现代电子技术
現代電子技術
현대전자기술
MODERN ELECTRONICS TECHNIQUE
2014年
7期
56-58
,共3页
QR码%二值化%图像处理%灰度值
QR碼%二值化%圖像處理%灰度值
QR마%이치화%도상처리%회도치
QR code%binarization%image processing%gray level
对光照不均的QR码图像进行全局二值化处理后,会出现全白或全黑的误差区域,在局部二值化过程中会出现伪边界情况,并且计算时间也会变长。针对光照不均的QR码图像提出了一种改进的基于背景灰度的二值化算法。首先,根据二维码源图像大小进行分块处理,使用灰度估算公式对分块的灰度值进行计算。其次,使用联合插值算法产生背景灰度水平图像,然后用背景灰度水平图像替代源图像得到校正图像。最后,采用Ostu算法对校正图像进行二值化。实验结果表明,该算法能有效的校正光照不均的QR图像,并得到一个良好的二值化图像。
對光照不均的QR碼圖像進行全跼二值化處理後,會齣現全白或全黑的誤差區域,在跼部二值化過程中會齣現偽邊界情況,併且計算時間也會變長。針對光照不均的QR碼圖像提齣瞭一種改進的基于揹景灰度的二值化算法。首先,根據二維碼源圖像大小進行分塊處理,使用灰度估算公式對分塊的灰度值進行計算。其次,使用聯閤插值算法產生揹景灰度水平圖像,然後用揹景灰度水平圖像替代源圖像得到校正圖像。最後,採用Ostu算法對校正圖像進行二值化。實驗結果錶明,該算法能有效的校正光照不均的QR圖像,併得到一箇良好的二值化圖像。
대광조불균적QR마도상진행전국이치화처리후,회출현전백혹전흑적오차구역,재국부이치화과정중회출현위변계정황,병차계산시간야회변장。침대광조불균적QR마도상제출료일충개진적기우배경회도적이치화산법。수선,근거이유마원도상대소진행분괴처리,사용회도고산공식대분괴적회도치진행계산。기차,사용연합삽치산법산생배경회도수평도상,연후용배경회도수평도상체대원도상득도교정도상。최후,채용Ostu산법대교정도상진행이치화。실험결과표명,해산법능유효적교정광조불균적QR도상,병득도일개량호적이치화도상。
All white or all black error areas would occur to QR code image with uneven illumination after global binariza-tion processing. Pseudo-boundary would appear in the processing of local binarization,and the calculation time would be long. Aiming at the nonuniform illumination QR code image,an improved binarization algorithm is proposed,which is based on back-ground gray-level. Firstly,doing sub-block according to the size of the Qrcode image,and gray-level estimation formula is used for computing the gray-level value of each block. Secondly,joint interpolation algorithm is adopted to create the background gray-level image which is used to take the place of original image to get the corrected image. Finally,the Ostu algorithm is used for the corrected image binarization. Experiment result shows that the algorithm can effectively correct the uneven illumination QR code image and obtain a good binary image.