public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
// get the camera frame as gray scale image
Mat gray = null;
if (DETECT_RED_OBJECTS_ONLY) {
gray = inputFrame.rgba();
} else {
gray = inputFrame.gray();
}
// the image to output on the screen in the end
// -> get the unchanged color image
Mat dst = inputFrame.rgba();
此处使用代码
org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;但我想做这样的事情。我想把这个Android代码转换为
opencv
java
public static Mat onCameraFrame(Mat inputFrame) {
Mat gray = null;
if (DETECT_RED_OBJECTS_ONLY) {
gray = inputFrame.rgba();
} else {
gray = inputFrame.gray();
}
// the image to output on the screen in the end
// -> get the unchanged color image
Mat dst = inputFrame.rgba();
现在没有这样的事情rgba()
& gray()
。请任何人帮我解决这个问题