MATLAB: How to crop an image using matrices

crop imageImage Processing Toolboxmatrixes

I need to crop a certain portion of an image. But the problem is that I want the croped image in the same dimension of the orginal image. I am asked to do this with the help of matrices. How can I do it

Best Answer

You can use imcrop(): https://www.mathworks.com/help/images/ref/imcrop.html and then apply imresize(): https://www.mathworks.com/help/images/ref/imresize.html to the cropped image.