Using Mean Shift Algorithm in the Recognition of Industrial Data Matrix Codes

Similar documents
A Scanning Method for Industrial Data Matrix Codes marked on Spherical Surfaces

Image Segmentation. Shengnan Wang

Dr. Ulas Bagci

Measurements using three-dimensional product imaging

Outline 7/2/201011/6/

Mean Shift Tracking. CS4243 Computer Vision and Pattern Recognition. Leow Wee Kheng

Robust PDF Table Locator

Unsupervised learning on Color Images

Chapter 3 Image Registration. Chapter 3 Image Registration

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Accelerating Mean Shift Segmentation Algorithm on Hybrid CPU/GPU Platforms

Local features: detection and description. Local invariant features

Nonparametric Clustering of High Dimensional Data

Lecture 8: Fitting. Tuesday, Sept 25

Mean shift based object tracking with accurate centroid estimation and adaptive Kernel bandwidth

Lecture 9: Hough Transform and Thresholding base Segmentation

[10] Industrial DataMatrix barcodes recognition with a random tilt and rotating the camera

Issues with Curve Detection Grouping (e.g., the Canny hysteresis thresholding procedure) Model tting They can be performed sequentially or simultaneou

Tracking system. Danica Kragic. Object Recognition & Model Based Tracking

Recognition of a Predefined Landmark Using Optical Flow Sensor/Camera

Multi-View 3D Reconstruction of Highly-Specular Objects

Efficient SLAM Scheme Based ICP Matching Algorithm Using Image and Laser Scan Information

Using the Kolmogorov-Smirnov Test for Image Segmentation

Problem definition Image acquisition Image segmentation Connected component analysis. Machine vision systems - 1

The Approach of Mean Shift based Cosine Dissimilarity for Multi-Recording Speaker Clustering

A Visualization Tool to Improve the Performance of a Classifier Based on Hidden Markov Models

Implementing the Scale Invariant Feature Transform(SIFT) Method

A DATA DRIVEN METHOD FOR FLAT ROOF BUILDING RECONSTRUCTION FROM LiDAR POINT CLOUDS

HOUGH TRANSFORM CS 6350 C V

Cover Page. Abstract ID Paper Title. Automated extraction of linear features from vehicle-borne laser data

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Local features: detection and description May 12 th, 2015

Absolute Scale Structure from Motion Using a Refractive Plate

Other Linear Filters CS 211A

(Refer Slide Time: 00:02:00)

Clustering. Discover groups such that samples within a group are more similar to each other than samples across groups.

Biomedical Image Analysis. Point, Edge and Line Detection

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

University of Cambridge Engineering Part IIB Module 4F12 - Computer Vision and Robotics Mobile Computer Vision

An Introduction to PDF Estimation and Clustering

3D Environment Reconstruction

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

HOUGH TRANSFORM FOR INTERIOR ORIENTATION IN DIGITAL PHOTOGRAMMETRY

Subpixel Corner Detection for Tracking Applications using CMOS Camera Technology

Case-Based Reasoning. CS 188: Artificial Intelligence Fall Nearest-Neighbor Classification. Parametric / Non-parametric.

CS 188: Artificial Intelligence Fall 2008

CSSE463: Image Recognition Day 21

OCR For Handwritten Marathi Script

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Chapter 18. Geometric Operations

Clustering. So far in the course. Clustering. Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. dist(x, y) = x y 2 2

Lecture 28 Intro to Tracking

IMAGE SEGMENTATION. Václav Hlaváč

Recall: Blob Merge/Split Lecture 28

Semantic Object Recognition in Digital Images

Structure from Motion

Tracking Computer Vision Spring 2018, Lecture 24

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Flooded Areas Detection Based on LBP from UAV Images

Chapter 11 Arc Extraction and Segmentation

Local Feature Detectors

CS664 Lecture #21: SIFT, object recognition, dynamic programming

Real-Time Human Detection using Relational Depth Similarity Features

Filtering Images. Contents

Figure (5) Kohonen Self-Organized Map

MULTI ORIENTATION PERFORMANCE OF FEATURE EXTRACTION FOR HUMAN HEAD RECOGNITION

Adaptive Feature Extraction with Haar-like Features for Visual Tracking

SIFT: Scale Invariant Feature Transform

CAP 5415 Computer Vision Fall 2012

School of Computing University of Utah

SIFT - scale-invariant feature transform Konrad Schindler

A NEW FEATURE BASED IMAGE REGISTRATION ALGORITHM INTRODUCTION

Image Acquisition + Histograms

Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. 2 April April 2015

Edge and local feature detection - 2. Importance of edge detection in computer vision

Types of Edges. Why Edge Detection? Types of Edges. Edge Detection. Gradient. Edge Detection

arxiv: v1 [cs.cv] 17 Feb 2016

2D Object Definition (1/3)

VOLUMETRIC MODEL REFINEMENT BY SHELL CARVING

Extracting Layers and Recognizing Features for Automatic Map Understanding. Yao-Yi Chiang

Footprint Recognition using Modified Sequential Haar Energy Transform (MSHET)

Image and Video Segmentation by Anisotropic Kernel Mean Shift

Local features and image matching. Prof. Xin Yang HUST

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Data Mining Chapter 9: Descriptive Modeling Fall 2011 Ming Li Department of Computer Science and Technology Nanjing University

Translations. Geometric Image Transformations. Two-Dimensional Geometric Transforms. Groups and Composition

Visual Tracking. Image Processing Laboratory Dipartimento di Matematica e Informatica Università degli studi di Catania.

WATERMARKING FOR LIGHT FIELD RENDERING 1

Analysis of Planar Anisotropy of Fibre Systems by Using 2D Fourier Transform

Image Segmentation. Selim Aksoy. Bilkent University

Note Set 4: Finite Mixture Models and the EM Algorithm

The goals of segmentation

3D from Photographs: Automatic Matching of Images. Dr Francesco Banterle

OBJECT detection in general has many applications

Image Segmentation. Selim Aksoy. Bilkent University

Operators-Based on Second Derivative double derivative Laplacian operator Laplacian Operator Laplacian Of Gaussian (LOG) Operator LOG

Local Features Tutorial: Nov. 8, 04

A COMPETITION BASED ROOF DETECTION ALGORITHM FROM AIRBORNE LIDAR DATA

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Transcription:

Using Mean Shift Algorithm in the Recognition of Industrial Data Matrix Codes ION-COSMIN DITA, VASILE GUI, MARIUS OTESTEANU Politehnica University of Timisoara Faculty of Electronics and Telecommunications Bd. Vasile Parvan 2, 3223 - Timisoara ROMANIA cosmin.dita@etc.upt.ro, vasile.gui@etc.upt.ro marius.otesteanu@etc.upt.ro FRANZ QUINT University of Applied Sciences, Karlsruhe Faculty of Electrical Engineering and Information Technology Moltkestrasse 3, 7633 - Karlsruhe GERMANY franz.quint@hs-karlsruhe.de Abstract: Data Matrix Codes (DMC) are established by these days in many areas of industrial manufacturing thanks to their concentration of information on small spaces. In today s usually order-related industry, where increased tracing requirements prevail, they offer further advantages over other identification systems. This underlines in an impressive way the necessity of a robust code reading system for detecting DMC on the components in factories. This paper provides a solution for the Data Matrix Codes recognition. Using the Mean Shift Algorithm, the main information of the DMC pattern are computed and based on these, a virtual identification pattern is constructed. Seeking and matching over the image, the Data Matrix Code is located. We concentrate on Data Matrix Codes in industrial environment, punched, milled, lasered or etched on different materials in arbitrary orientation. Key Words: DMC Scanning Method, Industrial Data Matrix Codes, Data Matrix Code Recognition, Mean Shift Introduction The industrial Data Matrix Code (DMC) is a twodimensional matrix bar-code consisting of dots (modules) arranged in a square. The information to be encoded can be text or raw data [4]. Error correction codes are added to increase the robustness of the code: even if they are partially damaged, they can still be read. As more data is encoded in the symbol, the number of modules (rows and columns) increases from 8 8 to 44 44. For industrial purposes, Data Matrix Codes are directly marked on the parts by different techniques like milling, punching ore lasering. In Fig., it is presented the diagram of the DMC system recognition. The image captured by the video camera is thresholded and labeled. Applying the Mean Shift algorithm to the labeled objects from the image, one estimates the distance between the modules, the Data Matrix pattern s orientation and the nominal area of the modules. Having this information, one can create a virtual identification pattern and a virtual timing pattern. Based on these patterns, one looks into the labeled objects structure and are held only the objects (called modules), which fall within the respective patterns. Using the virtual identification and timing pattern, a matching process will preserve only those modules, which are consistent with the two patterns. Knowing the position of the pattern, the Data Matrix Code can be scanned. 2 DMC acquisition and labeling After the gray image is thresholded, in the obtained image there are a set of objects. An object is a group of pixels that are connected to each other. In Fig.2, the first image indicates the connectivity using N 4 (p) and the second image indicates N 8 (p) respectively. Each object is labeled with a different value, from to the number of objects. Modules dist. computation Finder pattern recognition DMC Acquisition Thresholding & Labeling Pattern orientation DMC pattern construction Timing pattern recognition Modules surf. computation Figure : DMC recognition procces ISBN: 978--684-8-7 74

V (x,y-) V (x-,y) P (x,y) V (x,y) V D(x-,y-) V (x,y-) V D(x,y-) V (x-,y) P (x,y) V (x,y) iteration, one can consider that the window shifts to a more denser region of the data-set. V 4 (p) V (x,y) V 8 (p) V D(x-,y) V (x,y) V D(x,y) Figure 2: Neighborhood using 4-connected and 8- connected 3 Mean Shift algorithm Mean shift is a non-parametric feature-space analysis technique, a so-called mode seeking algorithm. It locates the maxima of a density function given discrete data sampled from that function []. By iteratively moving an analysis window starting from an initial estimate x, it detects the modes (maxima) of the density. Let a kernel function K(x i x) be given. This function determines the weight of nearby points for re-estimation of the mean. Typically one uses the Gaussian kernel on the distance to the current estimate, K(x i x) = e c x i x 2. The weighted mean of the density in the window determined by K is: x y = i N(x) K(x i x)x i x i N(x) K(x i x), () where N(x) is the neighborhood of x, a set of points for which K(x). The mean-shift algorithm now sets x m(x), and repeats the estimation until m(x) converges, Fig. 3 [7].. 2. 3. 4.. 6. 7. Figure 3: Mean Shift Algorithm If dense regions (or clusters) are present in the feature space, then they correspond to the mode (or local maxima) of the probability density function. For each data point, Mean shift associates it with the nearby peak of the data-set s probability density function. For each data point, Mean shift defines a window around it and computes the mean of the data point. Then it shifts the center of the window to the mean and repeats the algorithm till it converges. After each 4 DMC orientation estimation with Mean Shift Let s consider the labeled image of a Data Matrix Code and all the coordinates of the objects from the image. One starts from the first module to the last one from the image and calculates the angle of the straight line created by the modules, using the equation: α ij = arctan x j x i y j y i, (2) where (x i, y i ) şi (x j, y j ) are the coordinates of modules i and j. The calculates angels are stored in a connected list in increasing order. The analysis window s size should not be bigger than half of the angles. In the example from Fig. (b) the size is chosen as half of the space taken by the angles value. The general expression for the non-parametric density estimation is: P (x) = k N V, (3) where V is the volume of the x position, N is the total number of the elements, and k is the number of elements from inside V [6]. If we assume that the region surrounding the examples k is a Hypercube with sides of length h, centered in an estimated point x, its volume is given by V = h D, where D is the number of dimensions, Fig.4. h h (a) V D-Space x h A = Parzen(u) -/2 -/2 u (b) Analysis window Figure 4: Analysis window A = K(u) -/2 -/2 u (c) Kernel function In our case the dimension D =, this means that V is the length of the segment, and k is the number of the values contained in the segment []. Next, based on Fig. (b), the Mean Shift steps are described [2]: in the first step, the analysis segment is centered in the center of the data base coverage. The length of the segment is equal with half of the coverage. Using the equation (3), the density ISBN: 978--684-8-7 7

2 3 4 6 7 8 9 Recent Researches in Communications, Signals and Information Technology 8 6 2 6 4 9 8 2 8 6 4 2 (a) Angles histogram 4 3 2.. 2 2. 3 3. 4 (b) Mean Shift iterations Figure : Mean Shift Algorithm for angle computation x 4 8 6 4 2 2 3 4 6 7 (a) Distances histogram 7 6 4 3 2 2 4 6 8 2 (b) Mean Shift iterations Figure 6: Mean Shift Algorithm for distance between the modules computation center of the points from the segment is computed. The center of the segment is moved in the position calculated by the equation, Fig. (b), the ongoing of the Mean Shift, implemented to estimate the nominal area of the Data Matrix Code modules. in the second step, the segment would exceed the coverage of the angels. That is why, it is recalculated its dimension using the new values form the segment and its real length. the procedure is repeated until it converges to mean, 3 th 6 th steps. 4 4 3 3 2 2 9 8 7 6 4 3 2 We can notice that the peak position of the function densities stabilizes after each iteration. The Mean shift does not require a pre-parametrization process, the algorithm is adapting according to the values of the area subject to estimation. Estimating the distance and the nominal area of the modules with Mean Shift To estimate the distance between the modules and the modules nominal area we use the same method presented in the previous chapter. To create the structure of the distances we calculate the Euclidean distance between each object and its eight nearest neighbors. In Fig. 6 it is presented the histogram of the distances from the image and the ongoing of the Mean Shift, implemented to estimate the distance between the DMC modules. To estimate the common area of the Data Matrix Code modules, using the labeled image, we count the pixels from each object and create a structure of the objects. Using the Mean Shift algorithm, we estimate the position of the maximum density of the values of the areas. The value of this position is the nominal area of the Data Matrix module. In Fig. 7 it is presented the histogram of the areas from the image and 2 4 6 8 2 (a) Areas histogram 2 2 3 3 4 4 (b) Mean Shift iterations Figure 7: Mean Shift Algorithm for modules nominal area computation To better understand the method previously described, Fig. 8 presents the Data Matrix modules position in a 3-D space. The three dimension of the space are given by the areas, distances, and the angles of the modules. The points represented with red in the figure, are the Data Matrix Code modules. The other objects from the image are represented with blue. Distanta 4 3 2 8 6 2 4 4 6 2 8 Unghi Suprafata Figure 8: 3-D view of image objects ISBN: 978--684-8-7 76

6 DMC pattern recognition For the DMC pattern recognition, we start from its specifications, which consist of two adjacent edges marked entirely with modules and two adjacent edges marked only in the odd positions. It is also known that the pattern has a square shape and of course its orientation, the distance from the modules and the modules nominal area. With these inputs, a virtual pattern is built for the finder pattern and one for the timing one. Knowing that, the number of rows and columns of the DMC pattern varies between 8 8 and 44 44, consider the size of the DMC pattern of 8 8. Using the matrix of coordinates, relations (4, ), a pattern is built that overlaps the structure of coordinates of the objects from the Data Matrix Code image. Finally, it is searching for the objects that matches to the virtual pattern. L F = where: L,2 = L,8 = L 8, L 7, L 2, L, L,2 L,7 L,8 x y, L 2, = x 7d cos α y 7d sin α x d sin α y d cos α, L 8, =, (4) x 7d sin α y 7d cos α () The same operation is done for the timing pattern. It is known that the timing pattern has in its structure modules marked alternatively. Using this information, a matrix pattern of 4 4 is built, relations (6, 7), and it is searching in the structure of the coordinates from the image. L T = L,8 L,6 L,4 L,2 L,2 L,4 L,6 L,8, (6) (a) α (b) α 9 (c) α 8 (d) α 27 Figure 9: Finder pattern seeking (a) α (b) α 9 (c) α 8 (d) α 27 Figure : Timing pattern seeking (a) Finder pattern candidates (b) Timing pattern candidates x d(cos α 2 sin α) where: L 2, =, y d(sin α 2 cos α) x 2d cos α L,4 = y 2d sin α, x 2d(cos α 2 sin α) L 4, =. y 2d(sin α 2 cos α) (7) For the safe recognition of the Data Matrix pattern, the two patterns are rotated with (c) DMC pattern Figure : DMC pattern matching ISBN: 978--684-8-7 77

(9 o, 8 o, 27 o ), Fig. 9 -, due to the square form of the Data Matrix pattern. The objects coordinates that satisfy the conditions to fit simultaneously into the built patterns are chosen as candidates for a valid DMC. From all candidates, one selects, one selects the patterns that have the margins two by two at equal distances and the edges orientated towards the exterior. Fig. (a, b) presents the possibilities of the finder and timing patterns, and în Fig. (c) presents the selected patterns. The detected patterns have a 8 8 modules size, but the size of the Data Matrix code being unknown, the other parts of the fingerprint are not known either. Drawing imaginary lines over the four detected edges, their intersection leads us to the discovery of the other two corners of the pattern. Thus we know the four corners and the position of in the Data Matrix Code pattern. 7 Conclusion This article offers a solution for finding the orientation of the industrial Data Matrix Code. Based on the objects coordinates from the image, we use the Mean Shift algorithm to estimate the pattern orientation, the distance between the modules and their area. The Mean Shift algorithm does not need to be parameterized, is adapting by the information from the data set subject to be estimate. Form the technical data information of the DMC pattern, it is also known, that the DMC is composed of a finder pattern and a timing one, and the size of the patterns varies from 8 8 up to 44 44 [4]. Using the estimated data about the modules, it builds two virtual patterns. The finder pattern consists of a matrix 8 8 size, while the timing pattern size is 4 4. It searches in the structure of the images, the objects that overlap simultaneously the two given patterns. The finder and the timing patterns that are diagonally opposite and form a square represent the Data Matrix Code final pattern. Fig. 2-4 present some tests of the proposed method and its results. The finder pattern modules are pointed out with blue color, and the timing pattern modules with red. In Fig. 2(a, b) - 4(a, b), there it is shown the possibility of different systems of modules that could match the built patterns, but there are selected only the ones that meet the condition to form a Data Matrix pattern, Fig. 2(c) - 4(c). Note that there are different types of materials tested, and the codes of the patterns are of different sizes and with different orientations. The Data Matrix pattern size is precisely recognized in all presented ea=24, Angle=4.8724, Distance=.942 (a) Possible finder patterns Area=24, Angle=4.8724, Distance=.942 (c) Industrial DMC pattern (b) Possible timing patterns Figure 2: Aluminium, pattern size,8 cm Area=7, Angle=3, Distance=4.78 (a) Possible finder patterns Area=7, Angle=3, Distance=4.78 (c) Industrial DMC pattern (b) Possible timing patterns Figure 3: Copper, pattern size 2 cm figures. Its orientation and even the material on which it is marked does not influence the recognition system. Having the position of the Data Matrix Code one can scan inside of it for extracting the desired information [3]. The identification of the Data Matrix Codes, whose image is acquired with a video camera oriented non-perpendicularly on the the fingerprint code area, is possible due to the method s ability of recognizing the pattern. This method offers flexibility of use, with the capability of recognition of the Data Matrix Codes marked on non-flat surfaces. ISBN: 978--684-8-7 78

Area=9, Angle=62, Distance=4.39 Recent Researches in Communications, Signals and Information Technology Area=9, Angle=62, Distance=4.39 [] Comaniciu, D., Meer, P.: Mean shift: a robust approach toward feature space analysis: Pattern Analysis and Machine Intelligence, IEEE Transactions on. Pattern Analysis and Machine Intelligence, IEEE Transactions on 24(), 63 69 (22) (a) Possible finder patterns Area=9, Angle=62, Distance=4.39 (b) Possible timing patterns [2] Comaniciu, D., Ramesh, V., Meer, P.: Kernelbased object tracking: Pattern Analysis and Machine Intelligence, IEEE Transactions on. Pattern Analysis and Machine Intelligence, IEEE Transactions on 2(), 64 77 (23) [3] Dita Ion-Cosmin, Otesteanu Marius, Quint Franz: Scanning Industrial Data Matrix Codes 2 9th Telecommunications Forum (TELFOR) (November, 22-24, 2) [4] INTERNATIONAL STANDARD: Information technology International symbology specification Data matrix (c) Industrial DMC pattern Figure 4: Iron, pattern size,6 cm Acknowledgements: This work was partially supported by the strategic grant POSDRU 6/./S/3, (28) of the Ministry of Labour, Family and Social Protection, Romania, co-financed by the European Social Fund Investing in People. References: [] Raykar, V.C., R., D.: Fast optimal bandwidth selection for kernel density estimation: Proceedings of the sixth SIAM International Conference on Data Mining. Proceedings of the sixth SIAM International Conference on Data Mining pp. 24 28 (26) [6] Rob L. Hyndman, Xibin Zhang, Maxwell L. King: Bandwidth Selection for Multivariate Kernel Density Estimation Using MCMC (24). URL http://ideas.repec.org/p/ecm/ausm4/2.html [7] Yizong Cheng: Mean shift, mode seeking, and clustering: Pattern Analysis and Machine Intelligence, IEEE Transactions on. Pattern Analysis and Machine Intelligence, IEEE Transactions on 7(8), 79 799 (99) ISBN: 978--684-8-7 79