TWI567655B - Object of two - dimensional code discrimination method - Google Patents

Object of two - dimensional code discrimination method Download PDF

Info

Publication number
TWI567655B
TWI567655B TW105103746A TW105103746A TWI567655B TW I567655 B TWI567655 B TW I567655B TW 105103746 A TW105103746 A TW 105103746A TW 105103746 A TW105103746 A TW 105103746A TW I567655 B TWI567655 B TW I567655B
Authority
TW
Taiwan
Prior art keywords
image
dimensional code
grayscale
object according
decoding
Prior art date
Application number
TW105103746A
Other languages
Chinese (zh)
Other versions
TW201729143A (en
Inventor
Zhi-Wei Lin
Original Assignee
Calin Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Calin Technology Co Ltd filed Critical Calin Technology Co Ltd
Priority to TW105103746A priority Critical patent/TWI567655B/en
Application granted granted Critical
Publication of TWI567655B publication Critical patent/TWI567655B/en
Publication of TW201729143A publication Critical patent/TW201729143A/en

Links

Description

物件之二維碼辨視方法Two-dimensional code recognition method for objects

本發明係與影像辨視有關;特別是指一種物件之二維碼辨視方法。The invention relates to image recognition; in particular, to a two-dimensional code discrimination method for an object.

二維碼是以黑白矩形的資料點表示編碼後的資訊,在讀取二維碼時,係以掃描裝置掃描二維碼後進行解碼以取得二維碼所代表的資訊。二維碼的應用相當關廣泛,使用二維碼的物件,常見的有紙張、顯示幕。二維碼亦廣泛的應用於生產製造中,例如在所生產的物件上設置對應的二維碼,以作為物件的生產履歷追蹤之用。The two-dimensional code is a black and white rectangular data point indicating the encoded information. When the two-dimensional code is read, the scanning device scans the two-dimensional code and decodes it to obtain the information represented by the two-dimensional code. The application of the two-dimensional code is quite extensive, and the object using the two-dimensional code is commonly used with paper and display screens. The two-dimensional code is also widely used in manufacturing, for example, a corresponding two-dimensional code is set on the produced object to be used as a production history tracking of the object.

然,物件上的二維碼圖形發生模糊或變形的情形,則有可能會造成二維碼解碼失敗。以黑色塑膠材質的物件為列,在該物件上以雷射雕刻上二維碼後,由於雷射雕刻的過程中所產生的溫度會讓塑膠材質軟化,而造成二維碼圖形上的資料點產生變形,因此,該物件上的二維碼之解碼很容易失敗。其次,該物件為黑色,不易反光,更增加解碼的難度。However, if the two-dimensional code pattern on the object is blurred or deformed, the decoding of the two-dimensional code may fail. The black plastic material is used as a column. After the two-dimensional code is laser-engraved on the object, the temperature generated during the laser engraving will soften the plastic material, resulting in the data point on the two-dimensional code graphic. Deformation occurs, so the decoding of the QR code on the object is prone to failure. Secondly, the object is black, not easy to reflect, and the difficulty of decoding is increased.

有鑑於此,本發明之目的在於提供一種物件之二維碼辨視方法,可有效提高物件上二維碼解碼成功的機率。In view of this, the object of the present invention is to provide a two-dimensional code discrimination method for an object, which can effectively improve the probability of successful decoding of the two-dimensional code on the object.

緣以達成上述目的,本發明提供的一種物件之二維碼辨視方法,其中該物件具有一二維碼,該方法包含有下列步驟:In order to achieve the above object, the present invention provides a two-dimensional code discrimination method for an object, wherein the object has a two-dimensional code, and the method comprises the following steps:

A、擷取該物件之二維碼的影像;A. capturing an image of the two-dimensional code of the object;

B、對步驟A之影像進行伽瑪值調整;B. Perform gamma adjustment on the image of step A;

C、對步驟B處理後之影像依序進行平滑處理、邊緣偵測、灰階對比增強;C. Smoothing, edge detection, and grayscale contrast enhancement of the image processed in step B;

D、對步驟C灰階對比增強後之影像進行影像分割;D. Perform image segmentation on the image after step C grayscale contrast enhancement;

E、對步驟D處理後之影像依序進行影像二值化處理、侵蝕處理、膨脹處理;E. Perform image binarization processing, erosion treatment, and expansion processing on the image processed in step D;

F、對步驟E膨脹處理後之影像進行物件分析,以獲得一特徵影像;F. Perform object analysis on the image after the step E expansion process to obtain a feature image;

G、對該特徵影像進行侵蝕處理、膨脹處理,以獲得一第一影像;G, performing erosion processing and expansion processing on the characteristic image to obtain a first image;

H、對該第一影像進行匹配濾波(Dot Matched Filter),以獲得一第二影像;H, performing a Dot Matched Filter on the first image to obtain a second image;

I、將該第一影像與該第二影像進行影像相減後,再進行灰階對比增強以獲得一第三影像;以及I, after subtracting the image from the first image and the second image, performing grayscale contrast enhancement to obtain a third image;

J、對該第三影像進行該二維碼的解碼。J. Decoding the two-dimensional code for the third image.

本發明之效果在於對物件之原始影像進行一連串的影像處理,可有效改善習知技術中因二維碼模糊而造成解碼不易的缺失,提高物件上二維碼解碼成功的機率。The effect of the invention is that a series of image processing is performed on the original image of the object, which can effectively improve the lack of decoding caused by the two-dimensional code blur in the prior art, and improve the probability of successful decoding of the two-dimensional code on the object.

為能更清楚地說明本發明,茲舉一較佳實施例並配合圖式詳細說明如後。請參圖1所示,為應用本發明一較佳實施例之物件之二維碼辨視方法的一影像辦視系統,包括有一攝影機10、一影像處理裝置20、一反光罩30與一光源40,該影像辦視系統用以辨視一以鏡筒50為例之物件上的二維碼,本實施例中,該鏡筒50材質為黑色的塑膠,且該二維碼係以雷射雕刻於該鏡筒50的背部,以供生產履歷追蹤之用。In order to explain the present invention more clearly, a preferred embodiment will be described in detail with reference to the drawings. Referring to FIG. 1 , an image processing system for applying a two-dimensional code identification method for an object according to a preferred embodiment of the present invention includes a camera 10 , an image processing device 20 , a reflector 30 and a light source . 40. The image viewing system is configured to recognize a two-dimensional code on the object of the lens barrel 50. In the embodiment, the lens barrel 50 is made of black plastic, and the two-dimensional code is laser. Engraved on the back of the lens barrel 50 for production history tracking.

該攝影機10用以擷取該鏡筒50的影像。該影像處理裝置20為電腦且電性連接該攝影機10,用以接收該攝影機10擷取的影像並進行影像處理及辨視該二維碼,本實施例中,影像處理之演算法函式庫是使用由Matrox Imaging Library MIL 9.0。該反光罩30具有相對的一第一開口302與一第二開口304,且該反光罩30係由該第一開口302往該第二開口304的方向漸擴,該反光罩30的內表面呈弧面且用以將光線往該第二開口304的方向反射。該光源40用以提供光線,該光源於本實施例為環狀光源,但不以此為限,亦可以是多個發光元件組成。The camera 10 is used to capture an image of the lens barrel 50. The image processing device 20 is a computer and is electrically connected to the camera 10 for receiving the image captured by the camera 10, performing image processing and discriminating the two-dimensional code. In this embodiment, the image processing algorithm library It is used by Matrox Imaging Library MIL 9.0. The reflector 30 has a first opening 302 and a second opening 304. The reflector 30 is gradually expanded from the first opening 302 toward the second opening 304. The inner surface of the reflector 30 is The curved surface is used to reflect light toward the second opening 304. The light source 40 is used to provide light. The light source is an annular light source in this embodiment, but is not limited thereto, and may be composed of a plurality of light emitting elements.

本實施例物件之二維碼辨視方法包含圖2及圖3所示之下列步驟:The two-dimensional code discrimination method of the object of the embodiment includes the following steps as shown in FIG. 2 and FIG. 3:

架設該攝影機10、該反光罩30及該光源40。將該攝影機10的鏡頭102置於該反光罩30的第一開口302中,且將該光源40設置於該反光罩30內部且環繞於該第二開口304,使該光源40所發出的光線照射於該反光罩30內表面,且經該反光罩30的內表面反射而往該第二開口304射出。The camera 10, the reflector 30, and the light source 40 are mounted. The lens 102 of the camera 10 is placed in the first opening 302 of the reflector 30, and the light source 40 is disposed inside the reflector 30 and surrounds the second opening 304 to illuminate the light emitted by the light source 40. The inner surface of the reflector 30 is reflected by the inner surface of the reflector 30 and is emitted toward the second opening 304.

將該鏡筒50置於對應該反光罩30之第二開口304的位置,使該鏡筒50的背部面對該第二開口304。藉此,該光源40所發出的光線可以集中照射該第二開口304對應的區域,讓該鏡筒50的背部獲得較多的光線。The lens barrel 50 is placed at a position corresponding to the second opening 304 of the reflector 30 such that the back of the lens barrel 50 faces the second opening 304. Thereby, the light emitted by the light source 40 can illuminate the corresponding area of the second opening 304 to obtain more light on the back of the lens barrel 50.

該影像處理裝置20啟動該攝影機10擷取該鏡筒50之影像,且所擷取的影像傳送至該影像處理裝置20,原始影像如圖4所示,該鏡筒50之影像中包括該二維碼52的影像,該二維碼52的影像由複數個資料點所構成,每一個資料點包括多個像素。The image processing device 20 activates the camera 10 to capture the image of the lens barrel 50, and the captured image is transmitted to the image processing device 20. The original image is as shown in FIG. 4, and the image of the lens barrel 50 includes the second image. The image of the dimension code 52, the image of the two-dimensional code 52 is composed of a plurality of data points, each of which includes a plurality of pixels.

接著,該影像處理裝置20執行下列影像處理之步驟:Next, the image processing device 20 performs the following steps of image processing:

對所擷取的原始影像進行伽瑪(Gamma)值調整,以改變原始影像的動態範圍,讓該二維碼52之區域可被找出,所調整的伽瑪值範圍為1.1~2.2。於本實施例中,伽瑪值較佳者為2.19,調整後的影像如圖5所示。The gamma value of the original image captured is adjusted to change the dynamic range of the original image, so that the area of the two-dimensional code 52 can be found, and the adjusted gamma value ranges from 1.1 to 2.2. In this embodiment, the gamma value is preferably 2.19, and the adjusted image is as shown in FIG. 5.

續對調整伽瑪值後的影像的全局域依序進行平滑處理(Smoothing)、邊緣偵測、及灰階對比增強。灰階對比增強之參數為:影像灰階差倍率之範圍為1.0~3.0,影像灰階差為-128~128,影像灰階增強為0.01~0.2。較佳者,影像灰階差倍率為1.3,影像灰階差為-42,影像灰階增強為0.032。The global domain of the image after adjusting the gamma value is continuously smoothed (Smoothing), edge detected, and grayscale contrast enhanced. The gray scale contrast enhancement parameters are: the gray scale difference magnification of the image is 1.0~3.0, the gray scale difference of the image is -128~128, and the gray scale enhancement of the image is 0.01~0.2. Preferably, the image grayscale difference is 1.3, the image grayscale difference is -42, and the image grayscale enhancement is 0.032.

對灰階對比增強後的影像進行影像分割,影像分割的目的在於對影像中二維碼52中局部相連的區域分割,以凸顯出該二維碼52的特徵,便於後續的物件分析。本實施例中係以分水嶺(Watershed)演算法對影像進行影像分割,分水嶺演算法的參數為:Watershed Variation為1~255,Watershed Threshold為1~255。較佳者,Watershed Variation為13,Watershed Threshold為60~255,經影像分割處理後的影像如圖6所示。The image segmentation is performed on the grayscale contrast enhanced image. The purpose of the image segmentation is to segment the locally connected regions in the two-dimensional code 52 in the image to highlight the features of the two-dimensional code 52, which facilitates subsequent object analysis. In this embodiment, the image is segmented by a watershed algorithm. The parameters of the watershed algorithm are: Watershed Variation is 1~255, and Watershed Threshold is 1~255. Preferably, the Watershed Variation is 13, and the Watershed Threshold is 60-255. The image after image segmentation is shown in FIG. 6.

再對影像分割處理後的影像依序進行影像二值化處理、侵蝕處理、膨脹處理,藉以去除影像中部分的雜點。The image after the image segmentation process is sequentially subjected to image binarization processing, erosion processing, and expansion processing to remove some of the noise in the image.

而後,對膨脹處理後的影像進行物件分析,以獲得該二維碼52的一特徵影像;本實施例中係以二進位主要目標分析(binary large object analysis,blob analysis)演算法對影像進行物件分析,其目的在經前一步驟處理的影像仍可能會有些許的雜點殘留,藉由物件分析可選出屬於該二維碼的資料點。二進位主要目標分析演算法的參數為:Blob Area為5000~25000,Blob FeretX範圍為30~180,Blob FeretY範圍為30~180。較佳者Blob Area為5000~12000,Blob FeretX範圍為50~150,Blob FeretY範圍為50~150。Then, object analysis is performed on the image after the expansion process to obtain a feature image of the two-dimensional code 52. In this embodiment, the image is imaged by a binary large object analysis (blob analysis) algorithm. Analysis, the purpose of the image processed in the previous step may still be a little bit of residual, by object analysis to select the data points belonging to the QR code. The parameters of the binary target analysis algorithm are: Blob Area is 5000~25000, Blob FeretX range is 30~180, and Blob FeretY range is 30~180. The preferred Blob Area is 5000~12000, the Blob FeretX range is 50~150, and the Blob FeretY range is 50~150.

對該特徵影像進行侵蝕處理、膨脹處理,以獲得一第一影像,再對該第一影像進行匹配濾波(Matched Filter),以獲得一第二影像,其中,進行匹配濾波的目的在於,增強影像中該二維碼52之資料點的特徵,抑制非資料點之雜點。Performing erosion processing and expansion processing on the feature image to obtain a first image, and then performing a matched filter on the first image to obtain a second image, wherein the purpose of the matched filtering is to enhance the image. The feature of the data point of the two-dimensional code 52 suppresses the noise of the non-data point.

最後,進行影像相減處理,將該第一影像減去第二影像,以加強影像的對比,再進行灰階對比增強,以獲得一第三影像。此步驟中,灰階對比增強主要是針對該二進碼52進行影像處理,灰階對比增強之參數為:影像灰階差倍率之範圍為1.0~3.0,影像灰階差為-128~128,影像灰階增強為0.01~0.2。較佳者,影像灰階差倍率為1.3,影像灰階差為-42,影像灰階增強為0.032。該第三影像中該二維碼52的區域如圖7所示。Finally, performing image subtraction processing, subtracting the second image from the first image to enhance contrast of the image, and performing grayscale contrast enhancement to obtain a third image. In this step, the grayscale contrast enhancement is mainly for image processing of the binary code 52. The grayscale contrast enhancement parameters are: the grayscale difference magnification of the image ranges from 1.0 to 3.0, and the grayscale difference of the image is -128 to 128. The image grayscale enhancement is 0.01~0.2. Preferably, the image grayscale difference is 1.3, the image grayscale difference is -42, and the image grayscale enhancement is 0.032. The area of the two-dimensional code 52 in the third image is as shown in FIG.

完成前述影像處理的步驟後,該影像處理裝置20對該第三影像中的該二維碼52的區域進行二維碼52的解碼,並判斷解碼是否成功:After the step of performing the image processing, the image processing device 20 performs decoding of the two-dimensional code 52 on the region of the two-dimensional code 52 in the third image, and determines whether the decoding is successful:

若是,則取得該二維碼52中所包含的資訊,並結束辨識方法。If so, the information included in the two-dimensional code 52 is obtained, and the identification method is ended.

若否,則該影像處理裝置20進一步對該第三影像進行以下的步驟(圖3參照),其中:If not, the image processing device 20 further performs the following steps (refer to FIG. 3) for the third image, wherein:

該影像處理裝置20以一影像金字塔演算法,將該第三影像縮小為一預定層數的複數個影像層級之影像,茲定義該些影像層級之影像尺寸最大之一者為一第一影像層級之影像,尺寸次大者為一第二影像層級之影像,以此列推。本實施例中係以高斯影像金字塔將該第三影像的長寬各縮小一半形成該第一影像層級之影像,而第二影像層級之影像的長寬又為第一影像層級之影像的長寬的一半,以此列推。由於影像被縮小,該第一影像層級之影像中該二維碼52的資料點被縮小,使影像中的雜點亦被縮小而不易被判斷為是屬於該二維碼52的資料點。The image processing device 20 reduces the third image to a predetermined number of image level images by an image pyramid algorithm, and defines one of the image size levels to be a first image level. The image of the second largest image is the image of the second image level. In this embodiment, the length and width of the third image are each reduced by half by a Gaussian image pyramid to form an image of the first image level, and the length and width of the image of the second image level are the length and width of the image of the first image level. Half of this, pushed by this column. Since the image is reduced, the data point of the two-dimensional code 52 in the image of the first image level is reduced, so that the noise points in the image are also reduced and are not easily judged as belonging to the data point of the two-dimensional code 52.

對該第一影像層級之影像進行該二維碼52的解碼,並判斷解碼是否成功:Decoding the two-dimensional code 52 on the image of the first image level, and determining whether the decoding is successful:

若是,則取得該二維碼52中所包含的資訊,並結束辨識方法。If so, the information included in the two-dimensional code 52 is obtained, and the identification method is ended.

若否,則進行以下的步驟,其中:If no, proceed to the following steps, where:

在可容許的範圍內調整該二維碼52之該些資料點之間的間距,以形成一第四影像,續對該第四影像進行該二維碼52的解碼,並判斷解碼是否成功:Adjusting the spacing between the data points of the two-dimensional code 52 within an allowable range to form a fourth image, and continuing to decode the two-dimensional code 52 for the fourth image, and determining whether the decoding is successful:

若是,則取得該二維碼52中所包含的資訊,並結束辨識方法。If so, the information included in the two-dimensional code 52 is obtained, and the identification method is ended.

若否,則對該第二影像層級之影像進行該二維碼52的解碼,並判斷解碼是否成功:If not, decoding the two-dimensional code 52 on the image of the second image level, and determining whether the decoding is successful:

若是,則取得該二維碼52中所包含的資訊,並結束辨識方法。If so, the information included in the two-dimensional code 52 is obtained, and the identification method is ended.

若否,則再調整該二維碼52之該些資料點的間距,再行解碼,若解碼不成功則至少重覆一次對下一影像層級像之影像進行該二維碼52解碼或調整該二維碼52之資料點的間距後的解碼,直到解碼成功或對最後一個影像層級的影像執行完調整該二維碼52之資料點的間距後的解碼為止。若所有影像層級的層數進行前述之步驟後仍無法解碼,則判定為無法辨視該二維碼52,並結束辨識方法。If not, the distance between the data points of the two-dimensional code 52 is further adjusted, and then decoded. If the decoding is unsuccessful, the two-dimensional code 52 is decoded or adjusted at least once for the image of the next image level image. The decoding after the spacing of the data points of the two-dimensional code 52 is until the decoding is successful or the decoding of the data point of the two-dimensional code 52 is performed after the decoding of the image of the last image level is performed. If the number of layers in all image levels cannot be decoded after performing the above steps, it is determined that the two-dimensional code 52 cannot be recognized, and the identification method is ended.

據上所述,本發明藉由對物件之原始影像進行一連串的影像處理流程,可有效改善習知技術中因二維碼模糊或變形而造成解碼不易的缺失,提高物件上二維碼解碼成功的機率。此外,本發明藉由反光罩反射光源發出的光線,可以將光源集中照射於物件之二維碼上,讓二維碼之影像更為清晰,增加解碼成功的機會。According to the above description, the present invention can effectively improve the lack of decoding caused by the blurring or deformation of the two-dimensional code in the prior art by performing a series of image processing processes on the original image of the object, and improve the decoding of the two-dimensional code on the object. The chance. In addition, the present invention reflects the light emitted by the light source by the reflector, and can illuminate the light source on the two-dimensional code of the object to make the image of the two-dimensional code clearer and increase the chance of successful decoding.

以上所述僅為本發明較佳可行實施例而已,舉凡應用本發明說明書及申請專利範圍所為之等效變化,理應包含在本發明之專利範圍內。The above is only a preferred embodiment of the present invention, and equivalent changes to the scope of the present invention and the scope of the patent application are intended to be included in the scope of the present invention.

[本發明]
10‧‧‧攝影機
102‧‧‧鏡頭
20‧‧‧影像處理裝置
30‧‧‧反光罩
302‧‧‧第一開口
304‧‧‧第二開口
40‧‧‧光源
50‧‧‧鏡筒
52‧‧‧二維碼
[this invention]
10‧‧‧ camera
102‧‧‧ lens
20‧‧‧Image processing device
30‧‧‧Reflector
302‧‧‧ first opening
304‧‧‧second opening
40‧‧‧Light source
50‧‧‧Mirror tube
52‧‧‧ QR code

圖1為本發明一較佳實施例之影像辦視系統示意圖。 圖2、圖3為上述較佳實施例物件之二維碼辨視方法流程圖。 圖4為鏡筒之原始影像。 圖5為經伽瑪值調整後之鏡筒的影像。 圖6為經分水演算法進行影像分割後之鏡筒的影像。 圖7為第三影像中該二維碼的區域之影像。1 is a schematic diagram of an image viewing system according to a preferred embodiment of the present invention. 2 and 3 are flow charts of a two-dimensional code discrimination method for the object of the above preferred embodiment. Figure 4 shows the original image of the lens barrel. Fig. 5 is an image of a lens barrel adjusted by a gamma value. FIG. 6 is an image of a lens barrel after image segmentation by a water division algorithm. Figure 7 is an image of a region of the two-dimensional code in the third image.

Claims (17)

一種物件之二維碼辨視方法,其中該物件具有一二維碼,該方法包含有下列步驟: A、擷取該物件之二維碼的影像; B、對步驟A之影像進行伽瑪值調整; C、對步驟B處理後之影像依序進行平滑處理、邊緣偵測、灰階對比增強; D、對步驟C灰階對比增強後之影像進行影像分割; E、對步驟D處理後之影像依序進行影像二值化處理、侵蝕處理、膨脹處理; F、對步驟E膨脹處理後之影像進行物件分析,以獲得一特徵影像; G、對該特徵影像進行侵蝕處理、膨脹處理,以獲得一第一影像; H、對該第一影像進行匹配濾波,以獲得一第二影像; I、將該第一影像與該第二影像進行影像相減後,再進行灰階對比增強以獲得一第三影像;以及 J、對該第三影像進行該二維碼的解碼。A two-dimensional code discriminating method for an object, wherein the object has a two-dimensional code, the method comprising the following steps: A: capturing an image of the two-dimensional code of the object; B, performing gamma value on the image of step A Adjusting; C. Smoothing the image processed in step B, edge detection, and grayscale contrast enhancement; D. Perform image segmentation on the image after step C grayscale contrast enhancement; E. After processing step D The image is sequentially subjected to image binarization processing, erosion processing, and expansion processing; F. Performing object analysis on the image after step E expansion processing to obtain a feature image; G, performing erosion processing and expansion processing on the characteristic image to Obtaining a first image; H, performing matched filtering on the first image to obtain a second image; I, subtracting the image from the first image and the second image, and performing grayscale contrast enhancement to obtain a third image; and J, decoding the two-dimensional code for the third image. 如請求項1所述之物件之二維碼辨視方法,其中步驟J包括判斷該二維碼的解碼是否成功,若否,則進行下列步驟: K、使用一影像金字塔演算法,將該第三影像縮小為一第一影像層級之影像; L、對該第一影像層級之影像進行該二維碼的解碼。The method of claim 2, wherein the step J comprises determining whether the decoding of the two-dimensional code is successful, and if not, performing the following steps: K. using an image pyramid algorithm, the first The three images are reduced to an image of a first image level; L. The image of the first image level is decoded by the two-dimensional code. 如請求項2所述之物件之二維碼辨視方法,其中步驟K中縮小後的該第一影像層級之影像具有複數個資料點,該些點構成該二維碼,且步驟L包括: 判斷該二維碼的解碼是否成功,若否,則調整該些資料點之間的間距,以形成一第四影像,續對該第四影像進行該二維碼的解碼。The method of claim 2, wherein the reduced image of the first image level has a plurality of data points, the points constitute the two-dimensional code, and the step L comprises: Determining whether the decoding of the two-dimensional code is successful. If not, adjusting the spacing between the data points to form a fourth image, and continuing to decode the two-dimensional code for the fourth image. 如請求項3所述之物件之二維碼辨視方法,其中步驟K包括使用該影像金字塔演算法將該第三影像縮小為第二影像層級之影像,其中該第二影像層級之影像尺寸小於該第一影像層級之影像尺寸;步驟L中包括判斷該二維碼的解碼是否成功,若否,則對該第二影像層級之影像進行該二維碼的解碼。The method of claim 2, wherein the step K comprises using the image pyramid algorithm to reduce the third image to an image of a second image level, wherein the image size of the second image level is smaller than The image size of the first image level; the step L includes determining whether the decoding of the two-dimensional code is successful, and if not, decoding the two-dimensional code of the image of the second image level. 如請求項1所述之物件之二維碼辨視方法,其中步驟D中係以分水嶺演算法對步驟C灰階對比增強後之影像進行影像分割。The method for discriminating the two-dimensional code of the object according to claim 1, wherein in step D, the image is segmented by the watershed algorithm after the grayscale contrast enhancement. 如請求項5所述之物件之二維碼辨視方法,其中於步驟D中,分水嶺演算法的參數為:Watershed Variation為1~255,Watershed Threshold為1~255。The method for determining the two-dimensional code of the object according to claim 5, wherein in the step D, the parameters of the watershed algorithm are: Watershed Variation is 1~255, and Watershed Threshold is 1~255. 如請求項6所述之物件之二維碼辨視方法,其中於步驟D中,Watershed Variation為13,Watershed Threshold為60~255。The method according to claim 6, wherein the watershed variation is 13 and the Watershed Threshold is 60 to 255. 如請求項1所述之物件之二維碼辨視方法,其中步驟F中係以二進位主要目標分析演算法對步驟E膨脹處理後之影像進行物件分析。The two-dimensional code discriminating method for the object according to claim 1, wherein in step F, the object analysis is performed on the image after the step E is expanded by the binary main target analysis algorithm. 如請求項8所述之物件之二維碼辨視方法,其中於步驟F中,二進位主要目標分析演算法的參數為:Blob Area為5000~25000,Blob FeretX範圍為30~180,Blob FeretY範圍為30~180。The method for determining the two-dimensional code of the object according to claim 8, wherein in step F, the parameters of the binary main target analysis algorithm are: Blob Area is 5000~25000, Blob FeretX ranges from 30~180, Blob FeretY The range is 30~180. 如請求項9所述之物件之二維碼辨視方法,其中於步驟F中,Blob Area為5000~12000,Blob FeretX範圍為50~150,Blob FeretY範圍為50~150。The method for discriminating the two-dimensional code of the object according to claim 9, wherein in the step F, the Blob Area is 5000 to 12000, the Blob FeretX is 50 to 150, and the Blob FeretY is 50 to 150. 如請求項1所述之物件之二維碼辨視方法,其中於步驟B中,伽瑪值範圍為1.1~2.2。The method for identifying a two-dimensional code of the object according to claim 1, wherein in step B, the gamma value ranges from 1.1 to 2.2. 如請求項11所述之物件之二維碼辨視方法,其中於步驟B中,伽瑪值範圍為2.19。A two-dimensional code discriminating method for an object according to claim 11, wherein in step B, the gamma value ranges from 2.19. 如請求項1所述之物件之二維碼辨視方法,其中於步驟C中,灰階對比增強之參數為:影像灰階差倍率之範圍為1.0~3.0,影像灰階差為-128~128,影像灰階增強為0.01~0.2。The method for discriminating the two-dimensional code of the object according to claim 1, wherein in step C, the grayscale contrast enhancement parameter is: the grayscale difference magnification of the image ranges from 1.0 to 3.0, and the grayscale difference of the image is -128~ 128, the image gray scale enhancement is 0.01~0.2. 如請求項13所述之物件之二維碼辨視方法,其中於步驟C中,灰階對比增強之參數為:影像灰階差倍率為1.3,影像灰階差為-42,影像灰階增強為0.032。The method for discriminating the two-dimensional code of the object according to claim 13, wherein in step C, the parameters of the grayscale contrast enhancement are: an image grayscale difference magnification of 1.3, an image grayscale difference of -42, and an image grayscale enhancement Is 0.032. 如請求項1所述之物件之二維碼辨視方法,其中於步驟I中,灰階對比增強之參數為:影像灰階差倍率之範圍為1.0~3.0,影像灰階差為-128~128,影像灰階增強為0.01~0.2。The method for discriminating the two-dimensional code of the object according to claim 1, wherein in step I, the grayscale contrast enhancement parameter is: the grayscale difference magnification of the image ranges from 1.0 to 3.0, and the grayscale difference of the image is -128~ 128, the image gray scale enhancement is 0.01~0.2. 如請求項15所述之物件之二維碼辨視方法,其中於步驟I中,灰階對比增強之參數為:影像灰階差倍率為1.3,影像灰階差為-42,影像灰階增強為0.032。The method for identifying a two-dimensional code of the object according to claim 15, wherein in step I, the grayscale contrast enhancement parameter is: an image grayscale difference magnification of 1.3, an image grayscale difference of -42, and an image grayscale enhancement. Is 0.032. 如請求項1所述之物件之二維碼辨視方法,其中於步驟A中包含: 提供一攝影機、一反光罩與至少一光源,其中該反光罩具有相對的一第一開口與一第二開口,且該反光罩具有一內表面,該內表面係用以反射光線者; 將該攝影機的鏡頭置於該反光罩的第一開口中,且將該光源設置於該反光罩內部,使該光源所發出的光線經該反光罩的內表面反射而往該第二開口射出; 將該物件置於對應該第二開口的位置;及 以該攝影機擷取該物件之二維碼的影像。The method of claim 2, wherein the step A includes: providing a camera, a reflector, and at least one light source, wherein the reflector has a first opening and a second Opening, and the reflector has an inner surface for reflecting light; placing the lens of the camera in the first opening of the reflector, and placing the light source inside the reflector, so that The light emitted by the light source is reflected by the inner surface of the reflector to be emitted to the second opening; the object is placed at a position corresponding to the second opening; and the image of the two-dimensional code of the object is captured by the camera.
TW105103746A 2016-02-04 2016-02-04 Object of two - dimensional code discrimination method TWI567655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105103746A TWI567655B (en) 2016-02-04 2016-02-04 Object of two - dimensional code discrimination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105103746A TWI567655B (en) 2016-02-04 2016-02-04 Object of two - dimensional code discrimination method

Publications (2)

Publication Number Publication Date
TWI567655B true TWI567655B (en) 2017-01-21
TW201729143A TW201729143A (en) 2017-08-16

Family

ID=58407899

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105103746A TWI567655B (en) 2016-02-04 2016-02-04 Object of two - dimensional code discrimination method

Country Status (1)

Country Link
TW (1) TWI567655B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711223A (en) * 2018-12-28 2019-05-03 福州符号信息科技有限公司 A kind of promotion QR code decoding rate method and apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108596001B (en) * 2017-09-21 2021-02-02 北京三快在线科技有限公司 Two-dimensional code error correction decoding method and device, electronic equipment and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0825547A2 (en) * 1996-08-23 1998-02-25 Matsushita Electric Industrial Co., Ltd. Two-dimensional code reader
US20070175998A1 (en) * 2005-09-01 2007-08-02 Lev Zvi H System and method for reliable content access using a cellular/wireless device with imaging capabilities
CN101807257A (en) * 2010-05-12 2010-08-18 上海交通大学 Method for identifying information of image tag
TW201241753A (en) * 2011-04-14 2012-10-16 Zeon Corp Connect the mobile device and the hardware device on Internet directly by barcode scanning
US20130155474A1 (en) * 2008-01-18 2013-06-20 Mitek Systems Systems and methods for automatic image capture on a mobile device
TW201412029A (en) * 2012-09-10 2014-03-16 Cd Go Technology Co Coding system of 2D barcode

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0825547A2 (en) * 1996-08-23 1998-02-25 Matsushita Electric Industrial Co., Ltd. Two-dimensional code reader
US20070175998A1 (en) * 2005-09-01 2007-08-02 Lev Zvi H System and method for reliable content access using a cellular/wireless device with imaging capabilities
US20130155474A1 (en) * 2008-01-18 2013-06-20 Mitek Systems Systems and methods for automatic image capture on a mobile device
CN101807257A (en) * 2010-05-12 2010-08-18 上海交通大学 Method for identifying information of image tag
TW201241753A (en) * 2011-04-14 2012-10-16 Zeon Corp Connect the mobile device and the hardware device on Internet directly by barcode scanning
TW201412029A (en) * 2012-09-10 2014-03-16 Cd Go Technology Co Coding system of 2D barcode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711223A (en) * 2018-12-28 2019-05-03 福州符号信息科技有限公司 A kind of promotion QR code decoding rate method and apparatus

Also Published As

Publication number Publication date
TW201729143A (en) 2017-08-16

Similar Documents

Publication Publication Date Title
US10460413B2 (en) Feature-based signal localization in digital capture systems
US11194984B2 (en) Localization of machine-readable indicia in digital capture systems
KR102113911B1 (en) Feature extraction and matching and template update for biometric authentication
TWI706266B (en) Biometric system and computer-implemented method for biometrics
JP6945516B2 (en) Local tone mapping for symbol reading
US8977072B1 (en) Method and system for detecting and recognizing text in images
JP4232800B2 (en) Line noise elimination device, line noise elimination method, line noise elimination program
CN110569683B (en) Bar code detection method and bar code detection system
EP3462372B1 (en) System and method for detecting optical codes with damaged or incomplete finder patterns
US20120308089A1 (en) Method of biometric authentication by using pupil border and apparatus using the method
US9396422B1 (en) Methods and systems for localizing aztec codes
JP4518139B2 (en) Image processing device
JP2007156655A (en) Variable region detection apparatus and its method
El-Sayed et al. New edge detection technique based on the shannon entropy in gray level images
JPWO2017141802A1 (en) Image processing apparatus, character recognition apparatus, image processing method, and program recording medium
TWI567655B (en) Object of two - dimensional code discrimination method
JP2018096908A (en) Inspection device and inspection method
US9262665B2 (en) Decoding method and decoding processing device
JP3906221B2 (en) Image processing method and image processing apparatus
JP5264956B2 (en) Two-dimensional code reading apparatus and method
CN109448013B (en) QR code image binarization processing method with local uneven illumination
Abramov et al. Algorithms for detecting and tracking of objects with optical markers in 3D space
CN110660073B (en) Straight line edge recognition equipment
CN114845041B (en) Focusing method and device for nanoparticle imaging and storage medium
KR100713250B1 (en) A new character segmentation algorithm using edge projection