フィルターのクリア

Color Blue is not getting detected

2 ビュー (過去 30 日間)
Emmanuel
Emmanuel 2014 年 6 月 13 日
コメント済み: Emmanuel 2014 年 7 月 1 日
Hi all! I am tracking R,G and B colors and the threshold value I have given to blue is 0.15 and its not getting detected and tracked. I use a dark blue marker. Can you please help me out with thids?

回答 (1 件)

Image Analyst
Image Analyst 2014 年 6 月 13 日
Try adjusting the thresholds or use a different color space. See my color segmentation demos in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. Post an image you're having trouble with along with your blue detection code in a simple script designed to work on that image.
  1 件のコメント
Emmanuel
Emmanuel 2014 年 7 月 1 日
Hi..Sorry for the late reply!
diffblue = imsubtract(data(:,:,3),rgb2gray(data));
diffblue2 = imsubtract(data2(:,:,3),rgb2gray(data2));
diffblue = im2bw(diffblue, 0.15);
diffblue2 = im2bw(diffblue2, 0.15);
diffblue = bwareaopen(diffblue , 300);
diffblue2 = bwareaopen(diffblue2 , 300);
bwblue = bwlabel(diffblue , 8);
bwblue2 = bwlabel(diffblue2 , 8);
statsblue = regionprops(bwblue, 'BoundingBox', 'Centroid');
statsblue2 = regionprops(bwblue2, 'BoundingBox', 'Centroid');
The bounded boxes are detected by right camera and dotted boxes by left camera.Here you can see that I have to use external light and make sure that this light doesn't fall on red, otherwise, red goes undetected and threshold for red is 0.18. Please help me as to how can I reduce the dependency of external light and what kind of threshold will be apt for blue?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by