Hello,

I've noticed, that when medfilt2 is applied to an integer image using filter
of even size, it may produce incorrect result due to overflow:
---
  a = ordfilt2(A, nth, domain, padding);
  b = ordfilt2(A, nth + 1, domain, padding);
  retval = (a + b)./2;
---
The summation may cause problems.


I suggest to replace the last line by
---
  retval = a./2 + b./2;
---

-- 
With best regards, A.Sherikov.

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to