Hello,

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).

S.


Le 15/07/2020 à 17:58, P M a écrit :
Dear Scilab community,

Thanks to Antoine's functions I am able to read tif-files as M x N x Channel - matrix.

Px values are:

red       =>  255, 0, 0
green =>  0, 255, 0
black =>  0, 0, 0
white =>  255, 255, 255

Now:   I want to only keep the green pixel values.
This can be done due to:  G = img(:,:,2);

However, this plane does also include the white pixels, since white has a pixel value of 255 in the green plane.
This is Ok, as long as the white pixels are surrounded by the green area.

However there are also white pixels in the red and black area.
These white pixels should be set to 0.

I started to work with differential images , but somehow I can not get around the problem.

Please find below an example of my output.

upper line:    RGB; R-plane; G-plane ; B-plane

As you can see, the G-plane contains white pixel (2 dots), which are within the red-area
The desired output would be to have the G-plane without the 2 dots.

Any Idea?

Best Regards,
Philipp



grafik.png

_______________________________________________
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--
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
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to