Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In this case Mat is an array of RGB values from your image. Scalar in this case is a list of 3 numbers.</p> <p>What absdiff(I1, I2, s1) is saying you take a pixel from your first image(I1) which has color/grayscale/rgba channels ect and subtract it from the pixel in image 2(I2), take the absolute value of the difference and then store it in your allocated Matrix/Array(s1) as the first element. If you had an rgb image you'd get the absolute difference |R1-R2|,|G1-G2|,|B1-B2| and store those 3 values, where 1 is from image one, and 2 is from image 2, doing so for all pixels.</p> <p>What sum(s1) is saying, in s1 which stores the differences in color from the two images, sum up all the red values, sum up all the blue values, and sum up all the green values, and return a list of 3 numbers representing the totals of each color.</p> <p>Just replace RGB with YMK or anything else you might be using.</p> <p>More information about the basic types including Matrix and Scalar can be found in the opencv documentation here: <a href="http://opencv.willowgarage.com/documentation/cpp/basic_structures.html" rel="nofollow">http://opencv.willowgarage.com/documentation/cpp/basic_structures.html</a> and some code can be found near this file and directory: <a href="https://github.com/Itseez/opencv/blob/master/modules/core/include/opencv2/core/types_c.h" rel="nofollow">https://github.com/Itseez/opencv/blob/master/modules/core/include/opencv2/core/types_c.h</a></p> <p>"The class Mat represents a 2D numerical array that can act as a matrix (and further it’s referred to as a matrix), image, optical flow map etc. It is very similar to CvMat type from earlier versions of OpenCV, and similarly to CvMat , the matrix can be multi-channel, but it also fully supports ROI mechanism, just like IplImage ."</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload