View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Margincrop

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.58 KB File ID: #39849 Version: 1.0

Margincrop

by

Jurgen (view profile)

 

Simple way of cropping images by specifying the amount of pixels to be cut away from the edges.

| Watch this File

File Information
Description

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?
- Fast
- 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]);
subplot(1,2,1);imshow(I);
subplot(1,2,2);imshow(J);

Feedback is welcome.

Required Products MATLAB
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us