[Image processing] normalization and subtracting background noise

조회 수: 13 (최근 30일)
cristalline1308
cristalline1308 2016년 11월 12일
답변: Image Analyst 2016년 11월 13일
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.

답변 (2개)

Changoleon
Changoleon 2016년 11월 13일
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 2016년 11월 13일
Try imhistmatch() or mat2gray().

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by