Ask Your Question
1

Strange output from VideoStream

asked 2013-04-16 05:51:58 -0500

Bahar Sahin gravatar image

updated 2013-04-16 05:53:03 -0500

I'm trying to grab images from camera, display them and when display window is closed, I want everything that are displayed to be saved into videostream.

However, the output videostream is not what I desire. There are green and purple lines .Instead of my face, I see only my fore head and it is doubled -> Check this link

Here is my code:

from SimpleCV import Camera, Display, VideoStream

cam = Camera()
disp=Display()
vs = VideoStream("vid.avi", 25, True)

while disp.isNotDone():
    image=cam.getImage().scale(0.5)
    image.save(vs)
    image.save(disp)

My OS is Ubuntu 12.04; I didn't run my code on Windows but I watched the output video on Windows, no difference.

I couldn't figure out what causes this. Could it be related to the codecs?

Thanks in advance

edit retag flag offensive close merge delete

Comments

1

Are you sure you have proper codecs? What codecs are you using? FFMPEG or gstreamer library? What OpenCV version are you using? I just tried this code and it's working fine,

jayrambhia gravatar imagejayrambhia ( 2013-04-16 16:14:36 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-04-17 09:09:59 -0500

kscottz gravatar image

This absolutely looks like a codec issue. I can't make a suggestion off of the top of my head as what will work as I rarely use the VideoStream. I can confirm that your settings worked well on my machine. This may be a dumb question but have you installed ffmpeg?

edit flag offensive delete link more

Comments

Yes, I have. Apparently, my system causes this problem. I will reinstall ubuntu and all the packages. I hope it'll work. Thanks for your responses @jayrambhia and @kscottz

Bahar Sahin gravatar imageBahar Sahin ( 2013-04-17 15:47:09 -0500 )edit
0

answered 2013-08-03 00:40:37 -0500

NEWBIE gravatar image

I have the same problem. My output is show with lot of color line but I try run code in my friend laptop it's work!. (I and my friend run in window) I try install this http://www.free-codecs.com/download/KLiteCodec_Pack.htm but It's still not working.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-04-16 05:51:58 -0500

Seen: 557 times

Last updated: Aug 03 '13