how to suppress max value of b component
1 回表示 (過去 30 日間)
古いコメントを表示
For fire detection algorithm for class A flames I need to apply rules on the red R, green G, and blue B component on each pixel of the frame acquired, but before that I need to suppress the maximum values (255) of the blue component image so that the flame will not be captured as a source of bright light.
0 件のコメント
採用された回答
TADA
2018 年 11 月 10 日
編集済み: TADA
2018 年 11 月 10 日
You can find those pixels you want to ignore first then analyze the rest
ignoreBrightnessFactor = 255;
mask = B < ignoreBrightnessFactor;
% do calculations on relevant pixels
doSomething(R(mask), G(mask), B(mask));
2 件のコメント
TADA
2018 年 11 月 10 日
If you want to simply change the blue value of those pixels you can do
%use the factor variable from above
B(B >= ignoreBrightnessFactor) = 0;
Or if you want to remove them altogether:
%use the mask vector from above
R1 = R(mask);
B1 = B(mask);
G1 = G(mask);
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!