From my question, Can I determine the number of channels in cv::Mat Opencv
I am using the same code, to find the Laplacian of Gaussian of the image. The edges around the objects are well detected in the image.
How can I access the single element value of the final output image, abs_dst_gray
?
I know I have to use the '.at' operator and I also found its datatype to be CV_8U
. I tried the following
cout<<abs_dst_gray.at<uchar>(10,10)<<endl;
But using this method, I was not able to know what value it holds there. How can I find that value? If I use int
or long
, I end up with garbage values. I have always had this error and problem. Please help me here. I need those values so that I can try and determine the border values, given in the edges, which I can later use for segmentation purposes.