0% found this document useful (0 votes)
10 views

Parallel Scanning

Image scanning for lines

Uploaded by

piyush
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Parallel Scanning

Image scanning for lines

Uploaded by

piyush
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ISSN:2249-5789

Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

Parallel Scanning Based Speed-up Method for Detection of Elliptical Obstacles


in High-resolution Images

H. Waruna H. Premachandra*, Chinthaka Premachandra**, Dinesh Chandana Parape***


* Wayamba University of Sri Lanka, Makandura (NWP), Sri Lanka
E-mail: [email protected]
** Graduate school of Engineering,Tokyo University of Science
6-3-1 Niijuku, Katsushika-ku, Tokyo, 125-8585, Japan
Email: [email protected]
***Graduate school of Engineering, Kyoto University
Kyoto, Japan

Abstract
Objects in the binary images are generally detected consuming. In this paper, we propose a new less time
considering their geometrical information with the raster consuming ellipse detection approach without depending on
scanning. In the raster scanning, image is scanned starting Hough Transform. The new ellipse detection algorithm is
from left top point and ending with right down point. developed with the above mentioned parallel pixel scanning
However, in the case of high-resolution images, considerable method. According to experiments using appropriate high
processing time is needed for detecting objects by scanning resolution binary images, the new proposal showed high
all the pixels. In this paper, an object detection approach for elliptical object detection rate, and it could reduce the
high-resolution binary images is proposed without scanning processing time compared with the raster scanning. We
all the pixels in the images. Here, elliptical object detection applied proposed method to detect and delete ellipse
is considered, pixels on horizontal and vertical parallel lines enclosing characters in the high-resolution binary images. To
are scanned keeping a constant gap between each two lines. conduct this application a simple technique is added to
With this approach, processing time could be reduced since proposed ellipse detection to distinguish the ellipse enclosing
some of undesired objects could easily be dropped out in the characters from the characters those have elliptical shape
scanning stage. such as ‘O’ in the alphabet and zero in digits.
This paper is consisted with five main sections to
describe the entire project work. Section 2 introduces the
1. Introduction conventional ellipse detection approaches in the literature
and Section 3 details the new ellipse detection approach
In the digital image processing, raster scanning is combining with the parallel pixel scanning. Section 4 details
conducted while image is being processed. In the raster experimental results of the new proposal using the high
scanning, image is scanned starting from left top point and resolution images. Finally, Section 5 concludes the paper
ending with right down point. However, in the case of introducing some remaining work.
high-resolution images, considerable processing time is
needed to conduct desired object detection in the case of that
all pixels are scanned. In this paper, less time consuming
2. Related Works on Ellipse Detection
object detection approach for high-resolution binary images
Some ellipse detection methods are related to Hough
is proposed without scanning all the pixels in the images.
Transform(HT)[1~5]. The classical HT is very time
In this paper, objects detection problem in the binary
consuming and requires precise data for accuracy. However,
images are considered, objects are appeared with black pixels
a generalized HT and its applications to machine vision
and background is appeared with white pixels. Here,
problems, including the detection of circles, ellipses and
elliptical object detection is considered, pixels on horizontal
free-formed shapes are discussed by Davis et al. [2]. This
and vertical parallel lines are scanned keeping a constant gap
generalized HT needs a model description to search for and
between each two lines. If a black pixel is found while
an extension for rotation and scale invariance comes with
scanning, object detection is conducted re-scanning the
higher computational time. Ho and Chen [6] constituted two
surrounding area of that pixel. We propose an elliptical object
midpoint arrays by considering pairs of edge points in the
detection method following this parallel scanning.
same horizontal and vertical positions. From these two arrays
There are a lot of approaches for ellipse detection in the
the straight lines are detected separately by the HT and their
literature. Most of them are based on the Hough Transform as
intersections provide possible centers for ellipse. Then three
detailed in the next section, and they are too much time
other parameters of the angle and their major and minor axes
remain to be estimated. The method introduced by Xie et al.

265
ISSN:2249-5789
Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

[5] takes the advantages of the major axis of an ellipse to find Labeling starting points
ellipse parameters fast and efficiently. It only needs an
one-dimensional accumulator array to accumulate the length
information for minor axis of the ellipse. A.S. Aguado et al.
[7] use the parameteric polar representation to extend the
application of edge directional information from circle to
ellipse extraction. As a result they obtain a mapping which
decomposes the parameter space required for ellipse
extraction into two independent sub-spaces and one final
histogram accumulator. The mapping includes the tangent of
the angle of the first and second directional derivatives.
These tangents are computed by considering edge direction at
two border points. Qiang Ji et al. [8] introduce a statistically
efficient method for detecting ellipse in an image. Given a set
of digital arc segments, they introduce a geometric criteria to
select possible pairs of arc segments belonging to the same
ellipse. One main objective of our work is to detect and
delete the ellipse enclosing character without affecting Fig. 2 Vertical parallel scanning
characters. Above conventional methods are still very time
consuming. In this paper, we propose a new fast ellipse
detection method without depending on the voting
{( x − x0 ) cos θ + ( y − y 0 ) sin θ }2
approaches as mentioned above. In the new method, ellipse +
detection is conducted combining with parallel scanning. a2 ……….(1)
Therefore it is able to further reduce the processing time. {( x − x0 ) Sinθ − ( y − y 0 )Cosθ }2
=1
b2
3. Ellipse Detection
This section describes the pre-processing and mechanism
to detect the ellipses. Algorithm for ellipse Detection

3.1 Pre-processing Step 1: The image is binarized using Discriminant Analysis


and tilt correction is conducted using LPP method.
In this study, binarization and tilt correction processes are
Step 2: The image is scanned on vertical parallel lines
applied to the input image as the pre-processing. In the
keeping the distance between two consecutive lines as d
binarization process, Ohtsu’s method using discriminant
pixels (Fig. 2). Here, d is experimentally decided.
analysis is applied [9][10]. In this method threshold for
binarization is determined automatically. The LPP(Local
Step 3: If the scanned pixel( i , j ) is black, conduct labeling
Projection Profile) method is used for tilt correction [11].
process starting from it, setting the same label for all
connected black pixels.
3.2 Proposed Ellipse Detection Algorithm
Step 4: Determine the circumscribing rectangle of labeled
In this section, we introduce a new mechanism to detect area in Step 3.
ellipses in the images. In this method, image is scanned on
vertical parallel lines for detecting the ellipses as shown in Step 5: The following processing is conducted according to
Fig. 2. Here, the general equation for ellipse having a the size of the circumscribing rectangle determined in Step 4
different orientation is applied for detection. This general
equation is shown in following Equation (1). The algorithm (ⅰ) If the size of the circumscribing rectangle (width
for this proposal can be described as below. ⅹheight) is less than wⅹh pixels go to Step 11.

The farthest point (bx,by) The line


(ⅱ) If the size of the circumscribing rectangle
from the center perpendicular
on the line (widthⅹheight) is greater than wⅹh pixels, assume


to major axis (ax,ay)
b a that an ellipse exists belonging to the middle point of


θ circumscribing rectangle as the center point and
(x0,y0) The farthest
labeled point
calculate the middle point (x0 , y0) as Fig. 1. The center
from the center
point of the circumscribing rectangle coincides with
the center point of the ellipse. In Fig 1, green indicates
the labeled area and purple indicates the
circumscribing rectangle. Go to Step 6.
Fig. 1 Determination of ellipse parameters

266
ISSN:2249-5789
Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

Step 6: The major axis direction of the assumed ellipse in Step 10: Count the black pixel rate on the created ellipse
Step 5(ⅱ) is decided depending on the width and height of model in Step 9 following Equation (4) and conduct the
the circumscribing rectangle, and the half length of the major following processes.
axis is determined as below.
(ⅰ)If the black pixel rate on this model is less than 0.7, go
(ⅰ)If the width is greater than the height the assumed to Step 11.
ellipse has a nearly horizontal major axis. Find the
farthest point from center point (x0 , y0) in the right side (ⅱ)If the black pixel rate on this model is greater than 0.7,
of the labeled area. The distance between the center detect the black pixels on the model as an ellipse. Delete
point and farthest point (ax , ay)becomes half length of these detected black pixels setting them to white pixels.
the major axis(a) as shown in Fig. 1. Go to Step 7.
Step 11: Move to next pixel (i , j) in raster scanning and
(ⅱ) If the width is less than or equal to the height, the return to Step 3.
assumed ellipse has a nearly vertical major axis. Find
the farthest point from center point (x0 , y0) in the upper
side of the labeled area. The distance between the center The number of black pixels on ellipse model
black pixel rate =
The number of black and white pixels on ellipse model
point and farthest point becomes half length of the
major axis (b). Go to Step 7. (4)

In the above algorithm, the size of the rectangle (wⅹh


pixels) which circumscribes the connected component was
( a y − y0 ) determined by a preliminary experiment. In this experiment,
tan θ = first the widths and heights of twenty ellipses were measured.
( a x − x0 ) …………………..(2)
The minimum height and width of those twenty ellipses were
38 pixels and 39 pixels respectively. Tentatively we decided
to use wⅹh as 35ⅹ35 pixels.
( a y − y0 )
θ = arctan
(a x − x0 ) …………………...(3)
3.3 Distinguishing Ellipse Enclosing
Characters from Characters Having an
Ellipse Shape
Step 7: Calculate the inclination of the line connecting the
center point (x0 , y0) and found farthest point (ax , ay) in The new algorithm was tested suing the high resolution
Step 6 as Equation (2). Obtain the ellipse orientation(θ) using documentary images. Here, we use new algorithm to detect
calculated inclination following Equation (3). Determine the and delete the ellipse enclosing characters in the
equation for the line which crossing the center point (x0 , documentary images. Above proposed algorithm can
y0) and perpendicular to the major axis obtained in Step 6. In distinguish ellipses enclosing characters from the elliptical
Fig. 1, this line is indicated by a dash line. characters automatically, when characters are smaller than a
certain size, because, it can detect ellipses having a
Step 8: The following processing is conducted according to circumscribing rectangle (width ⅹheight) greater than wⅹh
the direction of the determined line in Step 7. pixels. However, the larger size characters (greater than wⅹh
pixels) have same shape as ellipse can also be deleted as an
(ⅰ) If the determined line is nearly vertical, find the ellipse enclosing characters.
farthest point on it from the center point (x0 , y0) in the A simple method is introduced to solve this. The ellipse
upper side of the labeled area, and calculate the distance enclosing characters includes black pixels inside the ellipse,
between this farthest point (bx , by) and center point (x0 , but elliptical characters such as the ‘O’ in the English
y0). This distance becomes half length of minor axis(b) alphabet and the zero(0) digit do not. In this method, if the
as shown in Fig. 1. ellipse is detected, decide whether it is the ellipse enclosing
the character or a character has same shape as ellipse, by
(ⅱ) If the determined line is nearly horizontal, find the counting the number of black pixels inside.
farthest point on it from the center point (x0 , y0) in the
right side of the labeled area, and calculate the distance 4. Experimental Results
between this farthest point and center point (x0 , y0).
This distance becomes half length of minor axis(a). In this paper, all the experiments were conducted using a
Core i3 3.4GHz PC. The appropriate images of documents
Step 9: Form an ellipse model using the center point (x0 , for experiments were created by a digital image scanner with
y0), half length of the major axis, orientation, and half length a resolution of 300 dpi. The size of created images is
of the minor axis obtained in the above steps. 2480ⅹ3508 pixels.

267
ISSN:2249-5789
Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

Fig. 3(a) Extracted image from Fig. 3(b) The result after ellipse detection and
a documentary image deletion for Fig. 3(a)

Fig. 4(a) Extracted image from Fig. 4(b) The result after ellipse detection and
a documentary image deletion for Fig. 4(a)

Fig. 5(a) Extracted image from a documentary image

Fig. 5(b) The result after ellipse detection and deletion for Fig. 5(a)

268
ISSN:2249-5789
Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

Fig. 6(a) Extracted image from Fig. 6(b) The result after ellipse detection and
a documentary image deletion for Fig. 6(a)

Fig. 7(a) Extracted image from Fig. 7(b) The result after ellipse detection and
a documentary image deletion for Fig. 7(a)

Fig. 8(a) Extracted image from Fig. 8(b) The result after ellipse detection and
a documentary image deletion for Fig. 8(a)

269
ISSN:2249-5789
Chinthaka Premachandra et al , International Journal of Computer Science & Communication Networks,Vol 3(4),265-270

Twelve documentary images including 56 ellipses intelligence 13(2), 1981, pp.111-122.


enclosing characters were used for the experiments. They
were processed for binarization, tilt correction, and ellipse [5] Y. Xie and Q.Ji, A new Efficient Ellipse Detection Method, Proc.
deletion in order. of International conference on Pattern Recognition2002, 2002, pp.
Ⅱ:957-960.
[6] C. Ho and L. Chen, A fast ellipse/circle detector using geometry,
4.1 Results Pattern Recognition, 1995, pp. 117-124.

Figure 3(a), 4(a), 5(a), 6(a), and 7(a) show the extracted
images from different documentary images including ellipses [7] A.S. Aguado, M.E. Montiel, and M.S. Nixon, On using
enclosing characters. Their ellipse deletion results are shown directional information for parameter space decomposition in ellipse
in Fig. 3(b), 4(b), 5(b), 6(b), and 7(b) respectively. Figure detection, Pattern Recognition, 1996, Volume29 pp. 369-381.
8(a) also an extracted image from a documentary image and
[8] Q. Ji and R.M.Haralick, A Statistically Efficient Method for
its ellipse deletion result is shown in Fig. 8(b). This includes
ellipse Detection, Proc. of International Conference on Image
two accurate deletions and two false deletions. Here, ellipse Processing, 1999, pp.730-734.
deletion is conducted after detecting them. This proposal
could delete ellipse enclosing characters with a success rate
of 91%(51/56). [9] N. Otsu: Discriminant and Latest Squares Threshold
Selecton ,Proc of 4IJPCPR 1978, pp 592-596.
Table 1 Processing time comparison
Average Processing time [10] N. Otsu, Threshold Detection Method from Grey-Level
Histograms, IEEE Trans. Systems, Man, and Cybernities, 1979,
Raster scanning 5.5 sec
SMC-9(No.1), pp.62-66.
Parallel scanning 1.9 sec
[11] H. Kawanaka, T. Sumida, K. Yamamoto, T. Shinogi, and S.
As mentioned above, new ellipse detection algorithm was Tsuruoka, Document Recognition and XML Generation of Tabular
developed combining a parallel scanning. We conduct Form Discharge Summaries for Analogous Case Search System,
experiments for the proposed algorithm with raster scanning Method Inf Med, 2007, 46:pp.700-708.
and parallel scanning concept. According to parallel scanning,
concept, 65% of processing time could be reduced as shown
the table 1.

5. Conclusions
In this paper, we introduce a new simple ellipse detection
approach. In this algorithm, ellipses were detected regardless
of the ellipse orientation and the entire image was not
scanned for ellipses detection. This algorithm finds the
ellipses determining its circumscribing rectangle. The new
algorithm showed good performance regarding the detection
rate and processing time.
In the case when the ellipse is connected to other objects
outside, it is not be able to find the real circumscribing
rectangle for the desired ellipse. As a result of this, some
ellipses were not detected effectively in the experiments. As a
future work, we plan to improve this algorithm to solve this
problem.

References
[1] S. Tsuji and F. Matsumoto, Detection of ellipses by a modified
Hough transform, IEEE transactions on computers 27(8),
pp.777-781, 1978.

[2] E.R Davies, Finding ellipses using generalized Hough transform,


Pattern Recognition Letterst.9, 1989, pp.87-96.

[3] R.K.K. Yip, P.K.S. Tam, D.N.K. Leung, Modification of Hough


transform for circles and ellipses detection using a 2-dimensional
array, Pattern Recognition 25(9), pp.1007-1022, 1992.

[4] D.H.Ballard, Generalized Hough Transform to detect Arbitrary


Patterns, IEEE transactions on Pattern Analysis and Machine

270

You might also like