Você está na página 1de 6

Volume 2 No.

5, MAY 2011 ISSN 2079-8407


Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

Extraction of ROI in Geographical Map Image


1
Mehnaz Tabassum, 2Mohammad Shorif Uddin
1
Dept. of Computer Science & Engineering, Daffodil International University, Dhaka 1207, Bangladesh,
2
Dept. of Computer Science & Engineering, Jahangirnagar University, Savar, Dhaka 1342, Bangladesh,
1
tabassum@daffodilvarsity.edu.bd, 2shorifuddin@gmail.com

ABSTRACT
Extraction of Region of Interest (ROI) from geographical map image is an important task of document analysis and
recognition. The extracted segments are applied to different machine vision and embedded system. The task is very
complex because of having overlapping objects, intersected lines etc in map. Keeping this in mind, the present thesis paper
describes two methods that have been applied to extract efficient ROI for both road network and waterway from
geographical map; one is color based segmentation applying K-means clustering and other is template based matching
which overcome the previous limitations. Different from the existent methods, these proposed approaches are efficient
both in segmentation results and further reconstruction also. And our experimental results are close to human perceptions;
therefore our methods provide better and more robust performance than either of the individual methods. We hope these
methods will find diverse applications in ROI extraction from geographical map and also image analysis.

Keywords: k-means, image segmentation, ROI, map image processing, transportation network

1. INTRODUCTION in raw data and coding standards but they are not close to
human perceptions. Unlike the RGB and CMYK color
Images are considered as one of the most models, Lab color is designed to approximate human
important medium of conveying information. An image vision. It aspires to perceptual uniformity, and its L
can have thousand times better impression than hundreds component closely matches human perception of lightness
lines of document. Understanding images and extracting [15]. It can thus be used to make accurate color balance
the information from them such that the information can corrections by modifying output curves in the ‘a’ and ‘b’
be used for other tasks is an important aspect of Machine components, or to adjust the lightness contrast using the L
learning. An example of machine learning form image can component.
separate road network from image which helps the car to
choose optimum path from source to destination. Color 2. LITERATURE REVIEW
image segmentation [1], whose purpose is to decompose
an image into meaningful partitions, is widely applied in The separation of text from map was done by
multimedia analysis. researchers till date. Fletcher and Kasturi [3] developed an
A map is a visual representation of an area, a algorithm for text string separation from mixed
symbolic depiction highlighting relationships between text/graphics image. Taking account of curving labeled
elements of that space such as objects, regions, and road names in the map, Tan and Ng [4] developed a
themes. A city map will include not only the city's system using the pyramid to extract text strings. Both
transport network, but also other important information, methods, however, assume that the text does not touch or
such as city sights or public institutions [14]. The overlap with graphics. Touching lines with text is
extraction of Region of Interest (ROI) from overlapping important for engineer drawings [9-11], especially maps
objects of city map such as transportation network is a [12]. This problem is much more complex since there are
challenging problem in color image analysis. The problem more types of data, various types of lines, possible
is much complex in city map analysis is more complex curvature and even branching of the graphics. An
since there are more types of data, various types of lines, approach in [5] introduced an algorithm which permits to
possible curvature and even branching of extract text on binary images. Then regions may have
graphics[10][11][12]. characters is selected using the maximum connected
components. The characters are merged into words using
Clustering is a feature-space method of Color Hough Transform. But, it does not support the overlapping
image segmentation. This method classifies pixels to of text and graphics elements of images which is a
different groups in a predefined color space. K-Means common problem of topographic maps. In [11], authors
clustering is popular for its simplicity for implementation develop a model to extract black characters in city maps.
[16], and it is commonly applied for grouping pixels in They use street lines data to recover the characters
images. The choices of color space may have significant composing street names. Due to the possible overlapping
influences on the result of image segmentation. There are between street names and street lines describing the street,
many kinds of color space [19], including RGB, YCbCr, they develop a specific OCR algorithm to produce an
YUV, HSV, CIE L*a*b*, and CIE L*u*v*. Although efficient text file of street names.
RGB, YCbCr, and YUV color spaces are commonly used More recently, a text/graphic separation method
237
Volume 2 No.5, MAY 2011 ISSN 2079-8407
Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

applied to color thematic maps has been described in Bangladesh. The entire work is carried out using MatLab
[10],[9],[15]. The authors describe a segmentation R2010a, Adobe Photoshop 7.0 and MS-Office.
technique based on 24 images obtained by a combination
of color components (R,G, B, (R+B)/2, etc.). The resultant b. Image Acquisition
binary image constructed from the mix of theses 24
images is then used in an OCR-based recognition system The first stage of any vision system is the image
with neural networks. acquisition stage. Color images of scenes and objects can
be captured on photographic film by conventional
3. THE ROI EXTRACTION PROCESS cameras, on video tape by video cameras, and on magnetic
FROM MAP disk or solid-state memory card by digital cameras. Digital
color images can be digitized from film or paper by
Color map contains several overlapping objects scanners. After the image has been obtained, various
with different in color, shape and size. The ROI is focused methods of processing can be applied to the image to
to road-network and water-way. The process of extraction perform the many different vision tasks required today.
of transport network deals with maximum connected road The images used in this paper are acquired from google
and extraction of waterway. This separation process using map in RGB image format.
k-means clustering is depicted in figure 1 which is
explained in the following section. c. RGB to L*a*b* Conversion
As next step in the processing, measured RGB
values in the map image are converted to CIE L*a*b*.
Here L* describes lightness; its values can range between
0 (black) to 100 (white). The other two variables describe
the actual color, with a* representing green (negative
values) or red (positive) and b* representing blue
(negative) or yellow (positive values). The conversion of
RGB to the L*a*b* system is done via an intermediate
step, by translating RGB values into CIE XYZ values. The
standard conversion from RGB to XYZ values, which was
used shipboard, uses the following equation [17]:

 X   X R .CR   X G .CG   X B .CB   R


 Y    Y .C  YG .CG  YB .CB    G (1)
   R R
 Z   Z R .CR  ZG .CG  Z B .CB   B
Where X, Y, Z are the CIE tri-stimulus values of
a color. R, G, B are the red, green, and blue channels of a
color as measured in the image. XR, YR, ZR, and so on
are the chromacities of the RGB primaries of the camera;
and

tristimulu s value of unit amount of camera primary


C
chromacity of the primary
for R, G, and B.

However, for computational purposes, the terms (XR ·


CR), (YR · CR), (ZR · CR), and so on are taken together
as a single unknown constant each, giving

X  X R
'
X G' X B'   R 
Y    Y ' 
   R YG' YB'   G  (2)
Figure 1: Flowchart of ROI extraction from Map Image
 Z   Z R' Z '
G Z B'   B 
a. Data Resources and Software used
For this research purpose we used K-Means This standard conversion implies that the lines
Clustering Technique for color based Image segmentation. calculated for X, Y, and Z intersect the origin of the axes
The images are of parts of Dhaka city, the capital of i.e., that pure black has values equal to, or very close to
238
Volume 2 No.5, MAY 2011 ISSN 2079-8407
Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

(0,0,0) in both the XYZ and RGB vector space. with f(Y/Yn) = (Y/Yn)1/3 for Y/Yn > 0.008856
 X   a1   X
'
X '
X  R
' and f(Y/Yn) = 7.787(Y/Yn) + 16/116 for Y/Yn ≤ 0.008856;
R G B
 Y   a    Y '
Y ' '
Y   G  (3)
f(X/Xn) and f(Z/Zn) are defined similarly. Xn, Yn, and Zn
   2  R G B are the tristimulus values of a reference white. For this
 Z   a3   Z
'
R Z '
G Z   B 
'
B
study, the known XYZ values of the white color chip are
used as reference values.
In this case, information about four colors is
needed to solve the constants (i.e. the red, green, blue, and d. K-Means clustering in L*a*b Color
gray chips). Writing out the matrix multiplication and Space
rearranging the sets of linear equations yields the
following for the X-values of the four color chips used: Clustering is a way to separate groups of objects.
K-means clustering treats each object as having a location
 X r  l Rr Gr Br   a1  in space[16]. It finds partitions such that objects within
 X  l Rg Gg Bg   X R 
each cluster are as close to each other as possible, and as
 g   (4) far from objects in other clusters as possible.
 X b  l Rb Gb Bb   X G  The K-means algorithm [18] is an iterative
      technique that is used to partition an image into K clusters.
 X gr  l Rgr G gr Bgr   X B  The basic algorithm is:

Here, Rr, Gr, and Br, and Xr, Yr, and Zr are the 1) Pick K cluster centers, either randomly or based
measured channels and the known XYZ values on some heuristic
respectively for the red chip; subscripts g = green, b = 2) Assign each pixel in the image to the cluster that
blue, and gr = gray apply to the other three color chips minimizes the distance between the pixel and the
used. Typically, values for the constants a1, a2, and a3 are cluster center.
found to range between 1.5 and 4.5, demonstrating that an 3) Re-compute the cluster centers by averaging all
offset from the origin of the X, Y, and Z axes is indeed of the pixels in the cluster
present. 4) Repeat steps 2 and 3 until convergence is attained
(e.g. no pixels change clusters)

Figure 2:RGB Map Image Figure 3: L*a*b of the Map

The XYZ values estimated for the data in the line


scan are then further converted to CIE L*a*b* values
using the following equations[17]:

  Y  16  (5)
L  116  f    
  Yn  116 

  X   Y  (6)
a   500  f    f  
  Xn   Yn 

 Y   Z  (7)
b  200  f    f   Figure 4: K-Means Output
  Yn   Z n 
In this case, distance is the squared or absolute
difference between a pixel and a cluster center. The

239
Volume 2 No.5, MAY 2011 ISSN 2079-8407
Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

difference is typically based on pixel color, intensity,


texture, and location, or a weighted combination of these
factors [19]. Here the color information exists in the 'a*b*'
space. ROI objects are pixels with 'a*' and 'b*' values. The
process used K-means to cluster the objects into three
clusters and pixel values distance is measured [19] by the
Euclidean distance metric

e. Connected component labeling of


Image
Connected component labeling is used in
computer vision to detect connected regions in binary
digital images, although color images and data with
higher-dimensionality can also be processed.[20][21][3]
When integrated into an image recognition system or
human-computer interaction interface, connected
component labeling can operate on a variety of
information.[3][4] Blob extraction is generally performed Figure 5: Output of Road Network processing
on the resulting binary image from a thresholding step.
Blobs may be counted, filtered, and tracked. We have used g. Process of Waterway
this technique to filter pixel value based thresholding for
separate connected components from K-Means clustered The same process of road network is applied for
imaging output. 8-connected component algorithm is identifying waterway from the map. In map water portions
applied to label connected neighbor. are colored with blue color. Smaller sized water colored
for pond, small lake, ditch etc. are removed. Then labeling
f. Process of Road Network is applied to detect the boundary of waterway.

After getting the segmented image having road


network several de-noising and reconstruction techniques
[9] are applied. After processing, maximum connected
road network has been labeled.

De-Noising
For removal noise from the road network image,
we have applied color based thresholding [9]. Because, all
roads are yellow like colored and we remove light-yellow
colored region from the image. Then image is converted
into binary image. This binary image is then feed for Figure 6: Output of Waterway Processing
reconstruction the missing road portion.
ROI Extraction from Map using Template Based
Reconstruction of Road: Matching is depicted in Figure 7, which is explained
immediately after the Figure. A basic method of template
Because of removal of overlapping objects, text matching uses a convolution mask (template), tailored to a
and line segments, some portions of road network specific feature of the search image, which we want to
disappeared. We have applied structuring elements to detect. This technique can be easily performed on grey
reconstruct [13] the missing portion of the road. images or edge images. The convolution output will be
highest at places where the image structure matches the
Maximum connected Road Network mask structure, where large image values get multiplied
by large mask values.
Identification: This method is normally implemented by first
picking out a part of the search image to use as a template:
After removal of noise and reconstruction, we
We will call the search image S(x, y), where (x, y)
have applied bounded area labeling and identified the
represent the coordinates of each pixel in the search
largest connected road area from the image.
image. We will call the template T(x t, y t), where (xt, yt)
represent the coordinates of each pixel in the template. We
then simply move the center (or the origin) of the template
T(x t, y t) over each (x, y) point in the search image and

240
Volume 2 No.5, MAY 2011 ISSN 2079-8407
Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

calculate the sum of products between the coefficients in Using Water template we get:
S(x, y) and T(xt, yt) over the whole area spanned by the
template. As all possible positions of the template with
respect to the search image are considered, the position
with the highest score is the best position. This method is
sometimes referred to as 'Linear Spatial Filtering' and the +
template is called a filter mask.
=

Fig 9: Extraction of Waterway using template

After applying structuring elements and De-


noising finally we get the separated water way as follows:

Figure 10: Separated Waterway after de-noising

4. CONCLUSION
We know that, Extraction of Region of Interest
(ROI) from geographical map image is very complex
because of having overlapping objects, intersected lines
etc in map. Keeping that in mind, two methods that have
been applied to extract efficient ROI for both road
network and waterway from geographical map; one is
color based segmentation applying K-means clustering
and other is template based matching which overcome the
previous limitations. Different from the existent methods,
Figure 7: Flowchart of ROI extraction from Map Image these proposed approaches are efficient both in
using template segmentation results and further reconstruction also. By
Color based segmentation, we get satisfactory results for
Here we input the MapImage and pick templates both road and Waterway, then after applying structuring
for road way and water way; save Red Green and blue elements and removing noises we get our projected ROI.
pixel values into three matrix and compute mean values of But by using template matching, we did not get adequate
them. Then the template checks pixel to pixel of input output to our projected ROI for road network.
MapImage and find the matching portion as satisfactory
results found i.e. employ the traditional template matching 5. LIMITATIONS AND FUTURE WORKS
algorithm as stated earlier.
Using Road template we get: Performance of efficient ROI extraction depends
and varies for map to map. Color based K-means
+ clustering is not applicable when there are less color
variations. And template based matching is less suitable
for narrow pixel area. The map image we exercise here
give satisfactory results for waterway by both techniques
= but for road network due to thin pixel area template
matching technique is not be up to snuff.
For future developments, this output can be
converted into graphs which can be processed by
embedded system in to drive vehicle and vessel
automatically from source to destination and follow
Figure8: Extraction of Road network using template optimum path.
241
Volume 2 No.5, MAY 2011 ISSN 2079-8407
Journal of Emerging Trends in Computing and Information Sciences

©2010-11 CIS Journal. All rights reserved.

http://www.cisjournal.org

REFERENCES [11] D. Dori and Liu W., “Vector-based segmentation of


text connected to graphics in engineering drawings,
[1] L. Lucchese and S. Mitray, “Color image in Advances in Structural and Syntactical Pattern
segmentation: A state-of-the art survey,” in Recognition”, P. Perner, P. Wang, A. Rosenfeld
Proceedings of the Indian National Science (eds.), Springer, pp. 322 – 331, 1996
Academy,Mar. 2001, pp. 207–221, (Invited Paper)
[12] Z. Lu, “Detection of text regions from digital
[2] G. Nagy, “Twenty years of document image engineering drawings”, IEEE Transactions on
analysis in PAMI”, IEEE Transactions on Pattern Pattern Analysis and Machine Intelligence, Vol. 20,
Analysis and Machine Intelligence, Vol. 22, No. 1, No. 4, pp. 431 - 439, April 1998
pp. 38 - 62, January 2000
[13] Ruini Cao , Chew Lim Tan, “Text/Graphics
[3] D. S. Doermann, “An introduction to vectorization Separation in Maps”, Selected Papers from the
and segmentation, in Graphics Recognition: Fourth International Workshop on Graphics
Algorithms and Systems”, K. Tombre and A. K. Recognition Algorithms and Applications, p.167-
Chhabra (eds.), Lecture Notes in Computer Science 177, September 07-08, 2001
1389, Springer, pp. 1 – 8, 1998
[14] Amândio Cordeiro , Pedro Pina, “COLOUR MAP
[4] L. A. Fletcher and R. Kasturi, “A robust algorithm OBJECT SEPARATION”, Mid-Term Symposium
for text string separation from mixed text/graphics of the new ISPRS Technical Commission 7, on
images”, IEEE Transactions on Pattern Analysis “Thematic Processing, Modelling and Analysis of
and Machine Intelligence, Vol. 10, No. 6, pp. 910 - Remotely Sensed Data”
918, November 1988
[15] Samma, Ali Salem Bin; Salam, Rosalina Abdul,
[5] C. L. Tan and P. O. Ng, “Text extraction using “Adaptation of K-Means Algorithm for Image
pyramid, Pattern recognition”, Vol. 31, No. 1, pp. Segmentation”, International Journal of Signal
63 – 72, 1998 Processing, October 1, 2009

[6] D. Wang and S. N. Srihari, “Analysis of form [16] MacQueen, J. B. (1967). "Some Methods for
images, in Document Image Analysis”, H. Bunke, classification and Analysis of Multivariate
P. S. P. Wang, H. Baird (eds.), World Scientific, pp. Observations". 1. Proceedings of 5th Berkeley
1031 – 1051, 1994 Symposium on Mathematical Statistics and
Probability. University of California Press. pp. 281–
[7] S. Naoi, Y. Hotta, M. Yabuki, and A. Asakawa, 297. MR0214227. Zbl 0214.46201.
“Global interpolation in the segmentation of
handwritten characters overlapping a border”, [17] Vattani, A. (2009). "k-means requires exponentially
Proceeding of 1st IEEE International Conference on many iterations even in the plane". Proceedings of
Image Processing, pp. 149 – 153, 1994 the 25th Symposium on Computational Geometry
[8] J. Yoo, M. Kim, S. Y. Han, and Y. Kwon, “Line (SoCG).
removal and restoration of handwritten characters
on the form documents”, Proceeding of 4th [18] H. Samet and M. Tamminen (1988). "Efficient
International Conference on Document Analysis Component Labeling of Images of Arbitrary
and Recognition, pp. 128 - 131, 1997 Dimension Represented by Linear Bintrees". IEEE
Transactions on Pattern Analysis and Machine
[9] K. Lee, H. Byun, and Y. Lee, “Robust Intelligence (TIEEE Trans. Pattern Anal. Mach.
reconstruction of damaged character images on the Intell.) 10: 579.
form documents. In Graphics Recognition:
Algorithms and Systems”, K. Tombre and A. K.
Chhabra (eds.), Lecture Notes in Computer Science [19] Michael B. Dillencourt and Hannan Samet and
1389, Springer, pp. 149 – 162, 1998 Markku Tamminen (1992). "A general approach to
connected-component labeling for arbitrary image
[10] R. Kasturi, S. T. Bow, W. El-Masri, J. Shah, J. R. representations”
Gattiker, and U. B. Mokate, “A system for
interpretation of line drawings, IEEE Transactions
on Pattern Analysis and Machine Intelligence”,
Vol. 12, No. 10, pp. 978 - 992, October 1990

242

Você também pode gostar