Image illumination correction of arterial contour

2 次查看(过去 30 天)
I have a code which which I am a bit confused on how to optimize in order to make it work for an image http://tinypic.com/view.php?pic=2jdx6g&s=7 since I am not able to modify the function imopen to remove the background illumination in order to obtain clear picture of the coronary vessels. Any suggestion?

回答(1 个)

Image Analyst
Image Analyst 2013-2-26
That is not what imopen is supposed to do. If anything it would be imclose() which does a dilation (smear bright stuff over the dark vessels) followed by an erosion (to return enlarged bright things to their original size). But I'd look at the literature to see what people are doing successfully with angiograms rather than spend time implementing something that ends up being really primitive and ineffective. http://iris.usc.edu/Vision-Notes/bibliography/contentsmedical.html#Medical%20Applications,%20CAT,%20MRI,%20Ultrasound,%20Heart%20Models,%20Brain%20Models
  8 个评论
mona
mona 2013-2-27
编辑:Image Analyst 2013-2-27
Yes, I do agree with you on this context. Although I don't understand what you assumed related to "background correct" but here's a simple case scenario of what I intend.
I just need the vessel to be darkened enough so that it is the most prominent feature of the image and for that purpose, the patches in the background should be suppressed as much as possible. Therefore, in a very simple coding,
I =double(rgb2gray(my image));
se = strel('disk',500);
g2 = imclose(I,se);
g2=mat2gray(g2);
I2 = I - g2;
figure(), imshow(I2,[])
which ofcourse doesn't work but atleast portrays the idea.
Image Analyst
Image Analyst 2013-2-27
You didn't do what I said. Try this:
grayImage = imread(fullFileName);
% Get the dimensions of the image.
% numberOfColorBands should be = 1.
[rows columns numberOfColorBands] = size(grayImage);
if numberOfColorBands > 1
grayImage = rgb2gray(grayImage);
end
% Display the original gray scale image.
subplot(2, 2, 1);
imshow(grayImage, []);
title('Original Grayscale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
% Give a name to the title bar.
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
% Close the image
se = strel('disk', 21);
closedImage = imclose(grayImage, se);
subplot(2, 2, 2);
imshow(closedImage, []);
title('Closed Image', 'FontSize', fontSize);
% Subtract to get the vessels alone.
vesselImage = log(1+double(closedImage)) - log(1+double(grayImage));
subplot(2, 2, 3);
imshow(vesselImage, []);
title('Subtracted Image', 'FontSize', fontSize);
I think the output looks pretty good. If you don't want the vessels to be white (which is normal for "foreground" objects, especially if you want to use regionprops()), then you can just reverse the subtraction:
vesselImage = log(1+double(grayImage)) - log(1+double(closedImage));

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by