1 | initial version |
you can use one of the submat functions here , e.g.:
Mat orig = Imgcodec.imread("my.jpg");
Rect roi = new Rect(20,20,60,60);
Mat cropped = orig.submat(roi);
2 | No.2 Revision |
you can use one of the submat functions here , e.g.:
Mat orig = Imgcodec.imread("my.jpg");
Rect roi = new Rect(20,20,60,60);
Mat cropped = orig.submat(roi);
and please, bookmark the docs !
3 | No.3 Revision |
you can use one of the submat functions here , e.g.:
Mat orig = Imgcodec.imread("my.jpg");
Imgcodecs.imread("my.jpg");
Rect roi = new Rect(20,20,60,60);
Mat cropped crop = orig.submat(roi);
and please, bookmark the docs !
4 | No.4 Revision |
you can use one of the submat functions here , e.g.:
Mat orig = Imgcodecs.imread("my.jpg");
if (orig.empty()) { // did it work ? we HAVE to check !
// error handling
}
Rect roi = new Rect(20,20,60,60);
Mat crop = orig.submat(roi);
and please, bookmark the docs !