Ask Your Question

rtlumb's profile - activity

2016-06-29 11:51:32 -0600 commented question triangulatePoints() origin of 3D world coordinates

Found answer, but it won't let me answer my own question as a new user. Answer: http://www.answers.opencv.org/questio...

2016-06-29 10:07:50 -0600 commented question triangulatePoints() origin of 3D world coordinates

Also the previously asked questions on this topic that I searched for are left remarkably unresolved. Would be nice to answer this definitively and have a resource for others later on.

2016-06-29 10:06:28 -0600 asked a question triangulatePoints() origin of 3D world coordinates

Hello, I'm having problems locating the convention for the origin of the world coordinate system for a stereo camera pair in the opencv doc. I believe the origin is centered on the left most camera and along the left most camera's field of view as I believe this is typical convention. I'm currently having a strange, unexpected shift in the x-coordinate of my outputted world coordinates of an LED target. In the past this has been a calibration error, but if someone could provide the openCV standard for the origin point in a stereo vision system with a link to doc, that would be very useful.

Thanks.

2016-06-22 14:29:19 -0600 answered a question Trouble accessing the intensity value of a CV_U8 gray image in C++

The proper intensity value was able to be accessed with the .at() function once the proper object types were used. In this case, and unsigned char object was being assigned to a char object.

"The typical effect (for almost every C++ compiler you'll use) is that 0-128 is the same, but anything above that becomes negative." -Tetragramm

Once the conversion was from uchar directly to int, instead of uchar to char to int, the expected 0-255 range of intensities were observed.

unsigned char g = image.at<uchar>(center); int r = int(g); cout << "r: " << r << endl;

Special Thanks to Tetragramm for helping resolve the issue.

-Rowan

2016-06-21 14:18:36 -0600 commented question Trouble accessing the intensity value of a CV_U8 gray image in C++

I have tried that with code like:

char g = image.at<uchar>(center); int r = int(g); cout << "r: " << r << endl;

Unfortunately this gives me the same output as the printf line above, and does return an integer value, but nothing like I'd expect. The values I currently receive are single digits values while I expect something about 150 or above.

2016-06-20 14:34:05 -0600 commented question Trouble accessing the intensity value of a CV_U8 gray image in C++

I have tried switching the rows and cols to no avail. I think the problem is a bit deeper than that. Also, shortened the title a bit.

2016-06-20 14:33:10 -0600 received badge  Editor (source)
2016-06-20 14:22:29 -0600 asked a question Trouble accessing the intensity value of a CV_U8 gray image in C++

In a larger context, I'd like to perform a sweep on detected circle object in a image, but cannot get a reasonable intensity value or I guess access the pixel correctly. I expect a uchar pixel type with values from 0-255. When I run the code, I get outputs that either involve letters or numbers that are much too low to be correct.

I use cvtColor() to first change a RGB image to Gray. The RGB image is originally a CV_8UC3 type mat image. I am also using openCV 3.0.

Here's a small snippet of code where I try to display a pixel value in the terminal. Here, circles is a vector of vectors, and I'm using it to access the center point of the detected circle object. When I draw the detected circles on the image and display it, there seems to be no issue.

Point2f center(cvRound(circles[0][0]), cvRound(circles[0][1]));
int x = round(circles[0][0]);
int y = round(circles[0][1]);
printf("center: %x\n", image.at<uchar>(center));
printf("center: %x\n", image.at<uchar>(circles[0][0], circles[0][1]));
printf("center: %x\n", *image.ptr<uchar>(x, y));

Thanks! Rowan