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

2020-03-09 Thread Chin Luh Tan
tHi, 



Just a little bit correction, the module currently I am working on is IPCV, not 
SIVP. 



I overlooked the scicv in comparison previously as I was "intoxicated" in 
telling history of the modules related to IPCV.



In fact I was trying to work on scicv as well, as it is almost a complete set 
to link to the opencv library. As mentioned by Clement, the link to the opencv 
is generated by SWIG, and since it is automatic, there could be a lot of 
crashed in name. 



On top of that, the syntax of the function are very similar to python, so it 
makes sense to for those switching from python to Scilab. 



As it is just too much datatype in OpenCV, it is almost impossible to map each 
of everyone to Scilab. Hence, then only way is to leave the output of a 
function to be in "OpenCV space" and computation goes on until the final result 
which is then convert back to Scilab for the result. 



For example, look at this tutorial : 
https://www.scilab.org/tutorials/computer-vision-%E2%80%93-structural-analysis



somewhere in the middle of the codes we have:



cont = contours(maxI);

hull = convexHull(cont);

hulld = double(hull(:));



this cont, hull are not Scilab variable, but cont required as the input for the 
convexHull function. If we convert it to Scilab var, then it will need to 
convert back to the opencv var to be accepted in the next function. hulld is 
the last result to convert to double.



About the opensource, from technical point of view, if I understand correctly, 
the whole module is generated by SWIG, and having the source is just... 
useless? or at least, once u have modified the source to fix some bugs, 
wait...this is provided the generated codes are readable. And once you modified 
it, the whole thing need to be maintained manually from that point onward? Else 
when the dev move to new version of OpenCV, the whole source will be refreshed 
again... (I could be wrong).



Let's switch to the coding style:


Let's compare if one need to implement function Hough transform:



in opencv, you can find the example of python, then follow the similar flow  to 
get to the end result. 



https://docs.opencv.org/4.1.2/d9/db0/tutorial_hough_lines.html



in IPCV, you can find the example in C/C++, then create a new gateway file 
under IPCV gateway folder, and add some lines in the source code from the 
example. 




#include "Whatever" 



int main(int argc, char** argv)

{

    // Declare the output variables

    GetImage()

    



    Mat dst, cdst, cdstP;

      .

    HoughLines(dst, lines, 1, CV_PI/180, 150, 0, 0 ); // runs the actual 
detection

    .



    SetImage()



    return 0;

}





The "GetImage" and "SetImage" is just an example of sending and passing the 
images/date to the gateway for computation, so this will create a function 
like: 



out= imhough(S,m,n) ... 



Which to choose is a preference of choice, at least, for me. 



Hope this helps. 





Regards,

Chin Luh










 On Mon, 09 Mar 2020 22:44:15 +0800 Antoine Monmayrant  
wrote 



Hello Clément,



Thanks for your answer.

I think it clarifies the situation somehow.

I still don't get your point of not open-sourcing it and maintaining it "for 
free".

I think it's the other way round: if you open-source it, it might happen that 
some members of the community contribute to extend it and maintain it "for 
free".

>From the info you gave me, scicv should be avoided by any one not being that 
>particular client of your group.

Moreover, scicv is adding noise and confusion to the atoms library.



Antoine





Le Lundi, Mars 09, 2020 15:29 CET, Clément David 
 a écrit:

 

 

About the feature set, I suggest you take a look at SIVP which is much more 
complete and target a wider audience. The available functions are the 
documented ones and we might add more if customers requested more.

 

Currently, this toolbox is used by some customers and we only mapped the 
feature requested by them to have an associated minimal OpenCV build. It 
targets customers and we will probably not open-source it as we don’t want to 
maintain it “for free”. Again if you want to co-develop, take a look at SIVP ; 
Chin Luh did a good job and it is open-source !

 

Regards,

 

Clément

 

 

From: users  On Behalf Of Antoine 
Monmayrant
Sent: Monday, March 9, 2020 2:34 PM
To: Users mailing list for Scilab 
Subject: Re: [Scilab-users] ?==?utf-8?q? Which module to use for hassle-free 
image processing with scilab ?


 

Hello Clément,

Thanks for your answer.
It's still not clear to me whether I should use scicv or not.
First, many features are missing and it's not clear to me how I can implement 
or discover them (hough transforms for example).
Is there a list of the opencv functions that you expose through swig and the 
one that are not implemented?

Also, I'm a bit surprised by your statement:
Note: the 

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

2020-03-09 Thread Clément David
Hello Stéphane,

>> We have a focus on keeping the data in the OpenCV world and "accessing" them 
>> from Scilab.
> 
> IMHO this is very confusing for people migrating image processing applications
> from Matlab (this is my case). For example, accessing rgb images directly as
> (n,m,3) hypermatrices are very handy.

The extraction/insertion should be handled correctly as well as converting 
n,m,3 uint8 back to OpenCV Mat images. Do you have a specific code sample that 
fail?

Thanks for your input,

--
Clément


___
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-09 Thread Stéphane Mottelet

Hello,

Le 09/03/2020 à 10:52, Clément David a écrit :

Hello Antoine,


- scicv: installs without any issue and as reported by Samuel (
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/forge.scilab.org/index.php/p/scicv/issues/1944/
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/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 been fixed in the past 
6
months. Moreover, many opencv functions are not available and it is not clear
how to access them.

About sciCV, the idea was to use SWIG [1] and OpenCV [2] as an easy to use (and simple to 
develop) toolbox for manipulating images and videos using Scilab scripts. Here we don't 
have Scilab scripts at all, just a bunch of SWIG rules to generate the Scilab C gateways 
from the OpenCV C API. We have a focus on keeping the data in the OpenCV world and 
"accessing" them from Scilab.


IMHO this is very confusing for people migrating image processing 
applications from Matlab (this is my case). For example accessing rgb 
images directly as (n,m,3) hypermatrices is very handy.


S.



The two reported bugs have been fixed in 0.5 (sorry I did not close them) and 
the latest 0.6 version is built for Scilab 6.1.0 after a customer request.

Note: the code is not open-source but SWIG for Scilab and OpenCV are!

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


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

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


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

2020-03-09 Thread Clément David
Hello Antoine,

> - 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 been fixed in the 
> past 6
> months. Moreover, many opencv functions are not available and it is not clear
> how to access them.

About sciCV, the idea was to use SWIG [1] and OpenCV [2] as an easy to use (and 
simple to develop) toolbox for manipulating images and videos using Scilab 
scripts. Here we don't have Scilab scripts at all, just a bunch of SWIG rules 
to generate the Scilab C gateways from the OpenCV C API. We have a focus on 
keeping the data in the OpenCV world and "accessing" them from Scilab.

The two reported bugs have been fixed in 0.5 (sorry I did not close them) and 
the latest 0.6 version is built for Scilab 6.1.0 after a customer request.

Note: the code is not open-source but SWIG for Scilab and OpenCV are!

--
Clément
___
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] Which module to use for hassle-free image processing with scilab ?

2020-03-08 Thread Chin Luh Tan
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 been fixed in 
the past 6 months. Moreover, many opencv functions are not available and it is 
not clear how to access them.

- sip : I used it at some point but it seems that it's no longer supported. Is 
this the case?

- many others, like sip which have not been updated for years (IPT, SIVP...)

Well, it's a bit of a mess and I am a bit lost.
Any of you 

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

2020-03-08 Thread Samuel Gougeon

Le 08/03/2020 à 10:17, Antoine Monmayrant a écrit :

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


Actually, this issue was first reported 2 years ago 
, as ATOMS 
comments.

And, indeed, no progress since then.

By the way, as far as i could see, scicv is *not* open source.

Regards
Samuel

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


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

2020-03-08 Thread Antoine Monmayrant

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 been fixed in 
the past 6 months. Moreover, many opencv functions are not available and it is 
not clear how to access them.

- sip : I used it at some point but it seems that it's no longer supported. Is 
this the case?

- many others, like sip which have not been updated for years (IPT, SIVP...)

Well, it's a bit of a mess and I am a bit lost.
Any of you have some piece of advice on which toolbox I should invest into and 
how I can  help improve this situation?

Thanks in advance,

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