Sunteți pe pagina 1din 5

Algorithm for Visualizing and Detecting Edges in RGB Colour Images

Using Logarithmic Ratio Approach


by Ali Almuntashri , Sos Agaian
The Department of Electrical and Computer Engineering
University of Texas at San Antonio
San Antonio, USA

Presented by
Afriyie, E. O.
Institute of Computer Science:Graduate Science
University of the Philippines
Los Ba
nos

oppongafriyie@gmail.com

Abstract
The Paper present an algorithm for visualizing edges in RGB coloured images as well as edge detection
using logarithmic ratio approach. It illustrate an algorithm for unveiling a more detailed unseen color edges
that the standard RGB-gray-scale traditional methods[1]. This enable help resolve a lot of real world machine
vision problems and numerous issues such as object detection difficult and may serve as a significant tool in
text recognition at uneven coloured light conditions.

INTRODUCTION

Edge detection is an important image processing tool


that is used as a fundamental pre-processing step in
many image processing applications. Edges map have
a significant role in application such as image categorization, image registration, feature extraction, and
pattern recognition.
ost of edge detection operators operate on greyscale
images since colour image components imposes some
sort of complexities in detecting edges [1] [6] . Nevertheless, colour images present no clear cut edges, even
though it also present more details and have potential
of unveiling extra details and accurate edges not shown
in greyscale images [3][2][1]. Novak and Shafer found
that 90 percent of edges are the same in both greyscale
and colour images, leaving 10 percent of edges to be
detected through the use of colour information [3][1].

2
2.1

BACKGROUND
Edge detection in colour images

Some of the common used image edge detection is the


fusion technique, which uses the traditional edge detectors. According to [? ] fusion techniques can be
grouped in to forms. The first fusion method finds the

gradient and edge map of each RGB level and fuses the
results into its edge map. The second fusion method, it
fuses the gradient of the RGB component into one element, and from the final fused gradient the edge map
is formed. Below are summary of the two methods in
a diagram form.

Figure 1: Block diagram of fused-edges method (top) and


fused- gradients method (bottom)

2.2

Colour Space

The common colour space widely used is the RGB


colour model. RGB colour model is based on three
chromatics of the red, green, and blue additive primaries, and can produce any chromatic that is the tri-

angle defined by those primary colors. To use RGB,


Integrating these expressions with the logarithmic
each pixel component is assigned specific independent gradients of gray tone functions introduced originally
value ranging from 0 to 225.
in [? ],[? ] yields the gradient in both directions as
follows:
There are several ways of converting RGB color to
!
greyscale, [2][4] uses the concept of assigning weights
int(f 3)int(f 62 )int(f 9)
int(f 1)int(f 42 )int(f 7)
for each colour components based on HVS and is per- Rx(i, j) = max log int(f 1)int(f 42 )int(f 7) log int(f 3)int(f 62 )int(f 9)
(4)
ception of colors. there are other conversion methods
!
which include the Principal component analysis which
int(f 7)int(f 82 )int(f 9)
int(f 1)int(f 22 )int(f 3)
log
Rx(i, j) = max log
int(f 7)int(f 82 )int(f 9)
int(f 1)int(f 22 )int(f 3)
used statistical information and have its usefulness re(5)
lated to pattern recognition[5].
where f represents pixels in gray tone at the below
3x3 window locations

2.3

Logarithm Image Processing

The introduction of non-linear methods was to help


deal with linear image processing issues such as (1)
the loss or distortion of information after transformation and (2) the inability of linear process to produce
consistent result with the real situation[7] One of the
non-linear approaches which provided a broad framework of in-depth study for several cases is the multiplicative homomorphic image processing. This method
employs the use of logarithm such as the log-ratio processing model, which finds its bases in logarithmic laws
and the human visual system process light algorithm.
The introduction of Logarithm image processing (LIP)
model was to address the loss of information and the
need for a more meaningful image fusion. It is designed
as a framework for representing and processing nonlinear images within a considerable range, and in based
on Webers visual laws. LIP makes use [7]

2.4

f1
f4
f7
Finally, the logarithmic
by:

f2 f3
f5 f6
f8 f9
gradient magnitude is found



n gx gy o
M agnitude = M 1 exp max
M M

(6)

where gx,gy denote isomorphic transformation.


This expression replaces the Cannys gradient magnitude calculation. A comparison of canny and the new
algorithm is represented below :

Previous work on LIP edge detection

In previous work of [? ] the developed a log-ratio edge


detection, which investigate relational relationship between adjacent pixels in a given neighbouring instead
of the investigating the difference between them. This
approach worked well for greyscale images where gradients changes in grey levels was hard to detect.
First we consider the rational morphological filters
as a ratio of two different morphological filters as follows:


MF1
R=
(1)
MF2
where MF1 and MF2 representing two different
classes of filters. the ratio is applued to determine the
maximum logarithmic variation in local windows by
considering the magnitude of horizontal and vertical
pixel as follow :
Rx(i, j) = max

log

Ry(i, j) = max

log

(I(i, j))
(I(i, j 1))

(I(i, j))
(I(i 1, j))

log

log

(I(i, j))

(I(i + 1, j))

ALGORITHM

The algorithm developed by [1] focus on extracting


edge details that cannot be highlighted for detection
using the standard assigned HVS vector weight for
RGB colors. Let Fn and Fm denote two different filters
as follows:
F n : (0.2989R, 0.5870G, 0.1140B);
F m : (R log

(0.2989R), Glog

(0.5870G), B log

(7)
B

(0.1140B));

(w 1R w 2G), Rlog

(w 1R w 3B));

(G log

(w 2G w 1R), Glog

(w 2G w 3B));

(B log

(w 2B w 1R), Blog

(w 2B w 3G));

(R log

!
(2)

(I(i, j + 1))

(I(i, j))

Figure 2: Original image (left), Cannys edge detection


(middle), log-ratio edge detection output (right)

!
(3)

(8)

where and are constants assigned to each


color component, w1, w2, w3 represent different assigned weight for R,G,B color components respectively.

The ratio of different morphological operations may


take any of the following forms:


1

max(F n)
max(F m)


; 2

max(F n)
max(F m)


; 3


max(F n)
max(F m)
(10)

(10)
Figure 4: a) Original image ; b) Cannys operator on the
standard greylevel mage; c) and d) Cannys operator on the corresponding greylevel images obwhere n =constant used for greyscale nationalizatained in the figure (3).

tion The above expression taken in to consideration the


RGB component with respect to the HVS perception
show successful outcome. The following figure highlights different greylevel details obtained using two difImages (c)and (d) as compared to (b) in the result
ferent operations in (9) and compares them to the stan- of edge detection, they yield more and different details.
dard greyscale image.
The next step is to apply our developed edge detection
algorithm highlighted in the previous work section on
each greyscale image in order to come up with precise
edge details boundaries. Then, results can be linearly
fused to generate one edge map. The following diagram presents an integrated picture of the developed
RGB color algorithm with our previous work.

Figure 3: a) Original image (HubbleSite.org);b) standard


greylevel mage; c) and d) represent two different
greylevel morphological-ratio operations

Figure 5: Algorithm block diagram

In order to visualize different edge details at each


grey level representation, Canny edge detection operator is applied on each image and the results are shown
in below

SIMULATION RESULTS AND


DISCUSSION

In this part different test images were tested using the


developed algorithm. The class of images is chosen
in away such that the images have gradient variations Figure 6: a) original image; b) standard graylevel; c)and
d) two algorithm-generated grayscale images; e)
in each RGB component where color boundaries are
and t) Cannys edge detection; g)and h) edge devery hard to distinguish.Each image goes under a mortection using log-ratio algorithm
phological ratio operation to develop a greyscale image
having more edge features. Then, the log-ratio edge detection approach is utilized to find the final edge map.

In figure (6) and (7), an original image having RGB


colors mixed in a gradient manner and coloured cube
image is chosen respectively. The objective is to extract all other edges where there is a slight transition
between one color component to another. Two different morphological ratio operations of ROB components
are carried out generating the two greyscale in both images in (c) and (d). When comparing these images to
the original gray level image in b), it can be noted that
the developed morphological ratio operations succeed
in highlighting different color transitions at the background. In figures (e) and (t) of both images, Canny
edge detection algorithm is used to detect the edges
of the new greyscale images. In both images (g) and
(h) represent edge maps using our log-ratio approach. Figure 7: a) original image; b) standard graylevel; c) and
d) two algorithm-generated grayscale images; e)
Clearly, the developed approach outperforms Cannys
and t) Cannys edge detection; g) and h) edge
algorithm in detecting unforeseen and continues edge
detection using log-ratio algorithm
transitions.

CONCLUSION AND APPLICATION

edge detection. In Image Processing, 2007. ICIP 2007.


IEEE International Conference on, volume 2, pages II
261. IEEE, 2007.

The introduced algorithm can be utilized at different appli- [3] Andreas Koschan. A comparative study on color edge
cations such as boundary detection, colour segmentation
detection. In Proceedings of the 2nd Asian Conference
objects classification. Different regions of interest can be
on Computer Vision, volume 3, pages 574578. Citeseer,
extracted from other background colours and analysed in1995.
dependently. Also, the ability to distinguish the edges of
different color layers based on RGB intensity values of in- [4] Karen Panetta, Sadaf Qazi, and Sos Agaian. Techterest may serve as a significant tool in text recognition at
niques for detection and classification of edges in color
uneven coloured light conditions.
images. In SPIE Defense and Security Symposium, pages
69820W69820W. International Society for Optics and
Photonics, 2008.

References

[5] Lindsay I Smith. A tutorial on principal components


[1] Ali Almuntashri and Sos Agaian. An algorithm for vianalysis. Cornell University, USA, 51:52, 2002.
sualizing and detecting edges in rgb color images using
logarithmic ratio approach. In Systems Man and Cyber- [6] Slawo Wesolkowski and Ed Jernigan. Color edge detecnetics (SMC), 2010 IEEE International Conference on,
tion in rgb using jointly euclidean distance and vector
pages 39423947. IEEE, 2010.
angle. In Proc. of the IAPR Vision Interface Conference, pages 916, 1999.
[2] Salih Dikbas, Tarik Arici, and Yucel Altunbasak.
Chrominance edge preserving grayscale transformation [7] Eric Wharton. Parameterized Logarithmic Image Prowith approximate first principal component for color
cessing for Practical Applications. ProQuest, 2008.

S-ar putea să vă placă și