Ask Your Question

mdresser's profile - activity

2020-04-02 22:49:34 -0500 commented answer CUDA : OpenCV requires enabled 'cudev' module from 'opencv_contrib'

It would be really good to update (at least) the Linux installation tutorial to reflect the need to set a path to opencv

2019-06-27 09:23:03 -0500 asked a question Is it possible to write 16 bit monochrome images to an avi video file?

Is it possible to write 16 bit monochrome images to an avi video file? I am getting 16bit monochrome data from a FLIR Gi

2019-04-01 10:43:57 -0500 commented answer Extract pixel value from Mat not working (for me)

Thank you very much for the quick response. I figured I was going to embarrass myself-- I was right! Sometimes it just

2019-04-01 10:43:27 -0500 marked best answer Extract pixel value from Mat not working (for me)

I am trying to return the value of a specific pixel in a Mat (defined as CV_16UC1, with 12bit monochome data)

This function is passed cursor coordinates as a point with integer .x and .y components. Everything seems to make sense except the returned value which makes no sense at all. I assume something has gone wrong with pointer arithmetic in the "TFrame.at<uint16_t>(TPoint.x(),TPoint.y())" statement but I can't see what I'm doing wrong?

void LT_viewer::temperatureAtCursor(const QPoint & TPoint) {
    double Tmin,Tmax;
    qDebug() << "TFrame.type: " << TFrame.type();
    qDebug() << "TFrame.depth: " << TFrame.depth();
    qDebug() << "TFrame.channels: " << TFrame.channels();
    qDebug() << "TFrame.step1: " << TFrame.step1();
    cv::Size Tsize = TFrame.size();
    qDebug() << "TFrame.size: " << Tsize.width << "x" << Tsize.height;
    cv::minMaxLoc(TFrame,&Tmin,&Tmax);
    qDebug() << "TFrame Min: " << Tmin << ", Max: " << Tmax;
    qDebug() << TFrame.at<uint16_t>(TPoint.x(),TPoint.y()) << " @ " << TPoint.x()<< "," << TPoint.y();
}

The output when I run it looks like this:

Debug:    2019-04-01 11:06:27.411: TFrame.type:  2 
Debug:    2019-04-01 11:06:27.411: TFrame.depth:  2 
Debug:    2019-04-01 11:06:27.411: TFrame.channels:  1 
Debug:    2019-04-01 11:06:27.411: TFrame.step1:  720 
Debug:    2019-04-01 11:06:27.411: TFrame.size:  720 x 540 
Debug:    2019-04-01 11:06:27.412: TFrame Min:  0 , Max:  4095 
Debug:    2019-04-01 11:06:27.412: 65535  @  658 , 251

The output values aren't all 65535 but they don't seem to have any connection with the actual image intensity.

I'd be really grateful for any suggestions of what I'm doing wrong!

Mark

2019-04-01 10:21:37 -0500 asked a question Extract pixel value from Mat not working (for me)

Extract pixel value from Mat not working (for me) I am trying to return the value of a specific pixel in a Mat (defined

2019-02-20 15:48:13 -0500 received badge  Enthusiast
2019-02-19 10:31:51 -0500 asked a question Can't get openCV 3.4.4 to compile properly on Ubuntu 18.04

Can't get openCV 3.4.4 to compile properly on Ubuntu 18.04 Using Cmake I attempted to compile openCV 3.4.4. If I set

2018-12-29 10:39:52 -0500 received badge  Supporter (source)
2018-12-29 10:39:35 -0500 marked best answer How do I convert a single channel monochrome image to 3 channel gray scale?

I want to use color to annotate a monochrome image.

As I understand it, first I need to convert the single channel monochrome image to a 3 channel gray scale image with BGR channels all set the same. Then I can overlay color annotations on the gray scale image.

It is the first part that has me stumped: It seems like .clone, .copyTo, cvtColor all force the output to the same number of channels as the input?

How do I create a 3 channel copy of a single channel image?

2018-12-29 10:39:35 -0500 received badge  Scholar (source)
2018-12-29 10:39:29 -0500 commented answer How do I convert a single channel monochrome image to 3 channel gray scale?

Thanks for the quick response. Using cvtColor did the trick. I was confused!

2018-12-28 12:20:31 -0500 asked a question How do I convert a single channel monochrome image to 3 channel gray scale?

How do I convert a single channel monochrome image to 3 channel gray scale? I want to use color to annotate a monochrome

2018-08-10 13:30:55 -0500 asked a question interactive calibration application fails assertion when compiled for debug

interactive calibration application fails assertion when compiled for debug Environment: openCV 3.4.2, Windows 10, VS201