How can i add all 'R' values in the image?
I need to add all the R values in the image . How can i do this?
I need to add all the R values in the image . How can i do this?
there's a builtin sum function for that:
e.g. if you have a (bgr) image:
Mat img = imread("my.png");
Scalar s = sum(img);
//s[0] = sum of blue channel,
//s[1] = sum of green channel,
//s[2] = sum of red channel,
Asked: 2015-01-07 03:58:10 -0600
Seen: 824 times
Last updated: Jan 07 '15
Extracting a vector of pixel values across multiple frames
Reading pixel values from a frame of a video
How to operate on each pixel of a cv2.cv.Mat with a 3 x 3 matrix?
Accessing pixel value always return same value
extract a vector of pixels from a frame
android ndk level access to camera video stream/pixels