1 | initial version |
if you have a Rect, e.g. from Imgproc.boundingBox() you can can use submat:
Mat roi = image.submat(rect);
operations, which don't change the depth or type of the image, can be done in-place:
Imgproc.equalizeHist(roi,roi);
else you need a new Mat for the output:
Mat hsv = new Mat();
Imgproc.cvtColor(roi, hsv, COLOR_BGR2HSV);
2 | No.2 Revision |
if you have a Rect, e.g. from Imgproc.boundingBox() you can can use submat:
Mat roi = image.submat(rect);
operations, which don't change the depth or type of the image, can be done in-place:
Imgproc.equalizeHist(roi,roi);
else you need a new Mat for the output:
Mat hsv gray = new Mat();
Imgproc.cvtColor(roi, hsv, COLOR_BGR2HSV);
gray, COLOR_BGR2GRAY);
3 | No.3 Revision |
if you have a Rect, e.g. from Imgproc.boundingBox() you can can use submat:
Mat roi = image.submat(rect);
operations, which don't change the depth or type of the image, can be done in-place:
Imgproc.equalizeHist(roi,roi);
else you need a new Mat for the output:
Mat gray = new Mat();
Imgproc.cvtColor(roi, gray, COLOR_BGR2GRAY);
4 | No.4 Revision |
if you have a Rect, e.g. from Imgproc.boundingBox() you can can use submat:
Mat roi = image.submat(rect);
operations, which don't change the depth or type of the image, can be done in-place:
Imgproc.equalizeHist(roi,roi);
else you need a new Mat for the output:
Mat gray = new Mat();
Imgproc.cvtColor(roi, gray, COLOR_BGR2GRAY);