DOC PREVIEW
Stanford EE 368 - Lecture Notes

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Detection of Visual Code Markers in Camera-Phone Images Prabhu Balasubramanian Stanford University Department of Electrical Engineering [email protected] Allen Huang Stanford University Department of Electrical Engineering [email protected] Abstract We describe the algorithm design and implementation of our submission for the EE368 final project, which involves detection of visual code markers in camera-phone images. We describe our approach and results, as well as the challenges faced during the development of our algorithm. For the reader’s interest, we also include a brief account of the algorithmic possibilities which we explored but did not ultimately employ. 1. Introduction In this project, we were charged with the task of locating and reading ‘visual code markers’ in cameraphone images. These markers are 11x11 arrays in which each element is either black or white. Some of these elements are part of distinguishing features which identify the pattern as a valid marker; these features include fixed guide bars and fixed corner elements. 83 of the 121 elements in the array represent binary-coded data (where a black element is a 1 and a white element is a 0). Additional information regarding the specifications and parameters of the project can be obtained at the EE368 course website, http://www.stanford.edu/class/ee368/project.html. This report describes the algorithm design and implementation which we used to solve the problem of detection and reading of visual code markers. It also outlines the results we achieved with the training image set and mentions key challenges and thoughts for future exploration if we were to refine this algorithm to make it even more robust. 2. Algorithm To solve the given problem, we employed a number of standard image processing techniques, all implemented in MATLAB, making heavy use of the capabilities of MATLAB’s Image Processing Toolbox, in addition to the software’s standard matrix processing functionality. On the whole, our algorithm is strongly biased towards the use of morphological techniques, such as dilation, erosion, and region labeling, although the final reading of bits happens by processing the original (non-binarized) image. Furthermore, the algorithm we used is best described as a hybrid method which employs both top-down and bottom-up approaches. In particular, our processing of the input image begins by taking a macroscopic view of the image in which we eliminate large segments of the image which we know cannot be related to visual code markers. After a sufficient number of image regions have been eliminated from candidacy by this step, we approach the image from the other direction, characterizing the small features and looking for regions which could be the guide bars or corner elements of markers. Confirming the nature of these small regions and their spatial relationships with each other allows us to conclusively identify markers and proceed with reading them. 2.1. Image preparation Our first step is to convert the input image to grayscale and employ morphological techniques for edge detection. In the first place, this step reduces the image to its essential features. Moreover, because the visual code markers should contain particularly strong edges (since transitions are, roughly speaking, from black to white), edge detection tends to highlight the regions containing markers (among other candidate regions). Edge detection takes place using the gray-level morphological erosion of the grayscale image. By using the erosion, we prevent nearby regions from merging, which would lead to shapes that could not be processed. This allows us to then binarize the image by thresholding. We thereby eliminate regions which are “not edgy enough” – all pixels which do not meet or exceed a certain brightness level (with respect to the overall mean ofthe image) are zeroed out. This thresholding level is taken to be a standard deviation about the mean in the image. By adapting the threshold level to each image, we can compensate for differences in the original illumination of the photograph. We subsequently perform morphological operations on this newly binarized image; opening the image eliminates small 1-regions, and closing it solidifies the remaining regions. 2.2. Region classification Having eliminated all but relatively large contiguous regions from our binarized image, we then proceed to determine which of these regions could be parts of visual code markers. In particular, we use region labeling to distinguish among all the regions in the image and then iterate through them, noting the geometric properties of each region. After zeroing out regions which are either too big or not solid enough to be marker elements, we group the remaining regions according to their major-to-minor-axis ratios; some regions are candidate square elements at the corners of the markers, and some regions are candidate rectangular elements to serve as horizontal or vertical guide bars. 2.3. Region evaluation We now test the regions which are candidates to be guide bars in potential markers. Our approach is to look at each region and see if it has a corresponding short bar region near it such that it could be a vertical guide bar; this is achieved by determining the orientation (along the major axis) of each bar and looking ‘above’ and ‘below’ it for another bar that is approximately perpendicular (allowing for variation in this angle due to perspective skew). If we have found two bars in the correct configuration, we use the width of these bars and their perpendicular distance from each other to calculate an element size for the potential marker that would be framed by these guide bars. We then use this estimated element size to calculate an expected location for the upper right fixed corner element of the marker. Verifying the presence of an approximately square region at this location adds further robustness to the marker identification scheme. 2.4. Locating the top left


View Full Document

Stanford EE 368 - Lecture Notes

Documents in this Course
Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?