




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、一種在線圖像編碼識別系統(tǒng)的設(shè)計摘要:本文介紹了在線圖像編碼字符識別系統(tǒng)的設(shè)計與實現(xiàn)過程,對其中重點環(huán)節(jié)進行了分析與研究,給出了主要環(huán)節(jié)問題的解決方法,在識別算法上,結(jié)合模板匹配與特征識別,提出了基于特征加權(quán)的模板匹配算法,該算法對提高字符識別率提到了較好的作用。關(guān)鍵詞:圖像處理;模式識別;特征加權(quán);軟件設(shè)計0引言圖像編碼字符識別的研究目前仍是國內(nèi)外一個重點研究課題,它具有廣泛的應(yīng)用背景,比如車牌號碼自動識別、郵政編碼的自動識別、試卷自動閱讀、報表自動處理等,由于這種在線圖像編碼字符的識別都具有一些共性,本文結(jié)合在線輪胎編碼字符識別系統(tǒng)的設(shè)計,對一般圖像編碼字符識別系統(tǒng)進行了闡述,對關(guān)鍵環(huán)節(jié)進行
2、了研究與分析,該方法對其它在線圖像編碼字符系統(tǒng)的開發(fā)具有一定指導意義。1在線圖像編碼識別系統(tǒng)流程在線圖像編碼字符識別系統(tǒng)主要包括數(shù)字圖像的采集、存儲、圖像預(yù)處理、編碼圖像提取、編碼特征提取、編碼識別和后續(xù)處理等一些環(huán)節(jié),其流程圖如圖1所示。圖像預(yù)處理后續(xù)處理編碼特征提取與識別編碼圖像的采集與存儲圖1 在線圖像編碼字符識別系統(tǒng)流程圖在線輪胎圖像編碼字符識別系統(tǒng)要求對通過生產(chǎn)流水線上每一個輪胎采集含有輪胎編碼的圖像,然后通過對圖像的處理,提取出輪胎編碼特征,采用合適的識別算法將每一位編碼字符進行識別。由于輪胎編碼字符在輪胎上有一定變形,且攝像角度不同,得到的編碼圖像差異也很大,規(guī)律性差,所以編碼圖
3、像的預(yù)處理和識別算法的選取顯得尤為重要。2圖像采集與存儲在線編碼圖像通常使用數(shù)碼攝像機、數(shù)碼照相機、數(shù)碼攝像頭等設(shè)備采集并輸入計算機進行處理,本系統(tǒng)采用QuickCamPro4000數(shù)碼攝像頭采集輪胎編碼圖像,直接按JPG格式存儲。編碼圖像一般都要先轉(zhuǎn)成BMP圖像格式,因為BMP格式己經(jīng)成為PC領(lǐng)域事實上的標準幾乎所有為Windows操作系統(tǒng)設(shè)計的圖像處理軟件都支持這種格式的圖像。BMP是Windows的原始位圖格式,它可以用于保存任意類型的位圖數(shù)據(jù),可以支持所有的屏幕分辨率和Windows所支持的顏色組合。一般情況下,為了保證顯示的高效率,它對圖像數(shù)據(jù)沒有任何的壓縮,所以一幅很小的位圖就可能
4、占據(jù)相當大的空間。BMP位圖文件包括位圖文件頭、位圖信息頭、調(diào)色板、位圖數(shù)據(jù)區(qū)四個部分,位圖文件頭由14個字節(jié)構(gòu)成,位圖信息頭由40個字節(jié)構(gòu)成,調(diào)色板的大小取決于色彩數(shù),單色圖像調(diào)色板占8個字節(jié),16色圖像調(diào)色板占64個字節(jié),256色圖像調(diào)色板占1024個字節(jié),224色圖像沒有調(diào)色板,位圖數(shù)據(jù)區(qū)內(nèi)數(shù)據(jù)按行順序自下而上、自左而右排列。3圖像預(yù)處理圖像預(yù)處理主要包括有:圖像灰度化、圖像降噪與增強、編碼區(qū)邊緣檢測、圖像幾何校正、編碼區(qū)圖像提取、編碼圖像二值化、字符分割、字符歸一化等。下面介紹幾個關(guān)鍵環(huán)節(jié)的處理過程。3.1 圖像灰度化處理編碼圖像通常是彩色的,實際識別用的圖像是灰度圖,所在需要先將彩色
5、編碼圖像轉(zhuǎn)換為灰度圖像。在RGB顏色模型中,如果R=G=B,則顏色(R,G,B)表示一種黒白顏色,其中R=G=B的值叫灰度值,灰度化處理就是使彩色的R、G、B分量值相等的過程。常用灰度化處理方法是加權(quán)平均值法,即R=G=B=(WRR+WGG+WBB)/3其中,WR、WG、WB分別是R、G、B的權(quán)值,實驗和理論證明,當WR=0.3, WG=0.59, WB=0.11時,即當R=G=B=0.30R+0.59G+0.11B時,能得到最合理的灰度圖像。3.2 圖像增強處理3.2.1 直接灰度變換線性灰度變換:假設(shè)圖像灰度是線性變化的,如原圖像f(x,y)灰度范圍為a,b,要求變換后圖像灰度范圍達到c,
6、d,根據(jù)線性規(guī)律,則變換后圖像g(x,y)為: (1)非線性變換對數(shù)變換和指數(shù)變換。當需要擴展低灰度區(qū)、壓縮高灰度區(qū)時使用對數(shù)變換,當需要擴展高灰度區(qū)時使用指數(shù)變換。3.2.2 平滑濾波降噪由于噪聲對應(yīng)圖像中的區(qū)域邊緣等灰度值具有較大較快變化的部分,屬高頻分量,所以使用低通濾波器(即平滑濾波器)降噪。同時平滑還可以使圖像模糊,有利于在提取較大的目標前去除較小的細節(jié)或?qū)⒛繕藘?nèi)的小間斷連接起來。平滑降噪的方法是使用模板對圖像進行卷積運算,線性平滑濾波器最常用的模板是如圖2所示的3×3模板,將此模板與圖像中像素按如下方法進行卷積運算,可得到平滑降噪的圖像。將模板在圖中漫游,并將模板中心與圖
7、中每個像素位置重合;將模板上系數(shù)與模板下對應(yīng)像素相乘;將所有乘積相加;將和賦給圖中對應(yīng)模板中心位置的像素。非線性平滑濾波器最常用的是中值濾波器,它將區(qū)域中所有的值按大小進行排序,將排序后位于中間的像素值賦予中心像素。中值濾波可有效地去除隨機噪聲,能得到較好的視覺效果。3.3 編碼區(qū)邊緣檢測邊緣是灰度值不連續(xù)的結(jié)果,可利用求一階和二階導數(shù)的方法檢測到。因為在邊緣地帶導數(shù)值大,而非邊緣的地方導數(shù)值小。由于數(shù)字圖像是離散的,不能求導數(shù),可以通過卷積的方法用差分近似代替微分。效果較好的邊緣檢測算法是Sobel算子。Sobel算子是一種梯度幅值,分別利用垂直算子Sx、水平算子Sy來獲取編碼區(qū)垂直邊緣和水
8、平邊緣,即在水平和垂直方向上使用如圖3所示的兩個不同的卷積模板,得到如圖4所示的邊緣檢測結(jié)果。121000-1-2-1-101-202-101圖2 平滑濾波器模板 圖3 Sobel邊緣檢測模板 圖4 Sobel算子邊緣檢測結(jié)果3.4 圖像幾何校正Hough變換可以檢測出編碼區(qū)圖像傾斜角度,根據(jù)此角度進行旋轉(zhuǎn)變換可使編碼區(qū)圖像得到校正。Hough變換可以將圖像空間XY中的直線(y=px+q)檢測問題轉(zhuǎn)換到參數(shù)空間PQ中點的檢測問題,在參數(shù)空間PQ里,建立一個累加數(shù)組Sum(p,q),對每一個圖像空間中給定邊緣點,讓p取遍所有可能值,根據(jù)直線方程q=-xp+y計算出對應(yīng)的q,對Sum(p,q)進行
9、累加,得到Sum(p,q)的值就是在(p,q)處共線的點的個數(shù),(p,q)的值就是圖像空間中直線的斜率和截距,由斜率得到圖像編碼區(qū)水平邊緣角度。3.5 字符切割通過對編碼字符區(qū)直接進行水平掃描,由字符間距一般可以將字符區(qū)域分割出來。也可以通過對編碼字符區(qū)做垂直方向投影運算,根據(jù)字符大致寬度與字符總數(shù),對字符進行切割。如圖5所示是編碼字符區(qū)及對應(yīng)垂直投影圖。 圖5 編碼字符及對應(yīng)垂直投影 圖6 線性插值示意圖3.6 字符歸一化處理對分割出的字符從四個方向掃描,確定字符邊界,然后采用線性插值方法對每個字符作歸一化處理,使每個字符歸一為32×16點陣。圖6為線性插值示意圖,根據(jù)線性原理,f
10、(x1)可由公式(2)計算: (2)4識別算法設(shè)計字符識別一般采取特征判別或模板匹配的方法,特征判別是根據(jù)特征抽取的程度分階段的、用結(jié)構(gòu)分析的辦法完成字符的識別。模板匹配即是根據(jù)字符的知識采取按形匹配的方法,模板匹配一般分為兩類:一類是直接利用輸入的二維平面圖像與字典中記憶的圖形進行匹配;另一類是抽出部分特征與字典進行匹配。輪胎編碼圖像中字符僅涉及部分英文字符和10個阿拉伯數(shù)字,字符較少,結(jié)構(gòu)相對簡單,因此具體識別時,既可以采用圖形匹配的方法,也可以采用結(jié)構(gòu)分析的方法。但由于輪胎上編碼字符有一定變形,且有斷裂現(xiàn)象,所以直接模板匹配與直接特征抽取方法識別率都不理想,本系統(tǒng)使用了模板匹配與特征識別
11、相結(jié)合的基于特征加權(quán)的模板匹配識別算法,其字符識別率比簡單模板匹配算法和特征識別算法識別率都有不同程度的提高?;谔卣骷訖?quán)的模板匹配識別算法基本思路是:給模板中有字符筆畫的點分配不同的權(quán)重,位于筆畫中心的點權(quán)重最高,位于筆畫邊緣的點權(quán)重最低,然后將樣本模板與標準模板逐點模糊匹配,按模糊識別規(guī)則識別。 5結(jié)論本本文結(jié)合輪胎編碼識別系統(tǒng)的實現(xiàn)對在線圖像字符編碼識別系統(tǒng)的設(shè)計進行了闡述,提出了一種模板匹配與特征匹配相結(jié)合的識別算法,該方法對傳統(tǒng)的模板匹配算法進行了改進,提高了變形、斷裂等字符的識別率。這種方法在試驗中得到了驗證,取得了令人滿意的效果。文結(jié)合輪胎編碼識別系統(tǒng)的實現(xiàn)對在線圖像字符編碼識別
12、系統(tǒng)的設(shè)計進行了闡述,提出了一種模板匹配與特征匹配相結(jié)合的識別算法,該方法對傳統(tǒng)的模板匹配算法進行了改進,提高了變形、斷裂等字符的識別率。這種方法在試驗中得到了驗證,取得了令人滿意的效果。外文原文(復(fù)印件)The Development of A Kind of Online Image Code Recognition SystemAbstract: This paper describes the design and the implement of online image coding char recognition system. It analyses and research
13、es the important contents about the system. Then it provides the solutions of main problems. In recognition algorithm, combining template matching with feature recognition, it put forword an improved template matching algorithm based on feature weights. The algorithm can obviously improve the char r
14、ecognition ratio.Keyword: image processing; pattern recognition; feature weights; software design0 IntroductionsCharacter recognition 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 au
15、tomatic identification, automatic reading papers, reports, automatic processing, because of this online image coded character recognition has some common, this paper online tire coding character recognition system for the general image coding character recognition system has been elaborated on the k
16、ey link of the research and analysis, the method of the other online image coded character system Development of guiding significance.1 An online image coding identification system processesOnline image coding character recognition system includes digital image capture, storage, image preprocessing,
17、 encoding the image extraction, feature extraction coding, coding identification and follow-up treatment of some aspects of its flow chart shown in Figure 1.Image preprocessingFollow-up treatmentFeaExtraction and Identification CodeCoded image capture and storageFigure 1-line character recognition i
18、mage coding system flowchartOnline tire image coding character recognition system requires the production pipeline through 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 i
19、dentify each coded character. Tire coding characters as a certain deformation in the tires, and different camera angles, are 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
20、 StorageLine coding commonly used digital camera images, digital cameras, digital video cameras capture and processed in computer, the system uses QuickCamPro4000 tire coding digital camera image capture, directly from JPG format.Coded images generally must first convert BMP image format, because th
21、e BMP format has become the de facto standard PC in the field - almost all of the Windows operating system designed for image 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 Wi
22、ndows supported screen resolution and color combination. Under normal circumstances, in order to ensure the display of high 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 head
23、er, palette, bitmap data area of four parts, bitmap file header from 14 bytes constitute the bitmap header from 40 bytes composition, 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 ima
24、ge 1024 bytes total, 224-color images without color palette, the bitmap data from the region under the order of the data by 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
25、geometry correction, image coding region of extraction, encoding image binarization, character segmentation, character normalization 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, whe
26、re the need to convert first color-coded images to grayscale. In the RGB color model, if R = G = B, then color (R, G, B) indicates 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 proces
27、s. Gray-scale processing methods are commonly used weighted average method, that is,R = G = B = (WRR + WGG + WBB) / 3Which, 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 mos
28、t reasonable grayscale.3.2 image enhancement processing3.2.1 Direct gray-scale transformation linear gray level transformation: 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 l
29、inear law, the transformed image g (x, y) as: (1) nonlinear transformation - log transformation and exponential transformation: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
30、.2.2 smoothing filter - Noise ReductionAs the noise in the area corresponding to the edge of the image gray value of such 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
31、 to the larger goal of the extraction prior to removal of the smaller details or to target the small interruption link.Smoothing 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
32、× 3 template, this template and image in pixels by the following method of convolution , get smooth image noise reduction. 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 c
33、orresponding pixel; add all the product; It will assign the figure corresponds to the template and the center of the pixel.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 pi
34、xel values given to the center pixel. Median filter can effectively remove the random noise, can get a better visual effect.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 o
35、f a large area, rather than the local derivative of the edge of the small. As the digital image is discrete, not the derivative, convolution method can replace the differential with the differential approximation.Is better Sobel edge detection algorithm is operator. Sobel operator is a gradient ampl
36、itude, respectively, using vertical operator Sx, Sy operator to obtain the level of the coding region of the vertical edges 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 resul
37、ts.-101-202-101121000-1-2-1Figure 2 smoothing filter template Figure 3 Sobel edge detection templateFigure 4Sobeledgedetection 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 transformat
38、ion can be corrected.Hough transform to the image space XY of the line (y = px + q) parameter space detection problem is 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
39、over all possible values, according to linear equation q =- xp + y to calculate the corresponding q, on the Sum (p, q) to 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
40、angle of the edge image coding standard.3.5 Character CuttingCoded character area on the level of scanning directly from 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
41、character less the total number of characters to be cut. Figure 5 is a coded character areas and the corresponding vertical projection.Figure 5 encoded characters and the corresponding Figure 6 Schematic diagram of vertical projection linear interpolation3.6 Character normalizationThe character of t
42、he segmented into four scans to determine the character boundaries, and then use linear interpolation for each character 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
43、(2) Calculation: (2)4 Identification algorithmTo determine the general characteristics of character recognition or template matching method, Feature identification is based on the degree of feature extraction stages, complete with a structural analysis approach to character recognition. Template mat
44、ching 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
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 數(shù)學課題 申報書
- 專項課題申報書
- 產(chǎn)科科研課題申報書
- 口腔教改課題申報書范文
- 益智課題申報書范文
- 和老外合同范例
- 課題申報書范例范文
- 代替舊合同新合同范例
- 教育范式 課題申報書
- 原液供貨合同范本
- 營銷部安全生產(chǎn)責任制
- 【講座】高三英語高效二輪備考講座課件
- 2022-2023學年遼寧省鞍山市普通高中高一年級下冊學期第一次月考數(shù)學(A卷)試題【含答案】
- 2022年安徽醫(yī)科大學第一附屬醫(yī)院臨床醫(yī)技、護理、管理崗位招聘187人筆試備考題庫及答案解析
- 弟子規(guī)42+用人物須明求+教案
- 微電網(wǎng)-儲能電池catl pet80ah電芯規(guī)格書
- GB/T 4209-2022工業(yè)硅酸鈉
- 2023年江蘇農(nóng)林職業(yè)技術(shù)學院高職單招(數(shù)學)試題庫含答案解析
- GB/T 39242-2020無損檢測超聲檢測靈敏度和范圍設(shè)定
- GB/T 32271-2015電梯能量回饋裝置
- GB/T 18775-2009電梯、自動扶梯和自動人行道維修規(guī)范
評論
0/150
提交評論