JSPM KK
JSPM KK
JSPM KK
net/publication/312294616
CITATIONS READS
3 3,354
1 author:
Kavita Khobragade
Fergusson College Pune
14 PUBLICATIONS 19 CITATIONS
SEE PROFILE
All content following this page was uploaded by Kavita Khobragade on 13 January 2017.
Abstract— Image processing is the new era of recent of the primary colors. A 16-bit digital grayscale image
research. Image Processing is a technology where consumes far more memory or storage than the same image
programs are written to handle and manipulate the image with the same physical dimensions in 8-bit digital
in terms of pixels. Latest technologies provide the easiest grayscale.[1] The coloured image is shown in figure 1.
way of writing the image processing programs. Some of
them are C, C++, Java, Matlab, OpenCV, Python etc. Java
is a programming language with image processing API
support. OpenCV is the library of programming functions
which works on classes and functions. Matlab is the
Matrix laboratory which works on matrices and vectors.
The purpose of this paper is to provide an introduction to
different technologies such as OpenCV, Java and Matlab
and explain pros and cons of each. These technologies are
used to convert coloured image to a gray-scale image. This
paper shows the comparative study of these technologies.
Fig.1 : Coloured Image
Keywords- Image Processing, Coloured image, Gray Scale
image, OpenCV, Java, Matlab. 1.2. Grayscale Image
.
Grayscale is a range of shades of gray without apparent
1. Introduction color. The darkest possible shade is black and the lightest
Image processing is the rapidly growing technology possible shade is white. Black means the total absence of
today. It is applied in various aspects and various areas of a transmitted or reflected light and the white means total
business. It forms core research area within engineering and transmission or reflection of light at all visible wavelength.
computer science disciplines. Image processing is a method Intermediate shades of gray are represented by equal
which converts an image into digital form and performs some brightness levels of the three primary colors [red, green and
operations on it. This process is done to get an enhanced blue]. [2] The grayscale image is shown in figure 2.
image or to extract useful information from it. In this case the
input and output is also an image. Usually Image Processing
system includes treating images as two dimensional signals
while applying already set signal processing methods to
them.[6]
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLO
SE);
frame.setSize(600,300);
imagegreyscale panel = new
imagegreyscale(pie[0],pie[1]);
frame.setContentPane(panel);
frame.setVisible(true);
}
}
i=imread('water.jpg'); Conclusion
%[a b c]=size(i);
figure(1), imshow(i);
r=i(:,:,1); This paper presents the comparison of OpenCV, Java and
g=i(:,:,2); Matlab, as image processing can be done using these
b=i(:,:,3); technologies. This paper shows the program code for
%for k=1:p
x= 0.2989 * r + 0.5870 * g+ 0.1140 * b;
converting coloured image to grayscale image and comparison
%end among them. From the above information it is observed that it
figure(2),imshow(x); is not required to remember the header file name needed for
the execution of a program. Secondly, the result / output vary
as far as intensities and contrast are considered. Thirdly, the
Fig.6: Matlab Program
size of the code is very small in Matlab than OpenCV and
Java. But Matlab gives very good intensities and contrast in
In this case the in-built rgb2gray() can be used. But the grayscale images. As future enhancement the
the conversion is done with the help of a expression. An preprocessing and segmentation algorithms are used for
imshow() is a function which displays the image to the screen. comparison.
Figure shows different image windows for colour and gray
image to display.[7]
REFERENCES
2. Observation and Discussion
For experimentation a simple program is considered i.e. the [1] http://whatis.techtarget.com/definition/0,,sid9_gci1169848,00.html
program is of converting a coloured image into gray-scale [2] http://whatis.techtarget.com/definition/0,,sid9_gci1169848,00.html
image. The comparisons of these four technologies are shown [3] www.oreilly.com/openbook/javawt/book/ch12.pdf
in table 1. [4] Gary Bradski, Adrian Kaehler, Learning OpenCV – Computer Vision
with OpenCV Library, O’reilly publication, June-2011.
Table. 1: Comparison of Different Technologies [5] Wilhem Burger, Mark Burge, Digital Image Processing: An algorithmic
introduction using Java, Springer, 2008.
OpenCV Java Matlab [6] http://www.engineersgarage.com/articles/image-processing-tutorial-
applications
Features
Open source or not Yes No No [7] Rafael Gonzalez, Richard Woods, Steven Eddins, Digital Image
Processing using Matlab, 2nd edition, Tata McGraw Hill publication,
2010.
Coding Slower Slower Faster