I am new to OpenCV.
As I am trying to detect laser dot using this code. But there is no change in output.As I found that it's not detection laser. Kindly help me in fixing this issue. Here is my code
@Override
public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
Mat frameH;
Mat frameV;
Mat frameS;
//static int a=1;
List<Mat> mChannels= new ArrayList<>();
Mat originalFrame=new Mat();
Mat frame=new Mat();
inputFrame.rgba().copyTo(originalFrame);
inputFrame.rgba().copyTo(frame);
mRgba = inputFrame.rgba();
Imgproc.cvtColor(frame,frame, Imgproc.COLOR_RGB2HSV);
mChannels.clear();
Core.split(frame, mChannels); // Split channels: 0-H, 1-S, 2-V
frameH = mChannels.get(0);
frameS = mChannels.get(1);
frameV = mChannels.get(2);
// Apply a threshold to each component
Imgproc.threshold(frameH, frameH, 155, 160, Imgproc.THRESH_BINARY);
Imgproc.threshold(frameV, frameV, 250, 256, Imgproc.THRESH_BINARY);
// Perform an AND operation
Core.bitwise_and(frameH, frameV, frame);
frameH.release();
frameV.release();
frameS.release();
frame.release();
return originalFrame; // This function must return
}