Adding noise to hyperspectral image (.mat file)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have to apply various noises(Gaussian blurr, AWGN) to a hyperspectral image(available in .mat format)( Let's take indian pines HS image for instance) . I read that Gaussian blurr is applied on the grayscale image of an rgb image with varying sigma (variance) and for applying AWGN, we need to vary standard deviations. My first question is that how to apply these noises in case of HS images as its dimension is 100x100x200 ( it's not any rgb image of mxnx3 size). For Gaussian blurr, do I need to convert the Hyperspectral image to rgb format and then grayscale format and then apply the noise? or do I convert HS image directly to grayscale image and apply noise? I'm confused. Please tell me how to do that. And how to apply AWGN to it too.( and visualizing the images )
It would be very helpful if explained through codes.( Let's take indian pines HS image for instance)
Thanks a lot in advance.
1 Commento
Bjorn Gustavsson
il 8 Mar 2019
Modificato: Bjorn Gustavsson
il 8 Mar 2019
So what part of my advice did you not understand?
To repeat:
An image, HS or not, is just an array of pixels with photon counts for intensity. If you see it for what it is things become less muddled by conventions and notation, such as RGB-images being either doubles scaled between 0-1 or uint8 between 0 and 255, those are just scaling-discretizations of much larger photon-counts. So if you want to add a Gaussian noise to layer 45 of that image you just add normal-distributed random numbers with standard deviation of 10 % to each pixel:
Inoisy_layer = Iideal(:,:,45) + 0.1*Iideal(:,:,45).*randn(size(Iideal(:,:,45)));
Risposte (1)
Bjorn Gustavsson
il 8 Mar 2019
Gaussian blur is just a convolution of your image with a 2-D Gaussian PSF for normal images (for an RGB image it might be slightly different widths for red green and blue light if the optical system is not achromatic). For your case you might have to do either a 3-D convolution of your 200x200x100 image with one constant 2-D Gaussian, or wiht a 3-D Gaussian if you're asked to model bluring in the third dimension too - possibly with completely different width.
If you want to add normal-distributed noise then it is nothing more than adding a normal-distributed radnom number to each pixel, take a look at randn and modify the standard deviation of your noise to fit your needs, for approximating Poisson-distributed noise (Image photon counts typically well above 100) I typical do:
Inoisy = Iideal + Iideal.^.5.*randn(size(Iideal));
HTH
1 Commento
Devi Anu
il 13 Mar 2020
how to add mixed noise in hsi data.. can anyone help me..thank you in advance
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!