Search code examples
pythonwebcamimage-capturesimplecv

SimpleCV basic getImage debugging


I just successfully installed SimpleCV on my Windows 7 Dell XPS. I have a HP Deluxe Webcam KQ246AA plugged into it. I have navigated to the SimpleCV Shell. I am trying to run the tutorial to take and show a picture from the webcam. From the SimpleCV shell I execute the following lines:

cam = Camera()
img = cam.getImage()
img.show()

After the first command, the light on my webcam turns on. After the second command nothing happens. After the third command I get some text output: <SimpleCV.Display.Display instance at 0x038D2A58> and a window pops up that is all black, and then that new window does the classic windows "Not Responding" and asks me if I want to force close. When I close the Shell, the light on the webcam turns off.

I have also tried:

img.save('C:/path/to/file/name.jpg');

Which saved the picture to the right location, but the picture was just all black. I guess that the picture is not being captured correctly, but I don't know why that causes the img.show() command to crash.

I tried referencing the SimpleCV docs (http://doc.simplecv.org/), but the link appears to be non-existent. I think I would really benefit from SimpleCV. Does anyone have any suggestions how I would debug this problem? Or, where is the documentation? I would at least to verify that I can capture pictures correctly from the webcam. Then get started with some of the other functionality.

** EDIT **

I installed the SimpleCV package from the .deb downloaded from their website onto my Thinkpad X61s running Ubuntu 10.10. 5 minutes for installationn. I plugged in a very generic webcam (not even sure what brand it is) and repeated the 3 lines of code above. I DID see the picture take from my webcam come up. So everything worked on the linux, and was very simple.


Solution

  • I'm one of the SimpleCV developers. Sorry I didn't notice our doc.simplecv.org is not working. I will try to get it working right away, that is just a shortcut to http://www.simplecv.org/doc/.

    The camera may just not work on windows, or you may have to manually install the drivers. Linux is much nicer in dealing with it. You can also test your camera on linux by installing a program called cheese from the app store or:

    sudo apt-get install cheese
    

    I'm normally a windows guy. I haven't found a good windows webcam viewer that is free and open source to verify that your camera is working. We are working on 1.3 and trying to get system test to notify you if any problems occur. See if you can verify your camera is working on windows before trying it with SimpleCV.