<div dir="ltr"><div>Stéphane,</div><div><br></div><div>Thanks for the hint.</div><div><br></div><div>This is nice for dots being completely surrounded by the green area.</div><div><br></div><div>In general there might be cases, where the dots are part of the red and part of the green area.</div><div><br></div><div>The result would than be like this:</div><div><br></div><div><div><img src="cid:ii_kcnp06ib1" alt="grafik.png" width="527" height="399"></div><div><br></div><div>Appreciate your input.</div><div></div><div>Philipp<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 15. Juli 2020 um 18:21 Uhr schrieb Stéphane Mottelet <<a href="mailto:stephane.mottelet@utc.fr">stephane.mottelet@utc.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<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>Le 15/07/2020 à 17:58, P M a écrit :<br>
</div>
<blockquote type="cite">
<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:17353b533bc793ad5ad1" alt="grafik.png" style="margin-right: 0px;" width="1121" height="670"><br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
users mailing list
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a>
<a href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" target="_blank">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre 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 href="http://www.utc.fr/~mottelet" target="_blank">http://www.utc.fr/~mottelet</a>
</pre>
</div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div>