Ask Your Question

jonathan's profile - activity

2020-03-06 12:20:30 -0600 received badge  Nice Answer (source)
2020-03-06 11:21:20 -0600 edited answer 'channel_type': is not a member of 'cv::DataType<_Tp>'

This happens when you declare a cv::Mat_<> with an unsupported type. OpenCV only 'instantiates' the template for

2020-03-05 20:30:00 -0600 received badge  Teacher (source)
2020-03-05 18:53:22 -0600 received badge  Editor (source)
2020-03-05 18:53:22 -0600 edited answer 'channel_type': is not a member of 'cv::DataType<_Tp>'

This happens when you declare a cv::Mat_<> with an unsupported type. OpenCV only 'instantiates' the template for

2020-03-05 12:49:45 -0600 received badge  Necromancer (source)
2020-03-05 11:54:23 -0600 answered a question 'channel_type': is not a member of 'cv::DataType<_Tp>'

This happens when you declare a cv::Mat_<> with an unsupported type. OpenCV only 'instantiates' the template code

2020-02-11 13:40:56 -0600 commented question About contours of the blob,area of blob's hole and contours hierarchy

IS_TOPLEVEL(hierarchy) ( (((hierarchy[2]!=-1) && (hierarchy[3]==-1))?1:0) ) This is confusing, shouldn't it be

2019-10-10 18:48:45 -0600 answered a question Antialiased polygon fill doesn't respect area borders

This is because Point is Point2i, an int type, and your floats are rounded to ints implicitly in the constructor. In you

2019-10-10 18:32:03 -0600 commented answer Antialiased polygon fill doesn't respect area borders

4th parameter to fillPoly is not index, it's the number of contours. Passing 0 will draw nothing.

2018-07-24 17:07:53 -0600 received badge  Supporter (source)
2018-07-02 14:30:19 -0600 commented answer imwrite: TIFF header TIFFTAG_SAMPLEFORMAT not written

Aha. Thank you, that's the key right there: the TIFF spec specifies a default, so OpenCV is intelligently omitting Sampl

2018-07-02 14:02:00 -0600 marked best answer imwrite: TIFF header TIFFTAG_SAMPLEFORMAT not written

Writing an OpenCV Mat to a TIFF file using imwrite's default settings, I noticed that a standard TIFF tag, TIFFTAG_SAMPLEFORMAT, is not written.

Other header tags, TIFFTAG_IMAGEWIDTH, TIFFTAG_IMAGELENGTH, TIFFTAG_BITSPERSAMPLE, and TIFFTAG_SAMPLESPERPIXEL, are correctly set by OpenCV.

The OpenCV Mat I'm writing has type CV_8UC3, so it seems as though TIFFTAG_SAMPLEFORMAT should be set to SAMPLEFORMAT_UINT.

Why is this tag missing? Is there a simple method to have OpenCV generate this tag as well? I'd like to avoid rewriting this convenient one-liner with a lot of libtiff code, just to get a standard tag.

2018-07-02 14:02:00 -0600 received badge  Scholar (source)
2018-06-29 20:42:57 -0600 asked a question imwrite: TIFF header TIFFTAG_SAMPLEFORMAT not written

imwrite: TIFF header TIFFTAG_SAMPLEFORMAT not written Writing an OpenCV Mat to a TIFF file using imwrite's default setti

2018-05-30 12:48:29 -0600 received badge  Enthusiast
2018-01-24 13:07:53 -0600 commented question How to write the same image format, compression and dpi of the image I read in

For my own work training visual neural nets, managing DPI is essential--my training images come from different camera so