Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,7 @@ Version 4.1.2.2 (24-Jul-20):

Version 4.5 (21-Nov-23):
1. Change OpenCV Dependency to 4.5
2. base64toimg, imgtobase64 (20-Sep-2022) - experimental, requite USB E for image exchange
2. base64toimg, imgtobase64 (20-Sep-2022) - experimental, requite USB E for image exchange

Version 4.5.0.1 (24-Feb-25)
1. backport master branch fixes
7 changes: 5 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Image Processing and Computer Vision Toolbox (IPCV) - Version 4.5 (21-Nov-23)
# Image Processing and Computer Vision Toolbox (IPCV) - Version 4.5.0.1 (24-Feb-25)

Version 4.5.0.1 (24-Feb-25)
1. backport master branch fixes

Version 4.5 (21-Nov-23):
1. Change OpenCV Dependency to 4.5
Expand Down Expand Up @@ -75,4 +78,4 @@ New functions:

Version 1.1 (6-Apr-17): Add features and tests, improved start file

Version 1.0 (17-Mar-17): Initial Release
Version 1.0 (17-Mar-17): Initial Release
23 changes: 0 additions & 23 deletions README.txt

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.5.0
4.5.0.1
2 changes: 0 additions & 2 deletions builder.sce
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ function main_builder();
///////////
tbx_builder_gateway(toolbox_dir);
tbx_builder_help(toolbox_dir);
//tbx_build_loader(TOOLBOX_NAME, toolbox_dir);
tbx_build_loader(toolbox_dir);
//tbx_build_cleaner(TOOLBOX_NAME, toolbox_dir);
tbx_build_cleaner(toolbox_dir);
endfunction
// =============================================================================
Expand Down
6 changes: 3 additions & 3 deletions demos/demo_transform.sci
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function demo_transform()

scf()
subplot(221); imshow(S); title("Original Image");
subplot(222); imshow(y1,jetcolormap(512)); title("DCT");
subplot(223); imshow(y2,jetcolormap(512)); title("FFT");
subplot(224); imshow(fftshift(y2),jetcolormap(512)); title("FFT Shifted");
subplot(222); imshow(y1,jet(512)); title("DCT");
subplot(223); imshow(y2,jet(512)); title("FFT");
subplot(224); imshow(fftshift(y2),jet(512)); title("FFT Shifted");

scf()
//subplot(221); imshow(S); title("Original Image");
Expand Down
32 changes: 9 additions & 23 deletions etc/IPCV.start
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//=============================================================================
// IPCV - Scilab Image Processing and Computer Vision toolbox
// Copyright (C) 2017 Tan Chin Luh
// Copyright (C) 2023-2025 - UTC - Stéphane Mottelet
//=============================================================================
//
function ipcvlib = startModule()
Expand All @@ -12,20 +13,16 @@ function ipcvlib = startModule()
etc_tlbx = getshortpathname(etc_tlbx);
root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") );

mprintf("Start %s %s\n",TOOLBOX_NAME,mgetl(fullfile(root_tlbx,"VERSION")));
mprintf(TOOLBOX_TITLE + "\n");
mprintf("2023 - Scilab Academy\n");
//mprintf("Find more information at https://ipcv.scilab-academy.com \n");
mprintf("Start %s %s: ",TOOLBOX_NAME,mgetl(fullfile(root_tlbx,"VERSION")));

if isdef("ipcvlib") then
warning(TOOLBOX_NAME + " library is already loaded");
return;
end


//Load functions library
// =============================================================================
mprintf("\tLoad macros\n");
mprintf("load macros");
pathmacros = pathconvert( root_tlbx ) + "macros" + filesep();
ipcvlib = lib(pathmacros);

Expand All @@ -35,23 +32,13 @@ function ipcvlib = startModule()
// load dependencies
// =============================================================================
// load dependencies on OpenCV
mprintf("\tLoad dependencies\n");
mprintf(", dependencies");
OPENCV_LIBS = ['opencv_world'];
//TORCH_LIBS = [''];

OPENCV_VERSION = "4.5.0"
bDepsLoaded = %t;
bNonfLoaded = %t;

if getos() == 'Windows' then // Windows

OPENCV_LIBS = OPENCV_LIBS + "450" ;
exec(etc_tlbx+'IPCV_windows.sci');
IPCV_windows(root_tlbx,OPENCV_LIBS);
//exec(etc_tlbx+'IPCV_windows_torch.sci');
//IPCV_windows_torch(root_tlbx,TORCH_LIBS);

else // Darwin, Linux
if getos() <> 'Windows' then // Darwin, Linux

exec(etc_tlbx+'IPCV_unix.sci');
IPCV_unix(root_tlbx,OPENCV_LIBS);
Expand All @@ -60,7 +47,7 @@ function ipcvlib = startModule()

// load gateways
// =============================================================================
mprintf("\tLoad gateways\n");
mprintf(", gateways");

exec(pathconvert(root_tlbx + "/sci_gateway/loader_gateway.sce", %f));

Expand All @@ -69,7 +56,7 @@ function ipcvlib = startModule()
// Load and add help chapter
// =============================================================================
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad help\n");
mprintf(", help");
path_addchapter = pathconvert(root_tlbx+"/jar");
if ( isdir(path_addchapter) <> [] ) then
add_help_chapter(TOOLBOX_TITLE, path_addchapter, %F);
Expand All @@ -79,7 +66,7 @@ function ipcvlib = startModule()
// Load demos
// =============================================================================
if or(getscilabmode() == ["NW";"STD"]) then
mprintf("\tLoad demos\n");
mprintf(", demos.");
pathdemos = pathconvert(root_tlbx+"/demos/ipcv.dem.gateway.sce",%F,%T);
add_demo("IPCV",pathdemos);
end
Expand All @@ -97,5 +84,4 @@ else
clear startModule; // remove startModule on stack

end
// =============================================================================

// =============================================================================
13 changes: 5 additions & 8 deletions etc/IPCV_unix.sci
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function IPCV_unix(root_tlbx,OPENCV_LIBS)
// image_codec_libs = ["png12"; "jpeg"];
// video_codec_libs = ["gstbase-0.10";"openh264";"gstreamer-0.10";"gstvideo-0.10";"gstapp-0.10";...
// "gstriff-0.10";"gstpbutils-0.10";"QtOpenGL";"QtTest";"gstinterfaces-0.10";"gstaudio-0.10";"gsttag-0.10"];
ffmpeg_libs = ["avutil"; "swscale"; "avcodec"; "avformat"; "avfilter"; "avdevice"];
ffmpeg_libs = ["avutil"; "swscale"; "swresample"; "avcodec"; "avformat"; "avfilter"; "avdevice"];
OPENCV_LIBS = "lib"+[ffmpeg_libs; OPENCV_LIBS];

ARCH = unix_g("uname -m");
Expand All @@ -30,7 +30,7 @@ function IPCV_unix(root_tlbx,OPENCV_LIBS)
cd(pp);

if bDepsLoaded == %t then
disp("Pre-Compiled OpenCV lib used");
printf(" (packaged OpenCV lib used)");
break;
end

Expand All @@ -49,7 +49,7 @@ function IPCV_unix(root_tlbx,OPENCV_LIBS)
end

if bDepsLoaded == %t then
disp("System OpenCV lib used");
printf(" (system OpenCV lib used)");
break;
end

Expand All @@ -71,7 +71,7 @@ function IPCV_unix(root_tlbx,OPENCV_LIBS)
end

if bDepsLoaded == %t then
disp("Mixed OpenCV lib used");
printf(" (mixed OpenCV lib used)");
break;
end

Expand All @@ -97,7 +97,4 @@ function IPCV_unix(root_tlbx,OPENCV_LIBS)
return;
end




endfunction
endfunction
48 changes: 46 additions & 2 deletions help/en_US/Image Reading, Display and Exploration/imread.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<variablelist>
<varlistentry>
<term>filename,url :</term>
<listitem><para> A string, the image filename or a valid URL to be read. For the case of URL, the full syntax must be used. For example, "http://www.tritytech.com/images/phocagallery/roll8_ScilabIOT.png".</para></listitem>
<listitem><para> A string, the image filename or a valid URL to be read. For the case of URL, the full syntax must be used. For example, "https://gitlab.com/uploads/-/system/project/avatar/3330423/puffin.png".</para></listitem>
</varlistentry>
<varlistentry>
<term>modes :</term>
Expand All @@ -61,6 +61,48 @@ im = imread(filename)
reads image in filename into im matrix. If filename contains a truecolor image, im is a MxNx3 hypermatrix, so for example im(:,:,1) stands for the red channel. For gray images, im is a MxNx1 unsigned char matrix.
</para>
<para>
The imread mode can be controlled by setting any of these optional arguments to 1:
</para>
<para>
IMREAD_UNCHANGED (return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation)
</para>
<para>
IMREAD_GRAYSCALE (convert image to the single channel grayscale image)
</para>
<para>
IMREAD_COLOR (convert image to the 3 channel color image)
</para>
<para>
IMREAD_ANYDEPTH (return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit)
</para>
<para>
IMREAD_ANYCOLOR (the image is read in any possible color format)
</para>
<para>
IMREAD_LOAD_GDAL (use the gdal driver for loading the image)
</para>
<para>
IMREAD_REDUCED_GRAYSCALE_2 (convert image to the single channel grayscale image and the image size reduced 1/2)
</para>
<para>
IMREAD_REDUCED_COLOR_2 (convert image to the 3 channelcolor image and the image size reduced 1/2)
</para>
<para>
IMREAD_REDUCED_GRAYSCALE_4 (convert image to the single channel grayscale image and the image size reduced 1/4)
</para>
<para>
IMREAD_REDUCED_COLOR_4 (convert image to the 3 channelcolor image and the image size reduced 1/4)
</para>
<para>
IMREAD_REDUCED_GRAYSCALE_8 (convert image to the single channel grayscale image and the image size reduced 1/8)
</para>
<para>
IMREAD_REDUCED_COLOR_8 (convert image to the 3 channelcolor image and the image size reduced 1/8)
</para>
<para>
IMREAD_IGNORE_ORIENTATION (do not rotate the image according to EXIF's orientation flag)
</para>
<para>
</para>
</refsection>

Expand All @@ -70,6 +112,8 @@ reads image in filename into im matrix. If filename contains a truecolor image,
im = imread(fullpath(getIPCVpath() + "/images/" + 'baboon.png'));
imshow(im);

im = imread(fullpath(getIPCVpath() + "/images/" + 'puffin.png'),IMREAD_UNCHANGED=1);
imshow(im);
]]></programlisting>
</refsection>

Expand All @@ -88,4 +132,4 @@ imshow(im);
<member>Tan Chin Luh</member>
</simplelist>
</refsection>
</refentry>
</refentry>
2 changes: 1 addition & 1 deletion help/en_US/Image Transforms/imdct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Performs a forward discrete Cosine transform of 1D or 2D array.
<programlisting role="example"><![CDATA[
S = imread(fullpath(getIPCVpath() + "/images/measure_gray.jpg"));
y = imdct(S);
imshow(y,jetcolormap(256));
imshow(y,jet(256));

]]></programlisting>
</refsection>
Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Image Transforms/imhough.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Applies Hough transformation to an image.
S = imread(fullpath(getIPCVpath() + "/images/2lines.png"));
[HM, rho, th] = imhough(S);
scf();Sgrayplot(th,rho,HM',strf="021");
xset("colormap",hotcolormap(64))
xset("colormap",hot(64))

]]></programlisting>
</refsection>
Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Image Transforms/imidct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ S = imread(fullpath(getIPCVpath() + "/images/measure_gray.jpg"));
y = imdct(S);
y2 = zeros(y);
y2(1:100,1:100) = y(1:100,1:100);
imshow(y2,jetcolormap(256));
imshow(y2,jet(256));
S2 = imidct(y2);
imshow(S2./255);

Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Image Transforms/imradon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If THETA is not defined, then 0:179 is assumed.
I = zeros(100,100);
I(25:75, 25:75) = 1;
[RT,xp] = imradon(I);
imshow(RT,hotcolormap(64));
imshow(RT,hot(64));

]]></programlisting>
</refsection>
Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Image Transforms/imwatershed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dist = Sd > 0.4;
[markers,n] = imlabel(dist);
markers(1:5,1:5) = 255;
Sw = imwatershed(S, markers);
imshow(Sw,hsvcolormap(3));
imshow(Sw,hsv(3));

]]></programlisting>
</refsection>
Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Morphological Operations/imblobprop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ A_edge = edge(A,'canny');
se = imcreatese('ellipse',15,15);
A_dilate = imdilate(A_edge,se);
[A_labeled,n] = imlabel(A_dilate);
imshow(A_labeled,jetcolormap(n));
imshow(A_labeled,jet(n));
[Area, BB, ctr] = imblobprop(A_labeled);
imrects(BB,[255,0,0]);

Expand Down
2 changes: 1 addition & 1 deletion help/en_US/Morphological Operations/imlabel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ A_edge = edge(A,'canny');
se = imcreatese('ellipse',15,15);
A_dilate = imdilate(A_edge,se);
[A_labeled,n] = imlabel(A_dilate);
imshow(A_labeled,jetcolormap(n));
imshow(A_labeled,jet(n));

]]></programlisting>
</refsection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ S = imread(fullpath(getIPCVpath() + "/images/coins_gray.jpg"));
Sbw = im2bw(S,0.5);
Sc = imfindContours(Sbw);
So = imcontour2label(S,Sc);
imshow(So,rainbowcolormap(size(Sc)));
imshow(So,rainbow(size(Sc)));

]]></programlisting>
</refsection>
Expand Down
Loading