Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : Image Processing Design Toolbox details
Login with GitLab

Image Processing Design Toolbox

This toolbox implements functions for object detection.
(7858 downloads for this version - 290757 downloads for all versions)
Details
Version
7.0
A more recent valid version with binaries for Scilab 5.3 exists: 8.3
Author
Dr. Eng. (J) Harald Galda
Owner Organization
private individual
Maintainer
Harald Galda
Category
License
Creation Date
October 20, 2010
Source created on
Scilab 5.3.x
Binaries available on
Scilab 5.3.x:
Windows 32-bit
Install command
--> atomsInstall("IPD")
Description
            IPD - Image Processing Design Toolbox Version 7.0
Copyright (c) by Dr. Eng. (J) Harald Galda, 2009 - 2010.
Conveyed under the conditions of the GNU GPL Version 3 or later.


This toolbox provides functions for designing and parameterizing image
processing algorithms. The following functionality is provided:

1. Histogram calculation
   - gray level histogram
   - cumulated histogram

2. Thresholding
   - segmentation by threshold
   - threshold calculation by Otsu method

3. Morphological filters
   - dilation
   - erosion
   - closing
   - opening
   - top hat
   - bottom hat

4. Median filter

5. Filtering for edge detection
    - Sobel filter
    - Laplace filter
    - Prewitt filter
    - Scharr filter

6. Region based segmentation
   - distance transform
   - watershed transform

7. Blob analysis
   - searching connected regions in binary images
   - removing blobs that have less pixels than a lower bound or more pixels
     than an upper bound
   - calculating specific properties of blobs such as bounding box, centroid
   - drawing bounding boxes around objects found in an image
   - calculating histogram of blob sizes
   - calculating cumulated histogram of blob sizes

8. Displaying images in figure windows
   - display
   - conversion of RGB to indexed images
   - conversion of indexed images to RGB 

9. Conversion between color images and gray level images
   - RGB    to  gray level
   - RGB    to  L*a*b* 
   - L*a*b* to  RGB 

10. Opening image and video files
   - reading image files
   - writing image files
   - reading video files

11. Linear filteration

12. Variance filter

13. Texture feature calculation
   - Laws texture energy
   - discrete Wavelet frames

14. Template Matching

15. Interactive Image Analysis GUI      

This version uses OpenCV 2.0 which is available for download at

     opencv.willowgarage.com/wiki/

It is recommended to choose Atlas library option when installing Scilab. IPD
can not be loaded if the reference library option was chosen during Scilab 
installation. The author of this toolbox does not use Intel Math Kernel
Library.

If you intend to work with the file red-car-video.avi, please install the XVid
codec which is available for download at 

      www.xvid.org
            
Files (5)
[2.27 kB]
Miscellaneous file
Beschreibung auf Deutsch -- Description in German
[3.17 MB]
Source code archive
Sources of IPD 7.0
[5.85 MB]
Windows 32-bit binary for Scilab 5.3.x
Windows 32-bit
Automatically generated by the ATOMS compilation chain

[2.18 kB]
Miscellaneous file
Description in English
[3.31 kB]
Miscellaneous file
Nihongo no setsumei -- Description in Japanese
News (19)
Comments (27)     Leave a comment 
Comment from Virgile Marguin -- October 28, 2010, 09:01:31 AM    
Hello,

First of all thanks for this toolbox.

I am using the Image Processing Design Toolbox (IPD) 5.0 on scilab 5.2.2.
I would like to obtain the voxel matrix from .TIF files containing several 2D
slices. For this purpose, I simply use the function ReadImage on my files, so I
can obtain the matrix.

The problem is that the matrix I obtain only consist in a two dimensions matrix, which
corresponds to the datas for only one slice of the .TIF file.
Could it be possible to correctly obtain the whole data of the .TIF file,
including the different slices ?

Thanks in advance and best regards,

Virgile
Answer from Harald Galda -- October 30, 2010, 07:09:26 PM    
ReadImage loads 2D images only.
Comment from Chin Luh Tan -- November 12, 2010, 03:29:59 AM    
Dear Dr Harald,

Hi again, I am Chin Luh. Again, thanks alot for your contribution. With your toolbox, I 
am able to recreate my old matlab blog to new scilab blog. 

http://scilab-imageprocessing.blogspot.com/

I would be blogging from time to time using scilab as well as IPD.

Keep up the great work!

Regards,
Chin Luh

Comment from mathieu letombe -- December 17, 2010, 10:09:16 AM    
Hi, 

I had also the problem of link and I figured out what it was. Effectively it's about VC++ 
2008 express, the DLLs compiled with it need DLLs of VC++. 
So there are two solutions: to install VC++ 2008 express, or just Microsoft Visual C++ 
2008 SP1 Redistributable Package (x86), wich could also be included in the install of the 
toolbox.
There is the same probleme with SIVP.

Except those install problems scilab, IPD and SIVP are great!

Thanks, mathieu.
Comment from Allan CORNET -- December 17, 2010, 10:24:13 AM    
Hi, What is your trouble about VS 2008 runtime ?

Please notice that Scilab uses and embed VS2008 runtime
When you launch scilab vs2008 runtime is loaded when you link a .dll there is no reason
that 
msvcrt90 was not found

Do not hesitate to create a bug report about this 

Allan
Comment from mathieu letombe -- December 17, 2010, 10:46:56 AM    
The problem is already described before in this page:
when loading IPD,  link('cxcore200.dll') fails and says the file doesn't exist. 
Personaly the problem appeared just on one of my 3 PCs.
Szymon told us it fails without visual 2008 express ans success with it. I just completed 
this analysis. This PC didn't have any visual 2008, another one had 2008 express and the 
third one 2008 professional.
I first tried to copy msvcrt90.dll near to cxcore200.dll even if it was already somewhere 
in scilab but it didn't work. Installing Microsoft Visual C++ 2008 SP1 Redistributable 
Package (x86) was the only way.
Comment from mathieu letombe -- December 17, 2010, 12:41:30 PM    
The problem is already described before in this page:
when loading IPD,  link('cxcore200.dll') fails and says the file doesn't exist. 
Personaly the problem appeared just on one of my 3 PCs.
Szymon told us it fails without visual 2008 express ans success with it. I just completed 
this analysis. This PC didn't have any visual 2008, another one had 2008 express and the 
third one 2008 professional.
I first tried to copy msvcrt90.dll near to cxcore200.dll even if it was already somewhere 
in scilab but it didn't work. Installing Microsoft Visual C++ 2008 SP1 Redistributable 
Package (x86) was the only way.
Comment from Rajan Gurjar -- December 23, 2010, 02:28:59 AM    
Dear Dr. Harald,
I have downloaded IPD and also SIVP. However, I do not have OpenCV. But I see that the
image files do open properly i.e., I can work with image files.
However, when I try to open video avi files I get an error about improper codecs.
I am not able to find good documentation on both SIVP or IPD. I do not understand what are
they dependent on? Do I have to download OpenCV? Or do they come with OpenCV dlls?
Thanks,
Rajan
Answer from Harald Galda -- December 23, 2010, 09:59:46 AM    
Dear Rajan,

you do not have to download OpenCV, because the DLLs come with the toolbox.

Codecs are needed for opening video files. A codec is used for data compression when a
video file is created. If you want to open this video file on another computer for
reading, the same codec must be installed there.

Codecs usually come with shareware and many codecs exist. Therefore, it is not possible to
include them in the toolbox. 

Comment from Hale Hale -- December 23, 2010, 09:33:38 AM    
Impossible to install. Got OpenCV as it is written IPD depends on its' libls.

Tried 

-->atomsInstall(['IPD','7.0']) 
atomsInstallList: The package IPD - 7.0 is not available.
 !--error 10000 

at line      51 of function atomsError called by :  
at line      76 of function atomsInstallList called by :  
at line     217 of function atomsInstall called by :  
atomsInstall(['IPD','7.0'])


Tried install manially in contrib:

Startup execution:
  loading initial environment
  
 IPD - Image Processing Design Toolbox 7.0   
    error(gettext("Scilab 5.3 or more is required."));
                                                      !--error 10000 
Scilab 5.3 or more is required.
at line      11 of exec file called by :    
 exec('loader_gateway.sce');
at line     301 of exec file called by :    
exec(get_absolute_file_path("loader.sce")+"etc\"+"IPD.start");
at line      10 of exec file called by :    
exec("C:\PROGRA~1\SCILAB~1.2\contrib\IPD\loader.sce");
in  execstr instruction    called by :  
llbackobject(5);execstr(toolboxes(1));if exists("%oldgcbo") then gcbo = %o
while executing a callback


Win7 64bit/Scilab 64bit.
Answer from Harald Galda -- December 23, 2010, 10:05:38 AM    
IPD 5.0 works with Scilab 5.2.2 whereas 7.0 needs Scilab 5.3.0 (final or beta versions). I
do not know whether the OpenCV DLLs can be loaded on 64 bit Windows because my computer
has 32 bit Windows.
Answer from Hale Hale -- December 24, 2010, 04:41:41 AM    
I've got 5.2.2 64 bit

-->atomsInstall(['IPD','5.0'])
atomsInstallList: The package IPD - 5.0 is not available.
 !--error 10000 

at line      51 of function atomsError called by :  
at line      76 of function atomsInstallList called by :  
at line     217 of function atomsInstall called by :  
atomsInstall(['IPD','5.0'])


So, you suggest to move to 32 bit ver? I dunno, will libs work under Win7/64
Actually I wanted to try fast operations on 64bit long data. So, first I need is to
prepare input data separately. :( no easy ways
Answer from Hale Hale -- December 24, 2010, 08:23:40 AM    
It is strange, but I can't install it even on 32-bit ver of SciLab  

-->atomsInstall(['IPD','7.0'])
atomsInstallList: The package IPD - 7.0 is not available.
 !--error 10000

at line      51 of function atomsError called by :
at line      76 of function atomsInstallList called by :
at line     227 of function atomsInstall called by :
atomsInstall(['IPD','7.0'])


-->ver
 ans  =
 
!Scilab Version:             5.3.0.1292396566                                         !
!                                                                                     !
!Operating System:           Windows 7 6.1                                            !
Answer from Hale Hale -- December 24, 2010, 10:18:14 AM    
OK, manual installation worked with 32 bits.
64bits can't link libs. cxcore200.dll not found (maybe 32bit system wrapper in windows
causes it)

The help is absolete. Can't try output of input images. Something wrong with output data
and doesn't work as it is written in example.

[PixelList Dimensions] = ReadImageFile
RGB = matrix(PixelList, Dimensions);
                          !--error 4 
Undefined variable: Dimensions


RGB = ReadImage
figure(); ShowColorImage(RGB, 'Result', ColorMap);
                                          !--error 4 
Undefined variable: ColorMap
Answer from Harald Galda -- December 30, 2010, 10:47:19 AM    
I tried to install the toolbox via 

   atomsInstall(['IPD','7.0'])

and got an error message, too. Then I called

   atomsSystemUpdate()

and after this I was able to install the toolbox via the Atoms GUI.

You can read an image file via

   ReadImage(FileName)

You do not need to call ReadImageFile. But if you want to call ReadImageFile you must
specify both output parameters.

   [PixelList Dimensions] = ReadImageFile(FileName)

should work as ReadImage calls this function.

The function ShowColorImage does not accept a color map as input. ShowColorImage
transforms a color image to an indexed image and calls ShowImage internally.
                              !
Comment from Oscar van der Velde -- December 23, 2010, 01:24:13 PM    
Dear Harald,

I filed a report about a memory problem which in my case occurs when doing video
processing here: http://bugzilla.scilab.org/show_bug.cgi?id=8689
If I use a series of images instead, processed one by one, the memory will at some point
also saturate. It seems the images or video are not only stored in a Scilab-accessible
variable but accumulate internally. For the images I have not yet distilled a different
test case. I hope the information is of help.

Best regards,
Oscar
Answer from Harald Galda -- December 29, 2010, 01:34:59 PM    
Dear Oscar,

I just checked whether ReadImageFile and ReadImageFromVideo (both called by ReadImage)
cause memory leaks. ReadImageFile does not. In ReadImageFromVideo a frame is read, but the
memory is not released inside the function. If I try to release it, an error occurs and
the function crashes. Therefore, I do not think that ReadImage causes a memory leak.

Regards
Answer from Oscar van der Velde -- January 25, 2011, 05:14:27 PM    
Dear Harald,

I'm working again with your module, now reading a series of separate bitmap images from a
long video using ReadImage. So internally it will use ReadImageFile. At any time, only the
current image and my calculations on it should be in memory. However, the same problem
occurs: memory grows and cannot be cleared. 
I will try to make a version of my script using SIVP and see if the same happens.

Regards,
Oscar
Comment from Rajan Gurjar -- December 23, 2010, 04:43:08 PM    
Dear Dr. Harald,
Thank you for your response about my question on OpenCV.

When I try the following:
VideoInfo = GetVideoInfo('contrib\IPD\5.0\demos\red-car-video.avi');
                                                                    !--error 133 
Internal error occured. 

I do not understand  what this error is. I tried Google this error but get no further.
I could run the avi file on my computer but could never open with IPD. 

I have also tried it in SIVP

Info = aviinfo('\contrib\IPD\5.0\demos\red-car-video.avi');
                                                           !--error 999 
aviinfo: Can not open video file \contrib\IPD\5.0\demos\red-car-video.avi. Maybe the codec
of the video can not be handled.

Are the two errors related? If it is the codec how come I am able to run the video file
using VLC media player?

Now I do know that for SIVP to open video files I have to install OpenCV which is not the
case for IPD which has the necessary dll (except the relevant codecs?). However, I am not
clear how to associate codecs with IPD. Any help will be appreciated.
Thanks,
Rajan
Answer from Harald Galda -- December 23, 2010, 08:43:17 PM    
Dear Rajan,

GetVideoInfo() calls an OpenCV function internally. Maybe aviinfo() of SIVP calls the same
function. 

Many OpenCV functions yield erroneous results or crash on Windows. Even example programs
delievered with OpenCV crash.

Even though GetVideoInfo() worked on my previous computer (32 bit Windows XP desktop,
purchased in last quarter of 2003), this function does not work on my present one (32 bit
Windows XP netbook, purchased in second quarter of 2010).

OpenCV is installed on both my old and new computer. So this can not be the problem.
Codecs do not need to be associated with IPD. In fact, such a functionality does not even
exist.

Regards
Harald
Answer from Harald Galda -- December 29, 2010, 01:29:39 PM    
Dear Rajan,

I installed the XVid codec which is available for download at www.xvid.org. Now
GetVideoInfo and the other video related function work again on my current computer. If I
publish a new version, I am going to write about XVid codec in the readme file.

Regards
Harald
Comment from Hale Hale -- December 24, 2010, 04:31:30 AM    
Impossible to install. Got OpenCV as it is written IPD depends on its' libls.

Tried 

-->atomsInstall(['IPD','7.0']) 
atomsInstallList: The package IPD - 7.0 is not available.
 !--error 10000 

at line      51 of function atomsError called by :  
at line      76 of function atomsInstallList called by :  
at line     217 of function atomsInstall called by :  
atomsInstall(['IPD','7.0'])


Tried install manially in contrib:

Startup execution:
  loading initial environment
  
 IPD - Image Processing Design Toolbox 7.0   
    error(gettext("Scilab 5.3 or more is required."));
                                                      !--error 10000 
Scilab 5.3 or more is required.
at line      11 of exec file called by :    
 exec('loader_gateway.sce');
at line     301 of exec file called by :    
exec(get_absolute_file_path("loader.sce")+"etc\"+"IPD.start");
at line      10 of exec file called by :    
exec("C:\PROGRA~1\SCILAB~1.2\contrib\IPD\loader.sce");
in  execstr instruction    called by :  
llbackobject(5);execstr(toolboxes(1));if exists("%oldgcbo") then gcbo = %o
while executing a callback


Win7 64bit/Scilab 64bit.
Answer from Hale Hale -- December 24, 2010, 07:50:40 AM    
sorry, this duplicate is a cache/cookie bug of page reload in browser.
Comment from Allan CORNET -- January 2, 2011, 12:09:24 PM    
IPD does not support X64 platform.

(opencv dependency)

Please contact author about this trouble

Allan
Answer from Harald Galda -- January 2, 2011, 07:19:12 PM    
OpenCV must be down loaded and built. I do not have a computer with 64 bit Windows.
Therefore, I can not provide 64 bit versions of the OpenCV DLLs. 

By the way, SIVP uses OpenCV 1.0 whereas IPD uses OpenCV 2.0. Therefore, taking the DLLs
from SIVP is not the solution.
Answer from Allan CORNET -- January 3, 2011, 06:13:24 AM    
> OpenCV must be down loaded and built. I do not have a computer with 64 bit Windows.
> Therefore, I can not provide 64 bit versions of the OpenCV DLLs. 
> 
> By the way, SIVP uses OpenCV 1.0 whereas IPD uses OpenCV 2.0. Therefore, taking the
> DLLs
> from SIVP is not the solution.



Hi,

Please notice that SIVP uses opencv 2.1.0 x64 and x86 version

Allan

Comment from Pat Gallagher -- January 17, 2011, 06:34:11 PM    
First, thanks very much for producing this toolbox.
Image processing is a big missing block from Scilab, but you are filling the gap.

I have previously used SIVP (and still do). However, this toolbox has more of the analysis
tools I need. 

The toolbox loads successfully through atoms and most functions work correctly. However,
if I use ShowImage on a large image (3Mpx), I get an out of memory error from Scilab.
If I shrink the image (external program), it loads in and displays with no problems.

All other functions, I have tried respond correctly (SegmentByThreshold, ErodeImage,
SearchBlobs, FilterBySize, CreatePixelIndexList, CreateHistogram)

I have uninstallled and re-installed Scilab without the Intel library (use Atlas) but this
made no change. I do have an Nvidia card that needs a special instruction for Scilab
plotting (ref.http://bugzilla.scilab.org/show_bug.cgi?id=8282);

I have a work-around (use external programs to display the images) but this is not really
ideal. 

I did try using SIVP functions (imshow) to display the image. This worked initially (and
for smaller images) but now fails consistently with a Microsoft VisualC++ Runtime error
and WScilex crash.

Error posted below.
Any advice would be appreciated.
Thanks
Pat

Error & Message:
>stacksize('max')
>CalibImage=ReadImage('d:\distdev\lines.jpg');
>ShowImage(CalibImage,'Calib Image')

ConcreteDrawableGrayplot::drawGrayplot: No more memory.
 ans  =
 
Handle of type "Figure" with properties:
========================================
children: "Axes"
figure_position = [200,200]
figure_size = [1440,900]
axes_size = [1430,764]
auto_resize = "on"
viewport = [0,0]
figure_name = "Calib Image"
figure_id = 0
info_message = ""
color_map= matrix 256x3
pixmap = "off"
pixel_drawing_mode = "copy"
anti_aliasing = "off"
immediate_drawing = "on"
background =  -2
visible = "on"
rotation_style = "unary"
event_handler = ""
event_handler_enable = "off"
user_data = []
tag = ""

Answer from Harald Galda -- January 18, 2011, 10:52:04 PM    
Dear Pat Gallagher,

ShowImage and ShowColorImage create a matrix plot. Displaying a matrix plot consumes much
time and memory. I can not provide any work around for this problem, I am afraid.

IPD and SIVP use the OpenCV library internally and OpenCV offers functions for displaying
images. But when using these functions, the images are not displayed in figure windows.

Best regards,
Harald Galda
Answer from Pat Gallagher -- January 18, 2011, 11:01:15 PM    
Thank you Harald for the very fast answer.

Knowing there is no nice solution will save me loads of time looking for it.
I will continue with the external program workaround.
Meantime, all the analysis tools I have tried work well and I can get the results I need.
Thanks again for this toolbox.

Is there anything in the future to access other OpenCV functions? Camera Calibration?
Distortion measurement/Correction?

Pat

Answer from Harald Galda -- January 19, 2011, 09:26:18 AM    
Dear Pat,

I have used OpenCV functions to implement toolbox functions. But I do not intend to
provide access to all OpenCV functions.

Harald


Comment from Pat Gallagher -- January 17, 2011, 10:38:54 PM    
First, thanks very much for producing this toolbox.
Image processing is a big missing block from Scilab, but you are filling the gap.

I have previously used SIVP (and still do). However, this toolbox has more of the analysis
tools I need. 

The toolbox loads successfully through atoms and most functions work correctly. However,
if I use ShowImage on a large image (3Mpx), I get an out of memory error from Scilab.
If I shrink the image (external program), it loads in and displays with no problems.

All other functions, I have tried respond correctly (SegmentByThreshold, ErodeImage,
SearchBlobs, FilterBySize, CreatePixelIndexList, CreateHistogram)

I have uninstallled and re-installed Scilab without the Intel library (use Atlas) but this
made no change. I do have an Nvidia card that needs a special instruction for Scilab
plotting (ref.http://bugzilla.scilab.org/show_bug.cgi?id=8282);

I have a work-around (use external programs to display the images) but this is not really
ideal. 

I did try using SIVP functions (imshow) to display the image. This worked initially (and
for smaller images) but now fails consistently with a Microsoft VisualC++ Runtime error
and WScilex crash.

Error posted below.
Any advice would be appreciated.
Thanks
Pat

Error & Message:
>stacksize('max')
>CalibImage=ReadImage('d:\distdev\lines.jpg');
>ShowImage(CalibImage,'Calib Image')

ConcreteDrawableGrayplot::drawGrayplot: No more memory.
 ans  =
 
Handle of type "Figure" with properties:
========================================
children: "Axes"
figure_position = [200,200]
figure_size = [1440,900]
axes_size = [1430,764]
auto_resize = "on"
viewport = [0,0]
figure_name = "Calib Image"
figure_id = 0
info_message = ""
color_map= matrix 256x3
pixmap = "off"
pixel_drawing_mode = "copy"
anti_aliasing = "off"
immediate_drawing = "on"
background =  -2
visible = "on"
rotation_style = "unary"
event_handler = ""
event_handler_enable = "off"
user_data = []
tag = ""

Comment from Dean Messing -- January 26, 2011, 10:25:57 PM    
Hello Dr. Galda

What is the current status of IPD with respect to Linux?
From comments above, it appears there isn't one.  If that is
correct, is it possible to build IPD under linux?

Thanks
Dean
Answer from Harald Galda -- January 26, 2011, 10:59:59 PM    
Hello Dean Messing,

there is no Linux version of IPD. However, this toolbox is open source, just as Scilab
itself. So you can build OpenCV 2.0 on Linux, copy the library files to

       SCI/contrib/IPD-7.0/sci_gateway/cpp/

and edit

       builder_gateway_cpp.sce

in the same directory so the include and library paths are set.

Best regards
Harald Galda
Answer from Dean Messing -- January 27, 2011, 12:09:52 AM    
Thanks so much for your quick reply!

At least Fedora 13 (and I suspect other modern Linux distributions)
have OpenCV as standard equipment:

==> rpm -qa | fgrep -i opencv
opencv-2.0.0-9.fc13.x86_64

It would certainly be nice to have the Linux version of IPD package
in ATOMS.

I'm unfamiliar with the details of ATOMS packages.  Is there a way w/in the package
query the system to check package requirements and just inform the user
what's needed in case something is missing?

Dean
Answer from Harald Galda -- January 27, 2011, 02:13:30 PM    
When you run Scilab on Linux, ATOMS probably will not offer IPD for download. I do not
have a Linux computer so I can not provide a package readable on Linux. If you have access
to a Windows machine, you might download the sources on it, unzip the package and transfer
the files to a Linux machine via a ftp or telnet.
Answer from Dean Messing -- January 27, 2011, 08:29:51 PM    
Thanks so much for your quick reply!

At least Fedora 13 (and I suspect other modern Linux distributions)
have OpenCV as standard equipment:

==> rpm -qa | fgrep -i opencv
opencv-2.0.0-9.fc13.x86_64

It would certainly be nice to have the Linux version of IPD package
in ATOMS.

I'm unfamiliar with the details of ATOMS packages.  Is there a way w/in the package
query the system to check package requirements and just inform the user
what's needed in case something is missing?

Dean
Comment from GM Culp -- January 27, 2011, 06:55:58 PM    
Good afternoon!

I have tried to install IPD in a myriad of ways and nothing works.  I have gone through 
ATOMS. I have unzipped and manually run the loader.  I have also change the directory name.
 
I keep getting errors that are related to a library required by the toolbox and 
cxcore200.dll.  Does anybody know what I'm doing wrong?  

I am running the following OS:
MS XP Windows Professional  
Version 5.1 (Build 2600.xpsp_sp3_gdr.100427-1636: Service Pack 3)

I have a 32-bit computer.

Thanks!
Gretchen
Answer from Allan CORNET -- January 27, 2011, 07:10:29 PM    
> Good afternoon!
> 
> I have tried to install IPD in a myriad of ways and nothing works.  I have gone through
> 
> ATOMS. I have unzipped and manually run the loader.  I have also change the directory
> name.  
> I keep getting errors that are related to a library required by the toolbox and 
> cxcore200.dll.  Does anybody know what I'm doing wrong?  
> 
> I am running the following OS:
> MS XP Windows Professional  
> Version 5.1 (Build 2600.xpsp_sp3_gdr.100427-1636: Service Pack 3)
> 
> I have a 32-bit computer.
> 
> Thanks!
> Gretchen


Scilab version ?
5.3 ?


With a standard installation it works perfectly (Good tools ;) )

        ___________________________________________        
                       scilab-5.3.0

                 Consortium Scilab (DIGITEO)
               Copyright (c) 1989-2010 (INRIA)
               Copyright (c) 1989-2007 (ENPC)
        ___________________________________________        
 
 
Startup execution:
  loading initial environment
 
-->atomsInstall('IPD')
 ans  =
 
!IPD  7.0-1  user  SCIHOME\atoms\IPD\7.0-1  I  !
 
-->atomsLoad('IPD')

 
 IPD - Image Processing Design Toolbox 7.0   
Shared archive loaded.
Link done.
Shared archive loaded.
Link done.
Shared archive loaded.
Link done.
Shared archive loaded.
Link done.

 ans  =
 
!IPD  7.0-1  user  SCIHOME\atoms\IPD\7.0-1  !
  
 global WAVELET_DAUBECHIES_2;   
 
 RGB = ReadImage('small_teaset.png'); Image = RGB2Gray(RGB);   
 
 WaveletFrames = CreateWaveletFrames(Image, WAVELET_DAUBECHIES_2, 3);   
 
 ChannelVariance = ComputeChannelVariance(WaveletFrames, [9 9]);   
 
 ListOfTitles = ['Horizontal Detail on 1st Level'; ...   
 
                 'Diagonal Detail on 1st Level'; ...   
 
                 'Vertical Detail on 1st Level'; ...   
 
                 'Horizontal Detail on 2nd Level'; ...   
 
                 'Diagonal Detail on 2nd Level'; ...   
 
                 'Vertical Detail on 2nd Level'; ...   
 
                 'Horizontal Detail on 3rd Level'; ...   
 
                 'Diagonal Detail on 3rd Level'; ...   
 
                 'Vertical Detail on 3rd Level'; ...   
 
                 'Approximation on 3rd Level'];   
 
 figure(); ShowImage(Image, 'Original Image');   
 
 for n = 1 : size(ChannelVariance, 3)   
 
  Image = ChannelVariance(:, :, n);   
 
  figure(); ShowImage(Image / max(Image), ListOfTitles(n));    
 
 end;   
Answer from Harald Galda -- January 28, 2011, 08:17:57 PM    
Hve you installed Microsoft Visual C++ 2008 Express Edition on your computer? If not,
please try and do so. IPD uses OpenCV 2.0 and the *.dll files of this library can only be
loaded if the compiler used to build them is present. THe file cxcore200.dll does exist as
it is delievered along with IPD.


> Good afternoon!
> 
> I have tried to install IPD in a myriad of ways and nothing works.  I have gone through
> 
> ATOMS. I have unzipped and manually run the loader.  I have also change the directory
> name.  
> I keep getting errors that are related to a library required by the toolbox and 
> cxcore200.dll.  Does anybody know what I'm doing wrong?  
> 
> I am running the following OS:
> MS XP Windows Professional  
> Version 5.1 (Build 2600.xpsp_sp3_gdr.100427-1636: Service Pack 3)
> 
> I have a 32-bit computer.
> 
> Thanks!
> Gretchen
Comment from GM Culp -- January 27, 2011, 07:37:39 PM    
Hello, Allan!

This is what I get when I attempt the install:

        ___________________________________________        
                       scilab-5.3.0

                 Consortium Scilab (DIGITEO)
               Copyright (c) 1989-2010 (INRIA)
               Copyright (c) 1989-2007 (ENPC)
        ___________________________________________        
 
 
Startup execution:
  loading initial environment
 
-->atomsInstall('IPD')
 ans  =
 
!IPD  7.0-1  allusers  SCI\contrib\IPD\7.0-1  I  !
 
-->atomsLoad('IPD')

 
 IPD - Image Processing Design Toolbox 7.0   
link: The file cxcore200.dll does not exist.
 
 Error occured when trying to load a library required by this toolbox.   

 ans  =
 
!IPD  7.0-1  allusers  SCI\contrib\IPD\7.0-1  !
Comment from Allan CORNET -- January 27, 2011, 08:00:49 PM    
[a,b]= getdebuginfo()

and win64()

from scilab

Please notice win64 plateform is not (yet) supported by ATOMS

Allan
Answer from Harald Galda -- February 4, 2011, 09:07:40 AM    
I installed the 32 bit version of Scilab and IPD on a 64 bit machine and everything worked

even without a C++ compiler. Note that even on a 64 bit computer the 32 bit version of 
Scilab is offered for download on the main page of Scilab and the 64 bit version is found 
clicking "Other Systems".

Things are difficult on a 64 bit version of Scilab. Visual Studio Express Edition generated

32 bit code only and this is not compatible to 64 bit Scilab. The Microsoft Windows SDK did

not work on the 64 bit machine I used.

Does anybody know a C++ compiler for 64 bit Windows that is free of charge?
Comment from GM Culp -- January 27, 2011, 08:23:54 PM    
This is what I got:

-->[a,b]= getdebuginfo()
 b  =
 
!Version: scilab-5.3.0          !
!                               !
!Compilation date: Dec 15 2010  !
!                               !
!Compilation time: 08:46:53     !
!                               !
!Compiler Architecture: x86     !
!                               !
!Compiled with Intel compiler   !
!                               !
!XML version: 2.4.26            !
!                               !
!Tcl/Tk: Enable                 !
!                               !
!TCL version: 8.5.2             !
!                               !
!TK version: 8.5.2              !
!                               !
!Path separator: ;              !
!                               !
!Directory separator: \         !
!                               !
!PCRE Version: 8.2              !
 a  =
 
!Memory in use:      84 %                                                                  
                             
!
!                                                                                          
                             
!
!Total Physical Memory (Kbytes): 1038764                                                   
                             
!
!                                                                                          
                             
!
!Free Physical Memory (Kbytes):  158956                                                    
                             
!
!                                                                                          
                             
!
!Total Paging File (Kbytes): 5033344                                                       
                             
!
!                                                                                          
                             
!
!Free Paging File (Kbytes): 3603996                                                        
                             
!
!                                                                                          
                             
!
!Total Virtual Memory (Kbytes): 2097024                                                    
                             
!
!                                                                                          
                             
!
!Free Virtual Memory (Kbytes): 1198656                                                     
                             
!
!                                                                                          
                             
!
!Free Extended Memory (Kbytes):       0                                                    
                             
!
!                                                                                          
                             
!
!Operating System: Windows XP                                                              
                             
!
!                                                                                          
                             
!
!        Intel(R) Pentium(R) M processor 1.60GHz                                           
                             
!
!                                                                                          
                             
!
!Number of processors: 1                                                                   
                             
!
!                                                                                          
                             
!
!Video card: ERROR                                                                         
                             
!
!                                                                                          
                             
!
!Video card driver version: ERROR                                                          
                             
!
!                                                                                          
                             
!
!Screen size: 1024 x 768 32 bits                                                           
                             
!
!                                                                                          
                             
!
!Number of Monitors: 1                                                                     
                             
!
!                                                                                          
                             
!
!Path: C:/Program Files/scilab-
5.3.0/bin;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WI
!
!     NDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\GeoX\Dot!
!     Net\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program Files\Co!
!     mmon Files\DivX Shared\;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition!
!     \GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\Program!
!      Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Deskto!
!     p Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C!
!     :\Program Files\Common Files\DivX 
Shared\;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbe!
!     m;C:\WINDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\G!
!     eoX\DotNet\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program F!
!     iles\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Desktop !
!     Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\!
!     Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport!
!      Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstra!
!     l\bin;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop

Edition\bin;C:\Program Files\G!
!     eosupport Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program File!
!     s\SPSS\SPSS Data Access Pack 2.5\                                                    
                             
!
!                                                                                          
                             
!
!ComSpec: C:\WINDOWS\system32\cmd.exe                                                      
                             
!
!                                                                                          
                             
!
!TMP : C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!TEMP: C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!WSCI: C:\Program Files\scilab-5.3.0                                                       
                             
!
!                                                                                          
                             
!
!SCIHOME: C:\DOCUME~1\DOHUSE~1\APPLIC~1\Scilab\scilab-5.3.0                                
                             
!
 
-->win64()
 ans  =
 
  F  
 
Comment from GM Culp -- January 27, 2011, 09:16:23 PM    
This is what I got:

-->[a,b]= getdebuginfo()
 b  =
 
!Version: scilab-5.3.0          !
!                               !
!Compilation date: Dec 15 2010  !
!                               !
!Compilation time: 08:46:53     !
!                               !
!Compiler Architecture: x86     !
!                               !
!Compiled with Intel compiler   !
!                               !
!XML version: 2.4.26            !
!                               !
!Tcl/Tk: Enable                 !
!                               !
!TCL version: 8.5.2             !
!                               !
!TK version: 8.5.2              !
!                               !
!Path separator: ;              !
!                               !
!Directory separator: \         !
!                               !
!PCRE Version: 8.2              !
 a  =
 
!Memory in use:      84 %                                                                  
                             
!
!                                                                                          
                             
!
!Total Physical Memory (Kbytes): 1038764                                                   
                             
!
!                                                                                          
                             
!
!Free Physical Memory (Kbytes):  158956                                                    
                             
!
!                                                                                          
                             
!
!Total Paging File (Kbytes): 5033344                                                       
                             
!
!                                                                                          
                             
!
!Free Paging File (Kbytes): 3603996                                                        
                             
!
!                                                                                          
                             
!
!Total Virtual Memory (Kbytes): 2097024                                                    
                             
!
!                                                                                          
                             
!
!Free Virtual Memory (Kbytes): 1198656                                                     
                             
!
!                                                                                          
                             
!
!Free Extended Memory (Kbytes):       0                                                    
                             
!
!                                                                                          
                             
!
!Operating System: Windows XP                                                              
                             
!
!                                                                                          
                             
!
!        Intel(R) Pentium(R) M processor 1.60GHz                                           
                             
!
!                                                                                          
                             
!
!Number of processors: 1                                                                   
                             
!
!                                                                                          
                             
!
!Video card: ERROR                                                                         
                             
!
!                                                                                          
                             
!
!Video card driver version: ERROR                                                          
                             
!
!                                                                                          
                             
!
!Screen size: 1024 x 768 32 bits                                                           
                             
!
!                                                                                          
                             
!
!Number of Monitors: 1                                                                     
                             
!
!                                                                                          
                             
!
!Path: C:/Program Files/scilab-
5.3.0/bin;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WI
!
!     NDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\GeoX\Dot!
!     Net\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program Files\Co!
!     mmon Files\DivX Shared\;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition!
!     \GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\Program!
!      Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Deskto!
!     p Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C!
!     :\Program Files\Common Files\DivX 
Shared\;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbe!
!     m;C:\WINDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\G!
!     eoX\DotNet\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program F!
!     iles\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Desktop !
!     Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\!
!     Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport!
!      Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstra!
!     l\bin;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop

Edition\bin;C:\Program Files\G!
!     eosupport Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program File!
!     s\SPSS\SPSS Data Access Pack 2.5\                                                    
                             
!
!                                                                                          
                             
!
!ComSpec: C:\WINDOWS\system32\cmd.exe                                                      
                             
!
!                                                                                          
                             
!
!TMP : C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!TEMP: C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!WSCI: C:\Program Files\scilab-5.3.0                                                       
                             
!
!                                                                                          
                             
!
!SCIHOME: C:\DOCUME~1\DOHUSE~1\APPLIC~1\Scilab\scilab-5.3.0                                
                             
!
 
-->win64()
 ans  =
 
  F  
 
Comment from GM Culp -- January 27, 2011, 11:55:04 PM    
This is what I got:

-->[a,b]= getdebuginfo()
 b  =
 
!Version: scilab-5.3.0          !
!                               !
!Compilation date: Dec 15 2010  !
!                               !
!Compilation time: 08:46:53     !
!                               !
!Compiler Architecture: x86     !
!                               !
!Compiled with Intel compiler   !
!                               !
!XML version: 2.4.26            !
!                               !
!Tcl/Tk: Enable                 !
!                               !
!TCL version: 8.5.2             !
!                               !
!TK version: 8.5.2              !
!                               !
!Path separator: ;              !
!                               !
!Directory separator: \         !
!                               !
!PCRE Version: 8.2              !
 a  =
 
!Memory in use:      84 %                                                                  
                             
!
!                                                                                          
                             
!
!Total Physical Memory (Kbytes): 1038764                                                   
                             
!
!                                                                                          
                             
!
!Free Physical Memory (Kbytes):  158956                                                    
                             
!
!                                                                                          
                             
!
!Total Paging File (Kbytes): 5033344                                                       
                             
!
!                                                                                          
                             
!
!Free Paging File (Kbytes): 3603996                                                        
                             
!
!                                                                                          
                             
!
!Total Virtual Memory (Kbytes): 2097024                                                    
                             
!
!                                                                                          
                             
!
!Free Virtual Memory (Kbytes): 1198656                                                     
                             
!
!                                                                                          
                             
!
!Free Extended Memory (Kbytes):       0                                                    
                             
!
!                                                                                          
                             
!
!Operating System: Windows XP                                                              
                             
!
!                                                                                          
                             
!
!        Intel(R) Pentium(R) M processor 1.60GHz                                           
                             
!
!                                                                                          
                             
!
!Number of processors: 1                                                                   
                             
!
!                                                                                          
                             
!
!Video card: ERROR                                                                         
                             
!
!                                                                                          
                             
!
!Video card driver version: ERROR                                                          
                             
!
!                                                                                          
                             
!
!Screen size: 1024 x 768 32 bits                                                           
                             
!
!                                                                                          
                             
!
!Number of Monitors: 1                                                                     
                             
!
!                                                                                          
                             
!
!Path: C:/Program Files/scilab-
5.3.0/bin;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WI
!
!     NDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\GeoX\Dot!
!     Net\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program Files\Co!
!     mmon Files\DivX Shared\;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition!
!     \GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\Program!
!      Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Deskto!
!     p Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C!
!     :\Program Files\Common Files\DivX 
Shared\;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Wbe!
!     m;C:\WINDOWS\System32;C:\Program Files\Geosupport Desktop Edition\bin;C:\Program 
Files\Geosupport Desktop Edition\G!
!     eoX\DotNet\bin;C:\Program Files\Geosupport Desktop Edition\GeoX\Java\bin;C:\Program 
Files\Cepstral\bin;C:\Program F!
!     iles\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport Desktop !
!     Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstral\bin;C:\!
!     Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop 
Edition\bin;C:\Program Files\Geosupport!
!      Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program Files\Cepstra!
!     l\bin;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\Geosupport Desktop

Edition\bin;C:\Program Files\G!
!     eosupport Desktop Edition\GeoX\DotNet\bin;C:\Program Files\Geosupport Desktop 
Edition\GeoX\Java\bin;C:\Program File!
!     s\SPSS\SPSS Data Access Pack 2.5\                                                    
                             
!
!                                                                                          
                             
!
!ComSpec: C:\WINDOWS\system32\cmd.exe                                                      
                             
!
!                                                                                          
                             
!
!TMP : C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!TEMP: C:\TEMP                                                                             
                             
!
!                                                                                          
                             
!
!WSCI: C:\Program Files\scilab-5.3.0                                                       
                             
!
!                                                                                          
                             
!
!SCIHOME: C:\DOCUME~1\DOHUSE~1\APPLIC~1\Scilab\scilab-5.3.0                                
                             
!
 
-->win64()
 ans  =
 
  F  
 
Comment from GM Culp -- January 27, 2011, 11:58:51 PM    
I apologize for the redundant posts.  I am not sure how that happened.
Comment from GM Culp -- January 28, 2011, 01:20:25 AM    
I apologize for the redundant posts.  I am not sure how that happened.
Comment from GM Culp -- January 29, 2011, 01:58:16 AM    
It works... I needed to install C++ compiler such as Visual Studio 2008 Express Edition 
(which Harald Galda advised in a previous post).  I will make sure to read the past posts 
more thoroughly next time!
Comment from Dean Messing -- February 5, 2011, 01:44:23 AM    
Hello Dr. Galda,

I am ready to try to build IPD 7.0 on my Fedora 13 linux box.
I downloaded the src zip file from this page.

I unzpped it and I see the cpp source files and so forth.
But I don't see any instructions for how to build from source
(on linux or windows).  No makefile.  No configure file.

So I don't know how to build the thing. I realise this is meant to be loaded
via ATOMS (of which I have ZERO knowledge :-). Maybe that's why.
Anyway I've never done this before with scilab, just used it as a simple user,
so please forgive the elementary questions.

Questions: 

1) I see three .dll files in sci_gateway/cpp along with the C++ source,
   and I three .lib files in cpp/lib.  These appear to be filled with more
   .dll files.  Should I just delete all this since they will be useless on
    a linux system?

2) The opencv lib files on my system are in /usr/lib64 and the include files
   are in /usr/include

   So, I suppose I should add
IncludePath = '-I""' + CPPGateWayPath + 'include""' + ' ' + '-I""' +.. 
'/usr/include/opencv""';

LibraryPath = '-LIBPATH:""' + CPPGateWayPath + 'lib""' + ':""' +'/usr/lib64""';

in builder_gateway_cpp.sce.  In that corrrect?

3) How to actually build the IPD?

4) How to get scilab to "see" IPD after it is built?
   In builder_gateway_cpp.sce I see that (for MSDOS) 'loader.sce' is deleted
   and 'loader_for_windows.sce' is copied to 'loader.sci'

   Maybe for linux I should just load the built loader.sci from my startup file?

Thanks for your help!


Dean





Answer from Harald Galda -- February 5, 2011, 09:41:49 AM    
Dear Dean,

just open the script builder.sce on Scilab and execute it. Everything else happens 
automatically. There is no need for make or configure files as Scilab generates these files

if necessary.

Then you close Scilab and start it again. You first click on "Toolboxes" and then on "IPD-
7.0". That's it. 

You should replace *.lib files and replace them by the corresponding files for Linux. The 
*.dll files are certainly useless on Linux. If you think they consume too much disk space,

delete them. They are not needed.

The builder and loader files must be edited so the libraries for Linux are loaded instead
of 
the *.dll files.

Harald
Answer from Dean Messing -- February 7, 2011, 10:03:02 PM    
Thanks for your help Dr. Galda.

I just tried to build IPD and got this error:

This toolbox requires Atlas library. Please re-install Scilab and choose Atlas library
option.

Problem is, I have scilab built with the Atlas libs.
Nonetheless -->with_atlas() returns F which is the source of the problem
in your builder.sce code.

A bit of searching reveals this bug:
  <http://bugzilla.scilab.org/show_bug.cgi?id=3265>.

Your thoughts?

Sincerely,
Dean
Answer from Dean Messing -- February 7, 2011, 10:05:16 PM    
For some reason the link I provided didn't make it into the reply.

The bug number is: 3265 on Scilab's Bugzilla.
Answer from Harald Galda -- February 8, 2011, 10:22:40 AM    
Dean,

you might open the files builder.sce and IPD.start, comment or delete the following lines
in 
both files:

if ~with_atlas() then
  
 error('This toolbox requires Atlas library. Please re-install ' + ...
       'Scilab and choose Atlas library option.');
  
end;

Then you can run builder.sce again. There were some problems with the OpenCV DLLs in the 
past and I found out that these problems could be solved by installing Scilab with Atlas 
library option.

Harald
Answer from Dean Messing -- February 8, 2011, 09:58:34 PM    
Thanks for the suggestion. After I discovered that with_atlas() had bugs,
I did this.

The next issue  was two missing files
in /usr/local/share/scilab/modules/helptools/data/css

These were c_code.css and xml_code.css which I copied over from
the scilab source (build) directory. (FYI: I am using scilab built from
the GIT development branch for 5.3.1. I am building
IPD in the scilab-5.3.1/contrib directory hoping it would automatically
find the above files, but I guess IPD keys off of $SCI which scilab
internally sets to its install directory /usr/local/share/scilab/.)

No matter: that part now works.  But then comes the next problem during the build.
I don't want to clutter up this forum with the full output because its long.
Perhaps you would send me your e-mail addr?  Mine
is dean2m at sharp3labs dot com  (delete the numbers and type the rest
in the obvious way.:-) I can then send you the full output.

Many of the warnings involve building the German and Japanese help pages.
(I don't have these help pages in Scilab, just the ones that Scilab builds
by default which are English, French, and Brazilian.)

Then ilib_gen_Make copies the cpp routines to TMPDIR.
Then I get this:

ilib_compile: An error occurred during the compilation:
and there's a long text message (many lines).  Here's
a typical stanza in this output:


!In file included from /usr/local/share/scilab//../../include/scilab/stack-c.h:!
!     34,                                                                      !
!                                                                              !
!                 from /usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_g!
!     ateway/cpp/include/IPD.h:27,                                             !
!                                                                              !
!                 from CreatePixelIndexList.cpp:18:                            !
!                                                                              !
!/usr/local/share/scilab//../../include/scilab/stack-def.h:19: note: #pragma me!
!     ssage: Using stack-def.h is deprecated. Please use api_scilab instead (tr!
!     y 'help api_scilab'). Note the stack-def.h API will be removed after Scil!
!     ab 6.0.                                                                  !

The build finishes with these lines:

!make: *** [MaskFilter.lo] Error 1                                             !

ilib_compile: The command was:
make  CFLAGS="-I/usr/local/share/scilab//../../include/scilab/
-I"/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include"
-I"/usr/include/opencv"" CXXFLAGS="-I/usr/local/share/scilab//../../include/scilab/
-I"/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include"
-I"/usr/include/opencv""
LDFLAGS="-LIBPATH:"/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/lib":"/usr/lib64""
FFLAGS="-I/usr/local/share/scilab//../../include/scilab/ "
   Generate a cleaner file
Generating loader_gateway.sce...
Generating cleaner_gateway.sce...
 
-->// Variables are cleared.
 
-->clear Version;
 
-->clear VersionError;
 
-->clear ToolboxName;
 
-->clear ToolboxPath;

So it built something!
I then copy three of my system shared objects (.dll's in Windows-land)
to sci_gateway/cpp/ and rename them so your code can link them:

highgui200.so  (was /usr/lib64/libhighgui.so.2.0.0 on my system)
cxcore200.so   ( similarly)
cv200.so       ( similarly)

Now I run it:

-->exec('loader.sce', -1)
 
 IPD - Image Processing Design Toolbox 7.0   
Shared archive loaded.
Link done.
Shared archive loaded.
Link done.
Shared archive loaded.
Link done.
Link failed for dynamic library
'/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp//libIPD.so'.
An error occurred:
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp//libIPD.so: cannot open
shared object file: No such file or directory
Link failed for dynamic library
'/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp//libIPD.so'.
An error occurred:
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp//libIPD.so: cannot open
shared object file: No such file or directory
etdynlibext(), 'libIPD', list_functions)
                                         !--error 236 
addinter: The shared archive was not loaded: (null)
at line      34 of exec file called by :    
    exec("loader.sce");
at line      20 of exec file called by :    
 exec('loader_gateway.sce');
at line     301 of exec file called by :    
exec(get_absolute_file_path("loader.sce")+"etc/"+"IPD.start");
at line      10 of exec file called by :    
exec('loader.sce', -1)
 
-->

Evidently cpp/libIPD.so didn't get built. I guess that's
due to the make error above.

Oh, yes.  As a reminder of what I said above, I did add these two
lines to builder_gateway_cpp.sci
  IncludePath = '-I""' + CPPGateWayPath + 'include""' + ' ' + '-I""' + 
                '/usr/include/opencv""';
  LibraryPath = '-LIBPATH:""' + CPPGateWayPath + 'lib""' + ':""' +'/usr/lib64""';

hoping that the build would use my system files as well as cpp/lib and cpp/include
Currently cpp/lib is empty and cpp/include contains your .h files minus the
ones involved with opencv (since these are in my /usr/include/opencv).

Anyway I'll await your direction.

Thanks,
Dean

 
Answer from Dean Messing -- February 9, 2011, 03:03:10 AM    
After more time spent on this, I have found where the IBD build process is failing.

The stuff about stack-c.h being deprecated are just warnings. It actually successfully
builds these modules:

GetVideoInfo.lo
DistanceTransform.lo
CreatePixelIndexList.lo
ConvertColorSpace.lo
CloseVideoFile.lo

Then it dies on MaskFilter.cpp
By running the Makefile "by hand" I see these errors:

g++ -I. -I/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include
-I/usr/include/opencv -fPIC -I/usr/local/share/scilab//../../include/scilab/
-I/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include
-I/usr/include/opencv -c MaskFilter.cpp  -fPIC -DPIC -o .libs/MaskFilter.o



In file included from
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:22,
                 from MaskFilter.cpp:19:
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/MaskFilterTemplate.h:
In member function 'virtual void CMaskFilterTemplate::ComputeOffsets(TUInt,
TUInt)':
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/MaskFilterTemplate.h:67:
error: 'm_ColumnOffsets' was not declared in this scope
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/MaskFilterTemplate.h:69:
error: 'm_RowOffsets' was not declared in this scope
In file included from MaskFilter.cpp:19:
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:
At global scope:
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:34:
error: ISO C++ forbids declaration of 'TGrayValueList' with no type
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:34:
error: expected ',' or '...' before '&' token
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:51:
error: ISO C++ forbids declaration of 'TGrayValueList' with no type
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:51:
error: expected ',' or '...' before '&' token
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:
In member function 'virtual GrayValueType
CLinearFilter::ComputeGrayValue(int)':
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:55:
error: 'm_NumberOfElements' was not declared in this scope
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:57:
error: 'GrayValues' was not declared in this scope
MaskFilter.cpp: In function 'int int_MaskFilter(char*)':
MaskFilter.cpp:94: error: cannot declare variable 'Filter' to be of abstract type
'CLinearFilter'
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/LinearFilter.h:27:
note:   because the following virtual functions are pure within 'CLinearFilter':
/usr/local/src/Scilab/scilab-5.3.1/contrib/IPD-7.0/sci_gateway/cpp/include/Filter.h:43:
note: 	GrayValueType CFilter::ComputeGrayValue(const std::vector<_Tp,
std::allocator<_Tp1> >&) [with GrayValueType = double]
make: *** [MaskFilter.lo] Error 1


I am now out of my depth because, although I know C, I don't know C++ and so don't
know how to fix these.  Perhaps there's a compiler flag that will loosen "scope"
restrictions?  Why would this build under Windows?

Dean
Answer from Harald Galda -- February 9, 2011, 11:52:56 AM    
The class hierarchy is CFilter -> CMaskFilterTemplate -> CLinearFilter. The member
variables  
m_NumberOfElements, m_RowOffsets and m_ColumnOffsets and the type TGrayValueList are 
declared in CFilter and are protected. This means that they should be accessable by all sub

classes of CFilter. 

ComputeGrayValue is not only declared but also defined in CLinearFilter. Therefore this 
function is not "pure virtual".

CFilter is a template class and so are the sub classes. A declaration such as 
CLinearFilter should be as legal as vector.

I do not understand why the declarations described above are considered as illegal by your

C++ compiler whereas everything compiles on Windows using Visual Studio. Does the compiler

on your machine not process templates?

In my opinion the question is not why this can be built under Windows, but why this can not

be built under Linux.
Answer from Harald Galda -- February 9, 2011, 12:18:04 PM    
It seems that problems can occure when compiling code using template classes with GCC. I 
have found an article about template instantiation with GCC. The URL:

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Template-Instantiation.html#Template-
Instantiation

I suggest you try and compile the C++ functions using the option "-frepo".
Comment from Allan CORNET -- February 5, 2011, 06:55:45 PM    
Please notice that if you respect toolbox skeleton , you must not modify loader.sce 
generated by Scilab (if you have to add some specific code, it is your etc/.start the good

place)

This is important if you want to be packaged n ATOMS

Allan
Answer from Harald Galda -- February 5, 2011, 07:11:56 PM    
builder_gateway.sce must be modified to make IPD run on Linux, not any loader script. I
hope 
that a modified version of builder_gateway.sce will be published on file exchange along
with 
the libraries for Linux. Then I can create a new version of the toolbox that will work on 
both Windows and Linux.

> Please notice that if you respect toolbox skeleton , you must not modify loader.sce 
> generated by Scilab (if you have to add some specific code, it is your etc/.start the
> good 
> place)
> 
> This is important if you want to be packaged n ATOMS
> 
> Allan
Comment from Allan CORNET -- February 5, 2011, 07:53:02 PM    
If you create a repository on http://forge.scilab.org/ for IPD
or if you give me access to a repository
I can do port on linux, mac, windows 64 bit ;)
I already for SIVP and some others modules

Allan
Answer from Harald Galda -- February 5, 2011, 08:50:57 PM    
I do have a repository on http://forge.scilab.org/ for IPD. I uploaded the ZIP file 
containing the source code, but no *.lib and *.dll files (which must be built on each 
operating system). Are any further steps necessary? 
Answer from Harald Galda -- February 5, 2011, 09:07:22 PM    
The repository has the URL http://forge.scilab.org/index.php/p/IPD/

If you use OpenCV 2.1 or 2.2 instead of 2.0, builder_gateway.sce must be modified 
accordingly. 
Answer from Dean Messing -- February 9, 2011, 03:19:14 AM    
> If you create a repository on http://forge.scilab.org/ for IPD
> or if you give me access to a repository
> I can do port on linux, mac, windows 64 bit ;)
> I already for SIVP and some others modules
> 
> Allan


Hi Allan.

You say you have already ported SIVP to linux?
I tried installing the ATOMS module but got errors at startup on my Fedora 13 system.
I thought I'd try to build from source and install. But I'm not seeing your ported
source (or any thing at all for SIVP) on forge.scilab.org.

I'd rather use IPD but until you complete your port I badly need something to
do my work.

So would you point me to the source files you ported for SIVP? I'll continue
to try getting IPD running on my system, but (see my comment (1362) above)
I'm out of my depth with the errors I'm seeing unless Harald, you, or someone else
gives me a clue.

Thanks for your help!
Answer from Harald Galda -- February 9, 2011, 12:22:00 PM    
I think it will be possible to build the toolbox on 64 bit Windows and maybe also on Mac. 
However, on Linux you must make sure that your C++ compiler processes templates.
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.