synchronizing two point grey USB cameras for Stereo using OpenCV?
Hi,
I have two Firefly MV USB cameras from PoinGrey which are working with the Camera1394 node, Im able to view the images and create an package containing c++ code which uses the cv_bridge node to integrate the stream from both cameras and perform a simple color inversion process on the frames of the images on OpenCV , thanks to this handy tutorial on the web at siddhantahuja.wordpress.com.
Now I would like to get up and running with synchronizing the two cameras (externally) and hopefully calculate the disparity. Currently I synchronize the cameras by enabling a strobe signal (output) and a trigger (input) on the two cameras by setting registers manually using Coriander . However this seems quite inefficient as I have to do it every time the cameras are turned on and is susceptible to errors on my behalf.
So the questions I ask are:
- What is the best way for me to get and set registers dynamically on the Firefly MV (IIDC 1.3 Compliant) camera? Should I use libdc1394 if so could someone please give me an example or a quick guide?
- Once the cameras are synchronized I will need to poll the cameras so that one camera waits for the completion of the other cameras frame capture process. Does ROS provide a solution for this? If not how can I program the cameras to do this?
Apologies if the question is very trivial, but im only just starting with OpenCV and ROS. I would greatly appreciate some help.
UPDATE: Ok, Since my software skills are not up to scratch yet I have not yet been able to set the camera regiasters through the 1394 library in order to poll the cameras to wait for a each other to complete their . However I am sure its possible but I just dont know how to.
Anyways to synchronise the cameras I made an external hardware trigger using a 555 timer circuuit which was able to synchronize my images to a 0.015s delay, by enabling a trigger at a specified frequency.
What was the max frame rate you got from your PGR camera ? Using the external 555 timer sync.