Results 1 to 4 of 4

Thread: Using Imaging Source Cameras in OpenCV 2.0 (C/C++)

  1. #1
    Join Date
    Aug 2010
    Posts
    2

    Using Imaging Source Cameras in OpenCV 2.0 (C/C++)

    The issue I am having only manifests itself in OpenCV. The camera (DFK21AUC03) functions fine in IC Capture. In OpenCV (1.1, 2.0, and 2.1) the camera by default renders only black and white images (Y800). I am wondering, how can I resolve this in OpenCV?

  2. #2
    Join Date
    Aug 2010
    Posts
    2

    Re: Using Imaging Source Cameras in OpenCV 2.0 (C/C++)

    The DFK produces both Y800 and RGB images. By default I was acquiring the Y800. To convert this to RGB in OpenCV I did the below:

    imgFrame=cvQueryFrame(capture);
    cvSetImageCOI(imgFrame,1);

    bayer = cvCreateImage( cvGetSize(imgFrame), IPL_DEPTH_8U, 1);
    cvCopy(imgFrame,bayer,NULL);

    img=cvCreateImage(cvGetSize(imgFrame), IPL_DEPTH_8U, 3);
    cvCvtColor(bayer,img,CV_BayerGB2RGB);

  3. #3
    Join Date
    Jan 2003
    Location
    Bremen, Germany
    Posts
    4,862

    Re: Using Imaging Source Cameras in OpenCV 2.0 (C/C++)

    Hello

    I do not know how to set the video format using OpenCV, thus I am very sorry, but I can not help you.

    However, the solution you found is nice, but I wonder whether you can set white balance.
    Best regards
    Stefan
    IC Imaging Control Support

  4. #4
    Join Date
    Jul 2010
    Posts
    10

    Re: Using Imaging Source Cameras in OpenCV 2.0 (C/C++)

    Quote Originally Posted by kankatee View Post
    The DFK produces both Y800 and RGB images. By default I was acquiring the Y800. To convert this to RGB in OpenCV I did the below:

    imgFrame=cvQueryFrame(capture);
    cvSetImageCOI(imgFrame,1);

    bayer = cvCreateImage( cvGetSize(imgFrame), IPL_DEPTH_8U, 1);
    cvCopy(imgFrame,bayer,NULL);

    img=cvCreateImage(cvGetSize(imgFrame), IPL_DEPTH_8U, 3);
    cvCvtColor(bayer,img,CV_BayerGB2RGB);

    After using this, can it be convert again to another color space?
    YUV maybe?


    Quote Originally Posted by Stefan Geissler View Post
    Hello

    I do not know how to set the video format using OpenCV, thus I am very sorry, but I can not help you.

    However, the solution you found is nice, but I wonder whether you can set white balance.
    Few weeks ago, i've read something in this forums about combining IC SDK + OpenCV. Someone posted it, i'm not sure if it is you or not. But for now it is gone..

Similar Threads

  1. there is a problem when building the demoapp project
    By bathongkr in forum IC Imaging Control C++ Class Library
    Replies: 3
    Last Post: March 3, 2010, 16:12:37
  2. Imaging Control 3.0 with other cameras
    By padu in forum IC Imaging Control .NET
    Replies: 3
    Last Post: August 31, 2007, 14:52:18
  3. IC Imaging Control 3.0 and SharpDevelop 2.0
    By elha in forum IC Imaging Control .NET
    Replies: 7
    Last Post: June 1, 2007, 14:44:54
  4. Capture Source filters for Network Cameras
    By Unregistered in forum MontiVision Development Kit
    Replies: 1
    Last Post: June 16, 2005, 12:26:10
  5. ICControl crashes
    By RPaulsen in forum IC Imaging Control C++ Class Library
    Replies: 2
    Last Post: October 11, 2004, 14:52:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •