correcting x-ray image

16 visualizaciones (últimos 30 días)
Christine Ak
Christine Ak el 12 de Oct. de 2013
Comentada: Wesam Mohamed el 9 de Jun. de 2020
hello... i have the following code to correct the contrast of x-ray image,, but at last it gives a black image not x-ray,, Can any body help ???
load('heel_effect.mat')
imread('Hand.png')
subplot 231
imshow('Hand.png')
title('Origin')
tissue=tissue_eq_slab_image ;
h=x_ray_HeelEffect_image;
subplot 232
imagesc(tissue); colormap gray
title('Tissue Slab')
subplot 233
imagesc(h); colormap gray
title('Heel effect')
[M,N]=size(tissue);
mid_line=tissue(M/2,:);
subplot 234
imshow(mid_line)
title('Mid Line')
[m,n]=size(mid_line);
for c=1:n
T(c)=mid_line(:,c);
end
subplot 235
plot(1:n,T)
title('Relation')
log_T=log (double(T+eps));
log_c=log(double((1:n)+eps));
% I=A*x^Gama
%Ln I=Ln A+ Gama Ln x
z=polyfit (log_c, log_T,1);
Gama=z(1,1); %slope= Gama
A=exp(z(1,2)); %constant=Ln A
[m1,n1]=size(h);
for i=1:n1
corrected(:,n1)=tissue(:,n1)/A*(n1.^Gama);
end
subplot 236
imagesc(corrected)
title('Corrected Image')
  11 comentarios
Image Analyst
Image Analyst el 12 de Oct. de 2013
zip up the mat file and click the paper clip icon when you make a comment!!
Wesam Mohamed
Wesam Mohamed el 9 de Jun. de 2020
Is this the full answer with run ?!

Iniciar sesión para comentar.

Respuestas (1)

Youssef  Khmou
Youssef Khmou el 12 de Oct. de 2013
You can use the histogram equalization , see this example :
I = imread('tire.tif');
J = histeq(I);
imshow(I)
figure, imshow(J)
see
doc histeq
  6 comentarios
Christine Ak
Christine Ak el 13 de Oct. de 2013
actually it doesn't work with X-rays...... My purpose is to enhance the contrast in the heel effect of the image the problem in the image is that the light distributed ((not)) equally at the sides
Christine Ak
Christine Ak el 13 de Oct. de 2013
Thankk You Guys 4 ur help... I found out the error it was in the second for loop...it must be
for i=1:n1
corrected(:,i)=h(:,i)/(A*(i.^Gama));
end

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by