Re: [Scilab-users] Changing properties of mark_mode polyline in param3d1

2022-05-01 Thread P M
Hello,

are you bound to param3d1 or can you use scatter3d instead?

scatter3d([1 2 3],[3 4 2],[5 2 4],36,['red1' 'green1'
'blue1'],'fill');a = gca();a.data_bounds = [0,0,0;7,7,7];

BR

Philipp


Am Fr., 29. Apr. 2022 um 12:57 Uhr schrieb Izabela Wójcik-Grząba <
i...@il.pw.edu.pl>:

> Hello,
>
> I have a simple example of param3d1 graph:
>
> param3d1([1 2 3],[3 4 2],[5 2 4]);
>
> h=gce();
>
> h.line_mode="off";
>
> h.mark_mode="on";
>
> h.mark_sytle=9;
>
> h.mark_size=1;
>
> h.mark_foreground=13;
>
> h.mark_background=13;
>
> I would like to ask if it's possible to change properties of marks
> individually? My main goal is to change colors using colormap according to
> the values assigned to each mark (point on the graph). As an illustration
> of my problem I give a vector of values and colors for the 3 points:
>
> [1 2 3]
>
> [red green blue]
>
> I know how to do it for line_mode="on", but for mark_mode the structure of
> figure is different.
>
> Thanks in advance for any help. Regards,
>
> Iza
> --
> Izabela Wójcik-Grząba
> Zespół Konstrukcji Metalowych
> ZKBiM IIB WIL Politechnika Warszawska
>
> ___
> 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] scicv toolbox

2022-03-07 Thread P M
Hi Stéphane

from the library description:

Scilab Computer Vision Module (scicv) is the Scilab interface to the
OpenCV library...

owner: Scilab Enterprises

So with "Scilab" I guess I refer to the Scilab core developer team (?) .

If that is to unclear, these are the mentioned mainainers.

Clement David

Administrator Atoms
Antoine Elias


As to IPCV:

I am of course aware of this great toolbox. But I do not recall if
Chin Lu Tan is still putting effort into further developing of the
toolbox.

Version 4.2.1 was releasaed 2019 and 2020 Chin Lu asked if the toolbox
shall still be maintained...

I do not remember a "final statement" of this.


BR

Philipp



Am Mo., 7. März 2022 um 09:31 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi Philipp,
>
> The active tolbox using OpenCV is IPCV, and the author is
> chinluh@bytecode-asia.com
>
> Le 07/03/2022 à 08:40, P M a écrit :
> > Dear developers,
> >
> > in the help page of the scicv toolbox, I find following statement:
> >
> > "The purpose of this toolbox is to provide an access to all the
> > functions and objects of OpenCV in Scilab."
> >
> >
> > Now, although I do very much like this statement in itself, I do not
> > think that all functions are already covered.
> >
> > So my question of interest:
> >
> > Is Scilab planning an update with more functions?
> >
> who is "Scilab" ?
>
> S.
>
> >
> > Best Regards,
> >
> > Philipp
> >
> >
> >
> >
> >
> > ___
> > users mailing list
> > users@lists.scilab.org
> > http://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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] scicv toolbox

2022-03-06 Thread P M
Dear developers,

in the help page of the scicv toolbox, I find following statement:

"The purpose of this toolbox is to provide an access to all the functions
and objects of OpenCV in Scilab."


Now, although I do very much like this statement in itself, I do not think
that all functions are already covered.

So my question of interest:

Is Scilab planning an update with more functions?


Best Regards,

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


Re: [Scilab-users] please help, I have just a mental blockade

2022-02-07 Thread P M
Hallo Claus,

would you like to explain, why you thought of images as input?

I worked a little in the field of finding lines/edges in noisy images and a
cumsum approach crossed my way some years ago.
So maybe here, there is something to learn for me?

Best Regards,
Philipp





Am Mo., 7. Feb. 2022 um 20:18 Uhr schrieb Claus Futtrup :

> Hi Heinz
>
> I notice that the E-vector is longer than the largest numberin the
> EE-vector. What decides the length of the E-vector?
>
> I was thinking length(EE) = 3 gives the highest number in the E-vector,
> and that e.g. max(EE) = 8 would be the length of the E-vector (but it's
> not ...), such that E = zeros(1:maxE) could be your initialization. This
> is why I ask, what decides the length of the E-vector?
>
> How large are the numbers going to be? ... are we talking
> graphics/pictures in the mega-pixel range as input?
>
> Best regards,
> Claus
>
> On 07-02-2022 18:35, Heinz Nabielek wrote:
> > Sorry, colleagues  -   please help, I have just a mental blockade.
> >
> > Given vector EE= [3 5 8]
> >
> > I want to create a stepwise increasing vector E= [0 0 1 1 2 2 2 3 3 3 3]
> >
> > And would need a system that works for much larger numbers
> >
> > Probably dead easy?
> > Heinz
> >
> > ___
> > 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] question to surf()

2022-01-04 Thread P M
Yes, that helped.
Thank  you,
Philipp

Am Di., 4. Jan. 2022 um 14:37 Uhr schrieb Samuel Gougeon :

> Le 04/01/2022 à 14:29, P M a écrit :
> > ...indeed..no problems with Scilab 6.1.1
>
>
> Likely because this example needs a bigger Java heap used for graphics.
> The default Java heap size has been increased from 256 to 512 MB in
> 6.1.1, for this kind of example.
> If you still work with Scilab < 6.1.1, you can increase the heap in your
> preferences => General
>
> Regards
> Samuel
>
> ___
> 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] question to surf()

2022-01-04 Thread P M
...indeed..no problems with Scilab 6.1.1
Thank you,
Philipp


Am Di., 4. Jan. 2022 um 12:22 Uhr schrieb Heinz Nabielek <
heinznabie...@me.com>:

> SurfPlot is no problem here.
> Scilab Version: 6.1.1.988271013
> macOS Catalina Version 10.15.7
> Heinz
>
>
>
>
> On 04.01.2022, at 09:29, P M  wrote:
>
> width = 900;
> height = 1500;
>
>
>
> x = linspace(1,width,width)
> y = linspace(1,height, height);
>
>
>
> for i = 1:width
>
>
> for j = 1:height
>
>
> z(i,j) = x(i)+y(j)
>
>
> end
> end
>
>
>
>  normalization if necessary
> //zMin = min(z);
> //z = z - zMin;
> //zMax = max(z);
> //z = z .* 255 ./ zMax;
>
>
>
> f = figure();
> f.background = 256;
> f.color_map  = hotcolormap(256);
> surf(x,y,z');
> e = gce();
> e.thickness = 0
> printf("Reached end of code\n");
>
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] question to surf()

2022-01-04 Thread P M
Dear,

is there a limitation for surf(), when displaying big matrices?

Background:

Imagine an image of size 900 x 1500.

Scilab crashes, when I try to display the image using surf().
- I know there is imshow, Matplot etc...
- for some cases it is nice to use surf() and take the pixel values as
Z-coordinate
- especially when the image contains 16 bit information and not 0-255 pixel
values

Now ... trying to display the image, Scilab closes unexpectedly.
Since I can not share the image itself, please see the code below.

Scilab does not close with this example, but the figure remains pure white.
When choosing smaller values for width/height the code works as
expected...e.g.: width = 900, height = 700

Scilab 6.1.0
Win 10

width = 900;height = 1500;
x = linspace(1,width,width)y = linspace(1,height, height);
for i = 1:width
for j = 1:height
z(i,j) = x(i)+y(j)
endend
 normalization if necessary//zMin = min(z);//z = z - zMin;//zMax =
max(z);//z = z .* 255 ./ zMax;
f = figure();f.background = 256;f.color_map  =
hotcolormap(256);surf(x,y,z');e = gce();e.thickness = 0

printf("Reached end of code\n");


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


Re: [Scilab-users] clarification in data type preciscion needed

2021-12-04 Thread P M
... Is it possible to delete this question?

I guess a int64_t variable should not be represented by a floating point
datatype...

Scilab 6 offers int64 datatype... Seems more correct.

BR
Philipp




Am Samstag, 4. Dezember 2021 schrieb P M :

> Dear programmers,
>
> I need/want to follow some C-library code with Scilab.
>
> The C-libarary defines a lot of variables by "int64_t".
>
> - So far I understand int64_t is a datatype of exactly 64bit length (8
> byte signed integer)
>
>
>
> What would be the correct equivalent data type in Scilab?
>
> - Normally I'd use doubles in Scilab, but is that correct?
>
>
>
> Thank you,
> Philipp
>
>
>
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] clarification in data type preciscion needed

2021-12-04 Thread P M
Dear programmers,

I need/want to follow some C-library code with Scilab.

The C-libarary defines a lot of variables by "int64_t".

- So far I understand int64_t is a datatype of exactly 64bit length (8
byte signed integer)



What would be the correct equivalent data type in Scilab?

- Normally I'd use doubles in Scilab, but is that correct?



Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] scilab and xlsx - files

2021-11-08 Thread P M
Hi Stéphane,

That works.
Thanks for the hint.

Best Regards,
Philipp

Am Fr., 5. Nov. 2021 um 14:15 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi Philip,
>
> The xlsreadwrite toolbox yields formatted dates in the string field. You
> should give it a try.
>
> S.
>
> > Le 5 nov. 2021 à 10:43, P M  a écrit :
> >
> > 
> > Dear,
> >
> > thanks to the xls-link toolbox I am able to read data directly from an
> xlsx-file.
> >
> > however, there is a strange data conversion going on:
> >
> > in the xlsx-file a column contains time data such as:
> >
> > 09:27:38// this is a GMT value
> >
> > result after reading the data into Scilab is like this
> > 0,394189814814815
> >
> > It is possible to get the hh:mm:ss back from this, like:
> >
> > 0.394189814814815 * 24 =  9.4605556 --> 9   = hours value
> > 0.4605556 * 60 = 27.63336  --> 27 = minutes value
> > 0.63336*60 = 38.0016 --> 38 = seconds value
> >
> > or:
> >
> > seconds = 0.394189814814815 * 24 * 60 * 60 ;
> > date = getdate( seconds )
> > - however
> >   --> the date would be wrong
> >--> which is obvious, because the initial value does not indicate
> a specific day
> >
> >   --> the time would have to be corrected for daylight saving time
> (summer time) if necessary
> >--> result is 10:27:38
> >
> > My question is:
> > Why is the extract from the xls file not intially in human readable
> format?
> > Is it, because EXCEL internally stores the time value in a decimal
> fashioned way and only displays in human readable format?
> >
> > Thank you,
> > Philpp
> >
> >
> >
> > ___
> > 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] scilab and xlsx - files

2021-11-05 Thread P M
Dear,

thanks to the xls-link toolbox I am able to read data directly from an
xlsx-file.

however, there is a strange data conversion going on:

in the xlsx-file a column contains time data such as:

09:27:38// this is a GMT value

result after reading the data into Scilab is like this
0,394189814814815

It is possible to get the hh:mm:ss back from this, like:

0.394189814814815 * 24 =  9.4605556 --> 9   = hours value
0.4605556 * 60 = 27.63336  --> 27 = minutes value
0.63336*60 = 38.0016 --> 38 = seconds value

or:

seconds = 0.394189814814815 * 24 * 60 * 60 ;
date = getdate( seconds )
- however
  --> the date would be wrong
   --> which is obvious, because the initial value does not indicate a
specific day

  --> the time would have to be corrected for daylight saving time (summer
time) if necessary
   --> result is 10:27:38

My question is:
Why is the extract from the xls file not intially in human readable format?
Is it, because EXCEL internally stores the time value in a decimal
fashioned way and only displays in human readable format?

Thank you,
Philpp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Scilab crashes on x_choose_modeless

2021-10-24 Thread P M
Hi,

What is the expected behaviour of x_choose_modeless ?

Executing the help example

[image: grafik.png]


I get the window below and Scilab does not react to anything.

Experienced under Scilab 6.1.0 (64-bit) on a Win10 PC.

[image: grafik.png]

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


[Scilab-users] Messagebox - button pre-selection

2021-10-22 Thread P M
Dear,

in a messagebox:

Is it possible to have a button other than the first one pre-selected?

e.g.: I'd like to have "No" pre-selected in the example below?

In my application the buttons must stay in their order as they are...so
simply changing the order (button label) is no option.

Thank you,
Philipp

[image: grafik.png]
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] reading binary files with some plain text

2021-10-01 Thread P M
Hi,

there is a binary file I would like to extract some info from.

If one opens the file witha text editor (such as notepad) it turns out,
that some human readable parts are inside of the binary file.


With Scilab I can get these data parts by:

fd  = mopen(files(i),'r');// with files(i) beeing a list
of absolute file paths
data = mfscanf(-1, fd, '%c'); mclose(fd);
txt = strcat(data);   // is the complete file in
one single line


Now I can do some regexp-search within the txt.

Question:

Since the file an become quite big and since the data of interest are
more to the end of the file,

the step:
data = mfscanf(-1, fd, '%c');

can take very long.

I tried

data =  mgetl (fd, -1);

which is much faster, but does not return the correct characters / string.


Any idea for exchanging the mfscanf-command?

Thank you,

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


Re: [Scilab-users] datatips in multiple axes plot

2021-09-30 Thread P M
David,

if you can express your data by a function, maybe something like this can
help?

BR
Philipp

// ##
//define functions for data generationfunction res=func1(x)
res = sin(x);endfunction
function res=func2(x)
res = x .* x;endfunction
function res=func3(x)
res = exp(x);endfunction

// define function for data tip callbackfunction
res=dataTipByX(fhandle, p1handle, p2handle, p3handle)

xTip = evstr(x_mdialog('select x value','x','10'));
y1Tip = func1(xTip);
y2Tip = func2(xTip);
y3Tip = func3(xTip);

a = fhandle.children();

sca(a(4))
datatipRemoveAll();
datatipCreate(p1handle,[xTip, y1Tip]);

sca(a(3))
datatipRemoveAll();
datatipCreate(p2handle,[xTip, y2Tip]);

sca(a(2))
datatipRemoveAll();
datatipCreate(p3handle,[xTip, y3Tip]);

res = 0;
endfunction
// create datax= linspace(-100,100,100);y1 = func1(x);y2 = func2(x);y3
= func3(x);
// create figure with plotsf = figure();
plot(x,y1);a1 = gca();e1 = gce();p1 = e1.children();
newaxes()plot(x,y2);a2 = gca();e2 = gce();p2 = e2.children();
newaxes()plot(x,y3);a3 = gca();e3 = gce();p3 = e3.children();
m1=uimenu(f,'label', 'DataTip', 'callback', "dataTipByX(f, p1, p2, p3)");
// do some figure editingf.background = 8;
a2.filled = 'off';a3.filled = 'off';
a2.y_location = "middle"a3.y_location = "right"
a3.log_flags = "nln"
p1.thickness = 1;p2.thickness = 1;p3.thickness = 1;
p2.foreground = 1;p3.foreground = 5;
// ##



Am Do., 30. Sept. 2021 um 13:15 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hello,
>
> Having digged in the code of the entity picker some time ago, I think that
> the problem  can be fixed at the Java level. Please create an issue on
> Bugzilla.
>
> S.
>
> Le 30 sept. 2021 à 13:10, CRETE Denis  a
> écrit :
>
> 
>
> Hello,
>
> I tried to use the example of “newaxes” in the help files, but I can’t
> create any datatip (because of frames ???)…
>
> With the example of “sca” in the help files, I can create datatips on all
> 3 curves (distributed on 2 different sets of axes). In this case, the
> subplots do not overlap.
>
> If the axes_bounds vectors are changed to [0,0,1,1] for both sets of axes,
> so that now they overlap, then I could not create datatips anymore.
>
>
>
> If you are looking for a workaround, then changing the order of the axes
> may be a solution. It should be possible to implement it by a new menu
> button created with uimenu (and as many submenus as the number of axes -1),
> each with a callback like “swap_handles(axes_1, axes_n)”.
>
> HTH
>
> Denis
>
>
>
> *De :* users  *De la part de* CHEZE David
> 227480
> *Envoyé :* jeudi 30 septembre 2021 09:57
> *À :* Users mailing list for Scilab 
> *Objet :* [Scilab-users] datatips in multiple axes plot
>
>
>
> Dear all,
>
>
>
> I found a limitation in the datatip manager of any figure window, as
> illustrated in the screen capture below, from the “multiple scaled plots”
> example : the datatip manager can catch only the last axe that was plotted,
> in the example only the red curve. This is a pity since it might be needed
> to ask datatip for other curves as well when analysing experimental data
> for instance.
>
> I tried to set first axe as the current axes, sca(gcf().children(3)), but
> I didn’t manage to get the datatips for the first black curve.
>
> Do you see any reason for this limitation? Enhancement suggestion ?
>
>
>
>
>
> David
>
>
>
> 
>
> ___
> 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] restriction for fileinfo (?)

2021-09-29 Thread P M
..typo: it is scilab 6.1.0 that I use in this case

Am Mi., 29. Sept. 2021 um 10:24 Uhr schrieb P M :

> Hallo Samuel,
>
> the whole thing is strange, since I also could create and read a path name
> on a win7 machine using Scilab 6.0.1.
> Here the path was in total 287 characters long, while the filename was 77
> characters long.
>
> However I still have issues:
> - Win10
> - Scilab 6.0.1
>
> // read the path name from a txt file
> fd = mopen("fileList.txt",'r');
> files = mgetl(fd,-1);
> mclose (fd);
>
> // nr of files
> nrOfFiles = size(files)(1);
>
>
> for i = 1:nrOfFiles
>[fileInfo, err]= fileinfo(files(i));
>dateLastMod(i,:) = getdate(fileInfo(i,6)(:,[1 2 6]);
> end
>
>
> I do not see any strange characters in the folder or file name structure.
>
> e.g.: specific german characters "ä", "ü", "ß" etc...except of maybe
> white-space-character
>
> folders can start with characters or numbers..e.g.:
>
> F:\CATIA-Parts\ExampleParts\BasicAircraft\000_fromMax\2029_13_98_-_06-This-is-model_name\04-SubmodelName\funktion\04_PartName\Part\PartVersion\04-the-actual-super-duper-long-file-name_SN0099-Part
> version.CATPart
>
> BR
>
>
>
>
>
>
>
>
>
>
>
>
>
> Am Di., 28. Sept. 2021 um 13:04 Uhr schrieb :
>
>> Philipp,
>>
>> No problem for me with Scilab 6.1.1 on Windows 10 for a file in a
>> directory whose name is 272-character long, when calling fileinfo() with
>> the huge name in the path.
>> So the issue may come from elsewhere. May be from a symbolic link (no
>> test done on my side)?
>>
>> Samuel
>>
>> - Mail d'origine -
>> De: P M 
>> À: International users mailing list for Scilab. 
>> Envoyé: Tue, 28 Sep 2021 11:13:30 +0200 (CEST)
>> Objet: [Scilab-users] restriction for fileinfo (?)
>>
>> Dear,
>>
>> is there a restriction in path length when using fileinfo() ?
>> I find files paths with a total length of > 256 characters.
>>
>> ../..
>> ___
>> 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] restriction for fileinfo (?)

2021-09-29 Thread P M
Hallo Samuel,

the whole thing is strange, since I also could create and read a path name
on a win7 machine using Scilab 6.0.1.
Here the path was in total 287 characters long, while the filename was 77
characters long.

However I still have issues:
- Win10
- Scilab 6.0.1

// read the path name from a txt file
fd = mopen("fileList.txt",'r');
files = mgetl(fd,-1);
mclose (fd);

// nr of files
nrOfFiles = size(files)(1);


for i = 1:nrOfFiles
   [fileInfo, err]= fileinfo(files(i));
   dateLastMod(i,:) = getdate(fileInfo(i,6)(:,[1 2 6]);
end


I do not see any strange characters in the folder or file name structure.

e.g.: specific german characters "ä", "ü", "ß" etc...except of maybe
white-space-character

folders can start with characters or numbers..e.g.:

F:\CATIA-Parts\ExampleParts\BasicAircraft\000_fromMax\2029_13_98_-_06-This-is-model_name\04-SubmodelName\funktion\04_PartName\Part\PartVersion\04-the-actual-super-duper-long-file-name_SN0099-Part
version.CATPart

BR













Am Di., 28. Sept. 2021 um 13:04 Uhr schrieb :

> Philipp,
>
> No problem for me with Scilab 6.1.1 on Windows 10 for a file in a
> directory whose name is 272-character long, when calling fileinfo() with
> the huge name in the path.
> So the issue may come from elsewhere. May be from a symbolic link (no test
> done on my side)?
>
> Samuel
>
> - Mail d'origine -
> De: P M 
> À: International users mailing list for Scilab. 
> Envoyé: Tue, 28 Sep 2021 11:13:30 +0200 (CEST)
> Objet: [Scilab-users] restriction for fileinfo (?)
>
> Dear,
>
> is there a restriction in path length when using fileinfo() ?
> I find files paths with a total length of > 256 characters.
>
> ../..
> ___
> 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


[Scilab-users] restriction for fileinfo (?)

2021-09-28 Thread P M
Dear,

is there a restriction in path length when using fileinfo() ?
I find files paths with a total length of > 256 characters.


e.g.:

total file name length  =   77 characters  // including the file
extension
total path length = 265 characters

[ret, err] = fileinfo( absolute_path_to_file);

ret = [ ]
err = -1



the absolute_path_to_file is correct and the file does exists...So I have
two assumptions:

- name of the file is to long ... limit at 32 or 64 characters ?

and/or

- fileinfo() can only handle 256 characters ... maybe 260, because of null
character at the string end ?


Best Regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] find all files of specific type on hard drive

2021-09-27 Thread P M
Hi Claus

this is exactly what I needed...10 kudos.

Best Regards,
Philipp



Am Mo., 27. Sept. 2021 um 21:01 Uhr schrieb Claus Futtrup <
cfutt...@gmail.com>:

> Hi Philipp
>
> To extend on the proposal by Denis, for Windows there is the DOS commands,
> like:
>
> DIR /S /B path\*.txt > result.lst
>
> It will traverse all subdirectories and with the pipe generate a text file
> with the result (replace 'path' with your real-name parent folder path).
> The result.lst contains a list of all files (one per line) with their
> complete file-path-names.
>
> Best regards,
> Claus
>
> On 27-09-2021 20:37, P M wrote:
>
> @ Denis:
> - I forgot to mention: The files are under windows.
>
> @ Claus:
> - [...] I create a list of all files in that directory and read all of
> them []
>
> Yes , this is what I see when using "listfiles"
> What I am searching for would be:
> - choose a directory
> - choose a file extension
>
> --> create a list of all files with that extension in :
> -> the directory
> -> in all sub-directories
>
> I do doubt that there is a ready-to-use-function for that, so my question
> is: How to do it the most elegant way?
>
> I do not have a full aproach for this, yet.
> However I feel, that the first thing to do is, to get absolut pathnames to
> all folders,
> Afterwards I would scan each folder for the specifi file type.
>
>
> Mh...still thinking.
> Philipp
>
>
>
>
>
>
> Am Mo., 27. Sept. 2021 um 17:52 Uhr schrieb Claus Futtrup <
> cfutt...@gmail.com>:
>
>> Hi Philipp
>>
>> This piece of code used to work (haven't checked with Scilab 6.1.1).
>> First I ask the user to select one file in the directory, then I create a
>> list of all files in that directory and read all of them:
>>
>> [units,typs,nams]=file(); // nams(1) = script file name incl. 
>> pathfpathname=strsplit(nams(1), [filesep()]);scriptpath = 
>> get_absolute_file_path(fpathname($));
>> printf("Please select a .txt measurement file\n");[filetoread pathtofile] = 
>> uigetfile("*.txt",scriptpath,"Choose measurement file");
>> // For a start, assume script file is in the same directory as the data,
>> // but don't be sure, read pathtofile and use it instead.readfile = 
>> pathtofile + "\" + filetoread;if length(filetoread)>4 then // one char + 
>> .txt expected, i.e. length>4
>> // If user doesn't select any file, the above check prevents a crash
>> chdir(pathtofile);
>> if verbose then printf(" MSG: File found, thanks!\n"); end
>>
>> ...
>>
>> // Analyze - find all files in the path, who's filename is an// integer, 
>> which means - we expect it to be an angle.filelist=listfiles(pathtofile + 
>> "\*.txt");
>>
>>
>> ...
>>
>> imax=max(size(filelist));
>>
>> ...
>>
>> printf("Loop %i times: ",imax);for i=1:imax do
>> printf("%i ",i) // Show progress
>> [path fname extension] = fileparts(filelist(i));
>> if isnum(fname) then// check if fname (a string) contains
>> d=evstr(fname);  // a number, and convert to number
>>
>>
>> I hope this is inspiring.
>>
>> Cheers,
>> Claus
>>
>> On 27-09-2021 16:50, P M wrote:
>>
>> Dear All,
>>
>> I need to find and list all files of a specific type on my hard
>> driveHow to do that in the most elegant way?
>>
>> E.g.:
>>
>> - find all *.txt files in "D:\"
>> - also find all '*.txt' files in each sub - directory, sub-sub-directory,
>> ..etc
>> - create a list that stores the absolute path names to the *.txt files.
>>
>> I am aware of
>> - dir
>> - findfiles
>> - listfiles
>> - ls
>>
>> But they only seem to list the files in a dedicated folder.
>>
>> Is there a function, that also searches all sub-folders automatically?
>>
>> Thank you,
>> Philipp
>>
>>
>>
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> ___
> 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] find all files of specific type on hard drive

2021-09-27 Thread P M
@  Denis:
My fault: unix_g seem to be promising.

f = unix_g('dir /A: *.txt /S')

looks promising.
thank you for the hint.
BR
Philipp



Am Mo., 27. Sept. 2021 um 20:37 Uhr schrieb P M :

> @ Denis:
> - I forgot to mention: The files are under windows.
>
> @ Claus:
> - [...] I create a list of all files in that directory and read all of
> them []
>
> Yes , this is what I see when using "listfiles"
> What I am searching for would be:
> - choose a directory
> - choose a file extension
>
> --> create a list of all files with that extension in :
> -> the directory
> -> in all sub-directories
>
> I do doubt that there is a ready-to-use-function for that, so my question
> is: How to do it the most elegant way?
>
> I do not have a full aproach for this, yet.
> However I feel, that the first thing to do is, to get absolut pathnames to
> all folders,
> Afterwards I would scan each folder for the specifi file type.
>
>
> Mh...still thinking.
> Philipp
>
>
>
>
>
>
> Am Mo., 27. Sept. 2021 um 17:52 Uhr schrieb Claus Futtrup <
> cfutt...@gmail.com>:
>
>> Hi Philipp
>>
>> This piece of code used to work (haven't checked with Scilab 6.1.1).
>> First I ask the user to select one file in the directory, then I create a
>> list of all files in that directory and read all of them:
>>
>> [units,typs,nams]=file(); // nams(1) = script file name incl. 
>> pathfpathname=strsplit(nams(1), [filesep()]);scriptpath = 
>> get_absolute_file_path(fpathname($));
>> printf("Please select a .txt measurement file\n");[filetoread pathtofile] = 
>> uigetfile("*.txt",scriptpath,"Choose measurement file");
>> // For a start, assume script file is in the same directory as the data,
>> // but don't be sure, read pathtofile and use it instead.readfile = 
>> pathtofile + "\" + filetoread;if length(filetoread)>4 then // one char + 
>> .txt expected, i.e. length>4
>> // If user doesn't select any file, the above check prevents a crash
>> chdir(pathtofile);
>> if verbose then printf(" MSG: File found, thanks!\n"); end
>>
>> ...
>>
>> // Analyze - find all files in the path, who's filename is an// integer, 
>> which means - we expect it to be an angle.filelist=listfiles(pathtofile + 
>> "\*.txt");
>>
>>
>> ...
>>
>> imax=max(size(filelist));
>>
>> ...
>>
>> printf("Loop %i times: ",imax);for i=1:imax do
>> printf("%i ",i) // Show progress
>> [path fname extension] = fileparts(filelist(i));
>> if isnum(fname) then// check if fname (a string) contains
>> d=evstr(fname);  // a number, and convert to number
>>
>>
>> I hope this is inspiring.
>>
>> Cheers,
>> Claus
>>
>> On 27-09-2021 16:50, P M wrote:
>>
>> Dear All,
>>
>> I need to find and list all files of a specific type on my hard
>> driveHow to do that in the most elegant way?
>>
>> E.g.:
>>
>> - find all *.txt files in "D:\"
>> - also find all '*.txt' files in each sub - directory, sub-sub-directory,
>> ..etc
>> - create a list that stores the absolute path names to the *.txt files.
>>
>> I am aware of
>> - dir
>> - findfiles
>> - listfiles
>> - ls
>>
>> But they only seem to list the files in a dedicated folder.
>>
>> Is there a function, that also searches all sub-folders automatically?
>>
>> Thank you,
>> Philipp
>>
>>
>>
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>>
>>
>> ___
>> 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] find all files of specific type on hard drive

2021-09-27 Thread P M
@ Denis:
- I forgot to mention: The files are under windows.

@ Claus:
- [...] I create a list of all files in that directory and read all of them
[]

Yes , this is what I see when using "listfiles"
What I am searching for would be:
- choose a directory
- choose a file extension

--> create a list of all files with that extension in :
-> the directory
-> in all sub-directories

I do doubt that there is a ready-to-use-function for that, so my question
is: How to do it the most elegant way?

I do not have a full aproach for this, yet.
However I feel, that the first thing to do is, to get absolut pathnames to
all folders,
Afterwards I would scan each folder for the specifi file type.


Mh...still thinking.
Philipp






Am Mo., 27. Sept. 2021 um 17:52 Uhr schrieb Claus Futtrup <
cfutt...@gmail.com>:

> Hi Philipp
>
> This piece of code used to work (haven't checked with Scilab 6.1.1). First
> I ask the user to select one file in the directory, then I create a list of
> all files in that directory and read all of them:
>
> [units,typs,nams]=file(); // nams(1) = script file name incl. 
> pathfpathname=strsplit(nams(1), [filesep()]);scriptpath = 
> get_absolute_file_path(fpathname($));
> printf("Please select a .txt measurement file\n");[filetoread pathtofile] = 
> uigetfile("*.txt",scriptpath,"Choose measurement file");
> // For a start, assume script file is in the same directory as the data,
> // but don't be sure, read pathtofile and use it instead.readfile = 
> pathtofile + "\" + filetoread;if length(filetoread)>4 then // one char + .txt 
> expected, i.e. length>4
> // If user doesn't select any file, the above check prevents a crash
> chdir(pathtofile);
> if verbose then printf(" MSG: File found, thanks!\n"); end
>
> ...
>
> // Analyze - find all files in the path, who's filename is an// integer, 
> which means - we expect it to be an angle.filelist=listfiles(pathtofile + 
> "\*.txt");
>
>
> ...
>
> imax=max(size(filelist));
>
> ...
>
> printf("Loop %i times: ",imax);for i=1:imax do
> printf("%i ",i) // Show progress
> [path fname extension] = fileparts(filelist(i));
> if isnum(fname) then// check if fname (a string) contains
> d=evstr(fname);  // a number, and convert to number
>
>
> I hope this is inspiring.
>
> Cheers,
> Claus
>
> On 27-09-2021 16:50, P M wrote:
>
> Dear All,
>
> I need to find and list all files of a specific type on my hard
> driveHow to do that in the most elegant way?
>
> E.g.:
>
> - find all *.txt files in "D:\"
> - also find all '*.txt' files in each sub - directory, sub-sub-directory,
> ..etc
> - create a list that stores the absolute path names to the *.txt files.
>
> I am aware of
> - dir
> - findfiles
> - listfiles
> - ls
>
> But they only seem to list the files in a dedicated folder.
>
> Is there a function, that also searches all sub-folders automatically?
>
> Thank you,
> Philipp
>
>
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> ___
> 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


[Scilab-users] find all files of specific type on hard drive

2021-09-27 Thread P M
Dear All,

I need to find and list all files of a specific type on my hard
driveHow to do that in the most elegant way?

E.g.:

- find all *.txt files in "D:\"
- also find all '*.txt' files in each sub - directory, sub-sub-directory,
..etc
- create a list that stores the absolute path names to the *.txt files.

I am aware of
- dir
- findfiles
- listfiles
- ls

But they only seem to list the files in a dedicated folder.

Is there a function, that also searches all sub-folders automatically?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Redrawing a maximized figure changes its original size and other problem

2021-09-03 Thread P M
Hi Federico,

Assuming that you ALWAYS want to have the figure at max screen size:

Question 1:

You can work with the screen width/height values to maximize the figure.

To get the screen values you can use:
- screenWidth =  getsystemmetrics('SM_CXSCREEN')
- screenHeight = getsystemmetrics('SM_CYSCREEN')

Your figureHeight may be some pixels less than the sceen Height, so that
the taskbar won't be covered.

With these values you can set the figure size using the figure properties.

Question 2:
Maximising a figure at my PC results in a full screen figure, with the
taskbar at the screen bottom beeing visible.

Having the correct figure size (see Question 1), you can set the figure
position by:
gcf().figure_position = .



Other approach:

Instead of clearing the complete figure, you maybe only need to clear the
graph (entitiy).
If you have multiple graphs in one figure, the approach is similar, but you
need to pick the correct entity.

Assumption:  Only one graph within a single figure.

x = linspace(1,100,100);y = sin(x);
f = figure(101);f.background = -2;plot(x,y);a = gca();e = gce();p =
e.children();

--> Now maximize the figure manually or have it already a max screen size


p.data = [];// clearing the data of the graph ... same as
a.children.children.data = []y = cos(x); // simulating
new data p.data = [x; y]';   // replotting the graph with new data


Note:  The approach does not change the axis min/max valuesso you maybe
need to tweak these parameters, depending on your data.


Good luck,
Philipp






Am Do., 2. Sept. 2021 um 02:24 Uhr schrieb Federico Miyara <
fmiy...@fceia.unr.edu.ar>:

>
> Dear All,
>
> I've noticed that when clearing the contents of a maximized figure using
> clf() and redrawing the figure from scratch, the maximized status changes
> status to normal with a size slightly larger than the available height of
> the screen. When maximizing it, it really shrinks to the available screen
> space. For instance
>
> figure(101);
> scf(101);
> clf(101);
> gcf().background = -2;
> plot(x, y)
>
> (I use this structure when I have several figures and need to refresh one
> of them).
>
> The presence of the first instruction is necessary for this to happen. The
> original (default) size is not recovered unless the figure is completely
> cleared.
>
> The second problem is that upon creation, any figure is located flush with
> the bottom of the screen, even if I have enabled that the task bar is
> always visible. This causes the bottom of the figure to be hidden behind
> the task bar. To make it vissible I need to manually move the figure
> upwards.
>
> The expected behavior would be that the window were completely visible
> from the beginning.
>
> I'm on Windows 7.
>
> Regards,
>
> Federico Miyara
>
>
>
>
> 
>  Libre
> de virus. www.avast.com
> 
> <#m_1245799826228827734_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> ___
> 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] Fwd: avoid auto-zoom when rotating a 3D graphic

2021-07-16 Thread P M
Hi Stèphane,

this is really looking good.

I wish that was possible, when doing an animation with Scilab for this:

   https://www.youtube.com/watch?v=6NVkBk7_4yM

The 3D-like animation starts at around 03:55.

Best Regards,
Philipp









Am Do., 15. Juli 2021 um 10:22 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi Philip,
>
> Here is a possible implementation for the next major release of Scilab
> (6.2)
>
> https://codereview.scilab.org/#/c/21801/
>
> Take a look at the video and tell me if it is OK for you. However, there
> are still some glitches which have to fo be fixed (e,g, problems when
> zooming in isoview mode) but we have some time to think about it.
>
> S.
> Le 07/07/2021 à 08:49, P M a écrit :
>
>
> Dear,
>
> is it possible to avoid the effect of auto-zoom / streching  when rotating
> a graph in 3D-view?...see result of attached code.
>
> My best guess is that one would have to set the a.margins according to
> the actual a.rotation_angles for each framebut is there a easier way?
>
> Thank you,
> Philipp
>
> R=23;N=1000;nmax=1.1*6*N/%pi;// Random points in cube 
> 2R*2R*2Rx=grand(nmax,1,'unf',-R,R);y=grand(nmax,1,'unf',-R,R);z=grand(nmax,1,'unf',-R,R);R2=R*R;//
>  Exclude points outside of sphere with radius RT=(x^2+y^2+z^2)>R2;M=[x y 
> z];M(T,:)=[];[r c]=size(M);M(((N+1):r), :)=[];x=M(:,1); y=M(:,2); z=M(:,3); f 
> = figure();f.background = 8;f.axes_size = [300,300]
> s = linspace(5, 1, N);scatter3d(x,y,z,msizes=1,s);a = gca();a.box = 
> "off";a.axes_visible = ["off","off","off"];a.x_label.visible = 
> "off"a.y_label.visible = "off"a.z_label.visible = "off"
> outgif = "Sphere03.gif";idGif = animaGIF(gcf(), outgif, 1,2);for i = 0:360;
> a.rotation_angles = [45, i];
> idGif = animaGIF(gcf(), idGif); // Adds the current figure to the GIF 
> streamend;animaGIF(idGif);// Closes the GIF stream
>
>
>
>
>
>
>
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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


[Scilab-users] Fwd: problem with subplot

2021-07-15 Thread P M
Hi Federico,

my best guess:   In your example only subplot(4,1,4) gets the x_label
Since this needs space, the diagram is smaller.

Workaround:create label for x-axis via xstring

Or:

Assign a x_label for each subplot, but hide it.
This will assign "space" for the label, but it won't be displayed...hence
all diagrams should look the same...

x = linspace(0,2*%pi,1000)y = sin(x)f = figure();f.background = 8;
for i = 1:4
subplot(4,1,i)
plot(x,y);
a = gca();
a.x_label.text = 't';
a.x_label.visible = 'off';enda.x_label.visible = 'on';

Best Regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Fwd: avoid auto-zoom when rotating a 3D graphic

2021-07-07 Thread P M
Hallo Stéphane,

I did play around with the settings for the following options...but
nothing removed the auto-zooming effect...so I gave up.

a = gca();a.isoview a.auto_margins a.auto_scale a.cube_scaling

Out of curiosity:Why was the feature removed?


Main question: How to reproduce the feature in Scilab 6 family?


Thank you,

Philipp



Am Mi., 7. Juli 2021 um 10:19 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Philipp, you should at least add
>
> gc(a().isoview = "on"
>
>
> Le 07/07/2021 à 08:49, P M a écrit :
>
>
> Dear,
>
> is it possible to avoid the effect of auto-zoom / streching  when rotating
> a graph in 3D-view?...see result of attached code.
>
> My best guess is that one would have to set the a.margins according to
> the actual a.rotation_angles for each framebut is there a easier way?
>
> Thank you,
> Philipp
>
> R=23;N=1000;nmax=1.1*6*N/%pi;// Random points in cube 
> 2R*2R*2Rx=grand(nmax,1,'unf',-R,R);y=grand(nmax,1,'unf',-R,R);z=grand(nmax,1,'unf',-R,R);R2=R*R;//
>  Exclude points outside of sphere with radius RT=(x^2+y^2+z^2)>R2;M=[x y 
> z];M(T,:)=[];[r c]=size(M);M(((N+1):r), :)=[];x=M(:,1); y=M(:,2); z=M(:,3); f 
> = figure();f.background = 8;f.axes_size = [300,300]
> s = linspace(5, 1, N);scatter3d(x,y,z,msizes=1,s);a = gca();a.box = 
> "off";a.axes_visible = ["off","off","off"];a.x_label.visible = 
> "off"a.y_label.visible = "off"a.z_label.visible = "off"
> outgif = "Sphere03.gif";idGif = animaGIF(gcf(), outgif, 1,2);for i = 0:360;
> a.rotation_angles = [45, i];
> idGif = animaGIF(gcf(), idGif); // Adds the current figure to the GIF 
> streamend;animaGIF(idGif);// Closes the GIF stream
>
>
>
>
>
>
>
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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


[Scilab-users] Fwd: avoid auto-zoom when rotating a 3D graphic

2021-07-06 Thread P M
Dear,

is it possible to avoid the effect of auto-zoom / streching  when rotating
a graph in 3D-view?...see result of attached code.

My best guess is that one would have to set the a.margins according to the
actual a.rotation_angles for each framebut is there a easier way?

Thank you,
Philipp

R=23;N=1000;nmax=1.1*6*N/%pi;// Random points in cube
2R*2R*2Rx=grand(nmax,1,'unf',-R,R);y=grand(nmax,1,'unf',-R,R);z=grand(nmax,1,'unf',-R,R);R2=R*R;//
Exclude points outside of sphere with radius RT=(x^2+y^2+z^2)>R2;M=[x
y z];M(T,:)=[];[r c]=size(M);M(((N+1):r), :)=[];x=M(:,1); y=M(:,2);
z=M(:,3); f = figure();f.background = 8;f.axes_size = [300,300]
s = linspace(5, 1, N);scatter3d(x,y,z,msizes=1,s);a = gca();a.box =
"off";a.axes_visible = ["off","off","off"];a.x_label.visible =
"off"a.y_label.visible = "off"a.z_label.visible = "off"
outgif = "Sphere03.gif";idGif = animaGIF(gcf(), outgif, 1,2);for i = 0:360;
a.rotation_angles = [45, i];
idGif = animaGIF(gcf(), idGif); // Adds the current figure to the
GIF streamend;animaGIF(idGif);// Closes the GIF stream
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How can I make a movie that shows how the sphere rotates around the z-axis?

2021-07-02 Thread P M
 the rotation can be realised by changing   "rotation_angles"  in a for
loop

.. creating the movie...maybe use scicv?

in a for loop
- set rotation angle
- display the graph
- save the actual graph as an image
- reload the image
- add image to frame


see code below:
Only draw back here:   the avi-file could not be played afterwards..and had
only 6kB in size.

I guess, this is because ffmpeg is missing on my PC, but I am pretty sure
that some scicv expert could solve this issue.

BR
Philipp

scicv_Init();
R=23;N=14500; 
r=grand(N,1,'unf',0,R);phi=grand(N,1,'unf',0,2*%pi);theta=grand(N,1,'unf',0,%pi);x=r.*cos(phi).*sin(theta);y=r.*sin(phi).*sin(theta);z=r.*cos(theta);
f = figure();f.background = 8;scatter3d(x,y,z,msizes=4);a = gca();
// create the avi filevideoWriter = new_VideoWriter("F:\testAvi.avi",
CV_FOURCC('M', 'P', '4', '2'), 25, [400, 400]);
for i = 0:360
a.rotation_angles = [60, i];

// save the graph as image
xs2png(f.figure_id, 'F:\testImg.bmp');

// read image
img = imread('F:\testImg.png', CV_LOAD_IMAGE_GRAYSCALE);

// add image as frame to avi
VideoWriter_write(videoWriter, img);
end
// free avi from memorydelete_VideoWriter(videoWriter);






Am Fr., 2. Juli 2021 um 00:22 Uhr schrieb Heinz Nabielek <
heinznabie...@me.com>:

> Colleagues:
>
> the code below generates 14,500 random points in a spherical volume.
> How can I make a movie that shows how the sphere rotates around the
> z-axis? And how do I store the animation? animaGIF does not exist on my
> Scilab 6.1 in my macOS 10.15.7
>
> Heinz
>
>
> R=23;
> N=14500;
> r=grand(N,1,'unf',0,R);
> phi=grand(N,1,'unf',0,2*%pi);
> theta=grand(N,1,'unf',0,%pi);
> x=r.*cos(phi).*sin(theta);
> y=r.*sin(phi).*sin(theta);
> z=r.*cos(theta);
> scatter3d(x,y,z,msizes=4);
> gca().rotation_angles = [60, 60];
>
>
> __
> Dr Heinz Nabielek
> Schüttelstrasse 77A/11
> A-1020 Wien, Österreich
> Tel +43 1 276 56 13
> cell +43 677 616 349 22
> heinznabie...@me.com
> ___
> 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] plot(x) - define color

2021-02-19 Thread P M
..because the question also mentions the line style:

in addition to:

colour=["red","blue","chocolate1",...]; // help color_list

you can also create

lineStyle = [ 1, 2, 3, 4, 2, 1 , ..]  // help polyline

and do:


for j=1:20
   h = plot(TestPH(j,:))
   h.foreground=color(colour(j));
   h.line_style = lineStyle(j)
end

BR
Philipp






Am Fr., 19. Feb. 2021 um 10:53 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi,
>
> Since 6.1 version, plot() yields the handles of created polyline
> entities, allowing to improve the piece of code which has been proposed,
> like this:
>
> colour=["red","blue","chocolate1",...]; // help color_list
> for j=1:20
>h = plot(TestPH(j,:))
>h.foreground=color(colour(j));
> end
>
> S.
>
> Le 19/02/2021 à 10:37, Jean-Yves Baudais a écrit :
> > Hi,
> >
> >
> >>
> colour=['.r-','.g-','.k-','.b-','.m-','.r:','.g:','.k:','.b:','.m:','.r--','.g--','.k--','.b--','.m--','.r-.','.g-.','.k-.','.b-.','.m-.'];
> >> for j=1:20
> >> plot(TestPH(j,:),colour(j));
> >> end
> >>
> >> but the plot is not very clear. I would like to add different color and
> to
> >> reduce line styles, that are difficult to recognize in the plot.
> >
> > I don't if there is a dedicated function, but
> >
> > colour=["red","blue","chocolate1",...]; // help color_list
> > for j=1:20
> >plot(TestPH(j,:))
> >gcf().children.children.children(1).foreground=color(colour(j));
> > end
> >
> > gives a solution.
> >
> > --Jean-Yves
> > ___
> > 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xpoly in x-y-z coordinates

2021-02-17 Thread P M
Hi Samuel,

please see my answers below in blue.

Thank you,
Philipp



Am Mi., 17. Feb. 2021 um 13:09 Uhr schrieb Samuel Gougeon :

> Hello Philipp,
>
> Le 08/02/2021 à 21:36, P M a écrit :
> > Dear Users,
> >
> > I have a 3D-plot.
> >
> > Onto that, I would like to add a xpoly-line with the following specs:
> >
> > xpoly ( [0 1], [0 0], [-0.4 -0.4], 'lines' 0)
> >
> > in other words: The polyline should be at the X-Y Plane, but shifted
> > to Z = -0.4
> >
> > I know that I can just plot the line, but that would destroy the
> > layout, which I would have to reconfigure.
>
>
> *What do you mean? That you don't want gca().data_bounds being updated?*
>
>
Consider a 3D-plot with following settings:
- view is rotated other than it's standard view.
- box is "off"
- axes are "off"
- labels are "off"

I found that adding afterwards a new line with plot3D8X,Y,Z) would
- rotate everything back into standard view
- switch box "on" again
- switch axes "on" again
- switch labels "on" again

So I would have to reconfigure the 3D-plot appearance .

Using xpoly, xarrow, xsegs allowes to just add a line, while the original
plot appearance does not change.
This is very comfortable.


> >
> > Similary to that I also would like xstring-Text in such a manner.
>
>
> *xstring(x, y, text) gce().data(3) = z_coordinate;*
>
> *works.*
>

--> Thank you, I was not aware of that.
Since xstring has only X-Y as input I didn't check for gce().data(3)



>
> >
> > Is something like this possible?xpoly3D() ?
>
>
> *Isn't param3d() right for that?*


--> Yes, you are right. but still a :  gca().data_boundsis necessary
afterwards.


>
> Samuel
>
> ___
> 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] Scilab & cdf-file format

2021-02-13 Thread P M
Dear,
thanks for the suggestions.
I did install scilab 5.5.2 & the scinetcdf-toolbox.

Turns out: The cdf-file at hand is of other format:

ncread(inFile, "GMT");
  !--error 999
ncread: nc_open() returned the error -51: NetCDF: Unknown file format.

BR
Philipp






Am Fr., 12. Feb. 2021 um 21:26 Uhr schrieb Samuel Gougeon :

> Le 12/02/2021 à 15:55, arctica1963 a écrit :
> > Hello
> >
> > There is a toolbox for 5.5.2 called scinetcdf which will work - this will
> > work with the standard netCDF format. However, it will not work in
> version
> > 6.x of Scilab. Perhaps a Scilab expert could look at how to get it
> compiled
> > for the latest Scilab?
> Previous thread about this topic:
>
> http://mailinglists.scilab.org/Scilab-users-Getting-netCDF-files-into-Scilab-6-0-1-tp4038278p4038374.html
> https://atoms.scilab.org/toolboxes/scinetcdf/1.2#comment3102
>
> Regards
> Samuel
>
> ___
> 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


[Scilab-users] scicv - CV_FOURCC

2021-02-10 Thread P M
Dear ,

from the scicv toolbox I use the new_VideoWriter - function:

videoWriter = new_VideoWriter(filename, fourcc, fps, frameSize)


Everything fine so far, except:

There are artefacts in the final video., which I guess are connected
to compression.

Here are some lines from my code:

videoWriter = new_VideoWriter(outPath, CV_FOURCC('M', 'P', '4', '2'),
frameRate, size(img));
if ~VideoWriter_isOpened(videoWriter) then
disp("Cannot create video file: " + outPath);end
for i = 1:nrOfFiles
img = imread(inPath(i));
VideoWriter_write(videoWriter, img);
disp(i)end
delete_VideoWriter(videoWriter);

*Question 1:* What other formats are possible for "CV_FOURCC"?
I just used'M', 'P', '4', '2'  , because it's the only
mentioned in the help.


*Question 2:* What format should - ideally - the input images have?
Currently I use BMP's, created with xs2bmp.

Thank you,

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


[Scilab-users] Scilab & cdf-file format

2021-02-10 Thread P M
Dear Users,

Is there any Scilab toolbox available, handling the cdf-file-format?

cdf = "common data file", which was original developed by NASA :
https://cdf.gsfc.nasa.gov/

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] xpoly in x-y-z coordinates

2021-02-08 Thread P M
sorry

I am completely fine with xarrows instead of xpoly.

Philipp

Am Mo., 8. Feb. 2021 um 21:36 Uhr schrieb P M :

> Dear Users,
>
> I have a 3D-plot.
>
> Onto that, I would like to add a xpoly-line with the following specs:
>
> xpoly ( [0 1], [0 0], [-0.4 -0.4], 'lines' 0)
>
> in other words: The polyline should be at the X-Y Plane, but shifted to Z
> = -0.4
>
> I know that I can just plot the line, but that would destroy the layout,
> which I would have to reconfigure.
>
> Similary to that I also would like xstring-Text in such a manner.
>
> Is something like this possible?xpoly3D() ?
>
> Thank you, Philipp
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] xpoly in x-y-z coordinates

2021-02-08 Thread P M
Dear Users,

I have a 3D-plot.

Onto that, I would like to add a xpoly-line with the following specs:

xpoly ( [0 1], [0 0], [-0.4 -0.4], 'lines' 0)

in other words: The polyline should be at the X-Y Plane, but shifted to Z =
-0.4

I know that I can just plot the line, but that would destroy the layout,
which I would have to reconfigure.

Similary to that I also would like xstring-Text in such a manner.

Is something like this possible?xpoly3D() ?

Thank you, Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Default x|y|z labels and title font size = 2?

2021-02-02 Thread P M
Dear Samual,

thanks for the proposal...I fully agree with it.

Best Regards,
Philipp


Am Di., 2. Feb. 2021 um 09:53 Uhr schrieb CHEZE David 227480 <
david.ch...@cea.fr>:

> Dear Samuel,
>
>
>
> I also have the same feeling that larger default font size would suit
> better, most of the time, as in the end the figures worked and analysed in
> Scilab environment are inserted into reports.
>
>
>
> Regards,
>
>
>
> David
>
>
>
> *De :* users  *De la part de* Samuel
> Gougeon
> *Envoyé :* lundi 1 février 2021 23:27
> *À :* International users mailing list for Scilab.  >
> *Objet :* [Scilab-users] Default x|y|z labels and title font size = 2?
>
>
>
> Dear all,
>
> After having changed the default grid style in Scilab 6.1.0, i propose to
> go on, tuning more carefully the default font size of axes labels.
>
> Each time that i define a xlabel, ylabel or sometimes zlabel, and a title,
> i have also to set explicitly their fontsize property, because i find the
> default size=1 always too small.
> Is it also your usage?
> Indeed, the font size = 1 is fine for ticks labels. From here, axes labels
> must be displayed with a bigger font size.
> Sometime size=2 is still not enough, noticeably with a LaTeX content. But
> well, then we can actually use an explicit fontsize setting.
>
> This proposal impacts everybody and frequently, because making plots is a
> basic task in Scilab
> Every comment is welcome, before implementing this simple change.
>
> Hope reading you soon.
>
> Samuel Gougeon
>
> clf
>
> subplot(1,3,1)
>
> plot2d
>
> xlabel "Title for abscissas"
>
> ylabel "Title for ordinates"
>
>
>
> subplot(1,3,2)
>
> xlabel "Title for abscissas" fontsize 2
>
> ylabel "Title for ordinates" fontsize 2
>
> plot2d
>
>
>
> subplot(1,3,3)
>
> xlabel "$\alpha\text{ coefficient }[m^{-1}]$" fontsize 2
>
> ylabel "$\beta\text{ result }[lm^{-1}]$" fontsize 2
>
> plot2d
>
>
> ___
> 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] Update library and help

2021-01-28 Thread P M
Hello Jean-Yves,

please let me forward Samuel Gougeon's answer to your question.

Best Regards,

Philipp


Hello Jean-Yves,

Jan 18, 2021; 2:54pm jbaudais[Scilab-users] Update library and help
Hello,

   When I modify the file myfunction.sci in my librairie "mylib", the
update works as expected when I restard Scilab with the following lines
in my .scilab file

genlib(SCIHOME+"/mylib/macros")
load(SCIHOME+"/mylib/macros/lib")
add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

I would like to do the update without Scilab exit and restart, so I do

--> del_help_chapter("Librairie perso")
--> clear mylib myfunction
--> genlib(SCIHOME+"/mylib/macros")
-->
help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR");
--> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR");
--> load(SCIHOME+"/mylib/macros/lib")
--> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")

Excepted genlib and xmltojar, not all the code lines work all the time
(some time yes and some time no).

Do you get any error message that tells that this line is KO while by
default other ones are OK?
Please note that the compilation of the documentation can (quite often)
yield some errors that are NOT displayed in the Scilab console
 (but, on Windows, in the so-called
consolebox()).
After such "silent" errors, some involved files can stay locked
 (or simply not updated), and next
instructions might look as failing.


I understand nothing because I not
able to reproduce "deterministically" the success, or not! So I think my
code is wrong.

On Windows, displaying the consolebox("on") when compiling some
documentation is the best and only way i know to see where are the problems
and fix them in source files. Without this, we blindly work.
I hope this helps.
Best regards
Samuel Gougeon

PS: Thanks to Philipp for forwarding this answer without breaking the
thread.

--

Am Mo., 18. Jan. 2021 um 14:55 Uhr schrieb Jean-Yves Baudais <
jean-yves.baud...@insa-rennes.fr>:

> Hello,
>
>When I modify the file myfunction.sci in my librairie "mylib", the
> update works as expected when I restard Scilab with the following lines
> in my .scilab file
>
> genlib(SCIHOME+"/mylib/macros")
> load(SCIHOME+"/mylib/macros/lib")
> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")
>
> I would like to do the update without Scilab exit and restart, so I do
>
> --> del_help_chapter("Librairie perso")
> --> clear mylib myfunction
> --> genlib(SCIHOME+"/mylib/macros")
> -->
>
> help_from_sci(SCIHOME+"/mylib/macros/myfunction.sci",SCIHOME+"/mylib/help/fr_FR");
> --> xmltojar(SCIHOME"/mylib/help/fr_FR","Librairie perso","fr_FR");
> --> load(SCIHOME+"/mylib/macros/lib")
> --> add_help_chapter("Librairie perso",SCIHOME+"mylib/jar")
>
> Excepted genlib and xmltojar, not all the code lines work all the time
> (some time yes and some time no). I understand nothing because I not
> able to reproduce "deterministically" the success, or not! So I think my
> code is wrong.
>
> What is the good code to update library and help after changing a file?
>
> --
> Jean-Yves Baudais
>
> ___
> 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] users@ interruptions?

2021-01-22 Thread P M
Yes, I did receive that message.

Best Regards,
Philipp

Am Fr., 22. Jan. 2021 um 21:05 Uhr schrieb Samuel Gougeon :

> Hello,
> Has anyone received the recent message archived @
>
> http://mailinglists.scilab.org/Scilab-users-Update-library-and-help-tt4041262.html
> ?
> I have not.
> BR
> Samuel
>
> ___
> 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] New constant %chars to get sets of symbols

2020-12-31 Thread P M
Dear,

if the content of e.g. %chars.greek.lower is a string:

Why not even subdivide this further, such as:

%chars.greek.lower.alpha = "α"
%chars.greek.lower.beta = "β"
...

Some work to create at first, but handy to use

Best Regards,
Philppp





Am Do., 31. Dez. 2020 um 16:37 Uhr schrieb Samuel Gougeon :

> Le 31/12/2020 à 16:11, Antoine Monmayrant a écrit :
>
> On 31/12/2020 15:43, Samuel Gougeon wrote:
>
> .../...
> We enter and display
> --> %chars   // (OK not here. See the proposed documentation for the full
> display)
>
> or for a chosen class
>
> --> %chars.greek
>  ans  =
>   lower = "αβδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ"
>   upper = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ KΩ℧"
>
>
> OK, I see better what you propose.
> But you are trading remembering a code (ie \lambda for λ) for remembering
> which class the symbol you are looking for belongs to...
>
> %chars displays all of them, on less than a screen (50 characters per line
> x 20 lines make 1000 characters ;-). It is illustrated in the provided help
> page.
> And it is hierarchical. So remembering 2 to 10 trivial fields names is
> enough (instead of 1000 codes), if you wish to display subsets.
>
>
> Again, for some of them, it might be obvious (ie \lambda is easy, so is
> %chars.greek for a Greek symbol) but for some others it's far from obvious.
> Like where would you put your \Diamond or \vdash?
>
> I may not understand the question. Please see the documentation. Both are
> already included in my current %chars illustrated in the doc.
>
>
> I've used my share of LaTeX IDEs and all the symbols assistants failed me
> in the same way: they give you easy and obvious access to symbols you
> already know by heart (ie \alpha is in Greek, top first element) but are a
> useless mess when looking for more obscure symbols (why is \bigstar in
> Misc-Math, between \blacklozenge and \spadsuit ?)
>
> +1. That's the point. This is why most often i display the whole %chars.
> Just %chars. Without any codes.
>
>
> ___
> 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] IPCV upscaling of image

2020-12-21 Thread P M
Hi Claus,

this works for me:

imgList = list();imgList(1) = imread(fullpath(getIPCVpath() +
"/images/superres/input001.png"));imgOut  =
imsuperres(imgList);figure();imshow(imgOut);outPath_1 =
'd:\testIn.png';outPath_2 = 'd:\testOut.png';res = imwrite(imgList(1),
outPath_1);res = imwrite(imgOut, outPath_2);xdel();

The input file is saved as a 64x64 image.
The superresolution image is saved as a 256 x 256 image.

Interestingly enough:
If the output paths are set to "c:\testOut.png", imwrite would not
work...unsure why.

Regards, Philipp

Am Mo., 21. Dez. 2020 um 11:37 Uhr schrieb Claus Futtrup :

> Hi Philipp
>
> The file was saved automatically. I don't think you can set what to save,
> or even the name of the file.
> I also did a xs2png, but that only saves the current figure. In my case a
> 610 x 460 pixel image (=the screen figure).
>
> Cheers,
> Claus
>
> On 21-12-2020 11:21, P M wrote:
>
> Dear Claus,
>
> the example did not include saving the image as a file.
>
> Best guesses:
> - use imwrite
> - use one of the xs2...-functions (e.g.: xs2bmp)
>
> BR
> Philipp
>
>
> Am Mo., 21. Dez. 2020 um 09:20 Uhr schrieb Claus Futtrup <
> cfutt...@gmail.com>:
>
>> Hi Philipp
>>
>> I see, thank you for explaining it to me. I also see that the upscale is
>> not 2x2 = 4, but it is 4x4 so the upscaled image is huge. The output file
>> is saved - I believe - in wherever your Scilab file browser is currently
>> active.
>>
>> Best regards,
>> Claus
>>
>> On 20-12-2020 22:55, P M wrote:
>>
>> Dear Claus,
>>
>> you need to feed a list into imsuperres()not directly the image.
>> Following should work.
>>
>> imgList = list();imgList(1) = imread('path_to_image');imgOut  = 
>> imsuperres(imgList);figure();imshow(imgList(1));figure();imshow(imgOut);
>> BR
>> Philipp
>>
>>
>> Am So., 20. Dez. 2020 um 19:42 Uhr schrieb Claus Futtrup <
>> cfutt...@gmail.com>:
>>
>>> Hi there
>>>
>>> I have a 4K picture, which I thought I'll try to upscale with the
>>> imsuperres in the IPCV toolbox. The code simply looks like this:
>>>
>>> imagefile = 'D:\Userdata\Claus\Pictures\Think_Global_4K.png';
>>> im = imread(imagefile);
>>> imout  = imsuperres(im);
>>>
>>> The file is read and I get the following response: Unsigned Integer 8
>>> bits (2160 x 3840). Then Scilab crashes. I'm running Scilab 6.1.0 (the
>>> original release) on Windows 10 - in a MS Windows dialog box I get:
>>>
>>>  >Scilab 6.1.0 (Desktop) has stopped working
>>>
>>>  >A problem caused the program to stop working correctly. Windows will
>>> close the program and notify you if a solution is available.
>>>
>>> I am not sure that I've understood how to use imsuperres correctly. I
>>> see in the _params that rfactor = 4 is the default, so I was expecting
>>> the image to be scaled by a factor 4 (maybe that's 2 x 2 = I get an 8K
>>> image = 4320 x 7680 pixels). The way I understand the documentation, I
>>> don't need to run imsuperres_params if I'm satisified with the defaults.
>>>
>>> Kind regards,
>>>
>>> Claus
>>>
>>> ___
>>> users mailing list
>>> users@lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>>>
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> ___
> 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] IPCV upscaling of image

2020-12-21 Thread P M
Dear Claus,

the example did not include saving the image as a file.

Best guesses:
- use imwrite
- use one of the xs2...-functions (e.g.: xs2bmp)

BR
Philipp


Am Mo., 21. Dez. 2020 um 09:20 Uhr schrieb Claus Futtrup :

> Hi Philipp
>
> I see, thank you for explaining it to me. I also see that the upscale is
> not 2x2 = 4, but it is 4x4 so the upscaled image is huge. The output file
> is saved - I believe - in wherever your Scilab file browser is currently
> active.
>
> Best regards,
> Claus
>
> On 20-12-2020 22:55, P M wrote:
>
> Dear Claus,
>
> you need to feed a list into imsuperres()not directly the image.
> Following should work.
>
> imgList = list();imgList(1) = imread('path_to_image');imgOut  = 
> imsuperres(imgList);figure();imshow(imgList(1));figure();imshow(imgOut);
> BR
> Philipp
>
>
> Am So., 20. Dez. 2020 um 19:42 Uhr schrieb Claus Futtrup <
> cfutt...@gmail.com>:
>
>> Hi there
>>
>> I have a 4K picture, which I thought I'll try to upscale with the
>> imsuperres in the IPCV toolbox. The code simply looks like this:
>>
>> imagefile = 'D:\Userdata\Claus\Pictures\Think_Global_4K.png';
>> im = imread(imagefile);
>> imout  = imsuperres(im);
>>
>> The file is read and I get the following response: Unsigned Integer 8
>> bits (2160 x 3840). Then Scilab crashes. I'm running Scilab 6.1.0 (the
>> original release) on Windows 10 - in a MS Windows dialog box I get:
>>
>>  >Scilab 6.1.0 (Desktop) has stopped working
>>
>>  >A problem caused the program to stop working correctly. Windows will
>> close the program and notify you if a solution is available.
>>
>> I am not sure that I've understood how to use imsuperres correctly. I
>> see in the _params that rfactor = 4 is the default, so I was expecting
>> the image to be scaled by a factor 4 (maybe that's 2 x 2 = I get an 8K
>> image = 4320 x 7680 pixels). The way I understand the documentation, I
>> don't need to run imsuperres_params if I'm satisified with the defaults.
>>
>> Kind regards,
>>
>> Claus
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> ___
> 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] IPCV upscaling of image

2020-12-20 Thread P M
Dear Claus,

you need to feed a list into imsuperres()not directly the image.
Following should work.

imgList = list();imgList(1) = imread('path_to_image');imgOut  =
imsuperres(imgList);
figure();imshow(imgList(1));figure();imshow(imgOut);

BR
Philipp


Am So., 20. Dez. 2020 um 19:42 Uhr schrieb Claus Futtrup :

> Hi there
>
> I have a 4K picture, which I thought I'll try to upscale with the
> imsuperres in the IPCV toolbox. The code simply looks like this:
>
> imagefile = 'D:\Userdata\Claus\Pictures\Think_Global_4K.png';
> im = imread(imagefile);
> imout  = imsuperres(im);
>
> The file is read and I get the following response: Unsigned Integer 8
> bits (2160 x 3840). Then Scilab crashes. I'm running Scilab 6.1.0 (the
> original release) on Windows 10 - in a MS Windows dialog box I get:
>
>  >Scilab 6.1.0 (Desktop) has stopped working
>
>  >A problem caused the program to stop working correctly. Windows will
> close the program and notify you if a solution is available.
>
> I am not sure that I've understood how to use imsuperres correctly. I
> see in the _params that rfactor = 4 is the default, so I was expecting
> the image to be scaled by a factor 4 (maybe that's 2 x 2 = I get an 8K
> image = 4320 x 7680 pixels). The way I understand the documentation, I
> don't need to run imsuperres_params if I'm satisified with the defaults.
>
> Kind regards,
>
> Claus
>
> ___
> 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] Atoms Modules

2020-12-18 Thread P M
Hi Samuel. Chin Luh,

Ok...let me command as a user.

I hesitated to comment, because I am not sure if I am educated enough to
answer the question, if IPCV maintenance should be continued.

My first question back to Chin Luh would be...What do you mean by
maintenance?... Adding new functions?

My second question is: Why would the obviously success of the toolbox be a
reason to stop maintenance?


Best Regards,
Philipp



Am Freitag, 18. Dezember 2020 schrieb Samuel Gougeon :

> Dear Chin Luh,
>
> Thank you so much for addressing the critical topic of external modules
> maintenance.
> While IPCV is the most downloaded module, your fair question
> >So should IPCV continue to be maintained ...?
> sounds desperate to me. I rather share the same feeling: Almost 5 days
> after your message, not a single answer from users...!
>
> So, apparently, the answer is likely: No, it's not worth maintaining the
> most downloaded module, and therefore No, it's not worth maintaining any
> other external module.
> Let's stop maintaining ATOMS for 2021. The ghosts of silent users are
> certainly rich enough to pay commercial equivalent tools.
>
> Since there are 12 days left before 2021, i will answer for particular
> cases in separate (sub-)threads.
>
> Best regards
> Samuel
>
> Le 14/12/2020 à 05:44, Chin Luh Tan a écrit :
>
> Sometimes it is hard to decide whether to continue maintaining an atoms
> module or not So I did "snapshots" of downloads on 9/11/2020 21:44 and
> 14/12/2020 12:20 respectively to see which modules are in the actual top
> downloads.
>
> Still, this is not a fair result, such as IPCV having some "patches" which
> will increase the download number, and some other factors as well.
>
> So should IPCV continue to be maintained ...?
>
> Here's the results.
>
> Image Processing and Computer Vision Toolbox 4620
> CPGE 3176
> MinGw toolbox 2946
> Arduino 2936
> CelestLab 2841
> iodelay toolbox 2429
> Coselica 1812
> SIMM 1800
> Image Processing Design Toolbox 1394
> Fuzzy Logic Toolbox 1186
> Scilab Computer Vision Module 1129
> GUI Builder 972
> Scilab Image and Video Processing toolbox 860
> Distfun 855
> Apifun 804
> Serial Communication Toolbox 781
> Time Frequency Toolbox 776
> Free Access Chemometric Toolbox 770
> Autoelem Toolbox 768
> Specfun 738
>
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ipcv vs scicv

2020-12-07 Thread P M
Please enlighten meon my PC the current situation is like this:

Scilab 6.1.0

Loading order 1:
- scicv
- IPCV
--> in console: help imread

--> img = imread(filename[,flag])// hence the imread function
from scicv is found / used (?)

---
Loading order 2:

- IPCV
- scicv
--> in console: help imread

--> im = imread(filename)
--> im = imread(url) // hence the imread function
from IPCV is found / used (?)

Does this not describe what Chin Luh has mentioned?


The behaviour described above would be different, when there is:
scicv.imread
IPCV.imread

...which is indeed python-like.

Thanks for your patience.

Philipp






Am Sa., 5. Dez. 2020 um 01:56 Uhr schrieb Chin Luh Tan :

> Hi Samuel,
>
> Thanks for your details explanations and examples, they are really
> helpful. Yes you're right, the functions loaded are base on what you have
> describe, not depending on the order the modules being loaded. Thanks for
> pointing this out.
>
> Regards,
> Chin Luh
>
> On Sat, 5 Dec 2020 at 02:37, Samuel Gougeon  wrote:
>
>> Hello Chin Luh,
>>
>> Le 04/12/2020 à 01:57, Chin Luh Tan a écrit :
>>
>> Hi all,
>>
>> Stephane, Thanks for the quick  examples to illustrate this.
>>
>> Claus, as shown by Stephane, this could be now by ourselves now from our
>> own modules. Stephane has illustrated a quick demo on this, while the one I
>> was testing with is the copy of toolbox skeleton inside the Scilab contrib,
>> modified to 2 modules, installed with atoms and let it load at start,
>> results are the same.
>>
>> There are 2 potential issues which we should take notes:
>> 1. The module which is loaded last, will have the "dominant" in the base
>> function.
>>
>> Are you sure about this? This was the rule with Scilab 5, but the removal
>> of the variables stack changed it within Scilab 6. I noticed with Scilab
>> 6.0 that the libraries are scanned for the required function only after
>> sorting their names in anti-alphabetical order.
>> So if both alib.myfunc() and zlib.myfunc() exist, myfunc() will call
>> zlib.myfunc(), whatever is the loading order of alib and zlib.
>>
>> On this respect, neither the
>> https://help.scilab.org/docs/6.1.0/en_US/library.html page is
>> up-to-date, not other pages dealing with libraries, like the genlib().
>> Here is the test:
>>
>> File = TMPDIR+"\test\";mkdir(File+"alib");mkdir(File+"zlib");
>> code = [ "function test()" ; "disp(""test from alib"")" ; 
>> "endfunction"];mputl(code, File+"alib\test.sci");genlib("alib", File+"alib");
>> code = [ "function test()" ; "disp(""test from zlib"")" ; 
>> "endfunction"];mputl(code, File+"zlib\test.sci");genlib("zlib", File+"zlib");
>> clear alib zlibload(File+"zlib\lib")load(File+"alib\lib")
>> test()
>> --> test()
>>   "test from zlib"
>>
>> for e.g.: the example that Stephane showed, we could call "lib1.foo" and
>> "lib2.foo", and calling just "foo" will be the same as  "lib2.foo".
>> 2. Only macros function could be called this way, if a module has a
>> scilab gateway that called direct from Scilab, (such as scicv), you could
>> not call scicvlib.imread as the imread is directly expose from the C lib to
>> Scilab.
>>
>> This is true only if the homonymous function is called without specifying
>> its library. Otherwise, the name resolution works:
>>
>> File = TMPDIR+"\test\";mkdir(File+"alib");code = [ "function cos(a)" ; "
>> disp(""cos() from alib"")" ; "endfunction"];mputl(code, 
>> File+"alib\cos.sci");genlib("alib", File+"alib");clear 
>> alibload(File+"alib\lib")
>> cos(1)alib.cos(1)
>>
>>
>> --> cos(1)
>>  ans  =
>>0.5403023
>>
>> --> alib.cos(1)
>>   "cos() from alib"
>>
>> Best regards
>> Samuel
>>
>> ___
>> 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] scicv - camera calibration

2020-11-24 Thread P M
Dear scicv developers,

is camera calibration possible with scicv?

Help states:

The following feature domains are (or will be) covered:
 [...]
  - Camera calibration (calib3d)
 [...]


I also do find a "opencv_calib3d2413.dll" somewhere in the scicv
installation folders.

However I do not find any scilab function pointing to the topic of camera
calibration.

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ipcv vs scicv

2020-11-24 Thread P M
Mh. Nice Idea.

Maybe something like this is already possible?

Install toolboxed but remove from autoloader.
So scilab starts without toolboxed from atoms.

The script includes than the command,  which module shall be loaded.

Thanks for the idea...i will try this.
Philipp




Am Dienstag, 24. November 2020 schrieb Claus Futtrup :

> Hi all
>
> I imagine naming conflicts can occur across different ATOMS.
>
> How about a change where one has to specify which ATOMS module you're
> using when calling a function, such that both can coexist side-by-side ?
>
> I'm thinking Pythonic here, like if you import for example numpy, you can
> write import numpy as np ... from hereon, you write np.pi for the
> definition of pi (=3.14159 ... ), and so on.
>
> Maybe something for Scilab 7 (?)
>
> Cheers,
> Claus
>
> On 24-11-2020 14:15, P M wrote:
>
> Dear developers,
>
> as I have many scripts with "imread" I wonder if some time in the future
> duplicate functions names from IPCV and SCICV are going to be
> removed/changed.
>
> It's kind of disturbing to have to use atomsInstall/atomsRemove when using
> different scripts.
>
> I think this was discussed already in the past, though an update would be
> nice.
>
> Thank you,
> Philipp
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] ipcv vs scicv

2020-11-24 Thread P M
Dear developers,

as I have many scripts with "imread" I wonder if some time in the future
duplicate functions names from IPCV and SCICV are going to be
removed/changed.

It's kind of disturbing to have to use atomsInstall/atomsRemove when using
different scripts.

I think this was discussed already in the past, though an update would be
nice.

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] image insertion using scicv

2020-11-24 Thread P M
Dear Experts,

I would like to implement a small image into a part of a big image.

I would know how to do that with IPCV, but the small image is loaded using
scicv "imread".

The help to "Mat" states:


   - insertion: syntax is the same a the usual Scilab insertion, and
   accepts a Scilab matrix in input (not yet available).
   - concatenation: syntax is the same a the usual Scilab concatenation
   (not yet available).


Is there any progress to make this available?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] converting octave script imremap to scilab

2020-11-22 Thread P M
if you refer to interp2 from CGLAB toolboxthen no, I have no success
with that.

CGLAB call:

vp = interp2(xp,yp,x,y,v)...were xp and yp are vectors

while at octave:
warped = grayinterp(im, XI, YI, interp, NA);   // im seems to be a mxn matrix

with:function [warped, valid] = grayinterp(im, XI, YI, interp,
extrapval)  if (strcmp(interp, "cubic"))
warped = graybicubic(double(im), XI, YI, NA);
  else
*warped = interp2(double(im), XI, YI, interp, NA);*
  endif
  valid = !isna(warped);
  warped(!valid) = extrapval;endfunction

BR

Philipp







Am So., 22. Nov. 2020 um 08:55 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi,
>
> Does interp2 works by using the triangulation ?
>
> S.
>
> Le 21 nov. 2020 à 22:56, P M  a écrit :
>
> 
> Dear All,
>
> I am trying to map an image onto a 3D surface.
> The image contains reference points, which with known 2D pixel coordinates.
> The 3D equivalent of these reference points is as well known.
> The 3D shape is represented by a set of X-Y-Z coordinates.
>
> For mapping the image onto a delaunay-triangulated surface I found
> following function:
>
> "imremap"...which - as far as I understand - should do what I want.
>
> now: "imremap" uses  "interp2"...and unfortunately both functions are in
> octave.
>
>
> imremap:   https://searchcode.com/codesearch/view/9585363/
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/searchcode.com/codesearch/view/9585363/>
>
> interp2: https://searchcode.com/codesearch/view/20327397/
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/searchcode.com/codesearch/view/20327397/>
>
>
> Converting the functions to Scilab seems to become an elephant, especially
> for interp2.
>
> If one could avoid  "interp2" , then "imremap" could be possible
> relatively easy converted to Scilab.
>
> Any ideas which Scilab function would work like interp2?
>
> Thank you,
> Philipp
> ___
> users mailing list
> users@lists.scilab.org
>
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>
> ___
> 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


[Scilab-users] converting octave script imremap to scilab

2020-11-21 Thread P M
Dear All,

I am trying to map an image onto a 3D surface.
The image contains reference points, which with known 2D pixel coordinates.
The 3D equivalent of these reference points is as well known.
The 3D shape is represented by a set of X-Y-Z coordinates.

For mapping the image onto a delaunay-triangulated surface I found
following function:

"imremap"...which - as far as I understand - should do what I want.

now: "imremap" uses  "interp2"...and unfortunately both functions are in
octave.


imremap:   https://searchcode.com/codesearch/view/9585363/

interp2: https://searchcode.com/codesearch/view/20327397/


Converting the functions to Scilab seems to become an elephant, especially
for interp2.

If one could avoid  "interp2" , then "imremap" could be possible relatively
easy converted to Scilab.

Any ideas which Scilab function would work like interp2?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] mesh2d - finding identical points

2020-11-20 Thread P M
I guess I do have such an u-v-plane.

The background of the background :

The task is to map an image onto a 3D geometry.

The image includes reference points, which correspond to known x-y-z
coordinates.

So the image plane is (my guess) the u-v-plane.

BR
Philipp




Am Fr., 20. Nov. 2020 um 12:16 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> In order to use mesh2d with your data, there must exist a plane (u,v) on
> which you could project your (x,y,z) data. The mesh obtained on projected
> data (u,v) would give you the triangulation of the (x,z,y) data. This won't
> be possible with mesh2d if you take for example scattered points on a
> sphere. However, any non-linear transformation "unfolding" the data could
> also help to use pure 2d tools like mesh2d.
>
> S.
> Le 20/11/2020 à 12:05, P M a écrit :
>
>
>
> Am Fr., 20. Nov. 2020 um 11:47 Uhr schrieb Stéphane Mottelet <
> stephane.motte...@utc.fr>:
>
>> Hi again,
>> Le 20/11/2020 à 11:30, P M a écrit :
>>
>> OK,
>> some more background:
>>
>> I actually want to perform a delaunay triangulation on a set of
>> X-Y-Z-coordinates.
>>
>> I suppose you mean a triangulation of scattered X-Y-Z but you call mesh2d
>> with X-Y only ?
>>
>
> Yes, indeed. And there is the bug in my data.
> As x-y coordinates repeat, they do have a different z in the original data.
> But since I call mesh2d with x-y only there are indeed identical points.
>
>
>
>>
>> I know of CGLAB, but it seems only available to Scilab 6.0.x, while I am
>> on Scilab 6.1.0
>>
>> CGLAB is based on a very old version of CGAL and thus is very hard  to
>> maintain as is. There is a lot of work...
>>
>
> I am currently installing Scilab 6.0 to try CGLAB...
>
>>
>> So the nearest thing to a delaunay triangulation I found is mesh2d...
>>
>> Yeah. Suboptimal choice indeed...
>>
>> Because of the delaunay triangulation, I am not sure if the order of
>> points may change.
>>
>> What do you mean ?
>>
>
> The scattered points represent a 3D surface geometry.
> If the points will be resorted, I could imagine that the triangulation
> does not fit to the surface geometry anymore.
>
>>
>> About unique:
>>
>> The result I get is actual of same size as the input matrix...I therefore
>> do assume that each point is unique in the first place (which they actually
>> should).
>>
>> What does repeat are individual x, y, z coordinates, but in different
>> combinations.
>> So the actual point is different.
>>
>>
>> e.g.:x may repeat, but than the y-z-coordinates are different from
>> point to point
>>
>> Could you share the data (you can send me a private message) ?
>>
>> S.
>>
>>
>> Thanks,
>> Philipp
>>
>>
>>
>> Am Fr., 20. Nov. 2020 um 10:57 Uhr schrieb Stéphane Mottelet <
>> stephane.motte...@utc.fr>:
>>
>>> Hi Philipp,
>>>
>>> Glad to hear that some people use mesh2d. I know we have to improve the
>>> error message by getting the numbers at the Fortran level... There is also
>>> other errors which are not easy to fix without knowing the number of the
>>> problematic point (point too close to the boundary, for example). Can you
>>> file a bug on BZ ?
>>>
>>> S.
>>> Le 20/11/2020 à 10:03, P M a écrit :
>>>
>>> Dear all,
>>>
>>> using the mesh2d - function I get an error: mesh2di: some points are
>>> identical.
>>>
>>>
>>> How to identify these points and remove the duplicates?
>>>
>>> There are roughly 500'000 coordinates
>>>
>>> Thank you,
>>> Philipp
>>>
>>> ___
>>> users mailing 
>>> listusers@lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>>>  
>>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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)3

Re: [Scilab-users] mesh2d - finding identical points

2020-11-20 Thread P M
Am Fr., 20. Nov. 2020 um 11:47 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi again,
> Le 20/11/2020 à 11:30, P M a écrit :
>
> OK,
> some more background:
>
> I actually want to perform a delaunay triangulation on a set of
> X-Y-Z-coordinates.
>
> I suppose you mean a triangulation of scattered X-Y-Z but you call mesh2d
> with X-Y only ?
>

Yes, indeed. And there is the bug in my data.
As x-y coordinates repeat, they do have a different z in the original data.
But since I call mesh2d with x-y only there are indeed identical points.



>
> I know of CGLAB, but it seems only available to Scilab 6.0.x, while I am
> on Scilab 6.1.0
>
> CGLAB is based on a very old version of CGAL and thus is very hard  to
> maintain as is. There is a lot of work...
>

I am currently installing Scilab 6.0 to try CGLAB...

>
> So the nearest thing to a delaunay triangulation I found is mesh2d...
>
> Yeah. Suboptimal choice indeed...
>
> Because of the delaunay triangulation, I am not sure if the order of
> points may change.
>
> What do you mean ?
>

The scattered points represent a 3D surface geometry.
If the points will be resorted, I could imagine that the triangulation does
not fit to the surface geometry anymore.

>
> About unique:
>
> The result I get is actual of same size as the input matrix...I therefore
> do assume that each point is unique in the first place (which they actually
> should).
>
> What does repeat are individual x, y, z coordinates, but in different
> combinations.
> So the actual point is different.
>
>
> e.g.:x may repeat, but than the y-z-coordinates are different from
> point to point
>
> Could you share the data (you can send me a private message) ?
>
> S.
>
>
> Thanks,
> Philipp
>
>
>
> Am Fr., 20. Nov. 2020 um 10:57 Uhr schrieb Stéphane Mottelet <
> stephane.motte...@utc.fr>:
>
>> Hi Philipp,
>>
>> Glad to hear that some people use mesh2d. I know we have to improve the
>> error message by getting the numbers at the Fortran level... There is also
>> other errors which are not easy to fix without knowing the number of the
>> problematic point (point too close to the boundary, for example). Can you
>> file a bug on BZ ?
>>
>> S.
>> Le 20/11/2020 à 10:03, P M a écrit :
>>
>> Dear all,
>>
>> using the mesh2d - function I get an error: mesh2di: some points are
>> identical.
>>
>>
>> How to identify these points and remove the duplicates?
>>
>> There are roughly 500'000 coordinates
>>
>> Thank you,
>> Philipp
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>>  
>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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)344234688http://www.utc.fr/~mottelet 
>> <https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>> <https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users>
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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] mesh2d - finding identical points

2020-11-20 Thread P M
OK,
some more background:

I actually want to perform a delaunay triangulation on a set of
X-Y-Z-coordinates.

I know of CGLAB, but it seems only available to Scilab 6.0.x, while I am on
Scilab 6.1.0

So the nearest thing to a delaunay triangulation I found is mesh2d...
Because of the delaunay triangulation, I am not sure if the order of points
may change.

About unique:

The result I get is actual of same size as the input matrix...I therefore
do assume that each point is unique in the first place (which they actually
should).

What does repeat are individual x, y, z coordinates, but in different
combinations.
So the actual point is different.


e.g.:x may repeat, but than the y-z-coordinates are different from
point to point

Thanks,
Philipp



Am Fr., 20. Nov. 2020 um 10:57 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hi Philipp,
>
> Glad to hear that some people use mesh2d. I know we have to improve the
> error message by getting the numbers at the Fortran level... There is also
> other errors which are not easy to fix without knowing the number of the
> problematic point (point too close to the boundary, for example). Can you
> file a bug on BZ ?
>
> S.
> Le 20/11/2020 à 10:03, P M a écrit :
>
> Dear all,
>
> using the mesh2d - function I get an error: mesh2di: some points are
> identical.
>
>
> How to identify these points and remove the duplicates?
>
> There are roughly 500'000 coordinates
>
> Thank you,
> Philipp
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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


[Scilab-users] mesh2d - finding identical points

2020-11-20 Thread P M
Dear all,

using the mesh2d - function I get an error: mesh2di: some points are
identical.


How to identify these points and remove the duplicates?

There are roughly 500'000 coordinates

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] IPCV imread

2020-11-12 Thread P M
Quote:

[...] These was a part in the code to check if the image read into Scilab
only consist of 2 values, min and max, and it will be automatically
converted to binary image.

Quote End

I thought about this, but did not expect it to be true.  :-)

Thanks for clarification.

Philipp





Am Do., 12. Nov. 2020 um 12:32 Uhr schrieb Chin Luh Tan <
chinluh@bytecode-asia.com>:

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Hi, These was a part in the code to check if the image read into Scilab
> only consist of 2 values, min and max, and it will be automatically
> converted to binary image. If you're using Windows, consider to download
> version 4.1.2.3 from https://github.com/tanchinluh/IPCV/tags
> <https://github.com/tanchinluh/IPCV/tags> and use the extra input to force
> reading in 3 layers. img = imread(imPath, IMREAD_COLOR = 1);Hope this
> helps.Regards,Chin Luh On Wed, 11 Nov 2020 20:20:18 +0800 P M
> > wrote Dear
> Experts,please improve my understanding of the IPCV function imread for
> following context:I have an image which is told to be a 3-channel image.At
> least with IrfanView I get a bit depth of 24 ... so I expect it to be an
> RBG image.However: The image contains - on purpose - only 2 colors.Now:img
> = imread(imPath);   // reads image as booleanimg =
> double(img);// convert to double.Question:Why does the
> imread-function read the image as a boolean image and not as a 3-channel
> image?Note:  I am totally fine with the result of imread..just
> being curious.Thank
> you,Philipp___users mailing
> list users@lists.scilab.org 
> http://lists.scilab.org/mailman/listinfo/users
> <http://lists.scilab.org/mailman/listinfo/users> *
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] IPCV imread

2020-11-11 Thread P M
Dear Experts,

please improve my understanding of the IPCV function imread for following
context:

I have an image which is told to be a 3-channel image.
At least with IrfanView I get a bit depth of 24 ... so I expect it to be an
RBG image.

However: The image contains - on purpose - only 2 colors.

Now:

img = imread(imPath);   // reads image as boolean

img = double(img);// convert to double.


Question:Why does the imread-function read the image as a boolean
image and not as a 3-channel image?

Note:  I am totally fine with the result of imread..just being
curious.

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] {EXT} Fwd: plotting dots vs xfarc

2020-10-02 Thread P M
Hi,

I think I'll modify the pixels in the imagelike: img(x,y) = 255;

If necessary I will also change some neighboured pixels to enlarge the
"dot"-size.

I do not need them blue...this was just to demonstrate that

  plot(x,y,'o')  ( = white)

and

 xfarc(x_arc,y_arc, w_arc,h_arc,0,360*64)   (= blue)

do not always plot at the same locationeven all coordinates are just
simple integers.

So far I could see, this does not change, even if one changes the
pixel_drawing_mode attribute.

Thanks for your ideas,
Philipp

Am Do., 1. Okt. 2020 um 10:25 Uhr schrieb Antoine Monmayrant <
antoine.monmayr...@laas.fr>:

>
> On 01/10/2020 09:05, Dang Ngoc Chan, Christophe wrote:
> > Hello,
> >
> >> De la part de P M
> >> Envoyé : mercredi 30 septembre 2020 16:50
> >>
> >> exact dot-coordinates, drawn as filled circles.
> >> All pixel coordinates of such an area would have to have exactly one
> single pixel value.
> >> The resulting graphic right now is stored via:  xs2bmp.
> >> [...]
> >> - It seems that the resulting pixels of the dot in the final image are
> not equally colored.
> > I suspect the following thing: pixels are squares, not dots.
> >
> > So it may be that xs2bmp somehow inter-/extrapolate the colours.
> > You then have a "leak" between the coloured pixel and its neighbours.
> >
> > You may try to draw squares of the exact size of the final pixel (e.g.
> 1/320 width and 1/200 height of the graphical window for a 320 × 200 raster
> picture).
> >
> > You may also try some functions from the image processing toolboxes.
> Well, another approach would be to:
> - use Matplot to display your image as a matrix, let's say [0:255] range.
> - modify the data in the matrix to be displayed where you went to get
> your "dot": like your change your data to 256
> - use a colormap that is grayscale from [0:255] and has a fancy color
> for 256 (blue?).
>
> If you do this, you should get a perfect co-registration of your image
> and your "overlayed" markers.
> Of course, your markers will not be circular dots, just a single pixel
> with what I described above, but you can also generate your own shapes
> (bigger squares, crosses, ~circles), provided that you use an odd number
> of pixels.
>
> Hope it helps,
>
> Antoine
>
> >
> > Hope this helps
> >
> > Regards
> >
> > --
> > Christophe Dang Ngoc Chan
> > cd...@wanadoo.fr
> >
> > 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
> >
> ___
> 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


[Scilab-users] Fwd: plotting dots vs xfarc

2020-09-30 Thread P M
Dear community,

I need to create images, which includes exact dot-coordinates, drawn as
filled circles.

All pixel coordinates of such an area would have to have exactly one single
pixel value.

The resulting graphic right now is stored via:  xs2bmp.


to create the dots I naturally would use:  plot (x,y,'o')

Issues here:
- It seems that the resulting pixels of the dot in the final image are not
equally colored.
- Especially pixels at the right lower "corner" seem to be off-colored.


So I tried:  xfarc:
Issue here:
- xfarc() seems not always to find the correct x-y-location.

See example attached.

 - The dots by plot() are colored white.
 - The xfarc is colored blue.

I left some dots without xfarc() to demonstrate the issue of plot().

I think I could "brute-force" pixel values of the underlying image (not
black for real purpose) to correct pixel values.
But actually I wanted to avoid that.

Any hint?

Used: Scilab 6.1.0

Best regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Read file (.txt)

2020-09-10 Thread P M
I think csvRead is just fine.

[data header] = csvRead(fname, ' ', '.', 'string', [], [], [], 0);

As you may notice the data Matrix contains a lot of empty columns.

This is due to the many white spaces in the text file

anyways, after reading the dta in you may use evstr() to convert into doubles.


BR

Philipp



Am Do., 10. Sept. 2020 um 04:03 Uhr schrieb <
antoine.el...@scilab-enterprises.com>:

> Hello Daniel,
>
> Do you have try with "evstr" function ?
>
> data = evstr(mgetl("output.txt"));
>
> Regards,
> Antoine
>
> ___
> 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] need help with image post processing

2020-07-15 Thread P M
Stéphane,

thank you, I can work with that.

Regards,
Philipp




Am Mi., 15. Juli 2020 um 22:14 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Another possibility: compute the connected components of the green plane
> bitmap image and keep only the largest one. You can use imlabel then
> imblobprop (in IPCV):
>
> im=im2bw(imread("G.jpg"),0.5); // I took a screenshot of your G plane image
>
> clf
> subplot(1,2,1)
> imshow(im)
>
> [im_labeled,n] = imlabel(im);
> [a,bb,c] = imblobprop(im_labeled);
> [as,k]=gsort(a);
> for i=2:n
> im(im_labeled==k(i))=0;
> end
>
> subplot(1,2,2)
> imshow(im)
>
> S.
> Le 15/07/2020 à 20:39, P M a écrit :
>
> Stéphane,
>
> Thanks for the hint.
>
> This is nice for dots being completely surrounded by the green area.
>
> In general there might be cases, where the dots are part of the red and
> part of the green area.
>
> The result would than be like this:
>
> [image: grafik.png]
>
> Appreciate your input.
> Philipp
>
> Am Mi., 15. Juli 2020 um 18:21 Uhr schrieb Stéphane Mottelet <
> stephane.motte...@utc.fr>:
>
>> 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
>>
>>
>>
>> [image: grafik.png]
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>>  
>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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)344234688http://www.utc.fr/~mottelet 
>> <https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>> <https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users>
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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] need help with image post processing

2020-07-15 Thread P M
Stéphane,

Thanks for the hint.

This is nice for dots being completely surrounded by the green area.

In general there might be cases, where the dots are part of the red and
part of the green area.

The result would than be like this:

[image: grafik.png]

Appreciate your input.
Philipp

Am Mi., 15. Juli 2020 um 18:21 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> 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
>
>
>
> [image: grafik.png]
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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


[Scilab-users] need help with image post processing

2020-07-15 Thread P M
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



[image: grafik.png]
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Fwd: Re: scilab and tif-files

2020-07-14 Thread P M
Hi Antoine,

This does help indeed...

withtiff_get_image_prop() I get the correct RGB-image from the
TIf-file.

Thank you very much.

Best Regards,
Philipp






Am Mo., 13. Juli 2020 um 08:25 Uhr schrieb Antoine Monmayrant <
antoine.monmayr...@laas.fr>:

> Houps,
>
> I mailed Philipp directly, so here is a copy of my answer and available
> script to read a subset of TIFF.
> It might be useful for some of you...
>
> Antoine
>
>
>  Forwarded Message 
> Subject: Re: [Scilab-users] scilab and tif-files
> Date: Sun, 12 Jul 2020 20:39:20 +0200
> From: Antoine Monmayrant 
> 
> To: P M  
>
> Hello Philipp,
>
> I played a bit with tiff format a while ago (as none of the image
> processing toolboxes could be installed on my work computers).
> The long story short: one of our microscope is storing data in a format
> (*.ols) that is just tiff file with some metadata.
> I hacked a bit of the tiff specification to only support the subset of
> tiff used by this microscope.
> So it might not be exactly what you need, it depends on the tiff files you
> are using.
> But maybe it can help you design your own homemade solution.
>
> Cheers,
>
> Antoine
> On 10/07/2020 11:52, P M wrote:
>
> Dear experts,
>
> I do have a tif-filein fact: lot's of them and of different size.
>
> Pixel values are:
> - red
> - green
> - white
> - black
>
> Now, I want to convert these files in Black/white images, such as:
>
> - red pixels --> black
> - green pixels --> white
> - black pixels --> black
> - white pixels --> black
>
> in other words:Only the green pixels are of interest.
>
> Now, as I use IPCV:
>
> - imread()...does not handle tif-files correctly
> --> it does read the files, but the output is a boolean-matrix..that
> doesn't help
>
> - tifread()...does only handle images with size 1024x1024 ... doesn't help
>
> Is there a way to read TIF-files into Scilab and keep the R-G-B-channels?
>
>
> Thank you,
> Philipp
>
>
>
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
> ___
> 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


[Scilab-users] saving an image as b/w image

2020-07-10 Thread P M
Dear Experts,

I try to save a black/white image as a binary image.

That means: An image with bit depth of 1.

"imwrite" from IPCV however seems to save the image at least as a
8-bit-image.

The array I want to save as an image consists of "0" and "1" only.

The output file type must be ".jpg".

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] scilab and tif-files

2020-07-10 Thread P M
Dear experts,

I do have a tif-filein fact: lot's of them and of different size.

Pixel values are:
- red
- green
- white
- black

Now, I want to convert these files in Black/white images, such as:

- red pixels --> black
- green pixels --> white
- black pixels --> black
- white pixels --> black

in other words:Only the green pixels are of interest.

Now, as I use IPCV:

- imread()...does not handle tif-files correctly
--> it does read the files, but the output is a boolean-matrix..that
doesn't help

- tifread()...does only handle images with size 1024x1024 ... doesn't help

Is there a way to read TIF-files into Scilab and keep the R-G-B-channels?


Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] data augmentation with scilab for neural networks

2020-06-24 Thread P M
Dear Scilabers,

probably not the correct forum to ask this question, but i do not know
better.

Dealing with neural networks and image segmentation I write some Scilab
code for data augmentation.
This is to increase my training data set.  ( = more images)

Data augmentation (for now) is done by:

- image rotation
- image horizontal shifting

Now a basic question:

- Does one apply the data augmentation only for the input images and keep
the label images?
Or
- does one also rotate/shear the label images?

A "label image" in this context is a binary image (black/white).

white --> corresponds to pixels in the input image, which are of interest
black --> corresponds to pixels in the input image, which are of no
interest.

Any help is appreciated.

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


[Scilab-users] imrotate

2020-06-24 Thread P M
Dear Experts,

using imrotate() from IPCV-toolbox:

imout = imrotate(im1,deg,crp)

crp : Returns only central portion output image which is the same size as
source if set to 1

My input image is 512x512 pixel.

The output image shall be of the same size.

For this I try crop = 1 and also crop = 0

However the output image is always of different size, depending on the
rotation value.

Do I misunderstand something?

Here my code:

for i = 1:nrOrigImg

img = imread(fpath_img(i));
mask = imread(fpath_mask(i));

// get a random rotation value
rotVal = grand(1, 1, "unf", -5, 5);

// rotate the input image
cropVal = 0;

img = imrotate(img,rotVal,cropVal);
imshow(img);

// rotate the mask image
mask = imrotate(mask,rotVal,cropVal);
imshow(mask);

// add suffix : _rot
fNameOut = baseNameImg(i) + "_rot" + extImg(i);
imwrite(img, subDir1 + "\" + fNameOut);

fNameOut = baseNameMask(i) + "_rot" + extMask(i);
imwrite(mask, subDir2 + "\" + fNameOut);
end



Best Regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Plotting a New Xpoly Directly Inside a Compound

2020-06-19 Thread P M
Hallo Robert,

 If you use xpoly() it means you know your data before you plot it?
--> I mean: you do not click in the figure to get the coordinates
--> Why not plot all data at once?

E.g.: Can you not plot all polylines in one single plot2d command?

If you can't, you may try following approach:
Assumption: all data is of same length, e.g.: all lines are drawn by same
number of points

1.) you may access the data that composes the plot by searching for:
*.children.data
   * =: I do not recall from memory how deep you have to search
   e.g.:
   plot2d();
   a = gca();
   a.children.children.dataor .a.children.children.children.data

2.: Save the *.children.data separately in a X-matrix and Y-matrix

3.: Add the data that you would plot with xpoly() to these matrices.

4.: xdel()

5.: replot everything with  plot2d(X-matrix, Y-matrix)

This should give you all lines at the same plot-hirachy.
I did not check, but I would guess that also the line order would not
change.

It should be possible to create a function out of this and loop though it
each time a xpoly() is added to the plot.


Again, it is not clear why you just do not fuse all data together into one
matrix and use plot2d() to plot all data at once.


Best Regards,
Philipp







Am Sa., 13. Juni 2020 um 20:05 Uhr schrieb RolandB :

> Hi,
>
> If one plots several curves into a 2D axes using plot2d(), the curves will
> be resembled as polyline children within a compound, which is a child of
> the
> according axes.
> Adding further polylines one by one using xpoly() puts these polylines
> outside the compound on the same level as the compound is located, as
> children of the according axes.
>
> Is there a simple way to have the polyline generated directly within the
> existing compound?
> I know that I can glue several polylines into a compound, but I would have
> to unglue the compound first and then glue all polylines together back into
> one compound.
> Having many (!) curves makes this quite slow. Especially as glue() reverses
> the order of the polylines, so I would have to do a second unglue();glue();
> in order to preserve the order they had before ungluing (BTW, is this a bug
> or is reversal of the order a desired feature?).
>
> On the other hand, what kind of advantage does the compound have at all,
> assuming I wouldn't need the possibility of making all of the curves in the
> compound visible or invisible by just modifying the visibility of the
> compound?
> Ok, I can address all curves by axes.children.children(1:$) without having
> to care about the legend, which would be together with the curves in
> axes.children(1:$) if all the polylines were not in a compound.
>
> But any additional advantage for using a compound?
>
> Regards,
> Roland
>
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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] Auto adjust level of a color image

2020-06-10 Thread P M
Dear Mat,

not sure if this helps,
but here is a way, how to set brightness using a constant value.

I guess for automatization one can figure out a way using mean pixel value.

Best Regards,
Philipp

img = imread(fullpath(getIPCVpath() + "/images/" + 'baboon.png'));

 // image size = 512 x 512
// result of "imread" is of type 10 --> text object// (???)..guess:
type = unsigned char, which is 8 bit However this limits the pixel
values between 0 and 255// e.g.: 255 + 1 will be set to "0" for
brightness control we must be able to exceed 255.// ..we also want to
go into negative pixel values// so we need to change integer
type...use int16// positive pixel values above 255 will be set to 255
afterwards// negative pixel values will be set to 0 afterwards
nPx = 512*512;
brighnessLv_1 = 128;brighnessLv_2 = -128;
img_1 = int16(img); img_1 = img_1 + brighnessLv_1;
   img_2 = int16(img);img_2 = img_2 + brighnessLv_2;
pos = find(img_1 > 255);img_1(pos) = 255;pos = find(img_1 < 0);img_1(pos) = 0;
pos = find(img_2 > 255);img_2(pos) = 255;pos = find(img_2 < 0);img_2(pos) = 0;
img_1 = uint8(img_1);img_2 = uint8(img_2);
f = figure();f.figure_size = [1591,610];f.background =
8;subplot(1,3,1);imshow(img);
subplot(1,3,2);imshow(img_1);
subplot(1,3,3);imshow(img_2);




Am Di., 9. Juni 2020 um 22:05 Uhr schrieb mat368 :

> Hello
> I am looking for a function or a code to auto adjust level of color image ?
> I dont see that in thé ipcv package.
>
> Thanks for tour trop.
> Mat
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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] Pong contest (new version)

2020-06-08 Thread P M
Pong2 score @ Win10


[image: grafik.png]


Regards, Philipp


Am Mo., 8. Juni 2020 um 14:23 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

>
> Le 08/06/2020 à 10:46, Stéphane Mottelet a écrit :
>
> Hello all,
>
> Here is a new version of the game using realtime() to fix a framerate of
> 60fps on each platform. This value should be ok even on old computers.
> Please continue to post your scores !
>
> S.
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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] Pong contest

2020-06-07 Thread P M
nice.

However on my win7 64bit Laptop the speed suddenly changes from very slow
to very fast and even back to slowso kind of unpredictable...

probably a feature :-)

Greetings


Virenfrei.
www.avg.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Am Sa., 6. Juni 2020 um 18:08 Uhr schrieb Claus Futtrup :

> Hello all
>
> Here's my first attempt (Microsoft Windows 10). Attached.
>
> /Claus
>
> On 05-06-2020 14:48, Stéphane Mottelet wrote:
>
> Hello all,
>
> As you may have noticed, there is now a little game in the
> Gaphics/Animation section of the demonstrations. As the speed and
> responsiveness seems to be similar under all platforms, it would be funny
> to launch a little contest. In the next Scilab version it would be
> interesting to implement a high score online record, but until then, you
> can answer this message with the same kind of screenshot I joined, showing
> you score and just taken after the game end with and with the last dialog
> on the figure.
>
> Cheers,
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
> ___
> 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] Corona modelling

2020-03-30 Thread P M
R = recovered = people who can not infect others anymore...this includes
the dead people...  (or not?)

there are some nice introducton videos at YouTube about thiseven
showing the mentioned model...

numberphile:  https://www.youtube.com/watch?v=k6nLfCbAzgo
3brown1blue:  https://www.youtube.com/watch?v=gxAaO2rsdIs

Best regards,
Philipp


Am Mo., 30. März 2020 um 18:57 Uhr schrieb Heinz Nabielek <
heinznabie...@me.com>:

> It is generally assumed that 1% of the infected will die. But that would
> not be part of the modelling, depends mainly on local health services.
>
> Heinz
>
> > On 30.03.2020, at 16:12, Vesela Pasheva  wrote:
> >
> > Hello colleagues,
> >
> > I would like to know whether the variable D of dead persons could be
> included in the model considered. Up till now the model considers the
> variables S - susceptible, I - infected and R - recovered. Where do the
> Dead persons D go.
> > Of course i such case the system will be of four differential equations.
> >
> > Best regards
> >
> > Vesela
> >
> > На 30-03-2020 15:38, Heinz Nabielek написа:
> >>> On 30.03.2020, at 08:13, Stéphane Mottelet
> >>>  wrote:
> >>> Hello Heinz,
> >>> Here is an interactive version (made for my children last week...) :
> >>> // Confinement COVID-19 !
> >>> // Stephane MOTTELET, UTC
> >>> // Tue Mar 24 08:55:03 CET 2020
> >> Great many thanks:
> >> o The SIR model is great and can be readily understood.
> >> o Scilab is great: one line of code where big EXCEL sheet produced a
> >> mess.
> >> o Scilab friends and colleagues are great: instantaneous and real
> >> help.
> >> If the modelling is anywhere near to right, it will soon be over in
> >> Austria (cyan circles are recorded infections). But this is likely
> >> over-optimistic.
> >> Heinz
> >> __
> >> Dr Heinz Nabielek
> >> Schüttelstrasse 77A/11
> >> A-1020 Wien, Österreich
> >> Tel +43 1 276 56 13
> >> cell +43 677 616 349 22
> >> heinznabie...@me.com
> >> ___
> >> 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
>
> ___
> 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


[Scilab-users] read database file (sqlite)

2020-03-13 Thread P M
Dear Experts,

I try to read a database file (*.db).

The file is obviously written with SQLite format 3...at least a online
viewer can show me the file contentand at the file beginning it's
written: sqlite format 3

Any chance, that I can read/view this file with Scilab?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Which module to use for hassle-free image processing with scilab ?

2020-03-08 Thread P M
Hi Chin Luh,

thank you very much for the historical insight.

I've been working with this US-company and AIVP for 2 or 3
years...interesting to see how it is all connected.

Best regards,
Philipp

Am So., 8. März 2020 um 14:49 Uhr schrieb Chin Luh Tan <
chinluh@bytecode-asia.com>:

> Hi Antoine,
>
> This is a very valid point and I afraid to say that there will not be any
> absolute answer for this question.
>
> I encounter the very same issue with you 10 years back when I need to
> replace Matlab with Scilab especially in Image Processing and Neural
> Network domain.
>
> I came across SIP, which I believe it was one of the earliest Image
> Processing module for Scilab, but if I remember correctly, it was only for
> much older version of Scilab and only for linux platform.
>
> Then the SIVP toolbox appeared from China Yearly Scilab Module competition
> back then and it was a very first module based on OPENCV library. However,
> it did not cover much functions such as morphology. By then, IPD released
> to cover these missing functions. The combination of these 2 modules under
> Scilab 5.x version could cover most what I needed during that time.
> (Initial version if IPD ridding on top of SIVP to use the OPENCV lib, after
> that it maintained its own lib)
>
> However, there are some issues with this method (using 2 modules
> together), both modules were written in very different way. SIVP very much
> following Matlab syntax, while IPD is very "computer science" way. For
> example, function reading an image into SIVP is "imread", IPD is
> "ReadImage". Also, the IPD will load a lot of global variable into
> workspace which is not in my favor.
>
> Then I tried to work on SIVP and add in some functionalities and tried to
> contact the author but no reply from him. In return, some US company
> approached us and would like to "buy" the enhanced version. However, I
> insist to remained it as OSS and we came out with some other collaboration
> form and re-brand it to AIVP (Advance Image and Video Processing). The
> module was not released in public that time.
>
> The US company gone after a few years, and I decided to make the AIVP
> public, the first thing I did is to make it Scilab 6 compatible, and
> release it with the new name, and this is how IPCV born.
>
> IPCV is currently independent module, using OPENCV 4.1.2. Half of the
> functions are from SIVP, others are newly added via either Scilab functions
> or OpenCV lib. Each of the function which call the OpenCV lib will need to
> have a C/C++ gateway in which it will call the OpenCV lib.
>
> In order to make the module run in an OS, the OpenCV libs are required for
> that OS, for windows, it is pretty simple. For Linux, if we were to package
> it for all Linux distro, I guess there will be a lot of dependencies.
> (unless we restrict the number of libs used, then the packaging is more
> likely)
>
> The source codes of IPCV are published in github
> https://github.com/tanchinluh/IPCV, infact we welcome anyone who wish to
> help in improving this module. There are a lot of fields which could be
> improve, I name a few:
> 1. Convert the gateway to use new Scilab 6 gateway. (for future release)
> 2. To help package the module for all Linux (despite the size) , or any
> other suggestion welcome.
> 3. To build extra functions in Image processing using the gateway.
> 4. Documentation
>
> There are still a lot of half cooked functions in the module, which really
> need contributions from any of us here. It is hard for a module to survived
> in OSS world, w/o much support from the community.
>
> After all, If we were to launch a kickstarter project for IPCV, would
> anyone back us? 😊
>
> Have a nice day!
>
> Regards,
> Chin Luh (IPCV Dev)
>
>
>
>
>
>
>
>
>
>
>
>
>  On Sun, 08 Mar 2020 17:17:22 +0800 *Antoine Monmayrant
> >* wrote 
>
> Hi all,
>
> This mail might sound like a rant, but it is an honest question: which
> image processing toolbox is usable with scilab and actively maintained?
>
> I tried many of them and honestly I did not find one that is just working,
> easy to instal and that can be installed and used reliably on different
> platforms:
>
> - IPCV : the installation is quite difficult (at least under linux). I
> just installed it under ubuntu 19.04 and it required manual installation of
> dependencies (apt install ...) and a patch. Some functions are half
> documented and in fact not implemented (imhoughc for example). I also had
> trouble in the past where the install proved impossible during several
> months on some OSes I use at work (can't remember which flavour of linux or
> windows it was).
>
> - scicv: installs without any issue and as reported by Samuel (
> http://forge.scilab.org/index.php/p/scicv/issues/1944/
> http://forge.scilab.org/index.php/p/scicv/issues/1946/ ), overwrites
> 'write' and 'read' which breaks many native functions in scilab together
> with other useful modules (ie uman). This is a blocking issue that has not
> 

Re: [Scilab-users] [EXTERNAL] Count specific values in text file

2020-02-12 Thread P M
Hi,

Option 1:
You manually put a "." inside the file and run the script.
Since you only mentioned "pi" and "e" it's little efford.

Option 2:
You still can use csvRead even without having a "." as separator.
Note: Search range adapted to count only in digits behind the decimal sign.
You may change as you wish.

Best regards,
Philipp

// path to the txt filepath = 'pathToFile'// read the file as
stringpiAsString = csvRead(path, [],[],'string')// split the string at
'' (use no token) [piAsString] = strsplit(piAsString,'');// convert
string to doublepiDigits = strtod(piAsString);// search: how often
appears a certain value in a specific range within the
digitssearchRange = 100;searchVal = 1;// adapt the range, to search
only places behind the decimal sign
[locations] = find(piDigits(2:searchRange+1) == searchVal);//
uncomment if wished// printf("location \t number\n");// for i=
2:searchRange+1// printf("%d \t %d \n", i-1, piDigits(i));//
endprintf("The number %d appears %d times in the first %d digits of
Pi\n",searchVal,length(locations),searchRange) ;printf("The number %d
appears at following locations: \n", searchVal);disp(locations');


Am Mi., 12. Feb. 2020 um 08:57 Uhr schrieb arctica1963 <
arctica1...@gmail.com>:

> Hello Philipp
>
> Your suggestion is kind of what I am trying to do, but the text file is not
> a CSV structure. It is just a single, very big number on one row. A small
> chunk:
>
> 31415926535897932384626433832795028841971693993751058209749445923078164 etc
> (no spaces between digits)
>
> How best to load the text file and then count the number of occurrences of
> a
> specific digit (e.g. 1)? At the moment the file essentially contains a very
> big integer.
>
> Interested to see the best method of doing this.
>
> Thanks
>
>
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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] [EXTERNAL] Count specific values in text file

2020-02-11 Thread P M
Hi,

is this what you're looking for?

// path to the txt filepath = 'pathToFile'
// read the file as stringpiAsString = csvRead(path, [],['.'],'string')
// split the string at the decimal[piAsString] = strsplit(piAsString,'.');
// just get the digitspiDigits = strtod(strsplit(piAsString(2)));
// search: how often does appears a certain value in a specific range
within the digitssearchRange = 100;searchVal = 1;
[locations] = find(piDigits(1:searchRange) == searchVal);
printf("The number %d appears %d times in the first %d digits of
Pi\n",searchVal,length(locations),searchRange) ;printf("The number %d
appears at following locations: \n", searchVal);disp(locations');

Best regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ?==?utf-8?q? plotting a function that changes with x

2020-02-09 Thread P M
Hi,
with the if-loop-approach you probably thought about this:

x=(0:1:72)for i=1:length(x)
if ((x(i)<18) == %T)   // elementwise comparison
then y(i) = sin(x(i)*%pi/24)
else
y(i)= 0.1*x(i)
endendplot2d(x,y,2)

However it's a if-loop within a for loop...
Best regards,
Philipp

Am So., 9. Feb. 2020 um 10:34 Uhr schrieb Antoine Monmayrant <
amonm...@laas.fr>:

> Hello,
>
> I think that (x>18) is not doing what you think it does.
> See below two options to define  y piecewise.
> Hope it helps,
>
> Antoine
>
> --
>
> //your code
> clf
>   x=(0:1:72)
> // here you x<18 is not what your think (it's a boolean vector)
> if x<18
> then y = sin(x*%pi/24)
> else
>  y= 0.1*x
> end
> plot2d(x,y,2)
>
> // two options
>
> // using the fact that x>18 is converted into
> // 1 when the condition is true
> // 0 when the condition is false
> y2 =  sin(x*%pi/24).*(x>18) + 0.1*x.*(x<=18);
>
> plot(x,y2,"ro");
>
> // using a range of indices & find
> y3=0.1*x;
> inds=find(x>18);
> y3(inds)=sin(x(inds)*%pi/24);
>
> plot(x,y3,"g");
>
> --
>
>
>
>
> Le Dimanche, Février 09, 2020 08:56 CET, Lloyd Judd 
> a écrit:
>
> > Hello,
> > I am trying make a plot, the function of which changes depending on the
> > value of x,. What I am really trying to do is to simulate solar panel
> > out put where it roughly follows a sine  function during daylight but is
> > basically zero from sunset to sunrise, and then later overlay that with
> > the demand curve. But I am still experimenting with the code at this
> > stage.
> >  I tried all different ways;  using the "function" command and the "plot
> > 2d" command . It only ever seems  to plot the last argument in the "if
> > then else" statement.
> > For example with this code;
> > clf
> >x=(0:1:72)
> >   if x<18
> >   then y = sin(x*%pi/24)
> >   else
> >   y= 0.1*x
> >end
> >   plot2d(x,y,2)it only plots  the y=0.1x partConversely if I put the
> > sine function under the "else" statement, it only plots the  sin
> > function.clfx=(0:1:72)
> > if x<18 then
> >  y=0.01*x
> > else
> >  y=sin(x*%pi/24)
> > end
> >   plot2d(x,y,2)What is the best way to plot a function that changes
> > depending on the range of x?Thanks and regardsLloyd Judd
> >
>
> ___
> 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] ?==?utf-8?q? density in a graph

2020-01-23 Thread P M
something like this...only in gray?
[image: test.png]

Am Do., 23. Jan. 2020 um 19:08 Uhr schrieb Antoine Monmayrant <
amonm...@laas.fr>:

> Hello Jean-Philippe,
>
> I think I understand what you want to do, but there is no easy way to get
> this in scilab.
> The main issue is that scilab does not support transparency.
> Otherwise, you could just plot your lines in black with 1/32 alpha (or
> 255/32 alpha if 0 means transparent and 255 solid color).
> For this kind of plot, I usually plot everything in scilab with a dummy
> color (let's say blue), export in svg, edit the svg to replace the dummy
> color by the transparent one.
>
> Antoine
>
>
> Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet <
> jean-philippe.gri...@wanadoo.fr> a écrit:
>
> > Dear all,
> >
> > I am drawing a graph in a gray scale (say from 1 to 32), using lines of
> > different density. I would like that, in the region of intersection of
> > two lines, the shade of gray be the sum of the densities of each line.
> > How can I manage that ?
> >
> > Thanks in advance for any hint
> >
> > JP Grivet
> >
> >
> > ___
> > 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
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] correctly applying A-weighting onto sound (dB-to-dBA)

2020-01-07 Thread P M
Dear All,

for a simulation temperatures shall be converted into a sound.

E.g.: Each temperature value represents a frequency.

Low temperatures = low frequency
High temperature = high frequency.

For creating the sound I use following approach:
  - create empty array, that will represent the final sound file
  - insert at the correct position(s) the corresponding frequencies (that
represent a dedicated temp-value)
 - save the - now completely filled - array using: savewave()

 I assume, that all frequencies are saved with the same amplitude.
Since different frequencies are recognized differently by the human ear,
some frequencies will appear louder than others.

To take care of this, I would like to apply the A-weighting curve onto the
sound.

How could this be done in Scilab?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] adding sound to avi-file within Scilab

2019-12-23 Thread P M
Dear Experts,

is it possible to merge sound and video in one of the Scilab toolboxes?

>From what I find the image processing toolboxes can create avi's, but only
put image as frames into the avi.

My current approach would be:

- create (or already have) a set of images...each one represents a single
frame
- put all images into a single avi-file
- create the sound and save it as a wav-file
- use a 3rd party software to merge avi+sound

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


Re: [Scilab-users] designing a sound file

2019-12-22 Thread P M
...ticket is solved.
Thank you Jan + Federico.

Creating a zero-vector of just the right length and inserting the sound at
the correct position just does it.

BR
Philipp


Am So., 22. Dez. 2019 um 00:23 Uhr schrieb Federico Miyara <
fmiy...@fceia.unr.edu.ar>:

>
> Philipp,
>
> You can certainly use the strategy you propose. This should work:
>
> tick = wavread("path/tick.wav");
> tock = wavread("path/tock.wav");
> ntick =  length(tick);
> ntock =  length(tock);
> m = max(ntick, ntock;  // Just in case both lengths differ
> Fs = 44100;
> x = zeros(1, n*Fs + m);// Allocate space allowing room for
> the last sound
> for k = 0:n
>if floor(k/2)== k/2 // tick if k is even, tock if odd
>x(k*Fs + 1:k*Fs + ntick) = tick;
>else
>x(k*Fs + 1:k*Fs + ntock) = tock;
>end
> end
>
> If you would like the sound to be a bit more realistic, you could apply
> some reververberation. To do that, create an impulse response by generating
> a random noise using grand with normal distribution and applying to it a
> decreasing exponential envelope with a time constant about 1/14 times the
> desired reverberation time (about 0.5 s for a normal living room). The
> duration of the impulse response should be longer than the reverberation
> time.
>
> Then convolve it with the dry signal x using conv. When you are done, sum
> an attenuated version of the result to the dry signal.
>
> Redards,
>
> Federico Miyara
>
>
> On 21/12/2019 17:16, P M wrote:
>
> Dear experts,
>
> I try to compose (design) a small sound file, made of several wav-files.
>
> My question:   How to approach this task in the best way?
>
>
> Here some input:
>
> - sound 1: Tick-sound of a clock
> - sound 2: Tock-sound of a clock
>
> each wav-file has these properties:
> - length: 0.1 sec
> - bits: 32
> - sample rate: 44100 Hz
> - mono
>
> Now:
> I want to create a tick-tock sound of length  n-seconds  .. where I can
> choice the length of n
> Each Tick-Tock-sound must be exactly 1-second apart from each other.
>
> I load the sounds with: loadwave
>
> Do I have to create a single "silent" wav file first, which is  n-seconds
> long and than insert at the correct position the sound signal?
>
> Thank you,
> Philipp
>
> ___
> users mailing 
> listusers@lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users
>
>
>
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] designing a sound file

2019-12-21 Thread P M
Dear experts,

I try to compose (design) a small sound file, made of several wav-files.

My question:   How to approach this task in the best way?


Here some input:

- sound 1: Tick-sound of a clock
- sound 2: Tock-sound of a clock

each wav-file has these properties:
- length: 0.1 sec
- bits: 32
- sample rate: 44100 Hz
- mono

Now:
I want to create a tick-tock sound of length  n-seconds  .. where I can
choice the length of n
Each Tick-Tock-sound must be exactly 1-second apart from each other.

I load the sounds with: loadwave

Do I have to create a single "silent" wav file first, which is  n-seconds
long and than insert at the correct position the sound signal?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scilab API sciprint to print on the same line

2019-12-13 Thread P M
...even more strange than the reported bug:
clc(1) seems to behave different when directly written into the console vs
used from SciNotes.

from SciNotes:

clc();for i=1:10 mprintf("%d\n",i)endclc(1)

result in console:
 1
2
3
4
5
6
7  // note that number 8,9,10 are cleared..so it's 3 lines, not only two

-->

code directly put into console...do this step by step
--> clc();
--> for i=1:10 mprintf("%d\n",i) end
1
2
3
4
5
6
7
8
9
10

--> clc(1)
1
2
3
4
5
6
7
8
9

-->  // works as expected

tested on win7, Scilab 6.0.2

best regards,
Philipp




Am Do., 12. Dez. 2019 um 23:20 Uhr schrieb Samuel Gougeon :

> Hello Chin Luh
>
> Le 12/12/2019 à 17:10, Chin Luh Tan a écrit :
>
> Hi Samuel,
>
> Thanks for your reply.
>
> Previously I was using clc(linenumtoclear) for showing this effect in
> scilab, but i never thought of the mprintf, i was using disp that time
>
> for i = 1:100
> disp("Static counter : " + string(i));
> sleep(1); clc(1)
> end
>
>
> I could not think using disp(). According to its expected behavior, it
> always appends an \n, while we want to stay on the line, what's the purpose
> of \r instead of \n, and mprintf() does not append anything to what it is
> requested to display.
>
>
> it seems that the mprintf also kind of broken? as it needs 3 \n to get
> this result?
>
>
> I do not think that disp() is broken. It looks OK, while clc(1) is bugged
> . This is why extra \n
> are required for this workaround using clc.
>
> I also tried to look into the clc C source and see whether I could use the
> c code of clc in scilab api but no luck, but your example of mprintf which
> need 3 \n inspired me to look into the mprintf c code and see how it works.
>
>
> Now that you know the clc code, please do not hesitate to propose a patch
> for its clc(1) bug ;-))
> Regards
>
> Samuel
>
>
> ___
> 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] ?= GUI hel

2019-12-03 Thread P M
> > So why do they use "clear" at the beginning of every script? This is
> like a Matlab signature.
>

I am no matlabber, but like to start my scripts with:

clc()
clear("all")
delete("all")
// in older days also: stacksize("max")

At least so long, as I am working on a script.
Pressing F5 for restating the script just ensures, that I always start from
new without the danger of keeping old variables/figure etc

Maybe this is some kind of lazyness...I would say: convenience :-)

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


Re: [Scilab-users] ?==?utf-8?q? GUI help

2019-11-28 Thread P M
Hallo Claus,

from what I understand the question is: How can GUI updated outside of the
function "calc" ?

In other words:
right now "calc" updates the GUI.
I guess the aim is that "calc" only returns output values, which will be
used to update the GUI .

Way 1:
Use global variables, which can be used in every function of the GUI.
The return value of the function will change this global variable.

Way 2
Give the calc() function output variables, such as:
function [out_var1, out_var2] = calc(arg1, arg2)
out_var1 = arg1 + ...
out_var2 = arg2 +
endfunction
With this it should be possible to update the GUI outside of a callback
function.

Way 3.similar to way 1...and the way I did in the past
use a single global variable, called: handles

handles is more a structure, than a single variable.
It contains all uicontrols aswell as all variables necessary to update the
GUI.
e.g.:

handles.f1 = figure()  // that would be the main GUI
handles.f2 = figure()  // that would be a sub GUI
handles.pb1 = uicontrol()   // that would be a push button of the GUI
handles.var1 =  // that would be a variable, necessary to
keep available to all uicontrols
handles.var2 =  // that would be another variable,
necessary to keep available to all uicontrols


When definig the callback function it would look like this:

function calc(handles)
  locVar1 = handles.var1
  locVar2 = handles.var2
  //...do the calculations...to change locVar1, locVar2
  //...update the handle variable(s)
  handles.var1 = locVar1
  handles.var2 = locVar2
  handles = resume(handles)
endfunction

one would call the function just as: calc(handles)


A general note:
It helps to put all callback functions into a separate subfolder
The main function (that only defines the GUI) will call and load all
callback functions from that subfolder.

I give callback function scripts the extension:  *.sci
I give the main GUI script the extension: *.sce
This is all not mandatory, but increases the overview.

To create the global variable "handles" I define a separate function:

function handles = Init(handles)
  handles.var1 = 0  // init value of var1
  handles.var2 = 0  // init value of var2
  handles.cmap = graycolormap(255)  // init GUI colormap
  handles.statusSlider = 0// can be a status variable for a slider..if
it has been used or not
  handles.statusPB = 0   // can be a status variable for a push bitton
..such as: has been pressed or not
  // etc...

  handles = resume(handles)
endfunction

sorry for the long Mail,
Best regards,
Philipp









Am Do., 28. Nov. 2019 um 08:57 Uhr schrieb Antoine Monmayrant <
amonm...@laas.fr>:

> Hello Claus,
>
> I've been playing a bit with GUIs for teaching, so maybe I can help.
> The issue is that I don't get what your problem is exactly here, so I my
> answer might be a bit off-topic.
> Do not hesitate to rephrase your issue, I'll try a more focused answer.
>
> Anywya, here is how I think your code could be improved:
>
> (1) You can use 'calc' as the callback for all of the editable text field
> so that your result gets shown right away, without having to press a button.
> (2) You should populate all the uicontrols of your gui first, then only
> update the displayed values, the visibility of the uicontrols, etc inside
> your calc function. (ie no more creating a uicontrol inside a callback)
> (3) The 'tag' property of any uicontrol together with 'findobj()' are
> really nice to get/set the properties of each existing uicontrol.
> (4) You can rely on a proper Model-View-Controler approach (or any other
> well established method to avoid mixing gui stuff with calculation stuff).
>
> I attached a small gui I use to illustrate optical anti-reflection coating.
> It is far from perfect (I did not implement a proper model-view-controler
> for example).
> But you can see how I tried to separate the different parts of the code an
> how I use findobj/tag/get/set,  etc.
>
> Hope it helps,
>
> Antoine
>
> Le Mercredi, Novembre 27, 2019 19:21 CET, Claus Futtrup <
> cfutt...@gmail.com> a écrit:
>
> > Hi there
> >
> > I'm trying to build a GUI. For simplicity on the forum, I've built a
> > really simple example of what I'm trying to do. How can I make the
> > "conditional" GUI output work and not have it inside the calc function?
> > ... or, how would you do it? Thanks.
> >
> > Best regards, Claus.
> >
> > // GUI_EXAMPLE.SCE
> > //
> > // Demo of how to build a simple GUI in Scilab.
> > // Real simple, with two input variables and one output.
> > // The example uses the basic mechanical example of a mass and a spring
> as
> > // input parameters and calculates the resonance frequency of the
> mechanical
> > // system.
> >
> > // Initialize variables
> > m  =  1;  // Moving mass 'm'(kilogram)
> > k  =  1;  // Stiffness, spring constant 'k'(Newton per meter)
> > fres  =  1;  // Resonance frequency (Hertz)
> > show_result  =  %f;
> >
> > function  calc()
> >  m  =  evstr(g

[Scilab-users] using transparency in Scilab

2019-11-18 Thread P M
Dear Scilab developers,

it seems that the topic of using transparency in Scilab pops up now and
then.

So wouldn't it be useful to implement transparency once and for all into
Scilab instead of using work-arounds?

Just a humble question :-)

Best regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] ?==?utf-8?q? rotate x_tick labels

2019-10-17 Thread P M
Dear Antoine,
that does it.
Thank you,
Philipp

Am Do., 17. Okt. 2019 um 18:49 Uhr schrieb Antoine Monmayrant <
amonm...@laas.fr>:

> Houps,
>
> I meant:
>
> a.x_ticks.labels(i)="$\rotatebox{90} {"+myLabels+"}$";
>
> Antoine
>
> Le Jeudi, Octobre 17, 2019 15:40 CEST, P M  a
> écrit:
>
> > Dear all,
> >
> > how can one insert the values of a string vector into a latex-formatted
> > string?
> >
> > Example:
> >
> > myLabels = [ 'label1'; 'label2'; ; label_n];   // myLabels = vector
> of
> > strings
> >
> > I am struggling by trying to use the entries of myLabel as automatic
> > generated LaTex-labels for x_ticks.
> >
> > for i = 1: nrOfLabels
> > str = myLabels(i);
> > a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write
> > "str" in latex format and 90° rotated to each label positionend
> >
> > Of course it is possible to type {str} by hand for each label.
> > But as the labels might change from plot to plot this is not really an
> > option.
> > Any idea?
> >
> > Thank you,
> > Philipp
>
> ___
> 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


[Scilab-users] rotate x_tick labels

2019-10-17 Thread P M
Dear all,

how can one insert the values of a string vector into a latex-formatted
string?

Example:

myLabels = [ 'label1'; 'label2'; ; label_n];   // myLabels = vector of
strings

I am struggling by trying to use the entries of myLabel as automatic
generated LaTex-labels for x_ticks.

for i = 1: nrOfLabels
str = myLabels(i);
a.x_ticks.labels(i)="$\rotatebox{90} {str}$";   // this will write
"str" in latex format and 90° rotated to each label positionend

Of course it is possible to type {str} by hand for each label.
But as the labels might change from plot to plot this is not really an
option.
Any idea?

Thank you,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] convert matlab code to scilab

2019-10-16 Thread P M
Dear Stephane,

thanks for your help.
I think in my case the problem is solved just by using:

[Minstances_hat] = unique(B(:));

This gives a vector of used px-values for different objects shown in image.
Each object is defined by a single pixel value.
Since B is the B-plane of an RGB-image, it is possible to assign each pixel
from the original image to an object using these values.

Thanks again,
Philipp


Am Mi., 16. Okt. 2019 um 13:27 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Sorry, in my answer the loop constructs "ic", not  "ia", i.e. the full
> equivalent to Matlab's "[C,ia,ic] = unique(A)" is in Scilab:
>
> [C,ia] = unique(A)
> for i=1:length(A)
> ic(i)=find(A(i)==C)
> end
>
> S.
> Le 16/10/2019 à 13:19, Stéphane Mottelet a écrit :
>
> Sorry, I thought you were just asking about the tildas, not the syntax of
> unique() in Scilab.
>
> Please see
>
> https://help.scilab.org/docs/6.0.2/en_US/unique.html
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/unique.html>
>
> vs
>
> https://fr.mathworks.com/help/matlab/ref/unique.html
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/fr.mathworks.com/help/matlab/ref/unique.html>
>
> Matlab syntax [C,ia,ic] = unique(___)  with 3 outputs has no equivalent in
> Scilab. i.e. in Matlab, after  [C,ia,ic] = unique(A) then A=C(ic), i.e.
> values in ic are the indices of corresponding unique value in C.  They can
> be recovered with the quick and dirty following loop:
>
> for i=1:length(a)
>  ia(i)=find(a(i)==C)
> end
> S.
>
> Le 16/10/2019 à 12:10, P M a écrit :
>
> [ans,ans,Minstances_hat] = unique(B(:));
> gives:  Wrong number of output arguments.
>
> I also tried :
>
> [Minstances_hat] = unique(B(:));
>
> and get a vector.
> also
>
> [Minstances_hat,index] = unique(B(:));
>
> seem to work.
>
>
> However afterwards there is this line:
>
> masks = reshape(Minstances_hat-1,size(B));
>
> I try to convert via:
>
> mask = matrix(Minstances_hat-1,size(B));
>
> but no success.
>
>
>
>
>
>
> Am Mi., 16. Okt. 2019 um 11:50 Uhr schrieb Stéphane Mottelet <
> stephane.motte...@utc.fr>:
>
>> Hello
>> Le 16/10/2019 à 11:46, P M a écrit :
>>
>> Dear experts,
>>
>> trying to convert a matlab code to scilab I come across following line:
>>
>> [~,~,Minstances_hat] = unique(B(:));
>>
>> How to replace the "~" symbol?
>>
>> by dummy names, e.g.
>>
>> [ans,ans,Minstances_hat] = unique(B(:));
>>
>> There is no equivalent mechanism in Scilab.
>>
>> B is the blue channel of a RGB image...hence a m x n matrix of integers 
>> (type(B) = 8 )
>>
>>
>> Thank you,
>>
>> Philipp
>>
>>
>> ___
>> users mailing 
>> listusers@lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>>  
>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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)344234688http://www.utc.fr/~mottelet 
>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/www.utc.fr/~mottelet>
>>
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
>> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users>
>>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>  
> <https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 

Re: [Scilab-users] convert matlab code to scilab

2019-10-16 Thread P M
 [ans,ans,Minstances_hat] = unique(B(:));
gives:  Wrong number of output arguments.

I also tried :

[Minstances_hat] = unique(B(:));

and get a vector.
also

[Minstances_hat,index] = unique(B(:));

seem to work.


However afterwards there is this line:

masks = reshape(Minstances_hat-1,size(B));

I try to convert via:

mask = matrix(Minstances_hat-1,size(B));

but no success.






Am Mi., 16. Okt. 2019 um 11:50 Uhr schrieb Stéphane Mottelet <
stephane.motte...@utc.fr>:

> Hello
> Le 16/10/2019 à 11:46, P M a écrit :
>
> Dear experts,
>
> trying to convert a matlab code to scilab I come across following line:
>
> [~,~,Minstances_hat] = unique(B(:));
>
> How to replace the "~" symbol?
>
> by dummy names, e.g.
>
> [ans,ans,Minstances_hat] = unique(B(:));
>
> There is no equivalent mechanism in Scilab.
>
> B is the blue channel of a RGB image...hence a m x n matrix of integers 
> (type(B) = 8 )
>
>
> Thank you,
>
> Philipp
>
>
> ___
> users mailing 
> listusers@lists.scilab.orghttps://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)344234688http://www.utc.fr/~mottelet
>
> ___
> 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


[Scilab-users] convert matlab code to scilab

2019-10-16 Thread P M
Dear experts,

trying to convert a matlab code to scilab I come across following line:

[~,~,Minstances_hat] = unique(B(:));

How to replace the "~" symbol?

B is the blue channel of a RGB image...hence a m x n matrix of
integers (type(B) = 8 )


Thank you,

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


Re: [Scilab-users] How to identify componants in a figure ?

2019-10-11 Thread P M
Hi,
if you want to count how many axes-children there are in a figure, you may
work with "tags".
Quick-n-dirty example below.
best regards,
Philipp

clc;clear();
// create the figuref = figure();
// first axesplot3d();a3d = gca();a3d.tag = 'axes';
// menumenu_1=uimenu(f,'label', '$\LaTeX$');menu_1.tag = "menu";//
submenuml1=uimenu(menu_1,'label',
'$\int_0^\infty\mathrm{e}^{-x^2}\,dx$');ml2=uimenu(menu_1,'label',
'$\frac\sqrt{\pi}2$');ml1.tag = "submenu";ml2.tag = "submenu";
// uicontrolu=uicontrol(f,'style','listbox','position', [10 10 150
160]);u.tag = "uicontrol";
// second axesnewaxes()plot2d();a2d = gca();a2d.tag = "axes";
c = f.children
// from all figure children count the number of axes-childrencount =
0;for i = 1:length(c)
str = c(i).tag;
if(str == "axes")
count = count+1;
endendprintf("there are %d axes children in f \n", count);
// get the position of the axes children from all figure
childrenposition = zeros(count,1);j = 0;for i = 1:length(c)
str = c(i).tag;
if(str == "axes")
j = j+1;
position(j) = i;
endendprintf("axes children of f can be found at position %d \n", position);


Am Fr., 11. Okt. 2019 um 11:19 Uhr schrieb Perrichon <
perrichon.pie...@wanadoo.fr>:

> Hello
>
>
>
> In my application, built with uicontrol in a main figure, I add graphs
> (Axes) with bode or Nyquist plot in the the main frame
>
>
>
> So, at the end, if we do
>
> f=gcf()
>
> I get :
>
>
>
> children: matrix 39x1
>
>
>
> I add
>
> a=f.children
>
>
>
> Then a is a collection (with bode) :
>
>
>
> Axes
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> uicontrol
>
> …..
>
> uicontrol
>
> uicontrol
>
> uimenu
>
> uimenu
>
> Axes
>
>
>
> So, How can I get, in a loop with length(a), the numbers of the chidren
> who are Axes ?
>
>
>
> In that case I hope something like [1, 39]
>
>
>
> Is there a way to do that ?
>
> I find nothing with the « get » function ?
>
>
>
> Thanks
>
>
>
> Pierre P.
>
>
>
>
>
>
>
>
>
>
> ___
> 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


[Scilab-users] Scilab + neural Networks (CNN / FCNN)

2019-08-23 Thread P M
Dear experts,

I am investigating if Scilab is capable to build a CNN or FCNN.

So far I understood the ANN-Toolbox is not able to build these neural
network types.
Also the Neural-Network-Module does not seem to support CNN's or FCNN's.

However it seems to be possible by using caffee together with scilab's
python toolbox.
see:
http://scilabipcv.tritytech.com/2017/08/21/deep-learning-cnn-with-scilab-using-caffe-model/


Question:
Is there work ongoing to implement CNN's and / or FCNN's into the Scilab
modules mentioned above?

Best regards,
Philipp
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] gui2bitmap 1.0 is released

2019-08-13 Thread P M
Ted,

if one is able to execute following commands from Scilab:
- GetActiveWindow
- GetFocus

What is the result?
- a window handle to the active window
- a handle to the window that has the keyboard focus

I am no hardcore programmer, but to my understanding still there was no
screenshot taken.

So what still would be necessary:
Call win10 snipping tool from scilab in such a way that it performs the
screenshot on the window that has the focus.

BR
Philipp




Am Di., 13. Aug. 2019 um 21:09 Uhr schrieb VTX1801 :

> Samuel,
> Observations:
> The Windows 10 Snipping Tool has a window mode that accurately captures the
> selected window.
>
> Additionally, if you hold down the Alt key when you press the Print Screen
> key the window
> that has focus is captured.
> Therefore, there must be a Windows command to capture the window that has
> focus.
> This command might be available to execute from the gui2bitmap code.
>
>
> Found this information regarding the window command:
>
> WIN32 API
> GetActiveWindow will return the top-level window that is associated
> with the input focus. GetFocus will return the handle of the window
> that has the input focus.
>
> This article might help:
> http://www.microsoft.com/msj/0397/Win32/Win320397.aspx
>
> Hope this helps.
> Best regards,
> Ted
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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] gui2bitmap 1.2 is released

2019-08-09 Thread P M
Hi Samuel,

I confirm:
- test with Win10 Laptop
- screen resolution 1920 x 1080 px
- screen scale factor 100 & 125%

using:

gui2bitmap("setScale", 100);  // 125 respectively
gui2bitmap("setBorders", [%F %F %F]);gui2bitmap(f, pathName, %t)   //
with no borders left, bottom, right

results in a correct screen shot image.

Thanks, great work.
Philipp

Am Fr., 9. Aug. 2019 um 04:53 Uhr schrieb Samuel Gougeon :

> This release should answer to display-scaling issues encountered by Ted &
> Philipp.
>
> Regards
> Samuel
>
> https://atoms.scilab.org/toolboxes/gui2bitmap
>
> CHANGES 1.1 => 1.2
> ==
> * "setMenu", "setScale" and "setBorders" syntaxes added.
> * gui2bitmap() now works as well on Linux (and MacOS X: not tested)
> * Unit tests added.
> * Tested on Windows 7 1920x1080 (with scale = 100|125|150%), 1600x900, 
> 1280x720
> * Tested on Linux Fedora 24
>
>
> SYNTAXES
> 
> gui2bitmap(idFig, filename)
> gui2bitmap(idFig, filename, withBorders)
>
> gui2bitmap("setMenu", parentHandle)
>
> gui2bitmap("setBorders", borders)
> gui2bitmap("setScale", scale)
>
> with:
>
> idFig  : handle of the figure
> filename   : pathname to the output image file
> withBorders: boolean
> borders: vector of 3 booleans
>  [left_border, bottom_border, right_border]
> scale  : Screen display zoom factor, in percentage
>
>
>
> Le 02/08/2019 à 14:29, Samuel Gougeon a écrit :
>
> Hello,
>
> I am glad to announce the first release of the *gui2bitmat* package :
> https://atoms.scilab.org/toolboxes/gui2bitmap
>
> gui2bitmap() aims to export into a .png | .jpg | .gif | .bmp bitmap image
> any graphical figure or User Interface with interactive components
> (uicontrols).
> An option allows to get the image of the full window, including its
> border/frame (with its menus bar, tools bar, status bar, and other bars ;-)
>
> It is a stand-alone function (no thirdparty needed), easy to use and easy
> to maintain
> (no hard code to recompile from a Scilab version to next ones).
>
> It is tested on Windows, but it should run as well on Linux and MacOS.
> It is fully documented.
>
> Enjoy.
> Samuel
>
> ---
> gui2bitmap
> get a bitmap image of a graphical figure or interface, including its
> uicontrols, nay window borders
>
> SYNTAXES
> 
> gui2bitmap(idFig, filename)
> gui2bitmap(idFig, filename, withBorders)
>
> idFig  : handle of the figure
> filename   : pathname to the output image file
> withBorders: boolean
>
>
>
> ___
> 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] How to print GUI window?

2019-08-06 Thread P M
beside the Images names, both Images are created with exact the same
codesee attachment

Note:
The appearance of the borders in the Win7 Image.

I guess it is the window style setting that leads to the difference.





Am Di., 6. Aug. 2019 um 14:45 Uhr schrieb P M :

> ..forgot a second Image
>
> Am Di., 6. Aug. 2019 um 14:45 Uhr schrieb P M :
>
>>  nice, so we getting closer.
>>
>> I would blame win10 for the scaling...
>>
>> This is, because in win7 I do get the correct Image, when executing the
>> code I tested under win10.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Am Di., 6. Aug. 2019 um 14:03 Uhr schrieb VTX1801 <
>> sl1...@rochester.rr.com>:
>>
>>> Philipp,
>>> Your hint was the answer.
>>> However, there is a slight background image on the left, right and
>>> bottom.
>>> The screen scale was set to 125 percent.
>>> Now with the scale set to 100 percent the GUI prints on one page with
>>> about
>>> 1/4 inch left and right space and about one inch top and bottom space.
>>>
>>> Is the gui2bitmap code trying to extract screen image by pixel size and
>>> position?
>>> Can the gui2bitmap mode be set to capture the window that has focus?
>>>
>>> Best Regards,
>>> Ted
>>>
>>>
>>>
>>> --
>>> Sent from:
>>> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
>>> ___
>>> users mailing list
>>> users@lists.scilab.org
>>> http://lists.scilab.org/mailman/listinfo/users
>>>
>>


test_gui2bitmap.sce
Description: Binary data
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to print GUI window?

2019-08-06 Thread P M
..forgot a second Image

Am Di., 6. Aug. 2019 um 14:45 Uhr schrieb P M :

>  nice, so we getting closer.
>
> I would blame win10 for the scaling...
>
> This is, because in win7 I do get the correct Image, when executing the
> code I tested under win10.
>
>
>
>
>
>
>
>
>
> Am Di., 6. Aug. 2019 um 14:03 Uhr schrieb VTX1801  >:
>
>> Philipp,
>> Your hint was the answer.
>> However, there is a slight background image on the left, right and bottom.
>> The screen scale was set to 125 percent.
>> Now with the scale set to 100 percent the GUI prints on one page with
>> about
>> 1/4 inch left and right space and about one inch top and bottom space.
>>
>> Is the gui2bitmap code trying to extract screen image by pixel size and
>> position?
>> Can the gui2bitmap mode be set to capture the window that has focus?
>>
>> Best Regards,
>> Ted
>>
>>
>>
>> --
>> Sent from:
>> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
>> ___
>> 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] How to print GUI window?

2019-08-06 Thread P M
 nice, so we getting closer.

I would blame win10 for the scaling...

This is, because in win7 I do get the correct Image, when executing the
code I tested under win10.









Am Di., 6. Aug. 2019 um 14:03 Uhr schrieb VTX1801 :

> Philipp,
> Your hint was the answer.
> However, there is a slight background image on the left, right and bottom.
> The screen scale was set to 125 percent.
> Now with the scale set to 100 percent the GUI prints on one page with about
> 1/4 inch left and right space and about one inch top and bottom space.
>
> Is the gui2bitmap code trying to extract screen image by pixel size and
> position?
> Can the gui2bitmap mode be set to capture the window that has focus?
>
> Best Regards,
> Ted
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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] How to print GUI window?

2019-08-06 Thread P M
one hint

what is the scale factor of your screen settingmine was set to 125%
I try to freely translate from German windows to english
-> right click on desktop
-> Display setting (or something like this..second from the bottom)
-> change size of text, Apps and other elements

back to 100% and the image looks different
still there are pixels around the GUI from the background, but at least the
complete figure is screen shotted

Am Di., 6. Aug. 2019 um 10:33 Uhr schrieb P M :

> Hi Ted,
>
> I confirm the issue you describe with:
>
> - DELL Laptop
> - Win 10
> - screen resolution: 1920 x 1080
> - Scilab 6.0.2
>
> following code gives the result in attachment:
>
> clc;clear();// Generate a nice GUI (from 
> demos)exec("SCI/modules/gui/demos/uicontrol_plot3d.dem.sce",-1);//f = 
> gcf();f.figure_size = [1300, 780];f.figure_position = [125, 
> 25];sleep(500)figGUI = "TMPDIR/gui2bitmap/gui2bitmap.png";// Export the 
> windowgui2bitmap(f, figGUI, %t)   // with window bordersdisp(f);
>
>
>
>
>
>
>
> Am Di., 6. Aug. 2019 um 06:11 Uhr schrieb P M :
>
>> Hi Ted,
>>
>> please confirm:
>> - your screen is: 1920 x 1080
>> - The GUI position is 125,25
>> - The GUI size is 1300 x 780...including borders and menu bars
>>  so if:
>>  f = handle of your figure
>>  than:
>>  f.position = [125, 25 , 1300, 780]  ??
>>
>> - The resulting image from gui2bitmap shows the GUI in a false way
>> (Background is visible at left and top border)?
>>
>> BR
>> Philipp
>>
>>
>>
>>
>> Am Mo., 5. Aug. 2019 um 20:28 Uhr schrieb VTX1801 <
>> sl1...@rochester.rr.com>:
>>
>>> Samuel,
>>> Windows 10 OS.
>>> The screen resolution of my laptop is set to 1920x1080.
>>> I still see the problems after atomsUpdate("gui2bitmap").
>>>
>>> The GUI is completely inside the screen.
>>> With about 1/4" gap above and below and about 1 inch on either side.
>>>
>>> The GUI appears to grow 1/4 inch only to the right side and down
>>> directions
>>> when gui2bitmap is executed.
>>> The resulting gui2bitmap look zoomed in and loses 3 inches from the right
>>> side and an inch or more from the bottom.
>>>
>>> Additionally, the area to the left and above the gui2bitmap screen
>>> capture
>>> shows the background of what was behind the GUI.
>>>
>>> I executed the following command atomsUpdate("gui2bitmap"), and restarted
>>> Scilab.
>>> No difference.
>>>
>>> Willing to redesign the GUI. How to make the graph area smaller with the
>>> same size uicontrols to result in slightly smaller GUI size?
>>>
>>> Lastly, tested using Snipping Tool software with mode set for window
>>> capture.
>>> Click on the GUI window and the complete GUI window appears in the
>>> Snipping
>>> Tool window with an all white background.
>>>
>>> Unfortunately, printing results with image printed on two sheets with
>>> printer basic preferences orientation set to "landscape" and advanced
>>> preferences scaling set to "fit to paper size".
>>> Vertical size fits the paper sheet but additional 2.6 inches on the
>>> second
>>> paper sheet.
>>>
>>> Very frustrating.
>>>
>>> Please advise,
>>> Ted
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from:
>>> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
>>> ___
>>> 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] How to print GUI window?

2019-08-05 Thread P M
Hi Ted,

please confirm:
- your screen is: 1920 x 1080
- The GUI position is 125,25
- The GUI size is 1300 x 780...including borders and menu bars
 so if:
 f = handle of your figure
 than:
 f.position = [125, 25 , 1300, 780]  ??

- The resulting image from gui2bitmap shows the GUI in a false way
(Background is visible at left and top border)?

BR
Philipp




Am Mo., 5. Aug. 2019 um 20:28 Uhr schrieb VTX1801 :

> Samuel,
> Windows 10 OS.
> The screen resolution of my laptop is set to 1920x1080.
> I still see the problems after atomsUpdate("gui2bitmap").
>
> The GUI is completely inside the screen.
> With about 1/4" gap above and below and about 1 inch on either side.
>
> The GUI appears to grow 1/4 inch only to the right side and down directions
> when gui2bitmap is executed.
> The resulting gui2bitmap look zoomed in and loses 3 inches from the right
> side and an inch or more from the bottom.
>
> Additionally, the area to the left and above the gui2bitmap screen capture
> shows the background of what was behind the GUI.
>
> I executed the following command atomsUpdate("gui2bitmap"), and restarted
> Scilab.
> No difference.
>
> Willing to redesign the GUI. How to make the graph area smaller with the
> same size uicontrols to result in slightly smaller GUI size?
>
> Lastly, tested using Snipping Tool software with mode set for window
> capture.
> Click on the GUI window and the complete GUI window appears in the Snipping
> Tool window with an all white background.
>
> Unfortunately, printing results with image printed on two sheets with
> printer basic preferences orientation set to "landscape" and advanced
> preferences scaling set to "fit to paper size".
> Vertical size fits the paper sheet but additional 2.6 inches on the second
> paper sheet.
>
> Very frustrating.
>
> Please advise,
> Ted
>
>
>
>
>
>
> --
> Sent from:
> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> ___
> 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


  1   2   >