Re: [Scilab-users] {EXT} How to count pixels

2019-06-09 Thread Tan Chin Luh

Hi,

sorry to interrupt, the following lines should work in IPCV to count the 
white and black pixels:


1. after imread, the image return as boolean as the image is an binary 
image.


2. assume that you have previous code and imread the image and the 
scilab variable for the image is "img"


--> sum(img==%t)   // total white pixels
 ans  =
   273370.
--> sum(img==%f) // total black pixels
 ans  =
   7230.

hope this helps.

rgds,
Chin Luh

On 7/6/2019 7:03 PM, P M wrote:
... the code should work under win7 if you have the *scicv*-module 
installed via atoms.

Note that you have to "activate" scicv to use its functionshence the:
scicv_Init();
at the beginning of the code.

I wrote the code at win10, but I doubt that this has an influence.

Good luck,
Philipp


Am Fr., 7. Juni 2019 um 12:16 Uhr schrieb Jean-Philippe Grivet 
>:


Hello Philipp,

Thank you for your program, it looks like it would do exactly what I
wanted. However (as I should have stressed before) I work under
win7. In
this environment, the only image processing toolbox is IPCV in which
several functions are lacking, namely

 scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get()

Further, in my case, img appears as a matrix of booleans (?).

I will try to download SIVP and determine the role of these functions.

Thank you,again

Jean-Philippe


---
L'absence de virus dans ce courrier électronique a été vérifiée
par le logiciel antivirus Avast.
https://www.avast.com/antivirus

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


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



--
Tan Chin Luh
Trity Technologies Sdn Bhd
Tel : +603 80637737
HP : +6013 3691728

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


Re: [Scilab-users] {EXT} How to count pixels

2019-06-07 Thread P M
... the code should work under win7 if you have the *scicv*-module
installed via atoms.
Note that you have to "activate" scicv to use its functionshence the:

scicv_Init();

at the beginning of the code.

I wrote the code at win10, but I doubt that this has an influence.

Good luck,
Philipp


Am Fr., 7. Juni 2019 um 12:16 Uhr schrieb Jean-Philippe Grivet <
jean-philippe.gri...@wanadoo.fr>:

> Hello Philipp,
>
> Thank you for your program, it looks like it would do exactly what I
> wanted. However (as I should have stressed before) I work under win7. In
> this environment, the only image processing toolbox is IPCV in which
> several functions are lacking, namely
>
>  scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get()
>
> Further, in my case, img appears as a matrix of booleans (?).
>
> I will try to download SIVP and determine the role of these functions.
>
> Thank you,again
>
> Jean-Philippe
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée par le
> logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] {EXT} How to count pixels

2019-06-07 Thread Jean-Philippe Grivet

Hello Philipp,

Thank you for your program, it looks like it would do exactly what I 
wanted. However (as I should have stressed before) I work under win7. In 
this environment, the only image processing toolbox is IPCV in which 
several functions are lacking, namely


    scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get()

Further, in my case, img appears as a matrix of booleans (?).

I will try to download SIVP and determine the role of these functions.

Thank you,again

Jean-Philippe


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus

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


Re: [Scilab-users] {EXT} How to count pixels

2019-06-05 Thread Jean-Philippe Grivet

Hello,

I am mainly interested in obtaining the ratio (number of white 
pixels)/(number of black pixels), so that units are not of primary interest.


Le 03/06/2019 à 15:21, Stéphane Mottelet a écrit :

Le 03/06/2019 à 14:56, Jean-Philippe Grivet a écrit :

My thanks to all respondants.

The figure is in internal Scilab firmat made up of polylines., the 
border is a polygon.
you did not say if you want to compute a surface in current units or 
really compute a surface in pixels



Le 03/06/2019 à 12:47, Dang Ngoc Chan, Christophe a écrit :

Hello,


De : Jean-Philippe Grivet
Envoyé : lundi 3 juin 2019 12:08

Using Scilab (6.02/Win7), I have drawn a picure made up of thick 
lines and

arcs, within a region with irregular borders.

What is the data structure of your picture?
A matrix of dots?
A Scilab figure containing polylines?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. 
If you are not the intended recipient (or have received this e-mail 
in error), please notify the sender immediately and destroy this 
e-mail. Any unauthorized copying, disclosure or distribution of the 
material in this e-mail is strictly forbidden.

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



---
L'absence de virus dans ce courrier électronique a été vérifiée par 
le logiciel antivirus Avast.
https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus 



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






---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus

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


Re: [Scilab-users] {EXT} How to count pixels

2019-06-03 Thread Stéphane Mottelet

Le 03/06/2019 à 14:56, Jean-Philippe Grivet a écrit :

My thanks to all respondants.

The figure is in internal Scilab firmat made up of polylines., the 
border is a polygon.
you did not say if you want to compute a surface in current units or 
really compute a surface in pixels



Le 03/06/2019 à 12:47, Dang Ngoc Chan, Christophe a écrit :

Hello,


De : Jean-Philippe Grivet
Envoyé : lundi 3 juin 2019 12:08

Using Scilab (6.02/Win7), I have drawn a picure made up of thick 
lines and

arcs, within a region with irregular borders.

What is the data structure of your picture?
A matrix of dots?
A Scilab figure containing polylines?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. 
If you are not the intended recipient (or have received this e-mail 
in error), please notify the sender immediately and destroy this 
e-mail. Any unauthorized copying, disclosure or distribution of the 
material in this e-mail is strictly forbidden.

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



---
L'absence de virus dans ce courrier électronique a été vérifiée par le 
logiciel antivirus Avast.
https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus 



___
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


Re: [Scilab-users] {EXT} How to count pixels

2019-06-03 Thread Jean-Philippe Grivet

My thanks to all respondants.

The figure is in internal Scilab firmat made up of polylines., the 
border is a polygon.



Le 03/06/2019 à 12:47, Dang Ngoc Chan, Christophe a écrit :

Hello,


De : Jean-Philippe Grivet
Envoyé : lundi 3 juin 2019 12:08

Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and
arcs, within a region with irregular borders.

What is the data structure of your picture?
A matrix of dots?
A Scilab figure containing polylines?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus

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


Re: [Scilab-users] {EXT} How to count pixels

2019-06-03 Thread Dang Ngoc Chan, Christophe
Hello,

> De : Jean-Philippe Grivet
> Envoyé : lundi 3 juin 2019 12:08
>
> Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines and
> arcs, within a region with irregular borders.

What is the data structure of your picture?
A matrix of dots?
A Scilab figure containing polylines?

--
Christophe Dang Ngoc Chan
Mechanical calculation engineer

General
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error), please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users