Professional Documents
Culture Documents
Imgresize: A Matlab Software For Resizing Images With Various Methods
Imgresize: A Matlab Software For Resizing Images With Various Methods
Imgresize: A Matlab Software For Resizing Images With Various Methods
net/publication/358659963
CITATIONS READS
0 72
1 author:
Wenjun Zhang
Sun Yat-Sen University
219 PUBLICATIONS 3,532 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Wenjun Zhang on 17 February 2022.
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 the Matlab based software for resizing images, imgResize (Version 1.0). Various
images with formats as PNG, JPG, GIF, etc., can be resized with specified scales or pixels. Users can choose
different methods for resizing images. The excutable software, full Matlab codes and user guide were given.
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 processing is a technique that uses computer to process images for achieving a human-like visual
system (Wu, 2006; Bhardwaj and Solanki, 2016). Image processing is a fundamental aspect for various
sciences and technologies, for example, medical digonosis, gene expression, landscape recognition, etc (Dogra
et al., 2018). However, the often used software for image processing shorts of some functionality. The present
study aimed to develop and present the Matlab based software (Zhang, 2012a-b, 2016, 2018, 2020, 2021a-b)
for image resizing. Various images with formats can be resized with specified scales or pixels. Users can
choose different methods for resizing images. Full Matlab codes and demo samples were given.
2 Method
2.1 Software package and Matlab source codes
The software for resizing images, imgResize (Version 1.0), was packaged as a WinRAR file (Fig. 1; see
supplementary material). Matlab source codes are presented in the following
function imgResize
origin=input('Input the file name of raw picture (e.g., x.jpg, x.png): ','s');
target=input('Input the file name of generated picture (e.g., y.jpg, y.png): ','s');
IAEES www.iaees.org
2 Network Pharmacology, 2022, 7(1-2): 1-4
sel=input('Choose the method for image resizing (1: Scale adjustment; 2: Pixel adjustment): ');
rgb=imread(origin);
if (sel==1)
res=input('Input inflation/reduction scale (0.5, 2, etc): ');
met=input('Choose the method for inflation/reduction (1: Bilinear; 2: Nearest): ');
if (met==1)
rgb=imresize(rgb,res,'bilinear');
elseif (met==2)
rgb=imresize(rgb,res,'nearest');
end
elseif (sel==2)
rows=input('Input desired row pixels (1000): ');
cols=input('Input desired column pixels (1000): ');
rgb=imresize(rgb,[rows cols]);
end
imwrite(rgb, target);
imshow(rgb);
IAEES www.iaees.org
Network Phharmacology, 2022,
2 7(1-2): 1-4 3
IAEES www.iaees.org
4 Network Phharmacology, 2022,
2 7(1-2): 1-4
Referencces
Bhardwaaj N, Solankii A. 2016. Ann efficient allgorithm for color image segmentationn. Selforganizzology, 3(3)::
87-999
Dogra J,, Prashar N, Jain S, Soodd M. 2018. Improved
I meethods for annalyzing MR RI brain imag ges. Networkk
Bioloogy, 8(1): 1-111
Wu HX. 2006. Recoggnition and Processing
P off Ecological Landscape
L Im
mages. MS DDissertation, Sun
S Yat-sen
Univversity, Guanggzhou, China
Zhang WJ.
W 2012a. A Java J softwaree for drawingg graphs. Netw
work Biologyy, 2(1): 38-444
Zhang WJ.
W 2012b. Computationall Ecology: Graphs,
G Netwo orks and Ageent-based Moodeling. Worrld Scientific,,
Singaapore
Zhang WJ.
W 2016. Selfforganizologyy: The Sciencce of Self-Org ganization. World
W Scientiffic, Singaporee
Zhang WJ.
W 2018. Funndamentals off Network Bioology. World d Scientific, London,
L UK
Zhang WJ.
W 2020. im mageProcAnaal: A novel Matlab
M softw
ware packagee for image processing and a analysis..
Netw
work Pharmaccology, 5(1-2)): 1-32
Zhang WJ.
W 2021a. A web tool foor generatingg user-interfaace interactivve networks. Network Bio ology, 11(4)::
247-2262
W 2021b. Coonstruction annd analysis off the word neetwork based on the Randoom Reading Frame
Zhang WJ. F (RRF))
methhod. Network Biology, 11((3): 154-193
IAEES www.iaees.org
w