Filter löschen
Filter löschen

how to suppress max value of b component

1 Ansicht (letzte 30 Tage)
Sarmad Paracha
Sarmad Paracha am 10 Nov. 2018
Kommentiert: Walter Roberson am 10 Nov. 2018
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.

Akzeptierte Antwort

TADA
TADA am 10 Nov. 2018
Bearbeitet: TADA am 10 Nov. 2018
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 Kommentare
Sarmad Paracha
Sarmad Paracha am 10 Nov. 2018
so how can i apply this now on the orignal image which should show image with suppressed b channel.
TADA
TADA am 10 Nov. 2018
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);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 10 Nov. 2018
  2 Kommentare
Sarmad Paracha
Sarmad Paracha am 10 Nov. 2018
so how can i apply this now on the orignal image which should show image with suppressed b channel.
Walter Roberson
Walter Roberson am 10 Nov. 2018
YourImage(:, :, YourImage(:,:,3) == 255) = 0;

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by