版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、一種在線圖像編碼識(shí)別系統(tǒng)的設(shè)計(jì)摘要:本文介紹了在線圖像編碼字符識(shí)別系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)過(guò)程,對(duì)其中重點(diǎn)環(huán)節(jié)進(jìn)行了分析與研究,給出了主要環(huán)節(jié)問(wèn)題的解決方法,在識(shí)別算法上,結(jié)合模板匹配與特征識(shí)別,提出了基于特征加權(quán)的模板匹配算法,該算法對(duì)提高字符識(shí)別率提到了較好的作用。關(guān)鍵詞:圖像處理;模式識(shí)別;特征加權(quán);軟件設(shè)計(jì)0引言圖像編碼字符識(shí)別的研究目前仍是國(guó)內(nèi)外一個(gè)重點(diǎn)研究課題,它具有廣泛的應(yīng)用背景,比如車牌號(hào)碼自動(dòng)識(shí)別、郵政編碼的自動(dòng)識(shí)別、試卷自動(dòng)閱讀、報(bào)表自動(dòng)處理等,由于這種在線圖像編碼字符的識(shí)別都具有一些共性,本文結(jié)合在線輪胎編碼字符識(shí)別系統(tǒng)的設(shè)計(jì),對(duì)一般圖像編碼字符識(shí)別系統(tǒng)進(jìn)行了闡述,對(duì)關(guān)鍵環(huán)節(jié)進(jìn)行
2、了研究與分析,該方法對(duì)其它在線圖像編碼字符系統(tǒng)的開(kāi)發(fā)具有一定指導(dǎo)意義。1在線圖像編碼識(shí)別系統(tǒng)流程在線圖像編碼字符識(shí)別系統(tǒng)主要包括數(shù)字圖像的采集、存儲(chǔ)、圖像預(yù)處理、編碼圖像提取、編碼特征提取、編碼識(shí)別和后續(xù)處理等一些環(huán)節(jié),其流程圖如圖1所示。圖像預(yù)處理后續(xù)處理編碼特征提取與識(shí)別編碼圖像的采集與存儲(chǔ) 圖1 在線圖像編碼字符識(shí)別系統(tǒng)流程圖在線輪胎圖像編碼字符識(shí)別系統(tǒng)要求對(duì)通過(guò)生產(chǎn)流水線上每一個(gè)輪胎采集含有輪胎編碼的圖像,然后通過(guò)對(duì)圖像的處理,提取出輪胎編碼特征,采用合適的識(shí)別算法將每一位編碼字符進(jìn)行識(shí)別。由于輪胎編碼字符在輪胎上有一定變形,且攝像角度不同,得到的編碼圖像差異也很大,規(guī)律性差,所以編碼
3、圖像的預(yù)處理和識(shí)別算法的選取顯得尤為重要。2圖像采集與存儲(chǔ)在線編碼圖像通常使用數(shù)碼攝像機(jī)、數(shù)碼照相機(jī)、數(shù)碼攝像頭等設(shè)備采集并輸入計(jì)算機(jī)進(jìn)行處理,本系統(tǒng)采用QuickCamPro4000數(shù)碼攝像頭采集輪胎編碼圖像,直接按JPG格式存儲(chǔ)。編碼圖像一般都要先轉(zhuǎn)成BMP圖像格式,因?yàn)锽MP格式己經(jīng)成為PC領(lǐng)域事實(shí)上的標(biāo)準(zhǔn)幾乎所有為Windows操作系統(tǒng)設(shè)計(jì)的圖像處理軟件都支持這種格式的圖像。BMP是Windows的原始位圖格式,它可以用于保存任意類型的位圖數(shù)據(jù),可以支持所有的屏幕分辨率和Windows所支持的顏色組合。一般情況下,為了保證顯示的高效率,它對(duì)圖像數(shù)據(jù)沒(méi)有任何的壓縮,所以一幅很小的位圖就可
4、能占據(jù)相當(dāng)大的空間。BMP位圖文件包括位圖文件頭、位圖信息頭、調(diào)色板、位圖數(shù)據(jù)區(qū)四個(gè)部分,位圖文件頭由14個(gè)字節(jié)構(gòu)成,位圖信息頭由40個(gè)字節(jié)構(gòu)成,調(diào)色板的大小取決于色彩數(shù),單色圖像調(diào)色板占8個(gè)字節(jié),16色圖像調(diào)色板占64個(gè)字節(jié),256色圖像調(diào)色板占1024個(gè)字節(jié),224色圖像沒(méi)有調(diào)色板,位圖數(shù)據(jù)區(qū)內(nèi)數(shù)據(jù)按行順序自下而上、自左而右排列。3圖像預(yù)處理圖像預(yù)處理主要包括有:圖像灰度化、圖像降噪與增強(qiáng)、編碼區(qū)邊緣檢測(cè)、圖像幾何校正、編碼區(qū)圖像提取、編碼圖像二值化、字符分割、字符歸一化等。下面介紹幾個(gè)關(guān)鍵環(huán)節(jié)的處理過(guò)程。3.1 圖像灰度化處理編碼圖像通常是彩色的,實(shí)際識(shí)別用的圖像是灰度圖,所在需要先將彩
5、色編碼圖像轉(zhuǎn)換為灰度圖像。在RGB顏色模型中,如果R=G=B,則顏色(R,G,B)表示一種黒白顏色,其中R=G=B的值叫灰度值,灰度化處理就是使彩色的R、G、B分量值相等的過(guò)程。常用灰度化處理方法是加權(quán)平均值法,即R=G=B=(WRR+WGG+WBB)/3其中,WR、WG、WB分別是R、G、B的權(quán)值,實(shí)驗(yàn)和理論證明,當(dāng)WR=0.3, WG=0.59, WB=0.11時(shí),即當(dāng)R=G=B=0.30R+0.59G+0.11B時(shí),能得到最合理的灰度圖像。3.2 圖像增強(qiáng)處理3.2.1 直接灰度變換線性灰度變換:假設(shè)圖像灰度是線性變化的,如原圖像f(x,y)灰度范圍為a,b,要求變換后圖像灰度范圍達(dá)到c
6、,d,根據(jù)線性規(guī)律,則變換后圖像g(x,y)為: (1)非線性變換對(duì)數(shù)變換和指數(shù)變換。當(dāng)需要擴(kuò)展低灰度區(qū)、壓縮高灰度區(qū)時(shí)使用對(duì)數(shù)變換,當(dāng)需要擴(kuò)展高灰度區(qū)時(shí)使用指數(shù)變換。3.2.2 平滑濾波降噪由于噪聲對(duì)應(yīng)圖像中的區(qū)域邊緣等灰度值具有較大較快變化的部分,屬高頻分量,所以使用低通濾波器(即平滑濾波器)降噪。同時(shí)平滑還可以使圖像模糊,有利于在提取較大的目標(biāo)前去除較小的細(xì)節(jié)或?qū)⒛繕?biāo)內(nèi)的小間斷連接起來(lái)。平滑降噪的方法是使用模板對(duì)圖像進(jìn)行卷積運(yùn)算,線性平滑濾波器最常用的模板是如圖2所示的3×3模板,將此模板與圖像中像素按如下方法進(jìn)行卷積運(yùn)算,可得到平滑降噪的圖像。將模板在圖中漫游,并將模板中心與
7、圖中每個(gè)像素位置重合;將模板上系數(shù)與模板下對(duì)應(yīng)像素相乘;將所有乘積相加;將和賦給圖中對(duì)應(yīng)模板中心位置的像素。非線性平滑濾波器最常用的是中值濾波器,它將區(qū)域中所有的值按大小進(jìn)行排序,將排序后位于中間的像素值賦予中心像素。中值濾波可有效地去除隨機(jī)噪聲,能得到較好的視覺(jué)效果。3.3 編碼區(qū)邊緣檢測(cè)邊緣是灰度值不連續(xù)的結(jié)果,可利用求一階和二階導(dǎo)數(shù)的方法檢測(cè)到。因?yàn)樵谶吘壍貛?dǎo)數(shù)值大,而非邊緣的地方導(dǎo)數(shù)值小。由于數(shù)字圖像是離散的,不能求導(dǎo)數(shù),可以通過(guò)卷積的方法用差分近似代替微分。-101-202-101121000-1-2-1效果較好的邊緣檢測(cè)算法是Sobel算子。Sobel算子是一種梯度幅值,分別利用
8、垂直算子Sx、水平算子Sy來(lái)獲取編碼區(qū)垂直邊緣和水平邊緣,即在水平和垂直方向上使用如圖3所示的兩個(gè)不同的卷積模板,得到如圖4所示的邊緣檢測(cè)結(jié)果。圖2 平滑濾波器模板 圖3 Sobel邊緣檢測(cè)模板 圖4 Sobel算子邊緣檢測(cè)結(jié)果3.4 圖像幾何校正Hough變換可以檢測(cè)出編碼區(qū)圖像傾斜角度,根據(jù)此角度進(jìn)行旋轉(zhuǎn)變換可使編碼區(qū)圖像得到校正。Hough變換可以將圖像空間XY中的直線(y=px+q)檢測(cè)問(wèn)題轉(zhuǎn)換到參數(shù)空間PQ中點(diǎn)的檢測(cè)問(wèn)題,在參數(shù)空間PQ里,建立一個(gè)累加數(shù)組Sum(p,q),對(duì)每一個(gè)圖像空間中給定邊緣點(diǎn),讓p取遍所有可能值,根據(jù)直線方程q=-xp+y計(jì)算出對(duì)應(yīng)的q,對(duì)Sum(p,q)進(jìn)
9、行累加,得到Sum(p,q)的值就是在(p,q)處共線的點(diǎn)的個(gè)數(shù),(p,q)的值就是圖像空間中直線的斜率和截距,由斜率得到圖像編碼區(qū)水平邊緣角度。3.5 字符切割通過(guò)對(duì)編碼字符區(qū)直接進(jìn)行水平掃描,由字符間距一般可以將字符區(qū)域分割出來(lái)。也可以通過(guò)對(duì)編碼字符區(qū)做垂直方向投影運(yùn)算,根據(jù)字符大致寬度與字符總數(shù),對(duì)字符進(jìn)行切割。如圖5所示是編碼字符區(qū)及對(duì)應(yīng)垂直投影圖。 圖5 編碼字符及對(duì)應(yīng)垂直投影 圖6 線性插值示意圖3.6 字符歸一化處理對(duì)分割出的字符從四個(gè)方向掃描,確定字符邊界,然后采用線性插值方法對(duì)每個(gè)字符作歸一化處理,使每個(gè)字符歸一為32×16點(diǎn)陣。圖6為線性插值示意圖,根據(jù)線性原理,
10、f(x1)可由公式(2)計(jì)算: (2)4識(shí)別算法設(shè)計(jì)字符識(shí)別一般采取特征判別或模板匹配的方法,特征判別是根據(jù)特征抽取的程度分階段的、用結(jié)構(gòu)分析的辦法完成字符的識(shí)別。模板匹配即是根據(jù)字符的知識(shí)采取按形匹配的方法,模板匹配一般分為兩類:一類是直接利用輸入的二維平面圖像與字典中記憶的圖形進(jìn)行匹配;另一類是抽出部分特征與字典進(jìn)行匹配。輪胎編碼圖像中字符僅涉及部分英文字符和10個(gè)阿拉伯?dāng)?shù)字,字符較少,結(jié)構(gòu)相對(duì)簡(jiǎn)單,因此具體識(shí)別時(shí),既可以采用圖形匹配的方法,也可以采用結(jié)構(gòu)分析的方法。但由于輪胎上編碼字符有一定變形,且有斷裂現(xiàn)象,所以直接模板匹配與直接特征抽取方法識(shí)別率都不理想,本系統(tǒng)使用了模板匹配與特征識(shí)
11、別相結(jié)合的基于特征加權(quán)的模板匹配識(shí)別算法,其字符識(shí)別率比簡(jiǎn)單模板匹配算法和特征識(shí)別算法識(shí)別率都有不同程度的提高?;谔卣骷訖?quán)的模板匹配識(shí)別算法基本思路是:給模板中有字符筆畫的點(diǎn)分配不同的權(quán)重,位于筆畫中心的點(diǎn)權(quán)重最高,位于筆畫邊緣的點(diǎn)權(quán)重最低,然后將樣本模板與標(biāo)準(zhǔn)模板逐點(diǎn)模糊匹配,按模糊識(shí)別規(guī)則識(shí)別。 5結(jié)論本文結(jié)合輪胎編碼識(shí)別系統(tǒng)的實(shí)現(xiàn)對(duì)在線圖像字符編碼識(shí)別系統(tǒng)的設(shè)計(jì)進(jìn)行了闡述,提出了一種模板匹配與特征匹配相結(jié)合的識(shí)別算法,該方法對(duì)傳統(tǒng)的模板匹配算法進(jìn)行了改進(jìn),提高了變形、斷裂等字符的識(shí)別率。這種方法在試驗(yàn)中得到了驗(yàn)證,取得了令人滿意的效果。 The Development of A Kin
12、d of Online Image Code Recognition SystemAbstract: This paper describes the design and the implement of online image coding char recognition system. It analyses and researches the important contents about the system. Then it provides the solutions of main problems. In recognition algorithm, combinin
13、g template matching with feature recognition, it put forword an improved template matching algorithm based on feature weights. The algorithm can obviously improve the char recognition ratio.Keyword: image processing; pattern recognition; feature weights; software design0 IntroductionCharacter recogn
14、ition of image coding is still the subject of intense study at home and abroad, it has broad applications, such as Automatic number plate recognition, postal code of the automatic identification, automatic reading papers, reports, automatic processing, because of this online image coded character re
15、cognition has some common, this paper online tire coding character recognition system for the general image coding character recognition system has been elaborated on the key link of the research and analysis, the method of the other online image coded character system Development of guiding signifi
16、cance.1 An online image coding identification system processesOnline image coding character recognition system includes digital image capture, storage, image preprocessing, encoding the image extraction, feature extraction coding, coding identification and follow-up treatment of some aspects of its
17、flow chart shown in Figure 1.Image preprocessingFollow-up treatmentFeature Extraction and Identification CodeCoded image capture and storage Figure 1-line character recognition image coding system flowchartOnline tire image coding character recognition system requires the production pipeline through
18、 the acquisition of each tire with tire encoded image, and then through image processing, coding to extract features of the tire, using the appropriate recognition algorithm to identify each coded character. Tire coding characters as a certain deformation in the tires, and different camera angles, a
19、re also great differences in the coding images, regularity is poor, so coded image preprocessing and recognition algorithms of selection is very important.2 Image Acquisition and StorageLine coding commonly used digital camera images, digital cameras, digital video cameras capture and processed in c
20、omputer, the system uses QuickCamPro4000 tire coding digital camera image capture, directly from JPG format.Coded images generally must first convert BMP image format, because the BMP format has become the de facto standard PC in the field - almost all of the Windows operating system designed for im
21、age processing software to support this format of the image. BMP is the original Windows bitmap format, which can be used to save any type of digital map data, can support all Windows supported screen resolution and color combination. Under normal circumstances, in order to ensure the display of hig
22、h efficiency, it does not have any compressed image data, so a small bitmap may occupy considerable space.BMP bitmap file includes the bitmap file header, bitmap information header, palette, bitmap data area of four parts, bitmap file header from 14 bytes constitute the bitmap header from 40 bytes c
23、omposition, tone color palette depends on the number of monochrome color images.Board accounted for 8 bytes, 16-color palette images accounted for 64 bytes, 256-color palette image 1024 bytes total, 224-color images without color palette, the bitmap data from the region under the order of the data b
24、y row and on the arrangement from left to right.3 PreprocessingImage preprocessing includes are: gray image, image noise reduction and enhancement, coding, edge detection, image geometry correction, image coding region of extraction, encoding image binarization, character segmentation, character nor
25、malization and so on. Here are some key aspects of the process.3.1 gray image processingImages are usually color coded, the actual identification with the image is grayscale, where the need to convert first color-coded images to grayscale. In the RGB color model, if R = G = B, then color (R, G, B) i
26、ndicates a Black white color, in which R = G = B is called the value of gray value, gray level processing is to make the color of the R , G, B component value equal to the process. Gray-scale processing methods are commonly used weighted average method, that is,R = G = B = (WRR + WGG + WBB) / 3Which
27、, WR, WG, WB are the R, G, B the weight of experimental and theoretical proof, when WR = 0.3, WG = 0.59, WB = 0.11, that is when R = G = B = 0.30R +0.59 G +0.11 B, can be the most reasonable grayscale.3.2 image enhancement processing3.2.1 Direct gray-scale transformation linear gray level transforma
28、tion: if the image gray scale is linear, as in the original image f (x, y) gray-scale range of a, b, asked the transformed image intensity range of up to c, d, According to the linear law, the transformed image g (x, y) as: (1) nonlinear transformation - log transformation and exponential transforma
29、tion:When the need to expand low gray zone, gray zone of high compression used on the log transformation, when the need to expand the use of high gray area index transformation.3.2.2 smoothing filter - Noise ReductionAs the noise in the area corresponding to the edge of the image gray value of such
30、rapid change with a larger part is a high frequency, so the use of low-pass filter (ie, smoothing filter) noise. At the same time can make the image fuzzy smoothing is beneficial to the larger goal of the extraction prior to removal of the smaller details or to target the small interruption link.Smo
31、othing noise reduction method is to use the template on the image convolution operation, linear smoothing filter is the most commonly used template is shown in Figure 2 of the 3 × 3 template, this template and image in pixels by the following method of convolution , get smooth image noise reduc
32、tion. In the figure, roaming the template and the template center and map location of each pixel overlap; the template on the coefficient multiplied with the template under the corresponding pixel; add all the product; It will assign the figure corresponds to the template and the center of the pixel
33、.The most commonly used non-linear smoothing filter is median filter, it will all of the values of the region are sorted according to size, will be sorted in the middle of the pixel values given to the center pixel. Median filter can effectively remove the random noise, can get a better visual effec
34、t.3.3 Edge detection codingEdge is the result of discrete gray value can be used to request the first and second derivative method to detect. Because the derivative of the edge of a large area, rather than the local derivative of the edge of the small. As the digital image is discrete, not the deriv
35、ative, convolution method can replace the differential with the differential approximation.Is better Sobel edge detection algorithm is operator. Sobel operator is a gradient amplitude, respectively, using vertical operator Sx, Sy operator to obtain the level of the coding region of the vertical edge
36、s and horizontal edges, that is, the horizontal and vertical directions as shown in Figure 3 using two different volumes product template, get the edge as shown in Figure 4 results.-101-202-101121000-1-2-1Figure 2 smoothing filter template Figure 3 Sobel edge detection templateFigure 4 Sobeledgedete
37、ction operator3.4 Image RectificationHough transform can detect the coding region of the image angle, the angle of rotation according to the coding region of the image transformation can be corrected.Hough transform to the image space XY of the line (y = px + q) parameter space detection problem is
38、transformed into the mid-point of detection PQ, PQ in the parameter space, the establishment of a cumulative array Sum (p, q), for each given the edge in image space, let p taken over all possible values, according to linear equation q =- xp + y to calculate the corresponding q, on the Sum (p, q) to
39、 accumulate, by Sum (p, q) the value of the is the (p, q) point total of the number line, (p, q) is the image space in the value of the slope and intercept, obtained by the slope angle of the edge image coding standard.3.5 Character CuttingCoded character area on the level of scanning directly from
40、the character spacing can generally be out of character segmentation. Can also be done by coded character area vertical projection operation, according to the character width and character less the total number of characters to be cut. Figure 5 is a coded character areas and the corresponding vertic
41、al projection.Figure 5 encoded characters and the corresponding Figure 6 Schematic diagram of vertical projection linear interpolation3.6 Character normalizationThe character of the segmented into four scans to determine the character boundaries, and then use linear interpolation for each character
42、for normalized so that each character is normalized to 32 × 16 lattice. Figure 6 Schematic diagram of linear interpolation, according to linear theory, f (x1) by the formula (2) Calculation: (2)4 Identification algorithmTo determine the general characteristics of character recognition or templa
43、te matching method, Feature identification is based on the degree of feature extraction stages, complete with a structural analysis approach to character recognition. Template matching that is based on knowledge of the characters take shape matching method according to the template matching is generally divided into two categories: direct use of the imported two-dimensional plane images and dictionary matching graphics memory; the other is out of some feature match with the dictionary.Tire coding image only some of the characters and English characters
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 策劃宣傳設(shè)備合同
- 餐廳盒飯合同模板
- 材料供應(yīng)運(yùn)輸合同范本
- 病人外出安全協(xié)議書
- 北京市人事局入職合同
- 山西省2024八年級(jí)物理上冊(cè)第三章物態(tài)變化中考聚焦課件新版新人教版
- 期末試題-2024-2025學(xué)年人教PEP版英語(yǔ)六年級(jí)上冊(cè) (含答案)
- 21 B光的衍射 光的偏振 激光 中檔版2025新課改-高中物理-選修第1冊(cè)(21講)
- 浙江省寧波市余姚市子陵教育集團(tuán)2024-2025學(xué)年八年級(jí)(上)期中數(shù)學(xué)試卷(含答案)
- 地礦地震儀器行業(yè)相關(guān)投資計(jì)劃提議
- 社區(qū)文化知識(shí)講座
- 提升創(chuàng)新創(chuàng)業(yè)能力
- GB/T 43480-2023無(wú)損檢測(cè)相控陣超聲柱面成像導(dǎo)波檢測(cè)
- 花鍵軸工序卡片5
- TikTok全球化運(yùn)營(yíng)策略解析
- 保安班長(zhǎng)工作管理制度
- 手術(shù)體位相關(guān)周圍神經(jīng)損傷及預(yù)防課件
- 2024人教版初中英語(yǔ)單詞詞匯表默寫背誦(中考復(fù)習(xí)必背)
- 數(shù)字媒體技術(shù)專業(yè)大學(xué)生職業(yè)生涯規(guī)劃書
- 【精】人民音樂(lè)出版社人音版五年級(jí)上冊(cè)音樂(lè)《外婆的澎湖灣》課件PPT
- 抗腫瘤藥物臨床合理應(yīng)用(臨床)
評(píng)論
0/150
提交評(píng)論