Ask Your Question
0

SimpleCV and raspberry pi question

asked 2013-03-20 07:05:34 -0500

Kannan gravatar image

updated 2013-03-20 07:08:03 -0500

Hi all,

Right now I am evaluating SimpleCV for a realworld image processing application. The algorithm has been finalized (detect line, blob and then do something else and direct the motor to reject stuff) and tested on a laptop with Sony ps3 eye web camera. So far so good, but it has to be an embedded application.

My idea is to install SimpleCV on PI and port the same python code to PI. I got the raspi image from cl.cam.ac.uk.projects.raspberrypi.tutorials.robot.downloads which includes SimpleCV and some more. The camera gets detected as video0 and shows up in /dev. But when I try to use camera all kinds of problems crop up, like SimpleCV can't find the driver and the pi hang up or display goes off completely.

question is

  1. Is PI upto the task of what I am doing?, now it looks a little shaky to be used in industrial environment.

  2. How to get the eye reliably working on pi ? I am already using 7 port belkin powered hub.

  3. Is showing up as video0 enough ? or do I need to install ffmpeg also ?

  4. how to get rid off VIDIOC_QUERYMENU: Invalid argument error and grab images from camera.

Appreciate any help to resolve these questions.

Kannan

PS: The link is garbled because of insufficient karma :(

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-03-20 08:17:28 -0500

decrot gravatar image

updated 2013-03-20 09:46:23 -0500

The Pi really isn't up to the task when using simplecv to do any sort of image processing. In my experience, it takes about 10 seconds to processing a simple grabbed image, which is way too slow in any industry environment.

As for the ps3 eye, you can check elinux.org and see that images corrupt.

as for testing purposes, to see if /dev/video0 is enough, did you do a 'hello world' cam code?

from SimpleCV import Camera, Display
import time

    cam = Camera()
    disp = Display()
    while disp.isNotDone():
        img = cam.getImage()
        img.save(disp)
        time.sleep(0.5)

I think you may need to look toward something like a beagleboard to use vision in a portable application.

Also scale down the image before processing, and lower the resolution of the camera. Compiling your python code to a pyc file can also boost performance.

edit flag offensive delete link more
0

answered 2013-03-20 08:53:30 -0500

kscottz gravatar image

So I've only really had a couple hours to work with the RaspberryPi and SimpleCV. As far as I can tell the hardware isn't up to snuff for processing images directly off the webcam in real time. For stand-alone image processing or processing images off a camera at less than a frame a second it should work. In my limited time working with the Pi I noticed that it bombed out on a number of calls that were using PyGame, and PyGame failed to render a bunch of times. I am going to take a look at this weekend and hopefully will have some more information.

edit flag offensive delete link more
0

answered 2013-03-20 10:13:07 -0500

Kannan gravatar image

Thanks for both of you, your answers confirmed my suspicions about pi. Even though my application demands less than 15 fps at 320x240, the pi may not fulfill my needs besides crashing in unpredictable ways.

As you have suggested, the next option is beagle or a full blown linux laptop.

Thanks Kannan

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

Stats

Asked: 2013-03-20 07:05:34 -0500

Seen: 3,103 times

Last updated: Mar 20 '13