2011-10-22 37 views
0

上午试图提取图像的红色部分中选择图像的特定区域作为显示的链接图像用于过滤

http://tinypic.com/r/2qntaip/7

我计算出这样

RGB = imread('Frame 0233.jpeg'); 
RGB =im2double(RGB); 
img = rgb2gray(RGB); 
n=[2 -1 -1;-1 2 -1;-1 -1 2];%detecting -45 degree lines in image 
pout_adapthisteq = adapthisteq(img); 
a3 = imfilter(pout_adapthisteq,n); 
figure(1),imshow(a3); 

在得到的结果的图像像这样http://tinypic.com/view.php?pic=ad1zn&s=7

任何人都可以帮我提取只在红色部分的线

+0

你可以尝试使用'edge'检测边缘,然后用105度的线性结构元素扩张。 –

+0

这是相同的图像在该[问题](http://stackoverflow.com/questions/7672048/detecting-edge-only-in-particular-portion-of-image) – Maurits

+0

检测边缘,然后使用与扩张105°线结构元素是不工作... – Patan

回答

1

这是我会怎么做Mathematica中:

enter image description here

+0

三江源非常贝利萨留.... – Patan

+0

但我的实际需求是在MATLAB中为图像的红色部分应用高通滤波器。因此,如何为lonie只有红色部分内做高通滤波...... – Patan

+0

@Varsha我展示了如何构建一个面具用于提取部分。之后,您可以根据需要操作区域内容。或者我不明白你的问题... –