Bill two-dimensional code image acquisition method and device based on multiple wavelengths and multiple light sources
Technical Field
The invention relates to the technical field of bill detection, in particular to a method and a device for acquiring a two-dimensional code image of a bill with multiple wavelengths and multiple light sources.
Background
The two-dimension code image of the bill is used as an important method in the field of bill anti-counterfeiting identification, and the accurate and quick two-dimension code image acquisition and identification have a significant effect on the safety of bill information.
Common two-dimension code image acquisition and identification methods comprise a traditional optical two-dimension code image acquisition and identification method and a two-dimension code image acquisition and identification method based on computer image processing. The traditional optical acquisition and scanning method is disclosed in patents CN206236100U and CN206209749U, and optical elements such as a camera and a light supplement lamp are adopted to acquire and recognize two-dimensional code images in an optical form, so that the method is simple and direct, the two-dimensional code images can be accurately acquired and recognized in the environment with weak light, but when the two-dimensional code images of bills cover redundant image information such as seals, the method is difficult to ensure the accurate recognition of the two-dimensional code images and cannot be used in some special environments. Two-dimensional code image acquisition and identification methods based on computer image processing, such as patents CN106682560A and CN106778717A, reduce the influence of other redundant image information on the two-dimensional code image identification by acquiring the original two-dimensional code image and performing image correction operations such as image binarization segmentation and noise filtering processing, and can be used for the two-dimensional code image acquisition and identification covering a seal. However, the method is complex in implementation process, needs a series of processes of image acquisition, computer processing, image output and the like, and is poor in real-time performance.
The specific patent references and related documents mentioned above are:
1) and a two-dimensional code quick identification device, patent number CN 206236100U. The utility model provides a quick recognition device of two-dimensional code, including casing, wide-angle lens, camera, focus regulator, pixel conversion chip and two-dimensional code recognition processor, the device can discern the two-dimensional code under the various environment, and the automatic two-dimensional code that amplifies adjusts the camera focus makes the camera can obtain clear two-dimensional code fast to improve the recognition rate. But this utility model is not suitable for the collection and the discernment to the two-dimensional code image of other images such as covering seal.
2) And a two-dimensional code recognition device, patent No. CN 206209749U. The utility model provides a two-dimensional code recognition device, including central processing unit, optical lens piece, camera, decoding chip, light filling lamp, reset circuit, button module, communication interface, print module, storage module, clock circuit, voice module, pilot lamp, drive module, display module, light detection module and power management module etc.. The device has the light filling function, can be applicable to the environment that light is darker, but its light source only possesses the light filling function, does not possess the ability of getting rid of redundant image information on the two-dimensional code image, is not suitable for the collection and the discernment to the two-dimensional code image of other images such as covering seal.
3) "two-dimensional code recognition method, device and system", patent No. CN 106682560A. The invention relates to a two-dimension code identification method, a device and a system, comprising the following steps: acquiring an image to be identified of a target two-dimensional code; selecting a correction processing function from the correction processing function set as a current correction processing function; performing image correction processing on the image to be recognized by adopting a current correction processing function, and taking a processing result as a corrected image to be confirmed; if the corrected image to be confirmed does not meet the reasonable correction condition, returning to execute the operation of reselecting the determined correction processing function from the correction processing function set; and if the corrected image to be confirmed meets reasonable correction conditions, identifying the target two-dimensional code in the corrected image to be confirmed. The method is used for carrying out image acquisition, processing and correction on the two-dimensional code image based on computer image processing, and the function of removing redundant image information on the two-dimensional code image is achieved.
4) The article provides gray processing, median filtering and image binarization processing on two-dimensional codes. When the threshold value is set too large during threshold value segmentation, the background of the two-dimensional code is difficult to filter, and if the threshold value is set too small, excessive segmentation of the image is easily caused. According to the method, under the condition that the color depth of the stamp is close to the color depth of the two-dimensional code, the threshold value is difficult to determine during threshold value segmentation.
Disclosure of Invention
In order to solve the technical problems, the invention aims to provide a method and a device for acquiring a two-dimensional image of a bill with multiple wavelengths and multiple light sources, which can reduce the influence of other redundant image information such as a seal on the two-dimensional image of the bill on the two-dimensional identification process and improve the acquisition accuracy of the two-dimensional image of the bill and the integrity of the bill information.
The purpose of the invention is realized by the following technical scheme:
a bill two-dimensional code image acquisition method based on multiple wavelengths and multiple light sources comprises the following steps:
A. collecting the color characteristic information of the bill two-dimensional code image covering the seal, and determining the light source type, the frequency and the wavelength parameter of each light source in the mixed light source;
B. according to the frequency and wavelength characteristics of each light source in the mixed light source, adjusting the electrical parameters of the mixed light source to obtain the required mixed light source;
C. the adjusted mixed light source acts on the two-dimensional code image covering the seal;
D. under the action of the mixed light source, the two-dimensional code image covering the seal is scanned and identified, and the two-dimensional code information of the bill is read.
A bill two-dimensional code image acquisition device with multiple wavelengths and multiple light sources comprises: : the system comprises an image acquisition module, a multi-light-source control module, a multi-light-source generation module and a two-dimensional code identification module; the above-mentioned
The image acquisition module is used for acquiring the color characteristic information of the bill two-dimensional code image covering the seal and determining the light source type, the frequency and the wavelength parameter of each light source in the mixed light source;
the multi-light source control module is used for adjusting the electrical parameters of the mixed light source to obtain the required mixed light source;
and the multi-light source generation module is used for emitting the adjusted mixed light source and applying the mixed light source on the two-dimensional code image covering the seal.
One or more embodiments of the present invention may have the following advantages over the prior art:
the invention determines the type and specific wavelength of the mixed light source based on the bill two-dimensional code image color characteristic information covering redundant image information such as a seal, and the like, and then adjusts the electrical parameters through the multi-light source control module and transmits the mixed light source through the multi-light source transmitting module, thereby reducing the influence of the redundant image information such as the seal and the like on the two-dimensional code image acquisition and recognition, and realizing the accurate recognition of the two-dimensional code and the complete acquisition of the bill information. Compared with the existing traditional optical acquisition and identification method, the method and the device for acquiring the two-dimensional code image of the bill based on multiple wavelengths and multiple light sources have the advantages that the interference of a background image during acquisition and identification of the two-dimensional code image is eliminated on the premise of ensuring the real-time performance, and the identification accuracy of the two-dimensional code is improved; compared with a two-dimensional code image acquisition and identification method based on computer image processing, the method has the advantages of reducing the complex process of computer image processing and improving the detection efficiency on the premise of ensuring the identification accuracy, having good real-time performance, strong adaptability and simple operation, and being suitable for two-dimensional code image acquisition and identification under various conditions.
Drawings
FIG. 1 is a flow chart of a bill two-dimensional code image acquisition method based on multiple wavelengths and multiple light sources.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the following embodiments and accompanying drawings.
As shown in fig. 1, the flow of the method for acquiring the two-dimensional code image of the bill with multiple wavelengths and multiple light sources includes the following steps:
step 10, collecting the color characteristic information of the bill two-dimensional code image covered with the seal, and determining the light source type, the frequency and the wavelength parameter of each light source in the mixed light source;
step 20, adjusting the electrical parameters of the mixed light source according to the frequency and wavelength characteristics of each light source in the mixed light source to obtain the required mixed light source;
step 30, the adjusted mixed light source acts on the two-dimensional code image covering the seal;
and step 40, under the action of the mixed light source, scanning and identifying the two-dimensional code image covering the seal, and reading the two-dimensional code information of the bill.
In the step 10, the mixed light source mainly comprises a white light source and a light source with a specific wavelength and frequency according to the color characteristics of the two-dimensional code and the stamp image. The light source with specific wavelength and frequency is used for reducing the influence of redundant seal image information on the bill two-dimensional code identification process, and the white light source is used for reducing the pixel point loss amount of the two-dimensional code image under the action of the mixed light source and keeping the integrity of the two-dimensional code image information.
The light source with specific wavelength and frequency is determined by the color characteristics of the image of the bill stamp, and the redundant image of the bill stamp is divided into n regions with areas A1、A2、A3…An(ii) a The wavelength of the reflected light of n areas of the seal image is divided into lambda by the image acquisition module under the action of a common light source1、λ2、λ3…λnThen, the specific wavelength λ of the light source with specific wavelength and frequency is:
in the above step 20, according to the light source type and the light source specific wavelength and frequency in the mixed light source determined in the step 10, the multi-light source control module of the present apparatus adjusts electrical parameters such as current and voltage of the multi-light source emitting module, and determines the mixed light source with specific wavelength and frequency and adjusts the intensity ratio of each light source in the mixed light source according to the specific electrical parameters.
In the step 30, the multi-light source emitting module emits the mixed light source after the multi-light source control module completes adjustment, and the mixed light source acts on the bill two-dimensional code image covering the stamp image, so that a light source is provided for the two-dimensional code identification process, and the function of reducing the influence of the stamp image on the two-dimensional code identification process is realized.
In the step 40, under the action of the light source with the specific wavelength and the specific frequency, the influence of redundant image information such as the stamp image and the like on the two-dimensional code image recognition is reduced, and the two-dimensional code recognition module scans and recognizes the two-dimensional code of the bill to quickly obtain the complete information of the bill.
The embodiment also provides a bill two-dimensional code image acquisition device of multi-wavelength and multi-light source, which comprises: the system comprises an image acquisition module, a multi-light-source control module, a multi-light-source generation module and a two-dimensional code identification module; the above-mentioned
The image acquisition module is used for acquiring the color characteristic information of the bill two-dimensional code image covering the seal and determining the light source type, the frequency and the wavelength parameter of each light source in the mixed light source;
the multi-light source control module is used for adjusting the electrical parameters of the mixed light source to obtain the required mixed light source;
the multi-light source generating module is used for emitting the adjusted mixed light source and enabling the mixed light source to act on the two-dimensional code image covering the seal;
and the two-dimensional code identification module is used for scanning and identifying the two-dimensional code image covering the seal and reading the two-dimensional code information of the bill.
The embodiment avoids the influence of redundant image information on the two-dimensional code image on the two-dimensional code identification, improves the accuracy of the two-dimensional code image acquisition and identification, and reduces the complexity of the computer image processing through an optical image processing mode of a multi-wavelength mixed light source, so that the two-dimensional code image acquisition and identification process is more accurate, direct and reliable.
Although the embodiments of the present invention have been described above, the above descriptions are only for the convenience of understanding the present invention, and are not intended to limit the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.