I am trying to find the white color in real time video flow. after turning the video into ofxCvGrayscaleImage as following:
colorImg.setFromPixels(video.getPixelsRef());
grayImg = colorImg;
I suppose in ofxCvGrayscaleImage, each pixel’s brightness is represented by a single 8-bit number,is that right? Then how can I get those numbers for each pixel from 0 to 255?
Is there a way to get the pixel data as we do in grayscale ofImage?something similar to the following:
ofColor colorAtXY = myImage.getColor(x, y);
float brightnessOfColorAtXY = colorAtXY.getBrightness();
Thanks a lot!