2011-10-22 66 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我展示瞭如何構建一個面具用於提取部分。之後,您可以根據需要操作區域內容。或者我不明白你的問題... –