Ask Your Question

Revision history [back]

One of source code in opencv is here.

Now in your question if you add an example with real value it would be easier to understand where the problem could be

One of source code in opencv is here.

Now in your question if you add an example with real value it would be easier to understand where the problem could be

p_src = src.ptr<uchar>(i); with a 3 channels it is weird src.ptr<vec3b>(i) is better

One of source code in opencv is here.

Now in your question if you add an example with real value it would be easier to understand where the problem could be

p_src = src.ptr<uchar>(i); with a 3 channels it is weird src.ptr<vec3b>(i) is betterbetter and saturate_cast is better than if ( ..>0.5