<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi, <br>
</p>
<p>sorry to interrupt, the following lines should work in IPCV to
count the white and black pixels:</p>
<p>1. after imread, the image return as boolean as the image is an
binary image.</p>
<p>2. assume that you have previous code and imread the image and
the scilab variable for the image is "img"<br>
<br>
--> sum(img==%t) // total white pixels<br>
ans =<br>
273370.<br>
--> sum(img==%f) // total black pixels<br>
ans =<br>
7230.<br>
</p>
<div class="moz-cite-prefix">hope this helps.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">rgds,<br>
Chin Luh<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 7/6/2019 7:03 PM, P M wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACf7ODthoQjVypEdNk3C_1guY-NA-_F44-xA3TEGcqXw2Et7Fg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div>... the code should work under win7 if you have the <b>scicv</b>-module
installed via atoms.</div>
<div>Note that you have to "activate" scicv to use its
functions....hence the: <br>
</div>
<div>
<pre style="font-family:Monospaced;font-style:normal"><span style="color:rgb(50,185,185)">scicv_Init</span><span style="color:rgb(74,85,219)">(</span><span style="color:rgb(74,85,219)">)</span><span style="color:rgb(0,0,0)">;</span></pre>
</div>
<div>at the beginning of the code.</div>
<div><br>
</div>
<div>I wrote the code at win10, but I doubt that this has an
influence.<br>
</div>
<div><br>
</div>
<div>Good luck,</div>
<div>Philipp<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Fr., 7. Juni 2019 um
12:16 Uhr schrieb Jean-Philippe Grivet <<a
href="mailto:jean-philippe.grivet@wanadoo.fr"
moz-do-not-send="true">jean-philippe.grivet@wanadoo.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">Hello
Philipp,<br>
<br>
Thank you for your program, it looks like it would do exactly
what I <br>
wanted. However (as I should have stressed before) I work
under win7. In <br>
this environment, the only image processing toolbox is IPCV in
which <br>
several functions are lacking, namely<br>
<br>
scicv_Init(); matplot(); Mat_cols_get(); Mat_rows_get()<br>
<br>
Further, in my case, img appears as a matrix of booleans (?).<br>
<br>
I will try to download SIVP and determine the role of these
functions.<br>
<br>
Thank you,again<br>
<br>
Jean-Philippe<br>
<br>
<br>
---<br>
L'absence de virus dans ce courrier électronique a été
vérifiée par le logiciel antivirus Avast.<br>
<a href="https://www.avast.com/antivirus" rel="noreferrer"
target="_blank" moz-do-not-send="true">https://www.avast.com/antivirus</a><br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank"
moz-do-not-send="true">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote>
</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="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Tan Chin Luh
Trity Technologies Sdn Bhd
Tel : +603 80637737
HP : +6013 3691728
</pre>
</body>
</html>