TW201939346A - Method, apparatus, and device for recognizing bar code - Google Patents

Method, apparatus, and device for recognizing bar code Download PDF

Info

Publication number
TW201939346A
TW201939346A TW107146919A TW107146919A TW201939346A TW 201939346 A TW201939346 A TW 201939346A TW 107146919 A TW107146919 A TW 107146919A TW 107146919 A TW107146919 A TW 107146919A TW 201939346 A TW201939346 A TW 201939346A
Authority
TW
Taiwan
Prior art keywords
image
barcode
preprocessing
processor
picture
Prior art date
Application number
TW107146919A
Other languages
Chinese (zh)
Inventor
楊磊磊
方剛
Original Assignee
香港商阿里巴巴集團服務有限公司
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 香港商阿里巴巴集團服務有限公司 filed Critical 香港商阿里巴巴集團服務有限公司
Publication of TW201939346A publication Critical patent/TW201939346A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)
  • Image Processing (AREA)

Abstract

Provided in an embodiment of the present description are a method, apparatus, and device for recognizing a bar code, the method comprising: acquiring an original bar code image; using an image processor to perform an image pre-processing operation on the original bar code image according to a pre-processing instruction so as to obtain a pre-processed bar code image; recognizing a target code value of the pre-processed bar code image.

Description

一種識別條碼的方法、裝置及設備Method, device and equipment for identifying bar code

本說明書實施例涉及資訊處理技術領域,特別涉及一種識別條碼的方法、裝置及設備。The embodiments of the present specification relate to the field of information processing technology, and in particular, to a method, a device, and a device for identifying a barcode.

隨著資訊數位化發展,條碼、二維條碼等條碼在生活中被廣泛使用,為我們的生活提供了便捷。例如,在結算商品的過程中,商家結算系統通過掃碼商品的條碼可以快速確定商品的名稱、價格等資訊。在支付過程中,通過行動設備的支付應用掃描商家提供的二維條碼可以向商家進行付款。在公共設施的使用態樣,通過行動設備的應用軟體掃描公共設施對應的二維條碼可以實現公共設施的借用、租賃、退還等操作。
圖1是現有的利用設備各部件識別條碼的示意圖。參照圖1,目前,具有條碼識別功能的應用軟體在識別條碼時,通常是先利用攝像裝置設備獲取條碼圖片,由於獲取的二維條碼圖片受到光線、褪色等影響,應用軟體需要對獲取的原始條碼圖片進行影像預處理,再識別預處理後的條碼圖片。由於獲取的條碼圖片的資料通常資料量比較大,例如,當圖片的輸入尺寸在1024像素*800像素時,影像的像素數在10萬左右,因此,影像預處理的運算量通常較大。由於應用軟體的運行都是依靠設備的中央處理器(Central Processing Unit,CPU)來實現,而使用者設備系統的交互式操作,例如應用頁面的切換、系統狀態的監聽、應用廣播的收發操作等,也需要依靠設備的CPU來實現,對前述的影像預處理會產生資源競爭,影響影像預處理的效率,降低了設備識別條碼的速率。因此,需要提供一種更快速的識別條碼的方法。
With the digital development of information, barcodes such as barcodes and two-dimensional barcodes are widely used in life, providing convenience for our lives. For example, in the process of settlement of goods, the merchant settlement system can quickly determine the name and price of the goods by scanning the barcode of the goods. In the payment process, the payment application of the mobile device can be used to scan the two-dimensional barcode provided by the merchant to make payment to the merchant. In the use of public facilities, scanning the two-dimensional bar code corresponding to public facilities through the application software of mobile devices can realize the borrowing, leasing, and return of public facilities.
FIG. 1 is a schematic diagram of identifying a bar code using each component of a conventional device. Referring to FIG. 1, at present, when an application software with a barcode recognition function recognizes a barcode, it usually uses a camera device to obtain a barcode picture. Since the obtained two-dimensional barcode picture is affected by light, fading, etc., the application software must The barcode image is pre-processed, and then the pre-processed barcode image is identified. Because the data of the obtained barcode image is usually relatively large, for example, when the input size of the image is 1024 pixels * 800 pixels, the number of pixels of the image is about 100,000, so the calculation amount of image preprocessing is usually large. Because the operation of application software is realized by the central processing unit (CPU) of the device, and the interactive operations of the user equipment system, such as the switching of application pages, the monitoring of system status, and the sending and receiving operations of application broadcasting, etc. It also needs to rely on the CPU of the device to implement it. The aforementioned image preprocessing will cause resource competition, affect the efficiency of image preprocessing, and reduce the rate of device barcode recognition. Therefore, there is a need to provide a faster method for identifying barcodes.

本說明書實施例的目的是提供一種識別條碼的方法、裝置及設備,可以提高設備識別條碼的速率。
本說明書實施例是這樣實現的:
一種識別條碼的方法,包括:
獲取原始條碼圖片;
利用影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作,得到預處理後條碼圖片;
識別所述預處理後條碼圖片的目標碼值。
一種識別條碼的設備,包括:記憶體和處理器;所述處理器包括中央處理器和影像處理器;所述記憶體儲存由所述處理器執行的電腦程式指令,執行所述電腦程式指令可以實現以下步驟:
所述中央處理器獲取原始條碼圖片;
所述影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片;
所述中央處理器識別所述預處理後條碼圖片的目標碼值。
一種識別條碼的裝置,包括:原始圖片獲取模組、預處理模組和碼值確定模組;
所述原始圖片獲取模組,用於獲取原始條碼圖片;
所述預處理模組,用於根據所述預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片;
所述碼值確定模組,用於識別出所述預處理後條碼圖片的目標碼值。
由以上可見,本說明書一個或多個實施例中,將對原始條碼圖片的預處理操作利用影像處理器來實現,由於影像處理器處理影像資料速度較快,可以提高條碼圖片的預處理速度。同時,利用影像處理器對原始條碼圖片進行預處理操作可以減少影像預處理操作對CPU資源的佔用,提高了CPU識別預處理後條碼圖片的效率。因此,本說明書提供的實施例利可以提高識別條碼的速率。
The purpose of the embodiments of the present specification is to provide a method, a device, and a device for identifying a barcode, which can increase the rate at which the device recognizes the barcode.
The embodiment of this specification is implemented as follows:
A method for identifying a barcode, including:
Get the original barcode picture;
Using an image processor to perform image preprocessing on the original barcode image according to a preprocessing instruction to obtain a preprocessed barcode image;
Identifying a target code value of the pre-processed barcode picture.
A device for identifying a barcode includes: a memory and a processor; the processor includes a central processing unit and an image processor; the memory stores computer program instructions executed by the processor, and the computer program instructions can be executed by the memory Implement the following steps:
The central processor obtains an original barcode picture;
Performing an image preprocessing operation on the original barcode image by the image processor according to a preprocessing instruction to obtain a preprocessed barcode image;
The central processor identifies a target code value of the pre-processed barcode picture.
A device for identifying a barcode, comprising: an original picture acquisition module, a preprocessing module, and a code value determination module;
The original picture obtaining module is used to obtain an original barcode picture;
The preprocessing module is configured to perform image preprocessing on the original barcode image according to the preprocessing instruction to obtain a preprocessed barcode image;
The code value determination module is configured to identify a target code value of the pre-processed barcode picture.
As can be seen from the above, in one or more embodiments of the present specification, the preprocessing operation of the original barcode image is implemented by an image processor. Since the image processor processes the image data faster, the preprocessing speed of the barcode image can be improved. At the same time, using the image processor to preprocess the original barcode image can reduce the CPU resources occupied by the image preprocessing operation and improve the CPU's efficiency in identifying the preprocessed barcode image. Therefore, the embodiments provided in this specification can improve the rate of identifying barcodes.

本說明書實施例提供一種識別條碼的方法、裝置及設備。
為了使本技術領域的人員更好地理解本說明書中的技術方案,下面將結合本說明書實施例中的附圖,對本說明書實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本說明書一部分實施例,而不是全部的實施例。基於本說明書中的實施例,本領域中具有通常知識者在沒有做出進步性勞動前提下所獲得的所有其他實施例,都應當屬於本說明書保護的範圍。
支付寶等應用軟體通過掃描二維條碼,可以實現收款、付款、添加好友等功能。這些應用軟體在通過掃描識別條碼的過程中,通常需要先對攝像裝置獲取的原始條碼圖片進行影像預處理,再識別預處理後的條碼圖片。一態樣現有的行動設備上的應用軟體執行上述預處理和識別的過程都需要利用CPU來實現,但是,行動設備上通常安裝有多個應用軟體,多個應用軟體的運行也都是依靠該設備的CPU來實現,因此,會和前述的影像預處理操作產生資源競爭,掃描識別條碼的應用無法完全利用設備的計算資源,會影響影像預處理的效率。另一態樣,由於攝像裝置獲取的條碼圖片的資料通常資料量比較大,利用CPU進行影像預處理時,較大的運算量需要佔用CPU的時長較多,也降低了設備識別條碼的速率。基於此,本說明書實施例中可以將對條碼圖片的預處理操作利用圖形處理晶片來實現,一態樣可以提高影像預處理的處理速度,另一態樣可以減少影像預處理操作對CPU資源的佔用,提高了CPU識別預處理後條碼圖片的效率,從而可以提高設備識別條碼的速率。
以下介紹本說明書一種識別條碼的方法的一種具體實施例。圖2是本說明書提供的利用設備各部件識別條碼的一個示意圖。圖3是本說明書提供的識別條碼的方法的一種實施例的流程示意圖,本說明書提供了如實施例或流程圖所述的方法操作步驟,但基於常規或者無進步性的勞動可以包括更多或者更少的操作步驟。實施例中列舉的步驟順序僅僅為眾多步驟執行順序中的一種方式,不代表唯一的執行順序。在實際中的系統或設備產品執行時,可以按照實施例或者附圖所示的方法順序執行或者平行執行(例如平行處理器或者多線程處理的環境)。具體的參照圖2和圖3,所述方法可以包括以下步驟。
S302:獲取原始條碼圖片。
用於識別條碼的設備可以獲取原始條碼圖片。具體地,可以利用所述設備的攝像裝置拍攝所述原始條碼圖片。
所述原始條碼圖片可以包括:條碼圖片或二維條碼圖片。
S304:利用影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作,得到預處理後條碼圖片。
可以利用影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作。
所述影像處理器可以表示擅長進行影像資料處理的裝置。具體地,所述影像處理器可以包括:圖形處理器(Graphics Processing Unit,GPU)、數位信號處理(Digital Signal Processing,DSP)晶片和/或影像信號處理(Image Signal Processing,ISP)晶片。
所述圖形處理器,通常是專門在設備上執行影像運算工作的微處理器,可以用於承擔輸出顯示圖形的任務。
所述數位信號處理器,是由大規模或超大規模積體電路晶片組成的用來完成數位信號處理任務的處理器。
所述影像資訊處理晶片是一種影像處理專用引擎,其可以高速處理影像信號。
所述影像預處理操作可以是對所述原始條碼圖片進行碼值識別之前所進行的處理。
在實際獲取條碼圖片的過程中,由於光線過亮或過暗、光照不均等原因,可能導致獲取的條碼圖片的全部或部分由於被過度曝光顯得很白,或者由於光線不足顯得很暗,從而導致條碼圖片的對比度較低,無法快速、準確地識別條碼圖片的碼值。通過所述影像預處理操作,可以增強條碼圖片的可檢測性,從而提高碼值識別的可靠性。
在一個實施方式中,所述影像預處理操作可以包括:平均亮度統計和二值化處理。
通過所述亮度統計操作可以確定所述原始圖片的亮度分佈情況。根據所述平均亮度統計操作的結果,可以進一步對所述原始條碼圖片進行二值化處理。例如,可以根據所述平均亮度統計操作的結果,確定一個或多個臨界值,根據所述臨界值對所述原始圖片進行二值化處理。
所述預處理指令可以為:用於實現所述預處理操作的代碼化語言編譯得到的電腦指令。所述預處理指令可以是所述影像處理器可執行的機器語言的電腦指令。
在一個實施方式中,若所述用於識別條碼的設備採用Android操作系統,所述用於實現所述預處理操作的代碼化語言可以採用Renderscript編程語言。
在另一個實施方式中,若所述用於識別條碼的設備採用iOS操作系統,所述用於實現所述預處理操作的代碼化語言可以採用OpenCL編程語言。
由於所述影像處理器通常處理影像資料速度較快,因此,利用所述影像處理器可以提高原始條碼圖片預處理的處理速度。
S306:識別所述預處理後條碼圖片的目標碼值。
所述用於識別條碼的設備可以識別所述預處理後條碼圖片的目標碼值。由於經過預處理操作後的條碼圖片可檢測性較強,可以快速識別出所述預處理後條碼圖片的目標碼值。
本說明書提供的實施例中,將對原始條碼圖片的預處理操作利用影像處理器來實現,由於影像處理器處理影像資料速度較快,可以提高條碼圖片的預處理速度。同時,利用影像處理器對原始條碼圖片進行預處理操作可以減少影像預處理操作對CPU資源的佔用,提高了CPU識別預處理後條碼圖片的效率。因此,本說明書提供的實施例利可以提高識別條碼的速率。
本發明實施例所提供的方法實施例可以在行動終端、電腦終端、伺服器或者類似的運算裝置中執行。以運行在行動終端上為例,圖2是本說明書實施例中一種行動終端的硬體結構方塊圖。如圖2所示,所述行動終端可以包括至少2個(圖中僅示出兩個)處理器102、用於儲存資料的記憶體104以及用於通信功能的傳輸模組106。
所述處理器102可以包括至少一個中央處理器(CPU)和至少一個圖形處理器(Graphics Processing Unit,GPU)。當然所述處理器102也可以包括其他的具有邏輯處理能力的單晶片、邏輯閘電路、積體電路等,或其適當組合。
所述記憶體104可用於儲存應用軟體的軟體程式以及模組,如本發明實施例中的搜索方法對應的程式指令/模組,中央處理器102通過運行儲存在記憶體104內的軟體程式以及模組,從而執行各種功能應用以及資料處理,即實現上述實施例中的識別條碼的方法。記憶體104可包括高速隨機記憶體,還可包括非揮發性記憶體,如一個或者多個磁性儲存裝置、快閃記憶體、或者其他非揮發性固態記憶體。在一些實例中,記憶體104可進一步包括相對於處理器102遠程設置的記憶體,這些遠程記憶體可以通過網路連接至所述頁面顯示設備。上述網路的實例包括但不限於互聯網、企業內部網、區域網路、行動通信網及其組合。實現的時候,該記憶體也可以採用雲記憶體的方式實現,具體實現方式,本說明書不作出限定。
所述傳輸模組106可以用於經由一個網路接收或者發送資料。上述的網路具體實例可包括所述頁面顯示設備的通信供應商提供的無線網路。在一個實例中,傳輸模組106包括一個網路介面卡(Network Interface Controller,NIC),其可通過基站與其他網路設備相連從而可與互聯網進行通訊。在一個實例中,傳輸模組106可以為射頻(Radio Frequency,RF)模組,其用於通過無線方式與互聯網進行通訊。
本領域中具有通常知識者可以理解,圖4所示的結構僅為示意,其並不對上述行動終端的結構造成限定。例如,所述行動終端還可包括比圖4中所示更多或者更少的組件,例如數位信信號處理(Digital Signal Processing,DSP)晶片、影像信號處理(Image Signal Processing,ISP)晶片等,或者具有與圖4所示不同的配置。
基於上述所述的識別條碼的方法,本說明書還提供一種裝置。所述的裝置可以包括使用了本說明書實施例所述方法的系統(包括分散式系統)、軟體(應用)、模組、組件、設備等並結合必要的實施硬體的設備裝置。基於同一創新構思,本說明書提供的裝置如下面的實施例所述。由於和方法解決問題的實現方案與方法相似,因此本說明書實施例具體的裝置實施可以參見前述方法的實施,重複之處不再贅述。儘管以下實施例所描述的裝置較佳地以軟體來實現,但是硬體,或者軟體和硬體的組合的實現也是可能並被構想的。
圖5是本說明書提供的識別條碼的裝置一個實施例的模組結構示意圖。如圖5所示,所述識別條碼的裝置可以包括:原始圖片獲取模組502、預處理模組504和碼值確定模組506。
所述原始圖片獲取模組502,可以用於獲取原始條碼圖片。
所述預處理模組504,可以用於根據所述預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片。所述影像預處理操作可以包括:平均亮度統計和二值化處理。
在一個實施方式中,所述預處理模組採用影像處理器實現。所述預處理指令是所述影像處理器可執行的機器語言的電腦指令。所述預處理指令可以是用於實現所述預處理操作的代碼化語言編譯得到的電腦指令。
在一個實施方式中,所述影像處理器可以包括:圖形處理器、數位信號處理晶片和/或影像信號處理晶片。
所述碼值確定模組506,可以用於識別出所述預處理後條碼圖片的目標碼值。
本說明書實施例提供的上述識別條碼的方法或裝置可以在電腦中由處理器執行相應的程式指令來實現,例如使用android、iOS系統程式設計語言在智慧終端實現,以及基於量子電腦的處理邏輯實現等。
具體的,本說明書另一態樣還提供一種識別條碼的設備,包括處理器及記憶體。所述處理器包括中央處理器和影像處理器。所述記憶體儲存由所述處理器執行的電腦程式指令,執行所述電腦程式指令可以實現以下步驟:所述中央處理器獲取原始條碼圖片;所述影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片;所述中央處理器識別所述預處理後條碼圖片的目標碼值。
在一個實施方式中,所述預處理指令可以是用於實現所述預處理操作的代碼化語言編譯得到的電腦指令。若所述用於識別條碼的設備採用Android操作系統,所述用於實現所述預處理操作的代碼化語言可以採用Renderscript編程語言。若所述用於識別條碼的設備採用iOS操作系統,所述用於實現所述預處理操作的代碼化語言可以採用OpenCL編程語言。
由此可見,本說明書提供的識別條碼的裝置和設備的實施例與本說明書中的方法實施例是基於同一創新構思,因此,本說明書提供的識別條碼的裝置和設備的實施例可以實現說明書中方法實施例的技術效果。
上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在附圖中描繪的過程不一定要求示出的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多任務處理和平行處理也是可以的或者可能是有利的。
在20世紀90年代,對於一個技術的改進可以很明顯地區分是硬體上的改進(例如,對二極體、電晶體、開關等電路結構的改進)還是軟體上的改進(對於方法流程的改進)。然而,隨著技術的發展,當今的很多方法流程的改進已經可以視為硬體電路結構的直接改進。設計人員幾乎都通過將改進的方法流程編程到硬體電路中來得到相應的硬體電路結構。因此,不能說一個方法流程的改進就不能用硬體實體模組來實現。例如,可程式設計邏輯裝置(Programmable Logic Device,PLD)(例如現場可程式閘陣列(Field Programmable Gate Array,FPGA))就是這樣一種積體電路,其邏輯功能由使用者對裝置編程來確定。由設計人員自行編程來把一個數位系統“整合”在一片PLD上,而不需要請晶片製造廠商來設計和製作專用的積體電路晶片。而且,如今,取代手工地製作積體電路晶片,這種編程也多半改用“邏輯編譯器(logic compiler)”軟體來實現,它與程式開發撰寫時所用的軟體編譯器相類似,而要編譯之前的原始碼也得用特定的編程語言來撰寫,此稱之為硬體描述語言(Hardware Description Language,HDL),而HDL也並非僅有一種,而是有許多種,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)與Verilog。本領域中具有通常知識者也應該清楚,只需要將方法流程用上述幾種硬體描述語言稍作邏輯編程並編程到積體電路中,就可以很容易得到實現該邏輯方法流程的硬體電路。
控制器可以按任何適當的方式實現,例如,控制器可以採取例如微處理器或處理器以及儲存可由該(微)處理器執行的電腦可讀程式碼(例如軟體或韌體)的電腦可讀媒體、邏輯閘、開關、特殊應用積體電路(Application Specific Integrated Circuit,ASIC)、可程式邏輯控制器和嵌入微控制器的形式,控制器的例子包括但不限於以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,記憶體控制器還可以被實現為記憶體的控制邏輯的一部分。本領域中具有通常知識者也知道,除了以純電腦可讀程式碼方式實現控制器以外,完全可以通過將方法步驟進行邏輯編程來使得控制器以邏輯閘、開關、特殊應用積體電路、可程式邏輯控制器和嵌入微控制器等的形式來實現相同功能。因此這種控制器可以被認為是一種硬體部件,而對其內包括的用於實現各種功能的裝置也可以視為硬體部件內的結構。或者甚至,可以將用於實現各種功能的裝置視為既可以是實現方法的軟體模組又可以是硬體部件內的結構。
上述實施例闡明的裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、行動電話、相機電話、智慧電話、個人數位助理、媒體播放器、導航設備、電子郵件設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任何設備的組合。
為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本說明書時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。
本領域中具有通常知識者應明白,本發明的實施例可提供為方法、裝置、或電腦程式產品。因此,本發明可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體態樣的實施例的形式。而且,本發明可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。
本發明是參照根據本發明實施例的方法、設備(裝置)、和電腦程式產品的流程圖和/或方塊圖來描述的。應理解可由電腦程式指令實現流程圖和/或方塊圖中的每一流程和/或方塊、以及流程圖和/或方塊圖中的流程和/或方塊的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可程式資料處理設備的處理器以產生一個機器,使得通過電腦或其他可程式資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的裝置。
這些電腦程式指令也可儲存在能引導電腦或其他可程式資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能。
這些電腦程式指令也可裝載到電腦或其他可程式資料處理設備上,使得在電腦或其他可程式設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可程式設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方塊圖一個方塊或多個方塊中指定的功能的步驟。
在一個典型的配置中,電腦設備包括一個或多個處理器、輸入/輸出介面、網路介面和內部記憶體。
內部記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或揮發性內部記憶體非揮發性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。內部記憶體是電腦可讀媒體的示例。
電腦可讀媒體包括永久性和非永久性、可行動和非可行動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可抹除可編程唯讀記憶體(EEPROM)、快閃記憶體或其他內部記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶式磁碟儲存器、石墨烯儲存或其他磁性儲存設備或任何其他非傳輸媒體,可用於儲存可以被電腦設備存取的資訊。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調變的資料信號和載波。
還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。
本領域中具有通常知識者應明白,本說明書的實施例可提供為方法、裝置或電腦程式產品。因此,本說明書可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體態樣的實施例的形式。而且,本說明書可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。
本說明書可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、組件、資料結構等等。也可以在分散式計算環境中實踐本說明書,在這些分散式計算環境中,由通過通信網路而被連接的遠程處理設備來執行任務。在分散式計算環境中,程式模組可以位於包括儲存設備在內的本地和遠程電腦儲存媒體中。
本說明書中的各個實施例均採用循序的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於裝置和伺服器實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。
以上所述僅為本說明書的實施例而已,並不用於限制本說明書。對於本領域中具有通常知識者來說,本說明書可以有各種更改和變化。凡在本說明書的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在申請專利範圍之內。
The embodiments of the present specification provide a method, a device, and a device for identifying a barcode.
In order to enable those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present specification. Obviously, the described The examples are only a part of examples of this specification, but not all examples. Based on the embodiments in this specification, all other embodiments obtained by those with ordinary knowledge in the art without making progressive labor should fall within the scope of protection of this specification.
Application software such as Alipay can realize the functions of receiving money, paying, adding friends, etc. by scanning the two-dimensional barcode. In the process of identifying barcodes by scanning these application software, it is usually necessary to first perform image preprocessing on the original barcode pictures obtained by the camera device, and then identify the pre-processed barcode pictures. In one aspect, the existing application software on the mobile device needs to use a CPU to perform the preprocessing and identification processes. However, multiple application software is usually installed on the mobile device, and the operation of multiple application software also depends on the It is implemented by the device's CPU. Therefore, it will compete with the aforementioned image preprocessing operations for resources. The application of scanning and identifying barcodes cannot fully utilize the computing resources of the device, which will affect the efficiency of image preprocessing. In another aspect, because the data of the barcode image obtained by the camera device is usually relatively large, when using the CPU for image preprocessing, a larger amount of calculation requires more time for the CPU, which also reduces the rate at which the device recognizes the barcode. . Based on this, in the embodiment of the present specification, the pre-processing operation of the barcode image can be realized by using a graphics processing chip. One aspect can improve the processing speed of image pre-processing, and the other aspect can reduce the CPU resources of the image pre-processing operation. Occupation improves the efficiency of the CPU to recognize the pre-processed bar code pictures, which can increase the rate of bar code recognition by the device.
The following describes a specific embodiment of a method for identifying a barcode in this specification. FIG. 2 is a schematic diagram of identifying a bar code using each component of the device provided in this specification. FIG. 3 is a schematic flowchart of an embodiment of a method for identifying a bar code provided in this specification. This specification provides method operation steps as described in the embodiment or the flowchart. However, conventional or non-progressive labor may include more or Fewer steps. The sequence of steps listed in the embodiments is only one way of executing the steps, and does not represent the only sequence of execution. When an actual system or device product is executed, it may be executed sequentially or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment). With specific reference to FIG. 2 and FIG. 3, the method may include the following steps.
S302: Obtain the original barcode image.
The device used to identify the barcode can get the original barcode picture. Specifically, the original barcode picture can be captured by using the imaging device of the device.
The original barcode picture may include: a barcode picture or a two-dimensional barcode picture.
S304: Use an image processor to perform image preprocessing operations on the original barcode image according to a preprocessing instruction to obtain a preprocessed barcode image.
An image processor may be used to perform an image pre-processing operation on the original barcode picture according to a pre-processing instruction.
The image processor may represent a device that is good at processing image data. Specifically, the image processor may include: a graphics processing unit (GPU), a digital signal processing (DSP) chip, and / or an image signal processing (ISP) chip.
The graphics processor is usually a microprocessor that performs image computing work on the device, and can be used to undertake the task of outputting and displaying graphics.
The digital signal processor is a processor composed of a large-scale or ultra-large-scale integrated circuit chip to complete a digital signal processing task.
The image information processing chip is an image processing engine, which can process image signals at high speed.
The image pre-processing operation may be processing performed before performing code value recognition on the original barcode picture.
In the actual process of obtaining a barcode image, due to excessively bright or dark light, uneven lighting, etc., all or part of the obtained barcode image may appear white due to overexposure, or appear dark due to insufficient light. The contrast of the bar code picture is low, and the code value of the bar code picture cannot be identified quickly and accurately. Through the image preprocessing operation, the detectability of the barcode picture can be enhanced, thereby improving the reliability of code value recognition.
In one embodiment, the image pre-processing operation may include: average brightness statistics and binarization processing.
The brightness distribution of the original picture may be determined through the brightness statistics operation. According to a result of the average brightness statistical operation, a binary process may be further performed on the original barcode picture. For example, one or more critical values may be determined according to a result of the average luminance statistical operation, and the original picture may be binarized according to the critical values.
The preprocessing instruction may be a computer instruction compiled by a coded language used to implement the preprocessing operation. The pre-processing instruction may be a computer instruction of a machine language executable by the image processor.
In one embodiment, if the device for identifying a barcode uses an Android operating system, the coded language for implementing the preprocessing operation may use a Renderscript programming language.
In another embodiment, if the device for identifying a barcode uses an iOS operating system, the coded language for implementing the preprocessing operation may use an OpenCL programming language.
Because the image processor usually processes image data faster, using the image processor can improve the processing speed of the original bar code picture preprocessing.
S306: Identify a target code value of the pre-processed barcode picture.
The device for identifying a barcode may identify a target code value of the pre-processed barcode picture. Since the pre-processed bar code picture is highly detectable, the target code value of the pre-processed bar code picture can be quickly identified.
In the embodiment provided in this specification, the preprocessing operation of the original barcode image is implemented by an image processor. Since the image processor processes the image data faster, the preprocessing speed of the barcode image can be improved. At the same time, using the image processor to preprocess the original barcode image can reduce the CPU resources occupied by the image preprocessing operation and improve the CPU's efficiency in identifying the preprocessed barcode image. Therefore, the embodiments provided in this specification can improve the rate of identifying barcodes.
The method embodiments provided in the embodiments of the present invention may be executed in a mobile terminal, a computer terminal, a server, or a similar computing device. Taking a mobile terminal as an example, FIG. 2 is a block diagram of a hardware structure of a mobile terminal in the embodiment of the present specification. As shown in FIG. 2, the mobile terminal may include at least two (only two are shown in the figure) a processor 102, a memory 104 for storing data, and a transmission module 106 for a communication function.
The processor 102 may include at least one central processing unit (CPU) and at least one graphics processing unit (Graphics Processing Unit, GPU). Of course, the processor 102 may also include other single chips with logic processing capabilities, logic gate circuits, integrated circuits, etc., or an appropriate combination thereof.
The memory 104 may be used to store software programs and modules of application software, such as program instructions / modules corresponding to the search method in the embodiment of the present invention. The central processing unit 102 runs the software programs stored in the memory 104 and Module to perform various functional applications and data processing, that is, to implement the method for identifying a barcode in the above embodiment. The memory 104 may include high-speed random memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely disposed with respect to the processor 102, and these remote memories may be connected to the page display device through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. When it is implemented, the memory may also be implemented in a cloud memory manner. The specific implementation manner is not limited in this specification.
The transmission module 106 can be used to receive or send data via a network. The above specific examples of the network may include a wireless network provided by a communication provider of the page display device. In one example, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
Those skilled in the art can understand that the structure shown in FIG. 4 is only for illustration, and it does not limit the structure of the mobile terminal. For example, the mobile terminal may further include more or fewer components than those shown in FIG. 4, such as a Digital Signal Processing (DSP) chip, an Image Signal Processing (ISP) chip, and the like. Or it has a different configuration from that shown in FIG. 4.
Based on the above-mentioned method for identifying a barcode, this specification also provides a device. The device may include a system (including a decentralized system), software (application), a module, a component, a device, and the like that use the method described in the embodiments of the present specification, and a device device that implements necessary implementation hardware. Based on the same innovative concept, the device provided in this specification is described in the following embodiments. Since the implementation scheme and method for solving the problem with the method are similar, the specific implementation of the device in the embodiments of this specification may refer to the implementation of the foregoing method, and the duplicated details are not described again. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and conceived.
FIG. 5 is a schematic diagram of a module structure of an embodiment of a device for identifying a barcode provided in this specification. As shown in FIG. 5, the device for identifying a barcode may include: an original picture acquisition module 502, a pre-processing module 504, and a code value determination module 506.
The original picture obtaining module 502 may be used to obtain an original barcode picture.
The pre-processing module 504 may be configured to perform image pre-processing on the original barcode image according to the pre-processing instruction to obtain a pre-processed barcode image. The image pre-processing operation may include: average brightness statistics and binarization processing.
In one embodiment, the pre-processing module is implemented by an image processor. The preprocessing instruction is a computer instruction of a machine language executable by the image processor. The preprocessing instruction may be a computer instruction compiled by a coded language used to implement the preprocessing operation.
In one embodiment, the image processor may include a graphics processor, a digital signal processing chip, and / or an image signal processing chip.
The code value determination module 506 may be used to identify a target code value of the pre-processed barcode picture.
The above method or device for identifying a barcode provided by the embodiments of this specification can be implemented by a processor executing corresponding program instructions in a computer, for example, using android and iOS system programming languages in smart terminals, and quantum computer based processing logic. Wait.
Specifically, another aspect of the present specification also provides a device for identifying a barcode, including a processor and a memory. The processor includes a central processing unit and an image processor. The memory stores computer program instructions executed by the processor, and executing the computer program instructions can implement the following steps: the central processor obtains the original barcode picture; and the image processor executes the preprocessing instruction on the original An image pre-processing operation is performed on the bar code picture to obtain a pre-processed bar code picture; the central processor identifies a target code value of the pre-processed bar code picture.
In one embodiment, the preprocessing instruction may be a computer instruction compiled by a coded language for implementing the preprocessing operation. If the device for identifying a barcode uses an Android operating system, the coding language used to implement the preprocessing operation may use a Renderscript programming language. If the device for identifying a barcode uses an iOS operating system, the coded language used to implement the preprocessing operation may use an OpenCL programming language.
It can be seen that the embodiments of the device and equipment for identifying barcodes provided in this specification and the method embodiments in this specification are based on the same innovative concept. Therefore, the embodiments of the devices and equipment for identifying barcodes provided in this specification can be implemented in the specification. Technical effects of method embodiments.
The specific embodiments of the present specification have been described above. Other embodiments are within the scope of the appended patent applications. In some cases, the actions or steps described in the scope of the patent application may be performed in a different order than in the embodiments and still achieve the desired result. In addition, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain embodiments, multi-tasking and parallel processing are also possible or may be advantageous.
In the 1990s, for a technical improvement, it can be clearly distinguished whether it is an improvement in hardware (for example, the improvement of circuit structures such as diodes, transistors, switches, etc.) or an improvement in software (for method and process Improve). However, with the development of technology, the improvement of many methods and processes can be regarded as a direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. It is programmed by the designer to "integrate" a digital system on a PLD, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of making integrated circuit chips by hand, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing, and requires compilation. The previous source code must also be written in a specific programming language. This is called the Hardware Description Language (HDL). HDL is not only one, but there are many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are commonly used. Those with ordinary knowledge in the field should also be clear, as long as the method flow is slightly logically programmed with the above-mentioned several hardware description languages and programmed into the integrated circuit, the hardware circuit that implements the logic method flow can be easily obtained. .
The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable storage of computer-readable code (such as software or firmware) executable by the (micro) processor. Media, logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those with ordinary knowledge in the field also know that, in addition to implementing the controller in a purely computer-readable code manner, it is entirely possible to program the method steps to logically make the controller with logic gates, switches, special application integrated circuits, programmable Logic controller and embedded microcontroller to achieve the same function. Therefore, the controller can be considered as a hardware component, and the device included in the controller for implementing various functions can also be considered as a structure in the hardware component. Or even, a device for implementing various functions can be regarded as a structure that can be both a software module implementing the method and a hardware component.
The devices, modules, or units described in the foregoing embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation is a computer. Specifically, the computer may be, for example, a personal computer, a laptop, a mobile phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing this specification, the functions of each unit may be implemented in the same software or multiple software and / or hardware.
Those having ordinary knowledge in the art should understand that the embodiments of the present invention may be provided as a method, a device, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable code therein. .
The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (devices), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and a combination of the flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, so that instructions generated by the processor of the computer or other programmable data processing device can be used A device for realizing the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
These computer program instructions may also be stored in computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory generate a manufactured article including a command device, The instruction device implements a function specified in a flowchart or a plurality of processes and / or a block or a block of a block diagram.
These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operating steps can be performed on the computer or other programmable equipment to generate computer-implemented processing, which can be executed on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
In a typical configuration, a computer device includes one or more processors, an input / output interface, a network interface, and internal memory.
Internal memory may include non-permanent memory in computer-readable media, random access memory (RAM) and / or volatile internal memory, non-volatile memory, and other forms, such as read-only memory (ROM) or Flash RAM. Internal memory is an example of a computer-readable medium.
Computer-readable media includes permanent and non-permanent, removable and non-removable media. Information can be stored by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other internal memory technology, read-only disc read-only memory (CD-ROM), digital multifunction Optical discs (DVDs) or other optical storage, magnetic tape cartridges, magnetic tape cartridge storage, graphene storage or other magnetic storage devices, or any other non-transmission media can be used to store information that can be accessed by computer equipment. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
It should also be noted that the terms "including,""including," or any other variation thereof are intended to encompass non-exclusive inclusion, so that a process, method, product, or device that includes a range of elements includes not only those elements, but also Other elements not explicitly listed, or those that are inherent to such a process, method, product, or device. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, product or equipment including the elements.
Those having ordinary knowledge in the art should understand that the embodiments of the present specification may be provided as a method, a device, or a computer program product. Therefore, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this manual may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable code. .
This manual may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected through a communication network. In a decentralized computing environment, program modules can be located in local and remote computer storage media, including storage devices.
Each embodiment in this specification is described in a sequential manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
The above descriptions are merely examples of the present specification and are not intended to limit the present specification. For those having ordinary knowledge in the art, this specification may have various modifications and changes. Any modification, equivalent replacement, or improvement made within the spirit and principle of this specification shall be included in the scope of patent application.

S302‧‧‧步驟S302‧‧‧step

S304‧‧‧步驟 S304‧‧‧step

S306‧‧‧步驟 S306‧‧‧step

102‧‧‧處理器 102‧‧‧ processor

104‧‧‧記憶體 104‧‧‧Memory

106‧‧‧傳輸模組 106‧‧‧Transmission Module

502‧‧‧原始圖片獲取模組 502‧‧‧Original picture acquisition module

504‧‧‧預處理模組 504‧‧‧Pretreatment module

506‧‧‧碼值確定模組 506‧‧‧Code value determination module

為了更清楚地說明本說明書一個或多個實施例或現有技術中的技術方案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本說明書中記載的一些實施例,對於本領域中具有通常知識者來講,在不付出進步性勞動的前提下,還可以根據這些附圖獲得其他的附圖。In order to more clearly explain one or more embodiments of the present specification or the technical solutions in the prior art, the drawings used in the embodiments or prior art descriptions will be briefly introduced below. Obviously, the appended description The drawings are just some of the embodiments described in this specification. For those with ordinary knowledge in the art, other drawings can be obtained based on these drawings without paying progressive labor.

圖1是現有的利用設備各部件識別條碼的示意圖; FIG. 1 is a schematic diagram of identifying a barcode using each component of a conventional device;

圖2是本說明書提供的利用設備各部件識別條碼的一個示意圖; FIG. 2 is a schematic diagram of identifying a barcode using each component of the device provided in this specification; FIG.

圖3是本說明書提供的識別條碼的方法一種實施例的流程示意圖; FIG. 3 is a schematic flowchart of an embodiment of a method for identifying a barcode provided in this specification; FIG.

圖4是本說明書實施例中一種行動終端的硬體結構方塊圖; 4 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present specification;

圖5是本說明書提供的識別條碼的裝置一個實施例的模組結構示意圖。 FIG. 5 is a schematic diagram of a module structure of an embodiment of a device for identifying a barcode provided in this specification.

Claims (10)

一種識別條碼的方法,包括: 獲取原始條碼圖片; 利用影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作,得到預處理後條碼圖片; 識別所述預處理後條碼圖片的目標碼值。A method for identifying a barcode, including: Get the original barcode picture; Using an image processor to perform image preprocessing on the original barcode image according to a preprocessing instruction to obtain a preprocessed barcode image; Identifying a target code value of the pre-processed barcode picture. 根據請求項1所述的方法,其中,所述影像預處理操作包括:平均亮度統計操作和二值化處理操作。The method according to claim 1, wherein the image preprocessing operation includes: an average brightness statistics operation and a binarization processing operation. 根據請求項1所述的方法,其中,所述預處理指令為:用於實現所述預處理操作的代碼化語言編譯得到的電腦指令。The method according to claim 1, wherein the preprocessing instruction is a computer instruction compiled by a coded language for implementing the preprocessing operation. 根據請求項3所述的方法,其中,所述預處理代碼化語言包括:用於實現所述影像預處理操作的代碼化語言。The method according to claim 3, wherein the preprocessing coded language comprises: a coded language for implementing the image preprocessing operation. 根據請求項3所述的方法,其中,所述用於實現所述預處理操作的代碼化語言採用Renderscript編程語言或者OpenCL編程語言。The method according to claim 3, wherein the coded language for implementing the preprocessing operation uses a Renderscript programming language or an OpenCL programming language. 根據請求項1所述的方法,其中,所述影像處理器包括:圖形處理器、數位信號處理晶片和/或影像信號處理晶片。The method according to claim 1, wherein the image processor comprises: a graphics processor, a digital signal processing chip, and / or an image signal processing chip. 一種識別條碼的設備,包括:記憶體和處理器;所述處理器包括中央處理器和影像處理器;所述記憶體儲存由所述處理器執行的電腦程式指令,執行所述電腦程式指令可以實現以下步驟: 所述中央處理器獲取原始條碼圖片; 所述影像處理器根據預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片; 所述中央處理器識別所述預處理後條碼圖片的目標碼值。A device for identifying a barcode includes: a memory and a processor; the processor includes a central processing unit and an image processor; the memory stores computer program instructions executed by the processor, and the computer program instructions can be executed by the memory Implement the following steps: The central processor obtains an original barcode picture; Performing an image preprocessing operation on the original barcode image by the image processor according to a preprocessing instruction to obtain a preprocessed barcode image; The central processor identifies a target code value of the pre-processed barcode picture. 根據請求項7所述的設備,其中,所述影像處理器包括:圖形處理器、數位信號處理晶片和/或影像信號處理晶片。The device according to claim 7, wherein the image processor includes a graphics processor, a digital signal processing chip, and / or an image signal processing chip. 一種識別條碼的裝置,包括:原始圖片獲取模組、預處理模組和碼值確定模組; 所述原始圖片獲取模組,用於獲取原始條碼圖片; 所述預處理模組,用於根據所述預處理指令對所述原始條碼圖片進行影像預處理操作得到預處理後條碼圖片; 所述碼值確定模組,用於識別出所述預處理後條碼圖片的目標碼值。A device for identifying a barcode, comprising: an original picture acquisition module, a preprocessing module, and a code value determination module; The original picture obtaining module is used to obtain an original barcode picture; The preprocessing module is configured to perform image preprocessing on the original barcode image according to the preprocessing instruction to obtain a preprocessed barcode image; The code value determining module is configured to identify a target code value of the pre-processed barcode picture. 根據請求項9所述的裝置,所述預處理模組採用影像處理器實現;所述影像處理器包括:圖形處理器、數位信號處理晶片和/或影像信號處理晶片。According to the device of claim 9, the pre-processing module is implemented by an image processor; the image processor includes a graphics processor, a digital signal processing chip, and / or an image signal processing chip.
TW107146919A 2018-03-02 2018-12-25 Method, apparatus, and device for recognizing bar code TW201939346A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810174440.7A CN108520188A (en) 2018-03-02 2018-03-02 A kind of method, apparatus and equipment of identification bar code
??201810174440.7 2018-03-02

Publications (1)

Publication Number Publication Date
TW201939346A true TW201939346A (en) 2019-10-01

Family

ID=63433503

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107146919A TW201939346A (en) 2018-03-02 2018-12-25 Method, apparatus, and device for recognizing bar code

Country Status (3)

Country Link
CN (1) CN108520188A (en)
TW (1) TW201939346A (en)
WO (1) WO2019165870A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108520188A (en) * 2018-03-02 2018-09-11 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of identification bar code
CN111435414B (en) * 2019-01-14 2024-04-05 北京京东尚科信息技术有限公司 Method, system, equipment and storage medium for identifying two-dimension code

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504716B (en) * 2009-03-13 2010-10-27 重庆大学 QR two-dimension bar code recognition method and system based on field programmable gate array
CN102737214A (en) * 2011-04-15 2012-10-17 上海真石信息技术有限公司 Barcode image threshold frequency mobile phone recognition technology
CN102184378B (en) * 2011-04-27 2014-10-29 茂名职业技术学院 Method for cutting portable data file (PDF) 417 standard two-dimensional bar code image
CN104809422B (en) * 2015-04-27 2017-09-05 江苏中科贯微自动化科技有限公司 QR code recognition methods based on image procossing
CN105678206A (en) * 2015-12-29 2016-06-15 东软集团股份有限公司 Bar code identification method and apparatus
CN107545207A (en) * 2017-09-28 2018-01-05 云南电网有限责任公司电力科学研究院 DM two-dimensional code identification methods and device based on image procossing
CN108520188A (en) * 2018-03-02 2018-09-11 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of identification bar code

Also Published As

Publication number Publication date
WO2019165870A1 (en) 2019-09-06
CN108520188A (en) 2018-09-11

Similar Documents

Publication Publication Date Title
TWI728266B (en) Two-dimensional bar code generation, business processing method, device and equipment, and two-dimensional bar code
US20200125885A1 (en) Vehicle insurance image processing method, apparatus, server, and system
JP6726427B2 (en) Information display method and device
TWI697840B (en) Resource allocation method, device and equipment
TWI694381B (en) Image processing method and device
WO2019034039A1 (en) Target image code recognition method and device
TWI743425B (en) Information recognition method, server, client and system
JP2020524319A (en) Method and apparatus for generating and identifying an identification code
TWI715814B (en) Image generation method and equipment
TWI769360B (en) A scanning code image recognition method, device and equipment
TW202121287A (en) Payment system, payment method, server equipment, medium and device
TW201928757A (en) Carrier article, and service information obtaining method, apparatus and device
TWI710989B (en) Business execution method, device and equipment applied to client and server
TWI691206B (en) Watermark adding processing method, device and client
CN110533643A (en) Certificate identification method and device
TW201939346A (en) Method, apparatus, and device for recognizing bar code
CN109344824A (en) A kind of line of text method for detecting area, device, medium and electronic equipment
US10168192B2 (en) Determining values of angular gauges
US11164056B2 (en) Method and system for applying barcode, and server
CN108010095B (en) Texture synthesis method, device and equipment
CN113657245B (en) Method, device, medium and program product for human face living body detection
CN112560530B (en) Two-dimensional code processing method, device, medium and electronic device
CN110968513B (en) Recording method and device of test script
CN110866478B (en) Method, device and equipment for identifying object in image
WO2020114375A1 (en) Two-dimensional code generation and identification methods and devices