1 | initial version |
This is the part where I would recommend you look at their CameraBridgeViewBase.CvCameraViewFrame
documentation.
From it, you can see that rgba()
and gray()
are member functions of the class CvCameraViewFrame
. All that they do is return either a coloured or grey frame respectively.
To achieve the same thing in Java, if you look at their documentation they do have a function called cvtColor
inside Imgproc
defined as
public static void cvtColor(Mat src,
Mat dst,
int code)
The first two parameters are self explanatory but for the third one, refer to their constant values list and anything with prefix COLOR_
can be passed as an argument. I'll leave it to you to figure out the one that corresponds to what you want.
Recommendation:
Always refer to the documentation if things do not make sense. Now I understand that Java's documentation isn't the greatest in contrast to C++ and Python's. This is were I'd refer you to this answer which should help you better understand the stuff.