ImagePro>Re: median filter and floating point images


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

ImagePro>Re: median filter and floating point images



Title: RE: ImagePro>median filter and floating point images

My un-educated guess is that somewhere in the process of filtering a floating point image, some of the filters used in IPP don't support the floating point format, forcing IPP to convert the data to 8-bit by default. The data is filtered and then it's converted back to floating point.

If that's the case, I suggest doing all the pre-filtering in 12 bit or 16 bit format and convert to float when you start doing the arithmetical stuff.

Jean-Paul Martin

-----Original Message-----
From: Aryeh M. Weiss [mailto:aryeh@optics.jct.ac.il]
Sent: Monday, July 07, 2003 5:48 AM
To: imagepro-users@lists.mediacy.com
Subject: ImagePro>median filter and floating point images


I have a strange observation concerning use of median and morphological
filters (two of my favorite tools) on floating point images.
Some background:

1. I acquire "16 bit" images with my Optronics Magnafire camera. Actually,
   they are 10 bit images, and they range in value from 0 to 1023 (so the
   bit bit image really looks dark, but that is not important).

2. I have to create ratios, so I convert these to floating point images,
   using "DIRECT" scaling, so that my floating point images should contain
   values between 0 and 1023, and this is indeed the case. I also set the
   dynamic range for the floating point images to 0-1023, so that I can
   see the images on screen.

3. I then do various things (like background estimation and subtraction,
   segmentation, and such). Along the way (pretty early on), I use a
   median filter on the images to remove point noise. Here is where things
   get strange.

If I run a line profile on the original image, I see the noisy profile, as
expected. If I run a line profile on the floating point image that was
derived from the 16-bit gray scale image, the profile is identical.
(Thank you Media Cy for defaulting the line position to the previously
selected line position). If I run the median filter on the original image,
and then update the line profile display, I see the expected reduction in
noise. However, if I run the median filter on the floating point image, I
now see that the intensity values appear to jump in increments of 4. It is
as if I suddenly lost the lower two bits of precision.

Low pass, high pass, Gaussian and other linear filters do not cause this
to happen. Morphological filter also cause this to type of thing to happen.
Changing the dynamic range on the floating point image changed the magnitude
of the jumps, but not be basic effect. If I use a larger dyn range, the jumps
are larger, and the jumps are smaller for a smaller dyn range (maybe even
it scales linearly).

Any help you can provide would be greatly appreciated, since I now have to
take a hard look at my algorithms in light of this.

Thanks in advance
--aryeh
Aryeh Weiss                          | email: aryeh@optics.jct.ac.il
Department of Electronics            | URL:   http://optics.jct.ac.il/~aryeh
Jerusalem College of Technology      | phone: 972-2-6751146
POB 16031                            | FAX:   972-2-6751275
Jerusalem, Israel                    | ham radio: 4X1PB/KA1PB



***********************************************************
This message was sent to you because you are subscribed to <imagepro-users@lists.mediacy.com>.
TO UNSUBSCRIBE, send an email to: <imagepro-users-off@lists.mediacy.com>
To switch to the DIGEST mode, email to <imagepro-users-digest@lists.mediacy.com>
To switch to the INDEX mode, email to <imagepro-users-index@lists.mediacy.com>
Send administrative queries to  <imagepro-users-request@lists.mediacy.com>
To SUBSCRIBE or UNSUBSCRIBE visit http://www.mediacy.com/tech/subscriber.htm
***********************************************************
This list is a forum for sharing applications, advice, and tips involving Media Cybernetics' products. It is not meant to be used as a vehicle for techncial support or for sales of third party products or services.

***********************************************************
Need an Image-Pro macro or driver? Find it at http://www.Solutions-Zone.com
Got an Image-Pro macro or driver? Add it to http://www.Solutions-Zone.com
***********************************************************




Search this Archive