Ask Your Question

yash101's profile - activity

2014-05-01 19:54:01 -0600 received badge  Editor (source)
2014-05-01 19:53:07 -0600 answered a question Camera is not opening and getting frames

As said before, try to use the newer C++ interface. With the new interface, grabbing the image from the camera is easier than anything you could think of. Here's some sample code:

#include <opencv2/highgui/highgui.hpp>
int main()
{
    CvCapture *cam1 = cv::cvCaptureFromCAM(0);
    while(true)
    {
        if(cam1)
        {
            cv::Mat img = cv::cvQueryFrame(cam1);
            //put your code here. img contains the picture from the camera.
        }
    }
}

I have never encountered any problem like this. The only time I have a camera failure is when my code is so cluttered that one small thing spoils everything. Try switching to Mat and garbage collection, coding and much more will be simpler!

Good luck! :)

2014-01-29 21:55:12 -0600 asked a question Tracking Vision/RetroReflective Tape

I am part of an FRC team, and I want to understand how to get the coordinates from retroreflective pieces/strips. We are using a green headlight, situated directly on the camera lens to get maximum saturation.

Today, I was able to successfully find the retroreflective tape using Canny. Now, I want to make it find the closed boxes, because the goals show as a closed box. I then want to do some thresholding to make sure it is at least a little green.

The problem is: I am stuck because I have no idea of what to use to highlight the polygons. After that, I don't know how to make sure it is green.

I'm sorry for this newbie-like post, but I am very stuck and rapidly running towards the deadline!

2014-01-29 21:46:48 -0600 answered a question OpenCV 2.4.7 on Linux 64 does not build Java so and jar

I typically configure the build with ccmake, cmake-curses-gui.

In your temporary release folder, just type ccmake .. You can then set up everything with an interface built for humans.

I like ccmake because i dislike when I have to pass a hundred parameters to a single command, via the terminal!