Image Processing Using Scilab
Image Processing Using Scilab
USING SCILAB
Rajesh B. Raut
Associate Professor, Dept. of E&C
Shri Ramdeobaba K.N. Engg. College, Nagpur
[email protected]
INSTALLING SIVP
After atomsInstall SIVP, do the proxy settings
Use help proxy command to see the proxy
settings
Eg.
atomsSetConfig (useProxy, True/False)
atomsSetConfig (ProxyHost, DNS/IP Address)
atomsSetConfig (ProxyPort, Port Address)
DIGITAL IMAGE
Image is a 2D matrix
can be:
Gray
BASIC FUNCTIONS:
IMREAD/IMSHOW/IMWRITE
imread
output image= imread(input image)
imshow
imshow(output image)
imwrite
output=imwrite(input image, output image
name)
Eg: info=imfinfo(baboon.png)
returns the information: filename filesize, width,
height bitdepth, etc.
DATATYPE CONVERSION
im2int8- Convert image to 8-bit signed integers
im2int16
im2int32
im2uint8
im2uint16
im2double
u- unsigned
double - double precision
0.5 (threshold) : specify threshold in the range [0,1], regardless of the class of
the input image.
BASIC OPERATIONS
Complement
outputimage = imcomplement(inputimage)
Resize
outputimage = imresize(inputimage, multi.
factor, resizing algo)
resizing algo. can be nearest, bilinear,
bicubic or area
Crop
outputimage=imcrop(inputimage, [Xcoord Ycoord
SizeX SizeY])
RESULTS: COMPLEMENT
Original
Complement
RESULTS: CROP
lenacrop = imcrop(lena [200, 200, 200, 200]);
Original
Cropped
RESULTS: RESIZE
Original
Resized by 2
2- 2D matrix elements
imhist
[counts, cells] = imhist(im)
[counts, cells] = imhist(im, bins)
Counts- the returned histogram.
Cells- the intervals for bins.
NOISE FUNCTIONS
Types
Gaussian-
additive noise
Salt & Pepper- black/white noise
Speckle- multiplicative noise
Localvar- Pixel-specific variance (Zero-mean Gaussian)
Function: imnoise
Outputimage=imnoise(inputimage, noisetype)
e.g. lenaNoised=imnoise(lena,gaussian)
Original
Gaussian
Speckle
prewitt
laplacian
F = fspecial(sobel);
average
Prewitt
Log
canny
TOPICS TO BE EXPLORED
FFT
Wavelets
Radon Transform
Hough Transform
TO CONCLUDE.