Compare value of a 1x1 Mat to an int
I want to compare a 1x1 Mat to an int to see if it passes a threshold. I do not know how to do this on android.
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
rgbMat = inputFrame.rgba();
bgrPixel= rgbMat.submat(1,2,1,2).clone();
grayPixel = new Mat();
Imgproc.cvtColor(bgrPixel, grayPixel, Imgproc.COLOR_RGBA2GRAY, 1);
return rgbMat;
}
How would I take grayVal and sample it over and over again till it reaches the right int?
sorry, i do not understand. ?? what is 'the right int' ?
I want the loop run until grayVal get hits the right value