DOC PREVIEW
Stanford EE 368 - Visual Code Marker Detection

This preview shows page 1-2 out of 6 pages.

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

Unformatted text preview:

1 Abstract — A process for marker detection which involvesadaptive thresholding, region-modeling and mapping has achallenge of recognizing marker in noisy space. We proposeaccurate and computationally efficient algorithm in detecting anynumber of marker within moderate tilt in camera image.I. INTRODUCTIONisual code marker, taken with mobile phone camera, isprone to have noise in pictures with its limited resolution.A marker in a picture can also be arbitrarily rotated and tilted.Hence the challenge is how to recognize the marker withaccuracy despite poor image quality, varying illumination,markers’ size and orientation. Speed in obtaining data from amarker is significant as well because a marker should quicklyload the information a user would like to obtain.In this paper we discuss a systematic sequence of proceduresin detecting marker, followed by other attempts in solving theproblem. Fundamental flow of algorithm was mainly adoptedfrom [1].II. APPROACHThe flow chart used for detection algorithm is shown in(Fig.1).Here is the outline of m files with their functions in detail.- detect_code.m : It is the main function that implementsthe overall process and returns data and points of theupper left corner element.- adaptive_thresholding.m : It applies adaptivethresholding technique and returns binary imageseparated by threshold value.- fit_ellipse.m : It fits the region into ellipse and providesrotation angle, length of axis, center points. .- draw_ellipse.m : It is used for debugging mode to plotellipse to be fit inside guide bars from ellipseinformation.- draw_feature.m : It draws and plots circles based on theinformation of long guide bar with certain search rangefor three corner elements.- find_corner_stone.m : It finds a corner element from acenter point within certain range and returns the label ofregion that contains the binary pixel.Fig. 1 Marker detection procedure flow chart- mapping_image.m : It performs projective mappingfrom code to image that returns 11 by 11 positions insidethe marker.- read_data.m : It reads data from positions obtainedthrough projective mapping.- bwlabel_mod.m : It upgrades speed as to examiningregion of the same label. This is a modified version of mfile using bwlabel2 function inside bwlabel.m function.- ycbcr_marker.m : It converts RGB image to YCbCrimage and classify the region into two according to thesimilarity of its CbCr components with the marker.- obtaining_ycbcr.m : It is a separate function from theprocedure that calculates the mean and standarddeviation of color components CbCr.III. ALGORITHMA. Gray scaling and adaptive thresholdingWe first convert an RGB image to a grayscale image by usingrgb2gray Matlab function. Using this function turns out to beless noisy than applying the coefficients in ITU-standardizedEE368 Project: Visual Code Marker DetectionDoe Hyun Yoon, Sang Hui AhnV2Fig. 2 (From training_5 image) Example of binary imagecreated after adaptive thresholding.formula. Then adaptive thresholding method described in [1]adapted from [2] is employed to separate foreground frombackground with nonuniform illumination. Constant thresholdvalue does not work in detecting markers because cameraimages have varying brightness over the image.Calculating a moving average of the last604808181=== widthspixels, the output binary image T(n)with (t = 15) percent darkness is :1)( =nTif×−×<stnhpn100100)(0)( =nTotherwisewherenpis the current gray value,)(nhis the average of)(ngsand)( widthngs−, and)(ngsis an approximateaverage of the last s pixels at current point as in [1].Thus the final binary image denotes our target of interest as 1and 0 otherwise (Fig. 2).B. Classifying regions into bars / dots / othersGuide bars (GB hereafter) and corner elements (CEhereafter) are indicators of a marker, thus the aim is to obtainposition of two bars and three dots before reading data from amarker.1) Finding bars: Since the size of the marker varies, we madeuse of the fact that two fixed GBs do not change in the ratio of itswidth and height. After labeling the regions of which thenumber of pixels satisfies above the threshold of 20 pixels, wemodeled those regions into ellipses. Regions that modeled intoellipses are then good candidates for GBs. Fitting into ellipseprovides us withsome merits in that we can measure the rotationof the ellipse, and the ratio of width to height is retained thesame regardless of its angle of rotation. We adopted the code forfitting into ellipse from [5]. The length of long axis, short axis,and its center provides critical information in later processeswhere calculation about relation between the bars and dots isinvolved.More specifically, within the regions identified with the samelabel, we set the region as a bar of which the ratio of long axis toFig. 3 Two markers are conceivable in each direction.short axis lies in the range of 2.7 to 10. True ratio for long andshort guide bar is 7/1 and 5/1 respectively, but we allowedmargins considering the distortion from noise in an image.2) Finding dots: With the region that is not bar, the potentialCEs are every dot that has the width to height ratio ofapproximately 1/1. Since dots can be seen as a circle, withoutthe course of modeling into ellipse, the length of the region ismeasured in horizontal and vertical direction and if two lengthsare within some tolerance it is defined as a dot.C. Identifying a set of bars and corner elementsOne marker is recognized with two GBs alignedperpendicular to each other and three CEs: one CE that stretchfrom two GBs respectively and the other one that lies on thevertex determined by the parallelogram defined by three points-two CEs and one point in the short GB. (Fig. 3)First step is to start by finding a set of two bars perpendicularto each other. Among the bars defined in the above (B),assuming that this is the long GB, we search for short GB in twodirections. For a fixed long GB, two marker positions areconceivable.(Fig 3) If a bar which lies within 90 degrees (withsome tolerance) is found, next step is to inspect if the potentialbar’s short axis and long axis are within the range compared tolong GB: in terms of short axis, a short GB’s should be in 60%to 140% of the long GB’s short axis (true ratio is 1 because theyboth occupy 1 pixel width); in terms of long axis, a short GB’swidth to height ratio should be within 3/7 to 6.9/7 ratio with longGB. (cf. true ratio is 5/7 without margin)With the information of long


View Full Document

Stanford EE 368 - Visual Code Marker Detection

Documents in this Course
Load more
Download Visual Code Marker Detection
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 Visual Code Marker Detection 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 Visual Code Marker Detection 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?