Reading an Image

  • Follow


Hello NG,

I'm looking for a function that reads an image (.jpg or .bmp) into a 
matrice (similar to Matlab function Imread) . I work with scilab 5.1.1 / 
Win (Vista or XP).

My aim is: I want to read a scanned diagram (curve) and determine the 
corresponding numerical values of the curve.

I already read about the SIP toolbox (Windows version) but most comments 
dealed with older versions of scilab or reported of failures.

As I'm new to scilab I would appreciated if anyone would advise me or 
report about his experiences.


Thanks in advance for any helpful answers.


Regards

Dietmar
0
Reply dietmar_berger (1) 10/30/2009 11:05:25 PM

On Oct 31, 12:05 am, Dietmar Berger <dietmar_ber...@arcor.de> wrote:
> Hello NG,
>
> I'm looking for a function that reads an image (.jpg or .bmp) into a
> matrice (similar to Matlab function Imread) . I work with scilab 5.1.1 /
> Win (Vista or XP).
>
> My aim is: I want to read a scanned diagram (curve) and determine the
> corresponding numerical values of the curve.
>
> I already read about the SIP toolbox (Windows version) but most comments
> dealed with older versions of scilab or reported of failures.
>
> As I'm new to scilab I would appreciated if anyone would advise me or
> report about his experiences.
>
> Thanks in advance for any helpful answers.
>
> Regards
>
> Dietmar

Hello,
http://siptoolbox.sourceforge.net/
http://sivp.sourceforge.net/
Best regards,
G. Dutilleux
0
Reply Guillaume 10/31/2009 6:47:46 AM


On 31 oct, 00:05, Dietmar Berger <dietmar_ber...@arcor.de> wrote:
> Hello NG,
>
> I'm looking for a function that reads an image (.jpg or .bmp) into a
> matrice (similar to Matlab function Imread) . I work with scilab 5.1.1 /
> Win (Vista or XP).
>
> My aim is: I want to read a scanned diagram (curve) and determine the
> corresponding numerical values of the curve.
>
> I already read about the SIP toolbox (Windows version) but most comments
> dealed with older versions of scilab or reported of failures.

That's right. There are no longer available online binaries of SIP
for
Scilab > 4.1.2 on WinXP, and personnal tentatives of rebuilding it
with a C compiler have failed.

I have succeeded in building SIVP (builder.sce. C compiler needed)
for Scilab 5.1.1 on winXP. Then, it works. But i have failed to do so
for
Scilab master > 5.1.1 (while many big improvements of Scilab
have been developped since last April's 5.1.1 release, for the
pending 5.2 release). This is clearly a big drawback: No longer
available image processing tool for Scilab >=5.2 on winXP.

Is there anyone else on the newsgroup having succeeded with SIVP
on winXP / Scilab > 5.1.1 ? Other comments are welcome.

Regards
Samuel
0
Reply Sam 10/31/2009 12:30:50 PM

Sam said on 31/10/2009 13:30:
> That's right. There are no longer available online binaries of SIP
> for Scilab > 4.1.2 on WinXP

The SIP website advertises that SIP 0.4.0 is supposed to work with 
Scilab 5.1. See right column at:

http://siptoolbox.sourceforge.net/

The corresponding binary file for Windows can be found at:

https://sourceforge.net/projects/siptoolbox/files/

(see file sip-0.4.0-bin-win32-sci4.0-beta.exe under SIP 0.4.0-candidate 1)

I did not try this build but I would be interested by your feedback.

Indeed, SIP having been stalled for several years I had turned to 
SIVP. Now the situation seems to be the opposite: SIP has new binaries 
but SIVP authors seem to have fallen off the face of the earth 
(checked in their forum at SourceForge, and in their bug tracking 
system, latest news is > 1 year old, and so on).

Lack of durability (i.e. long term support) of such software is a 
pain, but you cannot expect it when using a toolbox developed by 
students that sooner or later are no longer students. If SIP is now 
leading again I'll have to return back to SIP and leave SIVP.

But I'll first see which one is working under Scicoslab before making 
my decision. Anyone has experience in using SIP or SIVP under 
Scicoslab perhaps?


> I have succeeded in building SIVP (builder.sce. C compiler needed)
> for Scilab 5.1.1 on winXP. Then, it works. But i have failed to do so
> for Scilab master > 5.1.1

What was the problem, and how did you try to build it (which compiler, 
for instance)? (this is just for my education, I'll not dig into this 
problem).

Francois
0
Reply Francois 10/31/2009 1:58:49 PM

On 31 oct, 14:58, Francois Vogel <fsvogelnew5NOS...@free.fr> wrote:
> Sam said on 31/10/2009 13:30:
>
> > I have succeeded in building SIVP (builder.sce. C compiler needed)
> > for Scilab 5.1.1 on winXP. Then, it works. But i have failed to do so
> > for Scilab master > 5.1.1
>
> What was the problem, and how did you try to build it (which compiler,
> for instance)? (this is just for my education, I'll not dig into this
> problem).

The compiler: Microsoft Visual Studio 9.0
Hereafter is the output from exec builder.sce, up to the error:
Cheers
Samuel
-------
-->exec builder.sce
-->////////////////////////////////////////////////////////////
-->// SIVP - Scilab Image and Video Processing toolbox
-->// Copyright (C) 2008  Shiqi Yu
-->//
-->// This program is free software; you can redistribute it and/or
modify
-->// it under the terms of the GNU General Public License as
published by
-->// the Free Software Foundation; either version 2 of the License,
or
-->// (at your option) any later version.
-->//
-->// This program is distributed in the hope that it will be useful,
-->// but WITHOUT ANY WARRANTY; without even the implied warranty of
-->// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-->// GNU General Public License for more details.
-->//
-->// You should have received a copy of the GNU General Public
License
-->// along with this program; if not, write to the Free Software
-->// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307  USA
-->////////////////////////////////////////////////////////////

-->lines(0);
-->gateway_dir =3D get_absolute_file_path('builder.sce');
-->previous_dir =3D pwd();
-->cd(gateway_dir);
-->ilib_name  =3D 'libsivp';
-->//get all *.c file in this directory
-->srcfiles =3D listfiles('*.c');
-->//remove libsivp.c
-->files=3D[];
-->for myindex=3D1:size(srcfiles,1)
-->    if( srcfiles(myindex) <> 'libsivp.c' ) then
-->        files =3D [files, srcfiles(myindex)];
-->    end
-->end
-->files =3D strsubst(files, '.c', '.o');
-->scilab_version=3Dgetversion();
-->if ~(str2code( part(scilab_version, 8)) <=3D 4) & (MSDOS=3D=3D%F) then /=
/
version >=3D 5.x.x
-->   files =3D [files, 'common.h', 'config.h'];
-->end
-->// name known in scilab , C function called
-->table=3D[	'sivptest', 'int_test'; 		'sivp_init','int_sivp_init';
		'imread', 'int_imread';		'int_imwrite', 'int_imwrite';		'imfinfo',
'int_imfinfo';		'aviinfo', 'int_aviinfo';		'aviopen',
'int_aviopen';		'camopen', 'int_camopen';		'avifile',
'int_avifile';		'aviclose','int_aviclose';		'avicloseall','int_avicloseall'=
;		'avilistopened',
'int_avilistopened';		'avireadframe', 'int_avireadframe';		'addframe',
'int_addframe';		'int_imresize', 'int_imresize';		'int_imabsdiff',
'int_imabsdiff';		'int_imadd', 'int_imadd'; 		'int_imsubtract',
'int_imsubtract'; 		'int_immultiply', 'int_immultiply';
		'int_imdivide', 'int_imdivide'; 		'imfilter', 'int_imfilter';
		'filter2', 'int_filter2'; 		'mat2utfimg',
'int_mat2utfimg';		'int_canny', 'int_canny'; 		'int_sobel',
'int_sobel'; 		'int_cvtcolor', 'int_cvtcolor'; 		'ind2rgb',
'int_ind2rgb'; 		'detectobjects', 'int_detectobjects'; 		'camshift',
'int_camshift'; 		'meanshift', 'int_meanshift';		'detectforeground',
'int_detectforeground';		'impyramid', 'int_impyramid';		];
-->if (MSDOS) then
-->	libname =3D ilib_build(ilib_name,table,files,[],'Makelib',' '"C:\
\PROGRA~1\\OpenCV\\lib\\cxcore.lib'" '"C:\\PROGRA~1\\OpenCV\\lib\
\cv.lib'" '"C:\\PROGRA~1\\OpenCV\\lib\\cvaux.lib'" '"C:\\PROGRA~1\
\OpenCV\\lib\\highgui.lib'" ', '-I'"C:\\PROGRA~1\\OpenCV\\cxcore\
\include'"  -I'"C:\\PROGRA~1\\OpenCV\\cv\\include'"  -I'"C:\\PROGRA~1\
\OpenCV\\cvaux\\include'" -I'"C:\\PROGRA~1\\OpenCV\\otherlibs\
\highgui'"');
   Generate a gateway file
   Generate a loader file
   Generate a Makefile: Makelib
   Running the makefile
   Compilation de aviinfo
   Compilation de avicloseall
   Compilation de ind2rgb
   Compilation de immultiply
   Compilation de imwrite
   Compilation de detectobjects
   Compilation de imfilter
   Compilation de mat2utfimg
   Compilation de imread
   Compilation de aviclose
   Compilation de imfinfo
   Compilation de common
   Compilation de avilistopened
   Compilation de sivp_init
   Compilation de meanshift
   Compilation de test
   Compilation de canny
   Compilation de sobel
   Compilation de imdivide
   Compilation de imresize
   Compilation de filter2
   Compilation de cvtcolor
   Compilation de imsubtract
   Compilation de aviopen
   Compilation de camopen
   Compilation de avifile
   Compilation de avireadframe
   Compilation de imadd
   Compilation de detectforeground
   Compilation de camshift
   Compilation de addframe
   Compilation de impyramid
   Compilation de imabsdiff
   Building shared library (be patient)
   NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual
Studio 9.0\VC\bin\cl.EXE"'=E1: code retour '0x2'
   Stop.
 !--error 10000
unix_s: error during "nmake /Y /nologo /f Makelib.mak all" execution
at line      34 of function unix_s called by :
at line      61 of function ilib_compile called by :
at line      83 of function ilib_build called by :
I'"C:\\PROGRA~1\\OpenCV\\otherlibs\\highgui'"')
at line      51 of exec file called by :
exec builder.sce

0
Reply Sam 11/2/2009 9:29:37 PM

Sam said on 02/11/2009 22:29:
> Hereafter is the output from exec builder.sce, up to the error:

This does not look like the output of SIVP-0.5.0. In the latter the 
builder.sce is just a dummy file so that the entry shows up in the 
toolboxes menu. What version of SIVP did you try? Why not the latest?


On the other hand I have checked that SIVP-0.5.0 runs with 
Scicoslab-4.3, at least on Windows. There is a little issue because 
getversion() does not return the same kind of things in Scilab-5 and 
in Scicoslab. Just a slight change to do to make it run:

-->cd SCI/contrib/SIVP-0.5.0
  ans  =

  C:\PROGRA~1\SCICOS~2\contrib\SIVP-0.5.0

-->scipad loader.sce

Then, comment lines 36 and 37 that read:
   scilab_version=getversion();
   scilab_version=str2code( part(scilab_version, 8));
and add:
   scilab_version=4

Save and exit.

Then in Scicoslab, issue:

-->exec loader.sce


That's all. SIVP-0.5.0 seems to be ready to work with Scicoslab-4.3.

First try:

-->cd demos;
  ans  =

  C:\PROGRA~1\SCICOS~2\contrib\SIVP-0.5.0\demos

-->exec canny.sce;

This works for me.

The problem is that SIVP-0.5.0 is very unstable, and most of the demos 
crash:
   face.sce crash on detectfaces()
   noise.sce crash on imshow()
and so on.

I have no time to investigate now on this, unfortunately.

Francois
0
Reply Francois 11/28/2009 10:12:02 PM

5 Replies
666 Views

(page loaded in 0.161 seconds)

Similiar Articles:













7/25/2012 3:24:22 PM


Reply: