Image Processing Reference
In-Depth Information
where each stud lies on exactly one l i . For example, in Fig. 8.4, the top left brick is
a2
×
4 brick, with two parallel rows of four equidistanced studs.
For the final step, the top surface of the brick must be found, in order to define
its geometric shape (that is, square, rectangle, or slice). First, the templates found
for each stud position is subtracted from the image. This leaves some noise, which
is removed with the denoising CA model that was used to do the baseboard elimi-
nation. This results in a set of edges delineating the outlines of the brick in a two-
dimensional image, but which semantically has a three-dimensional interpretation
(see Fig. 8.5(e)). However, the observation that standard LEGO bricks are three-
dimensional protrusions from the top surface (containing the studs) to the bottom
surface, means that only the two-dimensional top surface is necessary to identify
the shape.
In order to find the top surface of the LEGO brick, a CA model is used to floodfill
the top surface starting from the known positions of the studs. In this model, each
cell may assume four possible states: background , edge , top surface and not top
surface . All the pixels where there were studs, are identified as top surface, and any
cell that is not background, edge or top surface, is identified as not top surface .
A Moore neighbourhood with a specified distance ns is used. The update rule
considers each cell. If it is not a top surface cell, the cell changes into a top surface
cell if it is adjacent to any top surface cell in the neighbourhood, and it is neither
edge nor background. Moreover, the number of neighbours that are not edge or
background, are counted. If this number exceeds a given threshold, then the current
cell becomes part of the top surface. Formally, let th be the threshold and ns the
neighbourhood size. Let a top surface cell be represented by 0, edges by 1, and
background by 2. Then the update rule can be described as:
0
,
if
x i , j (
t
) =
0& x i , j (
t
) =
2&
( m , n x m , n =
0
) >
th
,
x i , j (
t
+
1
)=
ns
ns
ns
ns
where i
2 ,
j
2 <
m
,
n
<
i
+
2 ,
j
+
2 ,
,
1
otherwise.
At this stage, it is now possible to encode the feature vector of a given LEGO
brick, based on its number of studs, stud locations, form, and colour. The Hu-set
of invariant moments was used to encode the feature vector with the information
extracted from the image. Once the feature vector has been calculated for the search
image, that vector can be matched against all the pre-calculated feature vectors of
images in the database.
An example of the retrieval correctness of the LEGO CBIR system is illustrated
in Fig. 8.6. The bricks are shown in best match order (the lower the number, the
better the match). Note that an identical brick to the search image was the best
match, followed by two other curved bricks, while the rectangular bricks were the
worst matches. Experiments showed that the success rate of the system is in the
order of 80%.
 
Search WWH ::




Custom Search