[Image processing] normalization and subtracting background noise

7 vues (au cours des 30 derniers jours)
cristalline1308
cristalline1308 le 12 Nov 2016
Hi!
I am trying to normalize two images. Image A is less brighter than Image B.(A:B=0.9:1).
I'd like to correct the intensities of two to be the same,
and then i'd like to control the max and min value of the intensity to subtract the background noise.
So far, I have written the script as below, and I'm having some troubles to do so.
I appreciate your help!
----------------------------------------------------
highthreshold=;
lowthreshold=;
ma1=max(max(imageA));
ma2=max(max(imageB));
me1=median(median(imageA));
me2=median(median(imageB));
ca1=(imageA>me1*lowthreshold).*(imageA<ma1*highthreshold);
ca2=(imageB>me2*lowthreshold).*(imageB<ma2*highthreshold);
Correct=mean(mean(imageA(ca1.*ca2==1)))/mean(mean(imageB(ca1.*ca2==1)));
image_Corr=imageB*Correct;
-------------------------------------
Thanks.

Réponses (2)

Changoleon
Changoleon le 13 Nov 2016
Hi. I assume you're images are grayscale. How about you try this:
upperlim = 200; % define the maximum intensity
lowerlim = 100; % define the minimum intensity
A1 = double(imread('')); %read first image
B2 = double(imread('')); %read second image
m = (255-0)/(upperlim-lowerlim); % define the slope of the transfer function
b = 0 - (m*lowerlim); % define the y-intercept of transfer function
B1 = (m*A1)+b; % new image B2 = (m*A2)+b; % new image
You can play with upper and lower limits to find the ideal version of your images.
Sina

Image Analyst
Image Analyst le 13 Nov 2016
Try imhistmatch() or mat2gray().

Catégories

En savoir plus sur Modify Image Colors dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by