Printable Version of Topic

Click here to view this topic in its original format

Unmanned Spaceflight.com _ Image Processing Techniques _ denoising images

Posted by: JohnVV Apr 5 2013, 06:37 AM

--- Note to everyone ---
--- feel free to add your own favorite tool to "denoise"


On the Titan thread there is some discussion on "denoiseing "
machi commented that this program did not do well on the SAR data
http://bigwww.epfl.ch/algorithms/denoise/

as a few of you know by now i like a program called "G'Mic" ( was called GREYCstoration )

it works on floating point data natively this is very handy with ISIS3
cubeatt it to a raw with a detached header , clean it , and import it back into isis all in float format

machi was using the jpg'ed version of BIUQI03N158_D167_T044S01_V02.IMG with "PureDenoise"
to use the example on there page and the pds image

first the "example on the PureDenoise web site

the noisy one
http://bigwww.epfl.ch/algorithms/denoise/images/Example-noisy1.png
there "clean one
http://bigwww.epfl.ch/algorithms/denoise/images/Example-den1.png

first the " Hot pixel " removal
this is a good example for "salt and pepper" noise
--- from the "gmic -h ( help option )

QUOTE
-remove_hotpixels:
_mask_size>0, _threshold[%]>0

Remove hot pixels in selected images.
Default values: 'mask_size=3' and 'threshold=10%'.



CODE
gmic Example-noisy1.png -type float  -remove_hotpixels 3,3.0% -type uchar -o Example-less.png


the "-remove_hotpixels" tool needs a image to be in float format , hence the "-type float" BEFORE calling the tool
and setting the type to "uchar" ( 0 to 255 ) for saving to a 8 bit png
http://imgbox.com/actJn5T2 http://imgbox.com/acyV8lyc
-- the gallery for the two above
http://imgbox.com/g/k6lYc1wU7l

the original is on the left and the hot pixel removed on the right

the image has a lot of dark area with very bright noise in it

---- the "denoise" option
-- from the "gmic -h " ( help option )
QUOTE
-denoise (+):
std_variation_s>=0,_std_variation_p>=0,_patch_size>=0,_lookup_size>=0,_smoothnes\
s,_fast_approx={ 0 | 1 }

Denoise selected images by non-local patch averaging.
Default values: 'std_variation_p=10', 'patch_size=5', 'lookup_size=6' and 'smoothness=1'.

contrasting this is the SAR t044 image
"BIUQI03N158_D167_T044S01_V02.IMG"

--- a crop to about the same area in the titan thread
this is in 32 bit float so Screen Shots --
http://imgbox.com/acx56Oid http://imgbox.com/abczdLEW

CODE
pds2isis from=BIUQI03N158_D167_T044S01_V02.IMG to =BIUQI03N158_D167_T044S01_V02.cub
crop from=BIUQI03N158_D167_T044S01_V02.cub to=crop.cub sample=700 nsamples=1500 line=10000 nlines=3000
rotate from=crop.cub to=crop1.cub degrees=90
isis2raw from=crop1.cub to=crop1.raw omin=0.0

this is a bit better for the "denoise" filter
light gray on dark gray with a lot of noise in every tone range
CODE
gmic -type float crop1.raw,3000,1500  -denoise 9,9,3,4,1 -o crop1.denoise.tiff

http://imgbox.com/abvR2eAa http://imgbox.com/acc0j9we


the original is on the left and the denoised on the right

for a stronger denoise increase the lookup_size
CODE
gmic -type float crop1.raw,3000,1500  -denoise 9,9,3,9,1 -o crop1.denoise1.tiff

http://imgbox.com/admM3zQJ

So 9 is a bit too much have a go with a look up size of 6

CODE
gmic -type float crop1.raw,3000,1500  -denoise 9,9,3,6,1 -o crop1.denoise1.tiff


http://imgbox.com/acuJziVB

for a bit more highs and lows drop the " std_variation_s and _std_variation_p"
CODE
gmic -type float crop1.raw,3000,1500  -denoise 3,3,3,6,1 -o crop1.denoise2.tiff

http://imgbox.com/ach8GRZW

Posted by: machi Apr 5 2013, 12:45 PM

QUOTE (JohnVV @ Apr 5 2013, 08:37 AM) *
On the Titan thread there is some discussion on "denoiseing "
machi commented that this program did not do well on the SAR data
http://bigwww.epfl.ch/algorithms/denoise/


http://www.unmannedspaceflight.com/index.php?showtopic=3168&view=findpost&p=195474.
I wrote this:
"I'm using different kind of non-local denoise filter - PureDenoise from Florian Luisier which isn't so good for SAR images as Deledalle's algorithm, but it's best from filters which are available."

Here is quick comparison between your last image and the puredenoise variant with an enhanced contrast:

 

Posted by: jhagen Sep 13 2014, 06:00 AM

The denoising interests me. I notice that if I do a channel by channel median operation with thresholds, a lot of latent detail is revealed that seems to be lost in the method described for the test image. Original image on left, filtered on right.



 

Posted by: mgrodzki Oct 7 2014, 11:42 PM

I am a graphic designer, so I am not doing this FOR SCIENCE! but more for the sake of making pretty pictures of celestial bodies. To me it is almost more a PR thing to get these images out there.

So I mess around in Photoshop often to get rid of noise and banding, etc. Recently did some of this with images from Rosetta and someone noted there might be some boulders lost in the noise and it’s things like this that make what I do not at all science-worthy. Something like this would have been noise reduction, dust & scratches and bringing hazes into channels blurring out banding as much as possible and adding the greys back into the image in layers until they look the same sans noise.

But here is an image of Comet Halley I did around 2009 and now when you look up that term in Google images it comes up as the 9th and 10th images. It is everywhere now. Even on the ESA site: http://sci.esa.int/rosetta/14290-comet-halley/. I can’t even find the original image anymore.

Anyway, I mention this one because it was largely a job to get rid of all the noise from the original. There was a ton of reconstruction on the haze and the tail. The far left end of the tail was even cropped in the original, so the left end of that image is totally fictional and a best-guess on my part.

So was this a good or bad thing I did? At the time I was just trying to make nice desktop wallpapers.

 

Posted by: alex_k Jan 5 2015, 12:45 PM

A test of Fourier-based denoising - on an image that seems http://www.unmannedspaceflight.com/index.php?s=&showtopic=572&view=findpost&p=216740.

The source image is a damaged part of http://mentallandscape.com/C_Luna09_1.jpg:



After two-pass processing and wavelet denoising by GIMP we get the follows:


For verification I used appropriate part of http://mentallandscape.com/C_Luna09_3.jpg. The lander a little moved and tilted between panoramas, so I stretched the source image for comparison (maybe not very exact). The light source position is also changed between panoramas.

Details of the surface seem to be recovered properly.

Posted by: Phil Stooke Jan 5 2015, 06:27 PM

Alex - a question for you to ponder. How would you tell the difference between a pixel which was a good representation of the real surface, and another pixel which was just a manipulated bit of noise? Presumably, in these very difficult images, both types of pixel exist, mixed together. But how can you tell which parts are real features?

One interesting test would be to try your method on an image which you know for sure does not contain any real lunar details (like a digital photo of a blank sheet of paper). Since the lunar images and Mars 3 images are all coming to us as scanned prints, it's not unreasonable to test it this way. So - photo a bit of paper, stretch the contrast enormously, and process it, and see what you get.

Phil Stooke


Posted by: machi Jan 6 2015, 03:05 AM

Alex, there is almost nothing real in that image. Signal to noise ratio is/was probably bad even in the original transfered image and you've worked with printed image.
If is something there, then easiest way to found that thing is binning in 32-bit depth (I quickly tried that and in fact few real features were destroyed by your procedure).
Good idea is to try denoising/detail enhancing process on some images of Uranian satellites by Voyager which have extremely low SNR but they still contain some
real information.
This is what Ted Stryk and Phil published about them - http://www.unmannedspaceflight.com/index.php?act=attach&type=post&id=13861.
You can then compare your results with theirs.
BTW you can found in the article that only the most significant details, mostly with connection to the clearly visible features, were treated as probably real.

Posted by: 4th rock from the sun Jan 6 2015, 11:41 AM

There are no magical processing algorithms.
Fancy stuff like fourier filters can be done manually by fine tuning highpass filters to the desired feature size.
That will enhance contrast on certain spatial frequencies, thus enhancing the visibility of certain structures.
It will also reduce pixel noise or small scale uncertain features.
So in images such that Luna 9 fragment, some large scale features may become apparent and the lens flare / overexposure effects reduced.

Yet all I see from the posted image is pixel noise and perhaps the paper fiber structure.
So you isolated and enhanced noise, and removed any details. If should be the opposite !
Just my honest opinion, trying to help, not to put anyone down wink.gif

Posted by: alex_k Jan 6 2015, 12:21 PM

Great thanks to Phil, Machi and 4th rock for the discussion. All answers are sent by personal mail.

Posted by: 4th rock from the sun Jan 6 2015, 06:55 PM

Replying here since it's not related to the processing itself. That new Luna 9 fragment is part of panorama 1.
It covers about 75% of the middle overexposed part, but less clipped that the version here: http://mentallandscape.com/C_Luna09_1.jpg
Yet the version on Don's site shows surface features better.

Here's a merge of both:


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)