I was just wondering if anybody has got opencv working with the new camera module yet? (Particularly with Python?), any examples, any issues?
thanks.
-
- Posts: 49
- Joined: Thu May 09, 2013 3:40 pm
Re: OpenCV with new camera module?
just received my camera module... would love to know the answer to this one too. I'll give a try tonight, I already have openCV loaded that works (slowly!) with a USB webcam.
Re: OpenCV with new camera module?
Not yet, although people have been able to do stuff using files instead
V4L drivers in the pipeline...
Gordon
V4L drivers in the pipeline...
Gordon
Gordon Hollingworth PhD
Raspberry Pi - Chief Product Officer
Raspberry Pi - Chief Product Officer
-
- Posts: 14
- Joined: Fri May 17, 2013 1:43 pm
Re: OpenCV with new camera module?
Sorry for the stupid question - but does this mean that without those drivers there is no way to use the camera as an input for opencv's CaptureFromCAM and we just have to wait?
-
- Posts: 14
- Joined: Fri May 17, 2013 1:43 pm
Re: OpenCV with new camera module?
The way I'm currently handling it is:
Not sure if there is a more elegant or direct way to do it (except for using stdout to skip the temp file)
Code: Select all
call (["raspistill -t 50 -n -o temp.jpg -w 640 -h 480" ], shell=True )
img = cv.LoadImage("temp.jpg")
Re: OpenCV with new camera module?
looks like a reasonable way, in the absence of capturefromcam.Quasim0ndo wrote:The way I'm currently handling it is:
Not sure if there is a more elegant or direct way to do it (except for using stdout to skip the temp file)Code: Select all
call (["raspistill -t 50 -n -o temp.jpg -w 640 -h 480" ], shell=True ) img = cv.LoadImage("temp.jpg")
Code: Select all
from subprocess import call
import time
t = time.time()
call (["raspistill -t 5 -o a.jpg"], shell = True)
tt = time.time() - t
print tt
Re: OpenCV with new camera module?
i think you need timelapse for that as this point.
Re: OpenCV with new camera module?
The apps are really intended as demo code for people to them modify to their own purposes. You could run at a lower res than full and use timelapse mode to get something like your requirements, but you may need to put the effort in and write your own app.eckythump wrote:looks like a reasonable way, in the absence of capturefromcam.Quasim0ndo wrote:The way I'm currently handling it is:
Not sure if there is a more elegant or direct way to do it (except for using stdout to skip the temp file)Code: Select all
call (["raspistill -t 50 -n -o temp.jpg -w 640 -h 480" ], shell=True ) img = cv.LoadImage("temp.jpg")
this gives a time of just over 1 second (for 1 frame). The -n option doesn't seem to work with my system, looks like others are having this problem too judging by the forum. Presumably a lot of this time is 'warmup' to get light balance etc. It takes about 2 seconds if I take another picture within the same script, so it is going through the process again. Is there a way to minimise this 'warmup' time, or get it to just do it once at the start of the script? The applications I want to run eventually need at least 5 fps with processing in OpenCV too between frames.Code: Select all
from subprocess import call import time t = time.time() call (["raspistill -t 5 -o a.jpg"], shell = True) tt = time.time() - t print tt
-n should be fixed in the next release, or you can rebuild the code with the fix as provided elsewhere.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
-
- Posts: 14
- Joined: Fri May 17, 2013 1:43 pm
Re: OpenCV with new camera module?
I've replaced my raspistill with the binary offered in this thread and -n works fine for me now:eckythump wrote: this gives a time of just over 1 second (for 1 frame). The -n option doesn't seem to work with my system, looks like others are having this problem too judging by the forum.
http://www.raspberrypi.org/phpBB3/viewt ... 43&t=43990
Re: OpenCV with new camera module?
hi all
any news about the V4L driver?
regards
any news about the V4L driver?
regards
Re: OpenCV with new camera module?
In progress; it's a big job so I wouldn't be expecting solid anything for a few weeks.ucola wrote:hi all
any news about the V4L driver?
regards
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.
Working in the Applications Team.
-
- Posts: 17
- Joined: Wed Aug 01, 2012 5:23 pm
Re: OpenCV with new camera module?
Been a few months since the last post here, any update on the status of V4L?
Re: OpenCV with new camera module?
Actually we've been working away on a proper V4L2 kernel driver for the Raspberry Pi camera and it's getting very close now... Just had to make some changes because we've moved to the 3.10 kernel but keep an eye out for a release soon...
Gordon
Gordon
Gordon Hollingworth PhD
Raspberry Pi - Chief Product Officer
Raspberry Pi - Chief Product Officer
Re: OpenCV with new camera module?
sounds very interesting! I will keep my eye out for that.
Am I right in thinking that once the proper V4L driver is ready, the CSI camera will more or less just work in the same way as a webcam currently does on the pi, but will also be getting the maximum hardware speedup via the gpu etc?
Am I right in thinking that once the proper V4L driver is ready, the CSI camera will more or less just work in the same way as a webcam currently does on the pi, but will also be getting the maximum hardware speedup via the gpu etc?