gocv icon indicating copy to clipboard operation
gocv copied to clipboard

how can i use gocv mat's method replace the java submat method?

Open busyfree opened this issue 2 years ago • 1 comments

Description

I'm using gocv to transfer java blindwatermark to go implement.


    //
    // java code
    //
    // C++: Mat Mat::operator()(Rect roi)
    //

    // javadoc: Mat::operator()(roi)
    public Mat submat(Rect roi) {
        return new Mat(n_submat(nativeObj, roi.x, roi.y, roi.width, roi.height));
    }

Your Environment

  • Operating System and version: mac os 12.1
  • OpenCV version used: 4.5.4
  • How did you install OpenCV? brew install opencv
  • GoCV version used: v0.29.0
  • Go version: go1.17.5
  • Did you run the env.sh or env.cmd script before trying to go run or go build? Yes

busyfree avatar Dec 29 '21 03:12 busyfree

maybe you can use Mat.Region?

zhifengzhuang avatar Aug 23 '22 14:08 zhifengzhuang