如何在Android Studio中使用OpenCV制作边界框

时间:2018-09-27 02:26:05

标签: opencv

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    mRgba = inputFrame.rgba();
    org.opencv.core.Size s = new Size(5,5);

    //Ukuran Kamera Full (1280 x 720)
    //Pembuatan ROI
    Imgproc.rectangle(mRgba, new Point(0,0),new Point(320,720) ,new Scalar(255,255,255),-1);
    Imgproc.rectangle(mRgba, new Point(960,0),new Point(1280,720) ,new Scalar(255,255,255),-1);

    //Main Program untuk Deteksi

    Imgproc.cvtColor(mRgba,imgGray,Imgproc.COLOR_RGB2GRAY);
    Imgproc.blur(imgGray,imgBlur, new Size(14,14));
    Imgproc.threshold(imgBlur,imgTreshold,25,255,Imgproc.THRESH_BINARY_INV);

任何人都知道如何根据二进制文件的大小从“ imgTreshold”基础制作边框吗?

0 个答案:

没有答案