[Scilab-users] SCILAB Equivalent of addpath function

classic Classic list List threaded Threaded
19 messages Options
Samuel Enibe Samuel Enibe
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] SCILAB Equivalent of addpath function

In MATLAB,  the function addpath enables a user to add any desired path the MATLAB directories. 

Is there an equivalent ìn SCILAB? 


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Hello,

Le 29/05/2019 à 12:25, Samuel Enibe a écrit :
> In MATLAB,  the function addpath enables a user to add any desired
> path the MATLAB directories.
>
> Is there an equivalent ìn SCILAB?

I am not sure to understand the question.
Since the execution mechanism of a script is different in both
languages, Scilab does not need any list of paths to be scanned to find
the file of the script to be run.
As you know, in Scilab, to execute a script.sci, its relative or
absolute path must be provided. It's mandatory.

Regards
Samuel Gougeon

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel Enibe Samuel Enibe
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Thank you very much for your quick response.

In using SCILAB, I create a folder for a given class of problems. The user-defined functions for the problem class are stored in the  folder. I use the SCILAB function genlib to create a functions library for the user-defined functions in the folder..

On startup of SCILAB, I would have to run genlib again or lib to make those user-defined  functions available for use.

Is there a way of telling SCILAB to search a given folder or folders for user-defined functions? In this way, I would not have to run lib or genlib during each SCILAB session.

Thank you very much.

God bless you.

Samuel Ogbonna Enibe


On Wed, May 29, 2019 at 7:20 PM Samuel Gougeon <[hidden email]> wrote:
Hello,

Le 29/05/2019 à 12:25, Samuel Enibe a écrit :
> In MATLAB,  the function addpath enables a user to add any desired
> path the MATLAB directories.
>
> Is there an equivalent ìn SCILAB?

I am not sure to understand the question.
Since the execution mechanism of a script is different in both
languages, Scilab does not need any list of paths to be scanned to find
the file of the script to be run.
As you know, in Scilab, to execute a script.sci, its relative or
absolute path must be provided. It's mandatory.

Regards
Samuel Gougeon

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Le 30/05/2019 à 11:19, Samuel Enibe a écrit :
Thank you very much for your quick response.

In using SCILAB, I create a folder for a given class of problems. The user-defined functions for the problem class are stored in the  folder. I use the SCILAB function genlib to create a functions library for the user-defined functions in the folder..

On startup of SCILAB, I would have to run genlib again or lib to make those user-defined  functions available for use.

Is there a way of telling SCILAB to search a given folder or folders for user-defined functions? In this way, I would not have to run lib or genlib during each SCILAB session.

Why don't you load your custom libraries within your scilab.ini or .scilab startup file? load() can be used (more safely than lib()) to do so.

However, this way won't prevent them from being cleared by the first "clear" (all) statement in the console (but this is the same for ATOMS modules loaded during the session).

To answer your question: As far as i know, no, there is presently no native mechanism looking for libraries in a series of paths, to load on the fly, or looking for a series of function definitions.sci to execute on the fly.

But it can be tentatively implemented by using the %onprompt mechanism. "--> uman %onpromt @" will tell you more about it.

Best regards
Samuel Gougeon


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel Enibe Samuel Enibe
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Thank you very much, Samuel.

I am using version 5.5.2 on Ubuntu 18.04.

Could you please let me know how to locate the the scilab.ini and the startup files?

Thank you very much.

God bless you.

Samuel Ogbonna Enibe


On Thu, May 30, 2019 at 11:18 AM Samuel Gougeon <[hidden email]> wrote:
Le 30/05/2019 à 11:19, Samuel Enibe a écrit :
Thank you very much for your quick response.

In using SCILAB, I create a folder for a given class of problems. The user-defined functions for the problem class are stored in the  folder. I use the SCILAB function genlib to create a functions library for the user-defined functions in the folder..

On startup of SCILAB, I would have to run genlib again or lib to make those user-defined  functions available for use.

Is there a way of telling SCILAB to search a given folder or folders for user-defined functions? In this way, I would not have to run lib or genlib during each SCILAB session.

Why don't you load your custom libraries within your scilab.ini or .scilab startup file? load() can be used (more safely than lib()) to do so.

However, this way won't prevent them from being cleared by the first "clear" (all) statement in the console (but this is the same for ATOMS modules loaded during the session).

To answer your question: As far as i know, no, there is presently no native mechanism looking for libraries in a series of paths, to load on the fly, or looking for a series of function definitions.sci to execute on the fly.

But it can be tentatively implemented by using the %onprompt mechanism. "--> uman %onpromt @" will tell you more about it.

Best regards
Samuel Gougeon

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Le 30/05/2019 à 13:42, Samuel Enibe a écrit :
> Thank you very much, Samuel.
>
> I am using version 5.5.2 on Ubuntu 18.04.
>
> Could you please let me know how to locate the the scilab.ini and the
> startup files?

On Linux, you may create and fill the .scilab file in your SCIHOME
directory:
help startup => https://help.scilab.org/docs/current/en_US/startup.html

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel Enibe Samuel Enibe
Reply | Threaded
Open this post in threaded view
|

Re: SCILAB Equivalent of addpath function

Thank you very much for your kind assistance.

God bless you.

Samuel Ogbonna Enibe


On Thu, May 30, 2019 at 12:57 PM Samuel Gougeon <[hidden email]> wrote:
Le 30/05/2019 à 13:42, Samuel Enibe a écrit :
> Thank you very much, Samuel.
>
> I am using version 5.5.2 on Ubuntu 18.04.
>
> Could you please let me know how to locate the the scilab.ini and the
> startup files?

On Linux, you may create and fill the .scilab file in your SCIHOME
directory:
help startup => https://help.scilab.org/docs/current/en_US/startup.html

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
jean-philippe grivet jean-philippe grivet
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] How to count pixels

Hello everybody,

Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines
and arcs, within a region with irregular borders. The backround is
white, all lines are black. Now I would like to count the number of
black and white pixels. Any idea on how I could do that ?

Thank you for your help

JP Grivet



---
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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Carrico, Paul-2 Carrico, Paul-2
Reply | Threaded
Open this post in threaded view
|

Re: [EXTERNAL] How to count pixels

Hi

Maybe using SIP toolbox and "imread" to convert your image into a matrix?

Paul

-----Message d'origine-----
De : users [mailto:[hidden email]] De la part de Jean-Philippe Grivet
Envoyé : lundi 3 juin 2019 12:08
À : [hidden email]
Objet : [EXTERNAL] [Scilab-users] How to count pixels

Hello everybody,

Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines
and arcs, within a region with irregular borders. The backround is
white, all lines are black. Now I would like to count the number of
black and white pixels. Any idea on how I could do that ?

Thank you for your help

JP Grivet



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.avast.com_antivirus&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4&s=P96Vk81d-MbQNmiUYSYQz7XQrrkHJlFei0XhAvzFQA8&e= 

_______________________________________________
users mailing list
[hidden email]
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DwIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=2R_Eyw3woK4XVPnEug_8oZFQfCE8Ul6UYufxQizYx6k&m=fnhdow1R1g4ghBZVYqlZ-oWAMu6-rfvUuVAPggoe2K4&s=YltZFEFwlhpEXGIsF8--PjOTA3vikgSNudE5IKAlTh8&e= 
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: How to count pixels

In reply to this post by jean-philippe grivet
Le 03/06/2019 à 12:07, Jean-Philippe Grivet a écrit :
> Hello everybody,
>
> Using Scilab (6.02/Win7), I have drawn a picure made up of thick lines
> and arcs, within a region with irregular borders. The backround is
> white, all lines are black. Now I would like to count the number of
> black and white pixels. Any idea on how I could do that ?

Do you just need to compute the enclosed area ? Do you have a
discretization of the border (successive segments) ?

S.

>
> Thank you for your help
>
> JP Grivet
>
>
>
> ---
> 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
> [hidden email]
> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Christophe Dang Ngoc Chan Christophe Dang Ngoc Chan
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

In reply to this post by jean-philippe grivet
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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
jean-philippe grivet jean-philippe grivet
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

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
> [hidden email]
> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

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
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
jean-philippe grivet jean-philippe grivet
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

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
>>> [hidden email]
>>> 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
>> [hidden email]
>> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

Le 05/06/2019 à 11:20, Jean-Philippe Grivet a écrit :
> 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.
>
Ok. So it is completely size/scale dependent and has to be done on the
bitmap image. Besides exporting the figure then reloading with imread
(present e.g. in IPCV Atoms module) I don't see other solutions.

S.

> 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
>>>> [hidden email]
>>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus 
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [hidden email]
>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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
> [hidden email]
> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

....do you mean something like this?
See example attached

It needs: Scilab Computer Vision Module


But as mentioned before:

The number of pixels you will find depend on how big you define image size / line width, etc.

Best regards,
Philipp

Am Mi., 5. Juni 2019 um 11:25 Uhr schrieb Stéphane Mottelet <[hidden email]>:
Le 05/06/2019 à 11:20, Jean-Philippe Grivet a écrit :
> 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.
>
Ok. So it is completely size/scale dependent and has to be done on the
bitmap image. Besides exporting the figure then reloading with imread
(present e.g. in IPCV Atoms module) I don't see other solutions.

S.

> 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
>>>> [hidden email]
>>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.avast.com/antivirus
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [hidden email]
>>> https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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
> [hidden email]
> 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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

test_countPixels.sce (2K) Download Attachment
jean-philippe grivet jean-philippe grivet
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
der_Phil der_Phil
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

... 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 functions....hence 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 <[hidden email]>:
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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Tan Chin Luh-2 Tan Chin Luh-2
Reply | Threaded
Open this post in threaded view
|

Re: {EXT} How to count pixels

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 functions....hence 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 <[hidden email]>:
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
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users


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

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users