기본 정보
- 저자
- DOI
- 10.5281/zenodo.8240754
- 저널
- Zenodo (CERN European Organization for Nuclear Research)
- 발행년도
- 2023
- 발행기관
- European Organization for Nuclear Research
- 피인용수
- 0
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.5281/zenodo.8240754
- 토픽
- Color Science and Applications
- OpenAlex ID
- W6913092910
평가 내용
- 관련도
- 사업분야
- 필름·전자재료 · (14) 드라이 필름(포토레지스트)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '필름·전자재료 > 드라이 필름(포토레지스트)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
This paper demonstrates a method to detect live coloured Red, Green, and Blue (RGB) images or objects using camera and MATLAB program. If any RGB (Red, Green, and Blue) coloured image or object comes in front of the camera, it detects a particular colour. This concept uses Image processing as its basic principle. The camera places a rectangular box over the image which will show the presence of particular colour at that enclosed space. This concept can be used in many applications like colour–object finder and colour-detector robot. MATLAB allows us to create a Graphical User Interface and we can perform the colour detection operation of RGB (Red, Green, and Blue) colours by using a program and image processing technique helps us to convert an image into digital form and performing operations on it to get an enhanced image or to extract some useful information as in this to detect RGB (Red, Green, and Blue) colours.
본문 13,936자
본문 펼치기
_March-April 2020_
_ISSN: 0193-4120 Page No. 23607 - 23610_
# Red Green Blue (RGB) Colour Detection Using MATLAB
Prakash Chandra Mishra <sup>1</sup> , Shakti Prasad Senapati <sup>2</sup> , Kshitij Saxena <sup>3</sup>
1Assistant in Department of Electronics and Instrumentation Engineering, Faculty of Engineering and Technology,
MJP, Rohilkhand University, Bareilly, U.P, India
2Assistant Professor in Department of EEE, Darbhanga College of Engineering, Darbhanga, Bihar, India
3B.Tech in Department of Electronics and Instrumentation Engineering, Faculty of Engineering and Technology,
MJP, Rohilkhand University, Bareilly, U.P, India
1prakashchandramishra075@gmail.com
_Article Info_ _Abstract_
_Volume 83_ This paper demonstrates a method to detect live coloured Red, Green, and Blue (RGB)
_Page Number: 23607 - 23610_
images or objects using camera and MATLAB program. If any RGB (Red, Green, and
_Publication Issue:_
Blue) coloured image or object comes in front of the camera, it detects a particular colour.
_March - April 2020_
This concept uses Image processing as its basic principle. The camera places a rectangular
box over the image which will show the presence of particular colour at that enclosed
space. This concept can be used in many applications like colour–object finder and colourdetector robot. MATLAB allows us to create a Graphical User Interface and we can
perform the colour detection operation of RGB (Red, Green, and Blue) colours by using a
program and image processing technique helps us to convert an image into digital form
and performing operations on it to get an enhanced image or to extract some useful
_Article History_
information as in this to detect RGB (Red, Green, and Blue) colours.
_Article Received_ _: 24 July 2019_
_Revised_ _: 12 September 2019_
_Accepted_ _:15 February 2020_ _Keywords:_
_Publication_ _: 30 April 20_ 20
_Abstract_
This paper demonstrates a method to detect live coloured Red, Green, and Blue (RGB)
images or objects using camera and MATLAB program. If any RGB (Red, Green, and
Blue) coloured image or object comes in front of the camera, it detects a particular colour.
This concept uses Image processing as its basic principle. The camera places a rectangular
box over the image which will show the presence of particular colour at that enclosed
space. This concept can be used in many applications like colour–object finder and colourdetector robot. MATLAB allows us to create a Graphical User Interface and we can
perform the colour detection operation of RGB (Red, Green, and Blue) colours by using a
program and image processing technique helps us to convert an image into digital form
and performing operations on it to get an enhanced image or to extract some useful
information as in this to detect RGB (Red, Green, and Blue) colours.
_Keywords:_ _MATLAB, Camera, Image Processing, Grey Scale Image, GUI, Median_
_<u>Filtering, Color detection,, Binary Scale Image</u>_
I. INTRODUCTION
Many Many real-world applications like motion
detection, object detection, colour detection require
real-time image processing. In this paper, a method
has presented to detect the live coloured images or
objects using a camera (inbuilt 0.3 megapixels) and
MATLAB program. If any RGB (Red, Green, and
Blue) colour comes in front of the camera, it
detects a particular colour depending on the user‟s
command. The program can be written and in any
version of the MATLAB, here 2013a version has
been used. Similarly, any camera can be used as per
our requirements, here initially; a built-in webcam
of 0.3 megapixel of laptop has been used. The
various tools and concepts used in the process of
color detection have been discussed in the next
sections.
_bl_ _h_ _d b_ _h_ _l_ _bl_ _h_
II. MATLAB- A PRODUCT OF
MATHWORKS
MATLAB is a commercial software product
available from The Math Works. It consists of a
main “engine” to perform computations, and
several (optional) extended - function libraries
(called “toolboxes”) for special - purpose
applications. MATLAB has a rich set of constructs
for plotting scientific graphs from raw or computed
data, suitable for inclusion in reports and other
documents [1]. Assistance for commands may be
obtained by typing help on the command line,
followed by the specific keyword. For example, in
using the “disp” command to display text, typing
help “disp” shows the syntax of the command,
together with a brief explanation of its operation.
MATLAB files have an “.m” extension. Two useful
commands are clear all and close all, which clear
23607
all current variables, and close all display windows
respectively [2].
III. GUI (GRAPHICAL USER INTERFACE)
A GUI (Graphical User Interface) is a system of
interactive visual components for computer
[software. GUI objects include icons, cursors, and](https://www.computerhope.com/jargon/s/software.htm)
[buttons. These graphical elements are sometimes](https://www.computerhope.com/jargon/b/button.htm)
enhanced with sounds or visual effects like
[transparency and drop shadows [3, 4]. Unlike a](https://www.computerhope.com/jargon/t/transpar.htm)
[command-line operating system or CUI (Character](https://www.computerhope.com/jargon/c/commandi.htm)
[User Interface), like UNIX or MS-DOS.GUI](https://www.computerhope.com/jargon/u/unix.htm)
operating systems are much easier to learn and use
because commands do not need to be memorized
[3, 4]. Additionally, users do not need to know any
[programming languages. Because of their ease of](https://www.computerhope.com/jargon/p/programming-language.htm)
use and more modern appearance, GUI operating
systems have come to dominate today's market. A
[pointing device such as the mouse is used to](https://www.computerhope.com/jargon/p/poindevi.htm)
interact with nearly all aspects of the GUI
(Graphical User Interface). More modern devices
[also utilize a touch screen. However, it is also](https://www.computerhope.com/jargon/t/toucscre.htm)
[possible to navigate a GUI using a keyboard [3].](https://www.computerhope.com/jargon/k/keyboard.htm)
Now suppose if anyone wants to detect the RGB
(Red, Green and Blue) colours, then firstly the
program will be run [5]. If the colours are present
as well as more than the preset luminance value,
(here 0.18) then the colours will be detected and
enclosed in the rectangular boxes with the „+‟
symbol. Red, Green, and Blue colours will be
enclosed in green and blue rectangular boxes
respectively.
IV. IMAGE PROCESSING
Image processing is a method to perform some
operations on an image to get an enhanced image or
to extract some useful information from it [6]. It is
a type of signal processing in which input is an
image and output may be image or characteristics
or features associated with that image. Image
processing basically includes the following three
steps-: Importing the image via image acquisition
tools, Analysing and manipulating the image and
output in which result can be altered image or
report that is based on image analysis.There are two
types of methods used for image processing
namely, analog and digital image processing [7, 8,
9]. Analog image processing can be used for the
hard copies like printouts and photographs. Image
analysts use various fundamentals of interpretation
_ISSN: 0193-4120 Page No. 23607 - 23610_
while using these visual techniques. Digital image
processing techniques help in manipulation of the
digital images by using computers [10]. The three
general phases of all the types of data have to
undergo while using digital techniques are
preprocessing, enhancement and display
(information extraction) [11]. Median filtering has
also been employed here. It is a non-linear digital
filtering technique used to remove noise from an
image or signal. Such noise reduction is a typical
pre-processing step to improve the results of later
processing [11]. It is very widely used in digital
image processing because under certain conditions
it preserves edges while removing the noise. It is
more effective than convolution [11]. In this the
image processing is employed by firstly capturing
the image then the operations are being performed
such as obtaining a grey image, removing color
components, removing noise from the grey image
by using filter command converting the filtered
image into a binary image and finally placing
rectangular box along with '+' symbol showing the
coloured area or region.
V. PROGRAMMING METHODOLOGY FOR
COLOR DETECTION
The following steps (syntax) in the programming
help to achieve the goal of live colour detection of
RGB (Red, Green, and Blue) colors using
MATLAB [12, 5]. The images had been shown
after executions of these syntaxes for the red colour
object which is stated sequentially. These syntax
executions have been performed in the MATLAB
2013a platform.
a.) d=getsnapshot (v) this function returns an
image from the video input.
The image returned is shown in the Fig. 1 given
below-:
Fig.1: Snapshot image of the red-colored object
_Published by: The Mattingley Publishing Co., Inc._ _23608_
The next process is the conversion of colored
image to grayscale image [13].
b.) rgb2gray (d) it converts the colour image to
grayscale image.
The image returned after executing this function is
shown in the Fig. 2 given below-:
Fig. 2: Greyscale image of the coloured image
After obtaining the greyscale image, next, the red
components have been substracted from gray image
c.) diff_im = imsubtract (d (:,:,1), rgb2gray(d)); it
is used to subtract red components from grey
image.
imsubtract(d(:,:,2), imsubtract(d(:,:,3)are used to
subtract the green and blue colours from the grey
image respectively.
Fig. 3 given below shows the image obtained for
the snapshot image in figure 1.
Fig. 3: Image obtained after subtracting red
colour component from grey image.
Once the substractioon process is over, then the
next work is to remove noise from that grey image.
d.) medfilt2 (diff_im, [3 3]) It is used to remove
noise.
Median filtering is a nonlinear operation used in
image processing to reduce salt and pepper noise
[11].
_ISSN: 0193-4120 Page No. 23607 - 23610_
e.)a=im2bw (a, 0.18) it converts the greyscale
image to a binary image.
The output image “a” replaces the pixels in the
input image with luminance greater than the preset
value (here 0.18) with one (white) and the other
pixels with value zero (black) [14]. Figure 4 given
below shows the binary image obtained as output.
Fig. 4: Binary image of the red-colored object
f.) stats = regionprops (a,'BoundingBox', 'Centroid')
-> it measure a set of properties for each
component in binary image
VI. RESULT AND DISCUSSION
The RGB (Red, Green, and Blue) colours had been
detected as shown in figure 5 given below. The red,
green, and blue colours are detected and enclosed
in a rectangular box with their respective colours.
Objects are detected only when the luminence is
greater than the preset value. Here the preset value
is 0.18 which can be changed as per one‟s
requirements and choices. On changing the preset
value, the outputs for the binary image changes as
well.
Fig. 5: RGB detection of different objects using
inbuilt laptop camera
_Published by: The Mattingley Publishing Co., Inc._ _23609_
_ISSN: 0193-4120 Page No. 23607 - 23610_
VII. CONCLUSION
The object detection has many utilities in industries
such as colour object detector which can be used in
industries to detect and place the different coloured
objects and many other applications. It is helpful in
the industries or places which deal with different
objects with different colours such as in the fruit
industry where different fruits have different
colours and they can be distinguished and separated
easily saving time and labour. It is also helpful in
the places where the bulk material is received and
there comes a need to distinguish the different
products based on the colours.
REFERENCES
[1] Pratap, R. (1998). Getting Started with MATLAB 5: A
Quick Introduction for Scientists and Engineers. Oxford
University Press, Inc.
[2] Leis, J. (2011). Digital signal processing using
MATLAB for students and researchers (p. 82). New
York: Wiley.
[3] Toby, B. H. (2001). EXPGUI, a graphical user interface
for GSAS. Journal of applied crystallography, 34(2),
210-213.
[4] Perreault, S., & Hébert, P. (2007). Median filtering in
constant time. IEEE transactions on image processing,
16(9), 2389-2394.
[5] Liu, X., & Hong, K. S. (2017). Detection of primary
RGB colors projected on a screen using fNIRS. Journal
of Innovative Optical Health Sciences, 10(03), 1750006.
[6] Blanchet, G., &Charbit, M. (2006). Digital signal and
image processing using MATLAB (Vol. 4). London:
Iste.
[7] Schalkoff, R. J. (1989). Digital image processing and
computer vision (Vol. 286). New York: Wiley.
[8] Gonzalez, R. C., Woods, R. E., &Eddins, S. L. (2004).
Digital image processing using MATLAB. Pearson
Education India.
[9] Gonzales, R. C., & Woods, R. E. (2002). Digital image
processing.
[10] Pitas, I. (2000). Digital image processing algorithms and
applications. John Wiley & Sons.
[11] Huang, T., Yang, G. J. T. G. Y., & Tang, G. (1979). A
fast two-dimensional median filtering algorithm. IEEE
Transactions on Acoustics, Speech, and Signal
Processing, 27(1), 13-18.
[12] Buksh, R., Routh, S., Mitra, P., Banik, S., Mallik, A., &
Gupta, S. D. (2014). MATLAB based image editing and
color detection. International Journal of Scientific and
Research Publications, 4(1), 1-6.
[13] Kumar, T., &Verma, K. (2010). A Theory Based on
Conversion of RGB image to Gray image. International
Journal of Computer Applications, 7(2), 7-10.
[14] Chhaya, S. V., Khera, S., & Kumar, P. (2015). Basic
geometric shape and primary colour detection using
image processing on matlab. International Journal of
Research in Engineering and Technology, 4(5), 505-509.
_Published by: The Mattingley Publishing Co., Inc._ _23610_
섹션 본문
섹션 본문이 없습니다.
참고문헌
참고문헌 정보가 없습니다.