Font Size: a A A

Research On Cigarette Counting And Recognition Algorithm Based On Template Matching And Its Implementation

Posted on:2007-08-01Degree:MasterType:Thesis
Country:ChinaCandidate:Z DengFull Text:PDF
GTID:2178360242461846Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Cigarette counting is a necessary working procedure in the manufacture workshop of medium-sized or pint-sized cigarette factory. There is an optional scheme based on the method of image recognition to recognize and count the cigarettes automatically. This method is using digital camera to take cigarette image from the cigarette container which is full of cigarettes. Cigarettes counting and recognition arithmetic based on template matching contains three parts: cigarette image preprocessing, localization of cigarette's center before recognition, cigarettes counting and recognition. The method of adjustment of cigarette position is a beneficial supplement to the cigarette counting and recognition arithmetic, because it can prevent cigarette overlapping.Cigarette image preprocessing is a course of obtaining high quality binary cigarette image, which includes four steps. Firstly, using the method of color segmentation to remove the impurities among cigarettes. Secondly, using the method of row-column scan to distill the frame of cigarette container and remove the environmental background impurities. Thirdly, choosing appropriate threshold values based on color histogram to threshold cigarette image. Fourthly, using the method of morphological filtering to remove isolated points and line segment which has single pixel width.Localization of cigarette's center before recognition is a course of classifying the pixels of binary cigarette image according to their possibilities to be the center of cigarettes and setting every class's recognition priority. Firstly, distance distribution of cigarette template is defined. Secondly, considering the distance between the object pixel of cigarette image and its closest boundary point in four directions based on the distance distribution of cigarette template, so six distance distribution of the pixels in cigarette image are obtained. These six distance distribution of the pixels in cigarette image are the main basis of pixels classification and setting recognition priority. In the process of recognition, pixels are searched according to the recognition priority from high to low.In the process of cigarette counting and recognition, a code scheme named rotating code is proposed to describe the attribution of cigarette template. Rotating code can map the two-dimension cigarette template to an integer, so with an attribution transform, the observation points set and standard coding value of every attribution can be obtained. In the process of template matching, do the same revolving coding and attribution transform to the image covered by the template, so the coding value of every attribution of the covered image can be obtained. Cigarette recognition conditions are established according to the differences between the attributes codes of the template and those of sub-image.The method of adjustment of cigarettes position is using the theory of the positional relationship of rounds to analyze the positional relationship of cigarettes. The questionable cigarette is defined; the method of removing or preserving questionable cigarette and the method of adjustment of intersecting cigarettes are proposed. So the aim of removing unwanted cigarettes and amending the counting result can be achieved.Two cigarette counting and recognition arithmetics based on rotating code are researched and realized, which are the recognition arithmetic based on attribution transform and the recognition arithmetic totally based on area. Two arithmetics are analyzed and compared from performance and the differences in realization methods.
Keywords/Search Tags:Image Recognition, Counting, Template Matching, Rotating Code, Distance Distribution, Positional Relationship
PDF Full Text Request
Related items