Re: imcrop
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Fri, 30 May 2008 22:54:04 +0000 (UTC)
In article <g1pvvi$edd$1@xxxxxxxxxxxxxxxxxx>,
Jack Branning <jbr.nospam@xxxxxxxxxx> wrote:
I need to crop 4 pixels from the left, and 4
from the right. It's 8 pixels in total but it must only be 4 pixels from either
side. How would I do that?
My previous code was close, but was cropping top and bottom rather
than left and right. Here is the revised code:
croppedimage = img(:,5:end-4,:);
This presumes that img is RGB. If img is only 2 dimensional, then
croppedimage = img(:,5:end-4);
--
"I buy more from my grocer than he buys from me, and I bet it's
the same with you and your grocer. That means we have a trade
deficit with our grocers. Does our perpetual grocer trade deficit
portend doom?" -- Walter Williams
.
- Follow-Ups:
- Re: imcrop
- From: Jack Branning
- Re: imcrop
- References:
- imcrop
- From: Jack Branning
- Re: imcrop
- From: Kenneth Eaton
- Re: imcrop
- From: Walter Roberson
- Re: imcrop
- From: Jack Branning
- imcrop
- Prev by Date: Re: implicit plot ??
- Next by Date: Re: imcrop
- Previous by thread: Re: imcrop
- Next by thread: Re: imcrop
- Index(es):
Relevant Pages
|