How to split a binary mask in square 1000x1000 and keep only ROI?
5 views (last 30 days)
Image Analyst on 22 Oct 2019
Use indexing. For example
croppedImage = originalImage(row1:row2, column1:column2, :);
You need to figure out what row1, row2, column1, and column2 are. Should be easy.
Not sure of what your definition of ROI is. There are lots and lots of squares in the image that contain 80% of the number of pixels in the image.