14 Jan 2013
Simple way of cropping images by specifying the amount of pixels to be cut away from the edges.
Watch this File
Simple way of cropping images by specifying the amount of pixels to be cut away from the image edges.
Of course imcrop exists, but I'm not a fan of using the rectangle syntax.
So why this?
- Practical syntax (for me at least)
- Can handle higher dimensions
- Couldn't find anything similar on FEX with expected tags
Crops along the first 2 dimensions, e.g.:
I = imread('peppers.png'); %rgb image
J = margincrop(I,[10 20],[100 100]);
Feedback is welcome.
| Required Products
MATLAB 7.6 (R2008a)