how to suppress max value of b component

5 次查看(过去 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.

采纳的回答

TADA
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 个评论
Sarmad Paracha
Sarmad Paracha 2018-11-10
so how can i apply this now on the orignal image which should show image with suppressed b channel.
TADA
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 个)

Walter Roberson
Walter Roberson 2018-11-10
  2 个评论
Sarmad Paracha
Sarmad Paracha 2018-11-10
so how can i apply this now on the orignal image which should show image with suppressed b channel.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

产品


版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by