如何在非常低对比度的图像中识别环形区域?

时间:2016-05-27 16:57:50

标签: matlab image-processing

[应该遵循什么程序来识别具有白色背景的环形区域(粉红橙色)。此外,如何放大环形区域中的强度值以进一步处理它们。

1 个答案:

答案 0 :(得分:4)

就易于处理而言,最好的办法是将图像转换为备用色彩空间。就个人而言,我会转换to HSV and use the saturation channel

img = imread('http://i.stack.imgur.com/2wJpd.jpg');
hsv = rgb2hsv(img);

saturation = hsv(:,:,2);

figure;
imshow(saturation);

enter image description here

然后你可以做各种过滤/处理来提取图像中的环。下面显示了一种可能的方法,但有很多方法可以处理这些数据。

% Apply a median filter to remove random false positives
M = medfilt2(saturation < 0.4, [13 13]);

% Label each connected component
L = bwlabel(~M);

% Find the biggest connected component
L = L == mode(L(L > 0));

% Segment it and fill the center hole
filled = imfill(L, 'holes');

% Show the result
figure;
subplot(1,2,1)
imshow(L)
subplot(1,2,2)
imshow(filled)

enter image description here