PointGrey cameras / conversion to OpenCV

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

PointGrey cameras / conversion to OpenCV

doylecorp

PointGrey FlyCapture2 SDK, OpenCV 2.3, MS Visual Studio 2010 -- Two
Flea3, USB3.0 cameras -- I'm converting FlyCap2 images to OpenCV using
the following code for multiple cameras, but it's pretty fickle.

cv::Mat captureImage( int camera ){

      error = ppCameras[camera]->RetrieveBuffer( &f2Img ); // Retrieve
images

      if (error != FlyCapture2::PGRERROR_OK)

           PrintError();



      f2Img.Convert( FlyCapture2::PIXEL_FORMAT_BGR, &cf2Img );



      unsigned int rowBytes =
(double)cf2Img.GetReceivedDataSize()/(double)cf2Img.GetRows();

      return cv::Mat( cf2Img.GetRows(), cf2Img.GetCols(), CV_8UC3,
cf2Img.GetData(), rowBytes );

}

For two cameras, if I don't use the cv::pyrDown function after
retrieving an image, then I only get one camera's viewpoint.  If I use
the pyrDown function, then I get both camera viewpoints.  I've tested
this within the function and get two different viewpoints and checked
that I was getting different serial numbers when viewing the camera
information.





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PointGrey cameras / conversion to OpenCV

doylecorp


Found out that I've been having USB3.0 driver problems.

--- In [hidden email], "doylecorp" <doylecorp@...> wrote:

>
>
> PointGrey FlyCapture2 SDK, OpenCV 2.3, MS Visual Studio 2010 -- Two
> Flea3, USB3.0 cameras -- I'm converting FlyCap2 images to OpenCV using
> the following code for multiple cameras, but it's pretty fickle.
>
> cv::Mat captureImage( int camera ){
>
>       error = ppCameras[camera]->RetrieveBuffer( &f2Img ); // Retrieve
> images
>
>       if (error != FlyCapture2::PGRERROR_OK)
>
>            PrintError();
>
>
>
>       f2Img.Convert( FlyCapture2::PIXEL_FORMAT_BGR, &cf2Img );
>
>
>
>       unsigned int rowBytes =
> (double)cf2Img.GetReceivedDataSize()/(double)cf2Img.GetRows();
>
>       return cv::Mat( cf2Img.GetRows(), cf2Img.GetCols(), CV_8UC3,
> cf2Img.GetData(), rowBytes );
>
> }
>
> For two cameras, if I don't use the cv::pyrDown function after
> retrieving an image, then I only get one camera's viewpoint.  If I use
> the pyrDown function, then I get both camera viewpoints.  I've tested
> this within the function and get two different viewpoints and checked
> that I was getting different serial numbers when viewing the camera
> information.
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: PointGrey cameras / conversion to OpenCV

afiqamani
This post has NOT been accepted by the mailing list yet.
Hi,
I'm sorry, may I ask for the full code. Thanks in advance.
Loading...