octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8612] impyramid.m for image package


From: Hartmut
Subject: [Octave-patch-tracker] [patch #8612] impyramid.m for image package
Date: Sun, 11 Oct 2015 18:25:53 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #5, patch #8612 (project octave):

When I look at the Matlab documentation for impyramid (see
http://de.mathworks.com/help/images/ref/impyramid.html ) then I read
"Reduction and expansion take place only in the first two dimensions."

To me this says that it is alright to always do the reduction and filtering
process ONLY to the dimensions 1 and 2 of any given input. The other possible
dimensions should probably be kept intact during this procedure. But in Matlab
this function impyramid is NOT ment to reduce an ND image along the third or
fourth dimension at all!

For this reason I think that the proposed code in comment 4 would NOT be
correct. Because it would filter along ALL present dimensions of a given
input, which would be too much.

I would suggest to leave the code mostly like it is, in this respect:

case "reduce"  
  im1 = imfilter (im, filt, 'replicate');   
  im2 = imfilter (im1, filt', 'replicate');

The result of keeping this would be the following: As long as imfilter onyl
supports n*m and n*m*3 images (as it does today), this would work fine,
because impyramid does (better: should do) an input checking and only allows
those types of input images. And as soon as imfilter will support Nd images,
this would still work as intended: One can remove the input checking in
impyramid, and then it will filter an Nd image along the first, and afterwards
along the second dimension. And it would keep the other dimensions intact,
because this is what imfilter will probably do if you give it for example an
n*m*k*l image and in a*b filter.

Note: Currently impyramid only seems to work with n*m and n*m*3 images (as
does imfilter). We should note this corretly in the documentation. Both do NOT
work with n*m*k images in general.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8612>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]