[Image processing] normalization and subtracting background noise

2 Ansichten (letzte 30 Tage)
cristalline1308
cristalline1308 am 12 Nov. 2016
Beantwortet: Image Analyst am 13 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.

Antworten (2)

Changoleon
Changoleon am 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 am 13 Nov. 2016
Try imhistmatch() or mat2gray().

Kategorien

Mehr zu Modify Image Colors finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by