<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>Maybe this is not relevant, but if the green region is garanteed
      to be always simply connected, you just have to fill holes in your
      absdiff(G,B) image (imfill function in IPCV).<br>
    </p>
    <p>S.</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 15/07/2020 à 17:58, P M a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACf7ODsfaVX-LTBqo2Wfqt8KcN6M9rn_ZoeWdz+qTAPWbYEdGg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Dear Scilab community,</div>
        <div><br>
        </div>
        <div>Thanks to Antoine's functions I am able to read tif-files
          as M x N x Channel - matrix.</div>
        <div><br>
        </div>
        <div>Px values are:</div>
        <div><br>
        </div>
        <div>red       =>  255, 0, 0<br>
        </div>
        <div>green   
          =>  0, 255, 0
        </div>
        <div>black
             
          =>  0, 0, 0 </div>
        <div>white    
          =>  255, 255, 255 </div>
        <div><br>
        </div>
        <div>Now:   I want to only keep the green pixel values.</div>
        <div>This can be done due to:  G = img(:,:,2);</div>
        <div><br>
        </div>
        <div>However, this plane does also include the white pixels,
          since white has a pixel value of 255 in the green plane.</div>
        <div>This is Ok, as long as the white pixels are surrounded by
          the green area.</div>
        <div><br>
        </div>
        <div>However there are also white pixels in the red and black
          area.</div>
        <div>These white pixels should be set to 0.</div>
        <div><br>
        </div>
        <div>I started to work with differential images , but somehow I
          can not get around the problem.</div>
        <br>
        <div>Please find below an example of my output.</div>
        <div><br>
        </div>
        <div>upper line:    RGB; R-plane; G-plane ; B-plane</div>
        <div><br>
        </div>
        <div>As you can see, the G-plane contains white pixel (2 dots),
          which are within the red-area</div>
        <div>The desired output would be to have the G-plane without the
          2 dots.<br>
        </div>
        <div>
          <div><br>
          </div>
          <div>Any Idea?</div>
          <div><br>
          </div>
          <div>Best Regards,</div>
          <div>Philipp<br>
          </div>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>
          <div><img src="cid:part1.E0A107B5.D9B85C43@utc.fr"
              alt="grafik.png" style="margin-right: 0px;" class=""
              width="1121" height="670"><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
  </body>
</html>