Matlab Software Package For Image Processing and Analysis
Matlab Software Package For Image Processing and Analysis
Article
WenJun Zhang
School of Life Sciences, Sun Yat-sen University, Guangzhou 510275, China; International Academy of Ecology and
Environmental Sciences, Hong Kong
E-mail: zhwj@mail.sysu.edu.cn, wjzhang@iaees.org
Abstract
In present study, I developed a powerful Matlab-based software package, imageProcAnal (Version 1.0), for
image processing and analysis. Several modules were available for uses. Functions to resize, crop, rotate, dilate,
pixelate and watermark images are included in Basic module. Adjustment of image edge, contrast and gamma
factor is available in Adjustment module. In Denoising module, four elementary denoising methods and their
joint uses are provided for image filtering and denoising. In Edge and Contour Detection module, five methods
for detection of image edge and contour are provided. Also three methods for image sharpening are available
in Sharpening module. Segmentation module includes three methods for image segmentation. Connected
components recognition can be made in Object Recognition module. In Analysis module, Pearson correlation
measure was provided to align images. Pearson correlations and p values among images can be obtained.
Mutiple methods across different modules can be sequentially and jointly used to achieve ideal image. Finally,
some examples for image processing can be found in Demo module. In addition to conventional methods, I
proposed two new methods for image segmentation, i.e., TDOS (Two-Dimensional Ordered Segmentation)
and MWAS (Moving Windows Averaging Segmentation). In TDOS, which is based on two-dimensional
ordered cluster analysis, the pixels belonging to the same segment (class) are adjoint and are not separated by
any of remaining segments. MWAS is based on moving windows averaging method for transect boundary
detection. Algorithms of TDOS and MWAS were given, and full Matlab codes of MWAS were given.
Keywords Matlab; software; image denoising; image adjustment; edge detection; image sharpening; image
segmentation; image alignment; Pearson correlation.
Network Pharmacology
ISSN 24151084
URL: http://www.iaees.org/publications/journals/np/onlineversion.asp
RSS: http://www.iaees.org/publications/journals/np/rss.xml
Email: networkpharmacology@iaees.org
EditorinChief: WenJun Zhang
Publisher: International Academy of Ecology and Environmental Sciences
1 Introduction
Image recognition and processing is a discipline that uses computer systems to identify and process images to
achieve a human-like visual system that understands the outside world (Wu, 2006; Bhardwaj and Solanki,
IAEES www.iaees.org
2 Network Pharmacology, 2020, 5(1-2): 1-32
2016). An image is an information carrier that conveys information to people in different patterns. Some of the
patterns can be recognized and understood by computer vision systems by simulating the visual function of the
human eye, but due to insufficient prior knowledge in related fields, some other patterns cannot be simulated
and identified by computer vision systems. The factors that affect the development of image recognition and
processing research are mainly the prior knowledge of related fields. This includes not only existing computer
algorithms, but also knowledge of image acquisition, image-related databases, etc.
Image processing and analysis is a fundamental aspect for various sciences and technologies, for example,
medical digonosis, gene expression, landscape recognition, etc (Dogra et al., 2018; Zhang and Qi, 2019).
However, the common used software for image processing are somewhat simple and short of many
functionalities. The present study aims to develop and present the powerful Matlab-based software for image
processing and analysis. Various functionalities seldom found in common software are available in the
software pakage. In addition, new methods are proposed also.
degr=10;
rgb=imread('geneExpression.png');
j=imrotate(rgb,degr, 'bilinear', 'crop'); %Rotate image by degr degrees
imshow(j);
rgb=imread('geneExpression.png');
rgb=imcrop(rgb); %Crop image interactively
imshow(rgb);
a=600; b=800;
rgb=imread('geneExpression.png');
j=imresize(rgb, [a b]) %Resize image to ba pixels
imshow(j);
m=5;
rgb=imread('wjzhang.png');
imj=im2bw(rgb);
se=strel('diamond',m);
j=imdilate(imj,se) %Dilate image with a diamond of size m
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 3
imshow(j);
The general process of embedding watermark in an image using discrete cosine transform is: (1) Discrete
cosine transformation of the original image; (2) generation of watermark signals; (3) embed watermark in the
image. The following is the procedure for the inverse of two-dimensional discrete cosine transformation to
obtain a watermarked image:
rgb=imread('wjzhang.png');
imdim=numel(size(rgb));
if (imdim~=2) rgb=rgb2gray(rgb); end
alfa=0.01; len=1000; %Set parameters
dctf=dct2(rgb);
[m,n]=size(dctf); %DCT (Discrete Cosine Transformation) of the image
watermark=randn(len,1);
[y0,z0]=sort(watermark); %Generate watermark series and sort it
v=dctf(:);
[y1,z1]=sort(v);
mn=m*n;
k=len;
p=zeros(mn,1); %Find the position for embeding watermark
for i=1:mn
if (k>=1)
p(mn)=y1(mn)*(1+alfa*y0(k));
k=k-1;
else p(mn)=y1(mn);
end
mn=mn-1;
end
y=zeros(mn,1);
mn=m*n;
for i=1:mn
y(z1(i))=p(i);
end
s=1;
for j=1:n
for i=1:m
dctf2(i,j)=y(s);
s=s+1;
end
end %Revise the amplitudes of s frequency components with greater amplitudes and embed watermark
idctf=idct2(dctf2);
imshow(idctf,[]); %Inverse of DCT for obtaining the image embedded with watermark
IAEES www.iaees.org
4 Network Pharmacology, 2020, 5(1-2): 1-32
Image adjustment is a processing method that highlights certain information in an image according to specific
requirements, such as improving some edge information and adjusting the contrast of the image, while
weakening or removing some unwanted information. The adjusted image can often enhance the ability to
recognize special information, improve the visual effect, and allow the observer to check a more direct and
clear image.
2.1.2.1 Grayscale linear transformation
Insufficient brightness or non-linearity of some images will make the contrast of images less than ideal. We
can improve the contrast of an image by reassigning the pixel amplitude. The grayscale of the image was
expanded by linear mapping. In addition, the image compression method is adopted, or the grayscale is
segmented, that is, compression is performed in a certain interval and expanded in another interval according
to image characteristics and our requirements.
2.1.2.2 Gamma adjustment
Gamma value in the function ‘imadjust’ can determine the correction effect. Gamma value determines the
grayscale mapping method of the input image to the output image, that is, determines whether to adjust low
grayscale or adjust high grayscale. When Gamma equals 1, it is a linear transformation.
2.1.2.3 Two-dimensional filtering
The spatial texture information of an image can reflect the position, shape, size and other characteristics of the
image. Using linear filtering technology can adjust some texture features of the image and remove other
unuseful features. Linear filtering is a neighborhood operation whose response is given by the sum of the
product of the filter coefficients and the corresponding pixel values of the area swept by the filtering window.
Matlab provides a variety of filtering operators, such as mean filtering, Gaussian lowpass filtering, Laplacian
operator, motion blur operator, edge adjustment, edge extraction, contrast enhancement filter, etc.
The following is the full Matlab codes for image adjustment:
rgb=imread('geneExpression.png');
imdim=numel(size(rgb));
if (imdim~=2) i=rgb2gray(rgb);
else i=rgb;
end
h=fspecial('prewitt');
j=imfilter(i,h); %Edge adjustment
imshow(j);
gamma=2;
rgb=imread('geneExpression.png');
imdim=numel(size(rgb));
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 5
if (imdim~=2) i=rgb2gray(rgb);
else i=rgb;
end
j=imadjust(i,[],[], gamma); %Gamma adjustment
imshow(j);
rgb=imread('geneExpression.png');
imdim=numel(size(rgb));
if (imdim~=2) i=rgb2gray(rgb);
else i=rgb;
end
h=fspecial('average');
j=imfilter(i,h); %Mean filtering
k=medfilt2(j); %Median filtering
rgb=wiener2(k); %Adaptive filtering
rgb=im2double(rgb);
IAEES www.iaees.org
6 Network Pharmacology, 2020, 5(1-2): 1-32
rgb=imread('geneExpression.png');
imdim=numel(size(rgb));
if (imdim~=2) i=rgb2gray(rgb);
else i=rgb;
end
bw1=edge(i,'sobel'); %Sobel method
bw2=edge(i,'roberts'); %Roberts method
bw3=edge(i,'prewitt'); %Prewitt method
bw4=edge(i,'log'); %Laplacian of Gaussian method
bw5=edge(i,'canny'); %Canny method
subplot(2,3,1);imshow(bw1);title('Sobel edge detection');
subplot(2,3,2);imshow(bw2);title('Roberts edge detection ');
subplot(2,3,3);imshow(bw3);title('Prewitt edge detection ');
subplot(2,3,4);imshow(bw4);title('Laplacian of Gaussian edge detection ');
subplot(2,3,5);imshow(bw5);title('Canny edge detection ');
rgb=imread('wjzhang.png');
rgb=im2bw(rgb);
stru=strel('diamond',1);
imd=imdilate(rgb,stru);
ime=imerode(rgb,stru);
imed=imd-ime;
contour=1-imed;
imshow(contour);
rgb=imread('geneExpression.png');
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 7
imdim=numel(size(rgb));
if (imdim~=2) i=rgb2gray(rgb);
else i=rgb;
end
subplot(2,2,1);imshow(i);title('Original');
h1=fspecial('sobel');
i1=filter2(h1,i);
subplot(2,2,2);imshow(i1);title('Sobel Sharpening ');
h2=fspecial('prewitt');
i2=filter2(h2,i);
subplot(2,2,3);imshow(i2);title('Prewitt Sharpening');
h3=fspecial('laplacian');
i3=filter2(h3,i);
subplot(2,2,4);imshow(i3);title('Laplacian Sharpening');
thr=128;
rgb=imread('geneExpression.png');
imdim=numel(size(rgb));
if (imdim~=2) c=rgb2gray(rgb);
else c=rgb;
end
subplot(1,2,1);imshow(c);
title('Original Image');
freq=imhist(c);
[r,t]=size(c);
N=r*t;
L=256;
freq=freq/N;
for i=2:L
if freq(i)~=0
st=i-1;
break
end
end
for i=L:-1:1
if freq(i)~=0;
IAEES www.iaees.org
8 Network Pharmacology, 2020, 5(1-2): 1-32
nd=i-1;
break
end
end
f=freq(st+1:nd+1);
p=st;q=nd-st;u=0;
for i=1:q;
u=u+f(i)*(p+i-1);
ua(i)=u;
end
for i=1:q
w(i)=sum(f(1:i));
end
d=(u*w-ua).^2./(w.*(1-w));
[y,tp]=max(d);
th=tp+p;
if th<=210
th=tp+p;
else th=210;
end
rgb1=zeros(r,t);
for i=1:r
for j=1:t
X1(i,j)=double(c(i,j));
end
end
for i=1:r
for j=1:t
if (X1(i,j)>=thr)
rgb1(i,j)=X1(i,j);
else
rgb1(i,j)=0;
end
end
end
subplot(1,2,2);imshow(rgb1);title('Segmentated Image');
thr=128;
rgb1=imread('geneExpression.png');
imdim=numel(size(rgb1));
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 9
if (imdim~=2) rgb=rgb2gray(rgb1)
else rgb=rgb1;
end
[m,n]=size(rgb);
for i=1:m
for j=1:n
if (rgb(i,j)>thr);
rgb(i,j)=255;
else
rgb(i,j)=0;
end
end
end
subplot(1,2,1);imshow(rgb1); title('Original Image');
subplot(1,2,2);imshow(rgb); title('Segmentated Image');
Thus there will be q(q-1) possible segmentaions. Calculate the error function for each segmentaion:
IAEES www.iaees.org
10 Network Pharmacology, 2020, 5(1-2): 1-32
Choose the segmentaions that meets min e(G(2)), the two segments can be achieved.
(2) Assume that k segments have been achieved. Following the procedure above, segmentate them as two
segments respectively, and choose the segmentation that meets max min e(G(2)), thus k+1 segments is
achieved.
(3) If k<q, segmentation continues, and if k=q, the calculation terminates.
Error function can be used as cluster distance level. At given level, we can use all resulatant segments as
the segments of the image.
The improved two-dimensional ordered clustering method (Zhang et al., 2014) is also available for TDOS
method.
2.1.6.4 Moving windows averaging segmentation (MWAS)
Moving windows averaging segmentation is based on boundary detection algorithm (Zhang and Schoenly,
1999; Zhang, 2005). Here I name it as MWAS.
For a gray image, the grayscale value, j, of any pixel falls in [0,255]. Calculate the frequency distribution
of grayscale values. It means that there are 256 ordered grayscale values along the x-axis, and 1 measurement
variable at each grayscale value j (i.e., number of the pixels with grayscale value j, fj).
Consider a window with window width Q in calculation of moving average segmentation. This window is
split into two equal halves, Wa and Wb, each half has Q/2 ordered grayscales. The grayscale location of this
window is defined by k+0.5, where k=Q/2,Q/2+1,Q/2+2,...,256-Q/2. The average of fj in each half window is
Wa(k+0.5)= ∑kj=k-Q/2+1fj/(Q/2)
Wb(k+0.5)= ∑k+Q/2j=k+1fj/(Q/2)
The distance between each of the resulting 256-Q+1 pairs of averages can be calculated. For a window,
calculate the absolute distance
DS(k+0.5) =|Wa(k+0.5)-Wb(k+0.5)|
Monte Carlo technique is used to estimate expected mean distance of distance matrix for a window width
Q. Each grayscale value is randomly repositioned along grayscale series 0~255 for l=1,2, .. ,p times (e.g.,
p=200), and distance for each of the reorderd data sets, producing a new distance matrix DR(k+0.5,l). For each
k+0.5 window midpoint grayscale along the series (0,1,2,…,255), the mean expected distance and standard
deviation are as follows
DSB(k+0.5)= ∑pl=1(DR(k+0.5,l)/p
SD(k+0.5)=(∑pl=1(DR(k+0.5,l)-DSB(k+0.5))2/(p-1))0.5
The overal expected mean distance and average standard deviation for the series at window width Q is
given by
For each window midpoint location, the distance estimate can be transformed into Z score as follows
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 11
DZ(k+0.5)=(DS(k+0.5)-DSB(·))/SDB
As done in Zhang et al. (2005), If the present ratio SDB2/DSB(·) against the cumulative ratios of all
window widths is less than 0.05, i.e., 95% of information has been obtained, or the number of window widths
is greater than n-Q+1, then start to calculate pooled distance.turn to pooling procedure.
Finally, the pooled distance estimate is calculated for each window midpoint grayscale from T different
window widths
The overal expected mean distance and average standard deviation for the series of pooled results are PDSB=0
and PSDB=1 respectively.
Calculate lower limit of the confidential interval with different confidence degree (Zhang and Schoenly,
1999)
If the pooled distance, DZB(k+0.5), of window midpoint is less than the upper limit, we consider the
corresponding grayscale location is a vally grayscale.
After doing these, the boundary grayscale locations (valley grayscale locations) can be determined across
the series 0~255. Thus, the interval [0,255] can be segmentated into several segments or no any segment.
IAEES www.iaees.org
12 Network Pharmacology, 2020, 5(1-2): 1-32
for k=1:s
for j=i:w-1+i
if (j>(floor(w/2)+z)) t2=t2+a(k,j); else t1=t1+a(k,j); end
end
b(k,i)=t1/floor(w/2);
b(k,i+1)=t2/floor(w/2);
t1=0; t2=0;
end
md(i,sm)=floor(w/2)+z+0.5;
z=z+1;
ds2(i,sm)=0;
for l=1:s
ds2(i,sm)=ds2(i,sm)+abs(b(l,i)-b(l,i+1));
end
end
for i=1:ts-w+1
dsb(i)=0;
p(i)=0;
qq(i)=0;
end
kk=1;
while (kk<=sim)
cols=randperm(ts);
for k=1:s
for j=1:ts
cc(k,j)=a(k,cols(j));
end
end
t1=0; t2=0; z=0;
for i=1:ts-w+1
for k=1:s
for j=i:w-1+i
if (j>(floor(w/2)+z)) t2=t2+cc(k,j); else t1=t1+cc(k,j); end
end
b(k,i)=t1/floor(w/2);
b(k,i+1)=t2/floor(w/2);
t1=0; t2=0;
end
z=z+1;
ds=0;
for k=1:s
ds=ds+abs(b(k,i)-b(k,i+1));
end
dsb(i)=dsb(i)+ds/sim;
p(i)=p(i)+ds^2;
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 13
qq(i)=qq(i)+ds;
end
kk=kk+1;
end
for i=1:ts-w+1
sd(i)=(p(i)-2*qq(i)*dsb(i)+sim*dsb(i)^2)/(sim-1);
if (sd(i)>=0) sd(i)=sqrt(sd(i)); else sd(i)=0;
end
end
momn=0; mosd=0;
for i=1:ts-w+1
momn=momn+dsb(i);
mosd=mosd+sd(i);
g(i)=ds2(i,sm);
end
mnbar(kp)=momn/(ts-w+1);
sdbar(kp)=mosd/(ts-w+1);
su=su+sdbar(kp)^2/mnbar(kp);
prop=sdbar(kp)^2/mnbar(kp)/su;
for i=1:ts-w+1
dz(i,sm)=(ds2(i,sm)-mnbar(kp))/sdbar(kp);
end
kp=kp+1;
if (prop<=(percent/100.0))
q=kp-1; break;
end
if (sm>=ts-w+1)
q=kp-1; break;
end
w=w+st;
end
wc=floor(st/2)*q-floor(st/2)+ts-(mw+st*(q-1))+1;
hk=ts-(mw+st*(q-1))+1;
s2=floor(st/2)*q-floor(st/2)+1;
mt=1;
tv=0;
for i=1:ts-mw+1
if (tv>=hk) mt=mt-1; end
if ((i>=s2) && (tv<hk))
mt=q; tv=tv+1;
end
pdz(i)=0;
ap=i;
for j=1:mt
pdz(i)=pdz(i)+dz(ap,j);
IAEES www.iaees.org
14 Network Pharmacology, 2020, 5(1-2): 1-32
ap=ap-floor(st/2);
end
pdz(i)=pdz(i)/mt;
s1=i*1.0/floor(st/2);
s3=(i-wc)*1.0/floor(st/2);
if ((floor(s1)==s1) && (i<s2)) mt=mt+1; end
if ((s3>floor(s3)) && (i>wc)) mt=mt+1; end
end
for i=1:ts-mw+1
g(i)=pdz(i);
end
mnbarr=0; sdbarr=1;
for j=1:4
th=0;
switch (j)
case 1
th=-2*sdbarr; %Deep vally grayscale detection: I
case 2
th=-1.5*sdbarr; %Mediate vally grayscale detection: II
case 3
th=-1*sdbarr; %Mild vally grayscale detection: III
case 4
th=-0.5*sdbarr; %Shallow vally grayscale detection. IV
end
on=1; off=1; ids=0;
for i=1:ts-w+1
if (g(i)<=(mnbarr+th))
if ((on==1) | (off==0))
ids=ids+1;
segs(j,ids)=i;
on=0; off=1;
end
continue;
else
if ((off==1) | (on==0))
off=0; on=1;
end
end
end
len(j)=ids;
end
segs=segs-1;
s=0;
for k=1:4
if (len(k)==0) continue; end
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 15
s=s+1;
end
[m,n]=size(rgb);
ss=0;
for k=1:4
if (len(k)==0) continue; end
rgb1=zeros(m,n);
ss=ss+1;
if (len(k)==1)
if (segs(k,1)==0)
for i=1:m
for j=1:n
rgb1(i,j)=0;
end
end
end
if (segs(k,1)>0)
for i=1:m
for j=1:n
if ((rgb(i,j)<=segs(k,1)))
rgb1(i,j)=0; end
if ((rgb(i,j)>segs(k,1)))
rgb1(i,j)=255; end
end
end
end
end
if (len(k)>=2)
if (segs(k,1)==0)
for i=1:m
for j=1:n
if ((rgb(i,j)>=segs(k,1)) && (rgb(i,j)<segs(k,2))) rgb1(i,j)=0; end
for l=2:len(k)-1
if ((rgb(i,j)>segs(k,l)) && (rgb(i,j)<=segs(k,l+1)))
rgb1(i,j)=segs(k,l); end
end
end
if ((rgb(i,j)>segs(k,len(k))) && (rgb(i,j)<=255)) rgb1(i,j)=255; end
end
end
if (segs(k,1)>0)
for i=1:m
for j=1:n
if ((rgb(i,j)>=0) && (rgb(i,j)<segs(k,1))) rgb1(i,j)=0; end
for l=1:len(k)-1
IAEES www.iaees.org
16 Network Pharmacology, 2020, 5(1-2): 1-32
rgb=imread('brainTumorMRI.png');
rgb=im2bw(rgb);
xr=bwlabel(rgb,8); %Connectedness
u=unique(xr); %max(u): number of connected components
stru=strel('diamond',1); %Diamond structure
for i=1:max(u(:))
ind=find(xr==i); %Choose an object
lind=ind(1);
IAEES www.iaees.org
Network Pharmacology, 2020, 5(1-2): 1-32 17
x0=zeros(size(rgb));
x0(lind)=1;
x=imdilate(x0,stru);
x1=x0;
while (~isequal(x1,x))
x1=x;
x=imdilate(x1,stru).*logical(rgb);
end
imr(:,:,i)=x;
end
for i=1:size(imr,3)
figure
im=imr(:,:,i);
imshow(im,[]);
end
IAEES www.iaees.org
18 Network Pharmacology, 2020, 5(1-2): 1-32
if (sigma==1) strr=strcat(strr,[char(13) 'Pearson correlation is statistically significant (p=' num2str(p) ')' char(13)]); end
if (sigma==0) strr=strcat(strr,[char(13) 'Pearson correlation is not statistically significant (p=' num2str(p) ')' char(13)]); end
fprintf(strr);
Fig. 1 The software, imageProcAnal (Version 1.0). Here an image has been loaded into the window.
IAEES www.iaees.org
Network Phharmacology, 20
020, 5(1-2): 1-332 19
Fig. 2 SF-RT gene exxpression patterrn in S. furciferra, geneExpresssion.png (Lin ett al., 2019).
Fig. 3 MR
RI image used for
f experiment is infected withh a tumor regio
on in the tempooral lobe, brainTumorMRI.png
g (Dogra et al.,,
2018).
IAEES www.iaees.org
w
20 Network Phharmacology, 20
020, 5(1-2): 1-332
3 Softwaare Guide
3.1 File menu
m (Fig. 5)
5
Openn: once the sooftware startss and before making any operation on image, an im mage must bee loaded intoo
the window interface by using Opeen sub-menu..
Reoppen: during anny operation, Reopen can be used to ree-loaded the original
o imagee initially loaaded by Openn
sub-menuu.
Save as: at any steep, the currennt image(s) inn the window can be savedd using Save aas sub-menu.
Save: the filenamee most recenttly used to saave image can n be used agaain to save new image for replacing thee
previous image.
Closee: terminate and
a close the software.
IAEES www.iaees.org
w
Network Phharmacology, 20
020, 5(1-2): 1-332 21
F 6 Basic mo
Fig. odule.
(a) (b))
Fig. 7 Parameter inpput window for Resize
R (a) and Rotate
R (b).
IAEES www.iaees.org
w
22 Network Phharmacology, 20
020, 5(1-2): 1-332
Figg. 9 Dilate an im
mage with speciified structure and
a size.
IAEES www.iaees.org
w
Network Phharmacology, 20
020, 5(1-2): 1-332 23
Fig. 14 A
Adjustment of an
a image with specified
s contraast parameters.In this example,, the image wass adjusted for more
m darkness.
IAEES www.iaees.org
w
24 Network Phharmacology, 20
020, 5(1-2): 1-332
IAEES www.iaees.org
w
Network Phharmacology, 20
020, 5(1-2): 1-332 25
(a) (b)
Fig. 17 Coomparison betw
ween original annd noise-removved images. (a) Original imagee (Fig. 2); (b) N
Noise-removed image
i by using
Joint (M_M_A) Filtering.
3.5 Edgee and Contou ur Detection module (Secction 2.1.4; Fig.F 18)
Detectionn of object edges
e in an image
i and im mage contou ur can be connducted by uusing the metthods in thiss
module.
Sobbel, Prewitt, Laplacian
L of Gaussian, Rooberts and Caanny Edge Detection:
D onee of these meethods can bee
chosen too detect edges (Section 2.11.4.1; Fig. 199). For an uncclean image with
w noises, liike geneExpreession.png inn
Fig. 2, it is suggested using denoissing methods to remove no oises in advannce, and then make edge detection.
d
Conntour Detectioon: the contouur of the imaage is detectedd using this method
m (Sectiion 2.1.4.2; Fig. 20).
IAEES www.iaees.org
w
26 Network Pharmacology, 2020, 5(1-2): 1-32
Fig. 19 Canny (upper) and Sobel (lower) edge detection on the images without (left) and with (right) removal of noises (here
using Joint (M_M_A) Filtering).
Fig. 20 Contour detection on the images without (left) and with (right) removal of noises (here using Joint (M_M_A) Filtering).
IAEES www.iaees.org
Network Phharmacology, 20
020, 5(1-2): 1-332 27
Fig.. 21 Sharpening
g module.
IAEES www.iaees.org
w
28 Network Phharmacology, 20
020, 5(1-2): 1-332
Fig. 23
2 Segmentatio
on module.
Fig. 24 Maximum Inter-ssegment Variannce Threshold seegmentation meethod (Here thee original imagee, geneExpressiion.png, has
been denoised by using Joint (M_M_A) Filtering).
IAEES www.iaees.org
w
Network Phharmacology, 20
020, 5(1-2): 1-332 29
Fig. 28 Object
O Recogniition module.
IAEES www.iaees.org
w
30 Network Phharmacology, 20
020, 5(1-2): 1-332
IAEES www.iaees.org
w
Network Phharmacology, 20
020, 5(1-2): 1-332 31
F 31 Demo module.
Fig. m
Fig. 33
3 Demo for Sh
harpening.
IAEES www.iaees.org
32 Network Pharmacology, 2020, 5(1-2): 1-32
References
Bhardwaj N, Solanki A. 2016. An efficient algorithm for color image segmentation. Selforganizology, 3(3):
87-99
Dogra J, Prashar N, Jain S, Sood M. 2018. Improved methods for analyzing MRI brain images. Network
Biology, 8(1): 1-11
Lin J, Zhang M, He JY, et al. 2019. Characterization of two non-LTR retrotransposons from Sogatella
furcifera and Nilaparvata lugens. Arthropods, 8(1): 7-16
Wu HX. 2006. Recognition and Processing of Ecological Landscape Images. MS Dissertation, Sun Yat-sen
University, Guangzhou, China
Zhang WJ. 1993. Two-dimensional order clustering and its application in the regionalization of agriculture.
Bulletin of Soil and Water Conservation, 13(1): 34-41
Zhang WJ. 2005. An improved algorithm on boundary detection of ecological transect and network software.
Journal of Biomathematics, 20(4): 477-486
Zhang WJ. 2012. Computational Ecology: Graphs, Networks and Agent-based Modeling. World Scientific,
Singapore
Zhang WJ. 2015. Calculation and statistic test of partial correlation of general correlation measures.
Selforganizology, 2(4): 65-77
Zhang WJ. 2016. Detecting connectedness of network: A Matlab program and application in tumor pathways
and a phylogenic network. Selforganizology, 3(4): 117-120
Zhang WJ. 2018a. Fundamentals of Network Biology. World Scientific Europe, London, UK
Zhang WJ. 2018b. Network matrix based methods for between-network comparison. Network Biology, 8(4):
144-152
Zhang WJ, Qi YH. 2019. Matlab methods for calculation of between-image correlations and similarities.
Ornamental and Medicinal Plants, 3(3-4): 6-12
Zhang WJ, Li X. 2015. General correlation and partial correlation analysis in finding interactions: with
Spearman rank correlation and proportion correlation as correlation measures. Network Biology, 5(4):
163-168
Zhang WJ, Qi YH. 2019. Matlab methods for calculation of between-image correlations and similarities.
Ornamental and Medicinal Plants, 3(3-4): 6-12
Zhang WJ, Qi YH, Zhang ZG. 2014. Two-dimensional ordered cluster analysis of component groups in
self-organization. Selforganizology, 1(2): 62-77
Zhang WJ, Schoenly KG. 1999. BOUNDARY: A Program for Detecting Boundaries in Ecological Landscapes.
IRRI Technical Bulletin No.3. International Rice Research Institute, Manila, Philippines
IAEES www.iaees.org