Re: imcrop



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
.



Relevant Pages

  • Re: button groups
    ... but i dnt knw how to use selectedobject property in my ... "I buy more from my grocer than he buys from me, ... Does our perpetual grocer trade deficit ...
    (comp.soft-sys.matlab)
  • Re: imcrop
    ... It's 8 pixels in total but it must only be 4 pixels from ... "I buy more from my grocer than he buys from me, ... Does our perpetual grocer trade deficit ...
    (comp.soft-sys.matlab)
  • Re: Morphological
    ...   the same with you and your grocer. ... Does our perpetual grocer trade deficit ...
    (comp.soft-sys.matlab)
  • Re: Morphological
    ... "I buy more from my grocer than he buys from me, ... Does our perpetual grocer trade deficit ... i want to move the sky background ...
    (comp.soft-sys.matlab)
  • Re: question on multithreading
    ... and 2 threads(2 core in my computer) are different. ... "I buy more from my grocer than he buys from me, ... Does our perpetual grocer trade deficit ...
    (comp.soft-sys.matlab)