Some of the answers I found recommended using :
frame = ...
Rectangle ROI = ...
Mat crop = new Mat(frame, ROI)
But this does not seem to wokr in Emgu 3.x
Ahmed, you really do not have to create an Image<> just to create a Mat. Try the following:
Mat myNewMat = new Mat(input, crop_region);
Since you do not have a RotatedRect you do not have to translate the rotated rectangle into an upright rectangle. So you can just create a new Mat from your existing Mat and the rectangle.
This should work and can simplify your code some.
Doug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With