Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4539326
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:55:52+00:00 2026-05-21T14:55:52+00:00

I have stereo cameras systems. In my program I catch the images from each

  • 0

I have stereo cameras systems.
In my program I catch the images from each camera in two threads. (one thread per camera).
After I receive the images from each camera, I want to process them with OpenCV. How I can say to my program, that the both camera threads got images and I can go to process them?

I have another question. Every received frame from the camera has a timestamp, which is specified by camera. How I can match the timestamp, so that I get images from two cameras, which were caught at the same time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T14:55:53+00:00Added an answer on May 21, 2026 at 2:55 pm

    Have you ever wrote an application using OpenCV to display the frames captured by the camera? Start from there. The application below does that and convert each frame to it’s grayscale version:

    CvCapture *capture = NULL;
    capture = cvCaptureFromCAM(-1); //-1 or 0 depending on your platform
    if (!capture)
    {
        printf("!!! ERROR: cvCaptureFromCAM\n");
        return -1;
    }
    
    cvNamedWindow("video", CV_WINDOW_AUTOSIZE);
    
    while (exit_key_press != 'q')
    {
        /* Capture a frame */
        color_frame = cvQueryFrame(capture);
        if (color_frame == NULL)
        {
            printf("!!! ERROR: cvQueryFrame\n");
            break;
        }
        else
        {
            // WOW! We got a frame! 
            // This is the time to process it since we are not buffering 
            // the frames to use them later. It's now or never.
    
            IplImage* gray_frame = cvCreateImage(cvSize(color_frame->width, color_frame->height), color_frame->depth, 1);  
            if (gray_frame == NULL)
            {
                printf("!!! ERROR: cvCreateImage\n");
                continue;
            }
    
            cvCvtColor(color_frame, gray_frame, CV_BGR2GRAY);
            cvShowImage("Grayscale video", gray_frame);
            cvReleaseImage(&gray_frame);
        }
            exit_key_press = cvWaitKey(1);
    }
    

    Keep in mind that the frames are being retrieved inside a loop, and if you quit the loop you’ll stop receiving data from the camera. It makes sense, right? This leaves you with 2 options:

    • Process the frame right way. But if this processing is slow, you’ll probably miss a few frames from the camera until the next cvQueryFrame() operation.

    • Store the frame using some buffer mechanism so you can do the processing on another thread. This is a good approach if your processing technique is demanding on the CPU and if you don’t want to loose any frames.

    About your second question, its not clear to me what you mean. Please elaborate further.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the stereo calibration parameters of two different cameras (different resolutions). I want
I have read that it's possible to create a depth image from a stereo
I have two vectors in a game. One vector is the player, one vector
I have calibrated stereo cameras and got the extrinsic matrix. I know the Translation
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
have not tested on windows. but in ubuntu when u disconnect from the network,
I've created two wave files using Audacity. Both have 44100hz sample rate, 32-bit float
I have to write the data below to a textfile after replacing two values
I have a file format (.STL, stereo lithography, the structure is standard and can
anyone using ffmpeg I have a fairly simple wmv exported by a user from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.