Data Matrix QR code image processing and application

Abstract: Based on the Meteor II Standard image acquisition card, the data collected by the camera is processed for the purpose of identifying the Data Matrix two-dimensional code on the metal parts. Realized the application of this method in real-time identification of industrial assembly line.

A two-dimensional code is a symbol that records information both in the two-dimensional direction of the plane. It makes full use of the two-dimensional space on the plane, greatly improving the information density, making it possible to encode large data on a small area. Secondly, due to its super error correction ability, even large areas of damage can be accurately identified. At present, QR codes are used in industrial automation, logistics, postal services, medical services, commerce, finance, transportation, identification, government management, public safety, customs, and national defense. In China, the application of QR codes is still in its infancy, and its application areas and fields are also quite limited. However, it is foreseeable that with its unique advantages, two-dimensional codes will be promoted and applied in various fields in China like barcodes.

In this paper, through Matrox's image acquisition card Meteor-II Standard, the MIL function library is used to capture and identify the Data Matrix two-dimensional code printed pneumatically on metal parts in real time, and specific image processing is performed on the collected Data Matrix images. Name it to meet the requirements of being identified. Finally, the methods to improve the recognition rate are discussed through experiments.

figure 1

1 Data Matrix overview

There are many types of QR codes, this article only discusses the matrix Data Matrix.

The biggest feature of Data Matrix is ​​"small", which can encode 30 numbers on an area of ​​25mm2, so it is widely used to mark small items such as integrated circuits and medicines. In addition, it is easier to print and generate Data Matrix in the production line of manufacturing industry.

As shown in Figure 1, the Data Matrix symbol looks like a chess board composed of two shades of light and dark. Each black or white square of the same size is called a data unit. The Data Matrix symbol consists of many such data units. There is a dead zone with a width of one data unit outside the edge-finding zone. The edge-finding area is the boundary of the "checkerboard", which is only used to locate and define the size of the digital unit, and does not contain any coding information. The data area surrounded by the edge search area contains coding information. The 0 and 1 in the matrix are the small black and white squares of Data Matrix, that is, the data unit.

Data Matrix adopts Reed-Solomon interleaving and interleaving coding, and an error correction code is added to the coding to make Data Matrix's error correction performance relatively strong. Taking a 5-bit serial number "12345" as an example, a 3-bit code word and a 5-bit error correction code of Data Matrix are obtained through the coding rules, and a 2-bit code word can be corrected with an error correction rate of 2/8 = 25%.

2 Identify Data Matrix code with MIL

Meteor-II Standard is an image acquisition card of Matrox Company. It collects external images through the camera and transmits them to the host memory in real time. MIL function development kit is a hardware-independent 32-bit image processing function library, which has a large number of basic image processing functions.

2.1 Basic process

The basic process of Data Matrix recognition is shown in Figure 2. Acquire images through the functions provided by MIL, and store the collected images in the image buffer in a digital way; enhance the image to improve the recognition accuracy of the image. In the experiment, the smoothing filtering method was used to reduce image noise, which solved the problem of image segmentation due to the excessive brightness of the edge of the code symbol when collecting Data Matrrix codes of metal parts; Scope, to solve the problem that the collected image is dark due to light or camera, the contrast is not significant enough, and the light and dark in the image are blurred.

Since the collected image has many useless backgrounds, the area where the Data Matrix symbol is located only accounts for a large proportion of the entire image. Using the mask method, a sub-buffer with a fixed position is used to limit the image processing area, and the images outside the area are ignored to realize the symbol extraction of Data Matrix. Finally, use the MIL function to directly decode, and put the decoding result in the specified character string, and print the result on the screen with the display sentence.

2.2 Expansion of the Data Matrix symbol

The Data Matrix codes on the metal parts are pneumatically printed into a dot matrix, which is not exactly the same as the standard Data Matrix symbol, and the gap between the dots is large. If this code is recognized without any treatment, the recognition rate will be very low. To solve this problem, the expansion algorithm of mathematical morphology is used. In order to improve the recognition accuracy, the Data Matrix symbol can be expanded several times to narrow the gap between data units. In this way, it is much easier for the computer to "find" Data Matrix's "L" type edge-finding area.

2.3 Implementation of pseudo real-time recognition

Since MIL itself does not support real-time image processing, real-time recognition requires a method called pseudo-buffering to implement pseudo real-time image processing. The image processed by the CPU each time is actually the last frame of image collected by the camera.

Double buffers make it possible to process images while acquiring them, as shown in Figure 3. The camera collects the image into the image buffer 1 and waits for processing. At the same time, the CPU uses this time to process the image in the image buffer 2 (previous frame). After completion, the functions of the two buffers are exchanged; the CPU processes the buffer 1 The image collected at the previous moment in, and the image in the buffer 2 has been processed at this time, and can receive the collected image of the next frame of the camera. In this reciprocation, the two buffers are interchanged, and the pseudo real-time processing can be realized by continuous movement. Adding Data Matrix recognition function to the processing link can realize real-time recognition of Data Matrix. The captured image and the processed image are exactly one frame apart, so it is "pseudo" real-time, but if the computer operation speed is fast enough, the effect of time delay can be ignored.

The advantage of this method is that it not only achieves real-time performance, but also separates the two processes of acquisition and processing, allowing the CPU and camera to process independently and in parallel, making full use of idle time.

3 Statistics and analysis of recognition results

Through programming, the Data Matrix code on the metal is recognized, and the total collected frame number (f), frame rate (f / s), the total number of frames recognized successfully, the recognition rate and other information are counted. Experiments prove that the recognition rate is very high when the camera focal length and light source are quite ideal.

The success rate of Data Matrix recognition is related to many factors. The first is the Data Matrix symbol itself. The dot matrix Data Matrix printed on paper is very different from that printed on metal parts. The second is the motion distortion during detection, which will affect the recognition success. The rate is again the influence of the background image. The greater the contrast between the Data Matrix symbol and the background color, the less the interference image in the background, the higher the recognition success rate; the rotation of the light source and the symbol will affect the recognition.

3.1 Impact of motion detection

Data Matrix detection is commonly used on the assembly line. At this time, the impact of the relative movement of the camera and the detected part on the recognition needs to be considered. In the experiment, the method of fixing parts and moving the camera was used to simulate the motion detection in the pipeline. The speed of the camera during each detection was recorded to find the maximum relative speed that the Data Matrix on the part could be identified.

Now 20 sets of data are measured through experiments, and Data Matrix of 6mm × 6mm is taken into consideration. The results are shown in Table 1.

As a result, under the conditions of ideal illumination and camera focus, the relative speed of maximum recognition is 2.00cm / s. If it is faster than this speed, Data Matrix may not be recognized due to motion distortion.

3.2 The influence of disturbing images

Under the same conditions, the image recognition rate with less background interference is higher, especially when Beijing has a rectangular shape similar to Data Matrix. Under good lighting conditions, test the Data Matrix recognition rate on metal parts. In the case of background interference and the use of sub-buffer to shield some background interference, 10 sets of data were measured, as shown in Table 2.

Table 1 The influence of the relative motion of the Data Matrix and camera to be tested on the recognition

Speed ​​(cm / s) 1.04 1.06 1.41 1.56 1.69 1.70 1.75 2.00 2.03 2.09
Can it be identified √ √ √ √ √ √ √ √ × √
Speed ​​(cm / s) 2.14 2.23 2.32 2.38 2.52 2.52 2.63 2.64 2.70 2.71
Can it be identified √ √ × × × × √ × × ×

Table 2 Influence of background interference on recognition

Interference 83% 84% 62% 81% 68% 92% 85% 60% 87% 74%
Shield interference 97% 88% 87% 84% 92% 90% 99% 83% 85% 90%

It can be seen that after using the buffer to mask some useless background images, the recognition effect is slightly better than that of the unshielded overall.

3.3 Influence of light source

The influence of the light source on the recognition success rate is reflected in the overall light and dark contrast of the image. For the Data Matrix on metal parts, it more affects the clarity of the symbol. If the position of the light source is not selected properly, due to the reflective characteristics of the metal, a specular reflection area with a particularly high brightness will be formed on the metal surface, which will cause strong interference to the Data Matrix image.

A better method is to use side light. Since the Data Matrix code on the metal parts is generated by pneumatic printing, there will be ups and downs in the printed place. The reflections in these areas are warm reflections, which are different from the mirror reflections in other areas. The side light helps to reflect the dot matrix and the metal reflection background. Separate the camera from the metal mirror reflection. Figure 4 compares the state of the two-dimensional code under side light and reflected light.

3.4 Adaptability of the identification procedure

The adaptability of the recognition program refers to the ability to adapt to different sizes and print types Data Matrix. There are three types of printing considered in this article: pneumatic printing on metal surfaces, electric needle printing on metal surfaces, and laser printing on standard paper. The experimental results show that the program's ability to recognize the pneumatic printing Data Matrix code is generally better than the electric needle printing Data Matrix code which is also made of metal. The recognition rates of different sizes are basically equal. The standard Data Matrix printed on paper can be recognized by the computer without too much image enhancement and dilation due to graphics standards, stable colors, and high resolution. The recognition rate is very high.

Tektronix supports Amazon (AWS) media services to provide quality assurance for end-to-end video Shengju Apple TV 4K disassembly report based on unified computing architecture technology video display system design: familiar modular components

Follow WeChat

Interesting and informative information and technical dry goods

Download Audiophile APP

Create your own personal electronic circle

Follow the audiophile class

Lock the latest course activities and technical live broadcast
Collect People collection
share it:
comment
Publish

related suggestion

Questions about Data Dashboard app

Published on 2018-03-01 15:22 • 575 views
Questions about Data Dashboard app
Design of S-curve acceleration and deceleration algorithm for stepper motor

Published on 2017-12-04 23:31 • 1735 views
Design of S-curve acceleration and deceleration algorithm for stepper motor
Nemetschek.Allplan.2015.Win64 1DVD

Published on 2017-08-13 16:34 • 315 views
Nemetschek.Allplan.2015.Win64 1DVD
What Is a Data Bus?

What Is a Data Bus? A data bus is a computer subs ...

Published on 2010-03-25 11:14 • 805 views
What Is a Data Bus?
What is Data Mart / Data Wareho ...

What is Data Mart / Data Warehouse English abbreviation: Data Mart Chinese ...

Posted at 2010-02-22 17:36 • 738 views
What is Data Mart / Data Wareho ...
What is Data Mining

What is Data Mining English abbreviation: Data Mining Chinese translation: Zi ...

Posted at 2010-02-22 17:34 • 290 views
What is Data Mining
What is Data Mining Tools

What is Data Mining Tools abbreviation: Data Mining Too ...

Posted at 2010-02-22 17:34 • 299 views
What is Data Mining Tools
What is Data Center

What is Data Center abbreviation: Data Cente ...

Posted at 2010-02-22 17:33 • 424 views
What is Data Center
What is Data Forwarding / CPGA / ...

What is Data Forwarding / CPGA / COD Data Forwarding ...

Posted on 2010-02-04 11:56 • 435 views
What is Data Forwarding / CPGA / ...
MAX4951 New re-drivers s ...

New re-drivers support PCIe Gen II and SATA / eSATA ...

Posted at 2009-05-29 10:57 • 304 times read
MAX4951 New re-drivers s ...
Novel Storage Idea Suppo ...

Novel Storage Idea Supports Ultra-Fast Data Acquis ...

Posted at 2009-04-16 15:55 • 443 times read
Novel Storage Idea Suppo ...
Data transmission module circuit diagram

The chips used in the data transmission module circuit diagram are:

Posted on 2008-10-14 09:37 • 445 times read
Data transmission module circuit diagram
Principles and applications of common electronic components

Chapter One Common Principles and Applications of Electronic Components Lecture 1: Resistors and Ohm's Law

Posted at 2006-04-16 23:47 • 2018 times read
Principles and applications of common electronic components
Working principle and application of 555 time base integrated circuit

Working principle and application of 555 time-based integrated circuit & nb ...

Published on 2006-04-16 23:34 • 1570 views
Working principle and application of 555 time base integrated circuit
Principle and application of chip inductance

Chip inductors are also known as surface-mount inductors, and they are combined with other chip components (SMC and S ...

Posted at 2006-04-16 23:32 • 388 views
Principle and application of chip inductance
[Photo] The principle and application of RF receiving integrated circuit GY2800

2002, Issue 6, Category: Electronic Products and Devices ...

Published on 2006-04-15 19:21 • 515 views
[Photo] The principle and application of RF receiving integrated circuit GY2800
Principle and Application of Audio Power Amplifier NCP2890

Abstract: Introduced the main performance characteristics and basis of the class A-B audio power amplifier NCP2890 of ON Semiconductor

Posted at 2006-03-24 13:30 • 706 views
Principle and Application of Audio Power Amplifier NCP2890
Programmable digital tube / keyboard serial interface chip HD7279A original ...

Abstract: HA7279A is an intelligent keyboard and LED special control chip, which has a serial interface and can simultaneously drive 8 common negative digital ...

Published on 2006-03-24 12:58 • 469 views
Programmable digital tube / keyboard serial interface chip HD7279A original ...
Data I / O programming system FlashCORE is Renesas ...

Automated programming solution supply ...

Published on 2006-03-13 13:03 • 352 views
Data I / O programming system FlashCORE is Renesas ...
var check_allow = "/d/Api/iscantalk.html"; var add_url = '/ d / article / write /'; function CheckLogin () {now_uid = ''; var ElecfansApi_checklogin = '/ webapi / passport / checklogin'; var logout_url = "{: U ('Login / logout')}"; var logout_url = 'http://bbs.elecfans.com/member.php?mod=logging&action=logout&refer=front'; $ .get (ElecfansApi_checklogin, function (data, textStatus) {if (data! = "") {EchoLoginInfo (data); CheckEmailInfo (data); data = $ .parseJSON (data); now_uid = data.uid; / * var login_content = 'write an article
'+ data.username +'
Quit '; * / var login_content =' write an article
'+ data.username +'
Set exit '; $ (' # login_area '). Html (login_content); var win_width = $ (window) .width (); if (win_width> 1000) {$ ("# mine"). MouseDelay (200) .hover (function () {$ ("# mymenu"). show ();}, function () {$ ("# mymenu"). hide ();});}} else {var content = 'Login Registration'; $ ('# login_area'). html (content); $ (". special-login"). click (function (e) {$ .tActivityLogin (); return false;});}});} $ (function () {// comment ------------------------------- var comment = $ ("# comment"); var comment_input = $ ("# comContent"); // Submit comment click event interaction $ ("# comSubmit2"). on ('click', function () {var content = comment_input.text (); // Empty input box comment_input. html (""). focus (); // Submit data to server $ .ajax ({url: '/plus/arcComment.php', data: {aid: $ ("# webID"). val (), dopost : 'apiPubComment', content: content}, type: 'post', dataType: 'json', success: function (data) {// Data format returned: if (data.status == "successed") {// Build temporary comment DOM var dom = ''; dom + = '
'; dom + =' '; dom + ='
'; dom + ='

'+ data.data.username +' '; dom + ='

'; dom + =' '+ content +' '; dom + =' '; dom + =' just now '; dom + =' '; dom + =' '; // insert a temporary comment to the list $ ("# comment ") .append (dom);} if (data.status ==" failed ") {// alert (data.msg); layer.msg (data.msg);}}}); return false;}); (function () {/ * * Insert single sign-on JS * / var setHost = 'https://passport.elecfans.com'; // Set domain name var script = document.createElement ('script'); script.type = 'text / javascript'; script.src = setHost + '/public/pc/js/t.passport.js'; script.setAttribute ("id", "sso_script"); script.setAttribute ("data-ssoSite", setHost); script.setAttribute ("data-ssoReferer", encodeURIComponent (location.href)); script.setAttribute ("data-ssoSiteid", "11"); var body = document.getElementsByTagName ("body"). item ( 0); body.appendChild (script);}) () / * * It is recommended to modify the style of the article without a picture * * / $ (". Article .thumb"). Each (function () {if ($ (this). find ('img'). attr ('src') == "") {$ (this) .find ('img'). remove (); $ (this) .parent (). css ('padding-left ',' 0px ');}}); / * Baidu share * / window._bd_share_config = {common: {bdText: '', // Custom share content bdDesc: '', // Custom share summary bdUrl: window.location.href, // Custom share URL address bdPic: ''} , share: [{"bdSize": 60, "bdCustomStyle": true}]} with (document) 0 [(getElementsByTagName ('head') [0] || body) .appendChild (createElement ('script')). src = 'http://bdimg.share.baidu.com/static/api/js/share.js?cdnversion=' + ~ (-new Date () / 36e5)]; var add_url = '/ d / article / write / '; // var check_allow = "{: U (' Api / iscantalk ')}"; var check_allow = "/ d / api / iscantalk"; var click_items_length = $ ('. art_click_count '). length; if ( click_items_length> 0) {var id_str = ''; $ ('. art_click_count'). each (function () {id_str + = $ (this) .attr ('data-id') + ',';}) // var url = "{: U ('Api / getclickbyids')}"; var url = "/ d / api / getclickbyids"; var id_data = 'id_str =' + id_str; $ .ajax ({url: url, data: id_data, type: 'post', dataType: 'json', success: function (re) {if (re.list.length> = 1) {var list = re.list; for (var i in list) {var t emp_id = list [i] ['id']; var temp_span = $ (". art_click_count [data-id =" + temp_id + "]") temp_span.html (list [i] ['click']);}} }})} $ ("# comContent"). click (function () {if (now_uid == '') {$ .tActivityLogin (); return false;}}) $ (function () {var follow_wrap = $ ( ".author-collect"); var now_uid = "{$ _super ['uid']}"; var face_src = "{$ _super ['uface']}"; var getFollowNum = $ (". followNum strong"). html (); // Follow $ (window) .on ('click', '.author-collect', function () {if (now_uid == '') {$ .tActivityLogin (); return false;} if ( $ (this) .attr ('id') == 'follow') {$ .post ('/ d / user / follow', {tuid: article_user_id}, function (data) {// Data format returned: if (data.status == "successed") {$ (". followNum strong"). html (++ getFollowNum); follow_wrap.html ('followed'). attr ('id', 'cancelFollow'). css ( 'background', '# 999'); var follow_user = ' '; $ (' # follow_list '). append (follow_user);} if (data.status == "failed") {alert (data.msg);}});} else {// Unfollow if ($ ( this) .attr ('id') == 'cancelFollow') {$ .post ('/ d / user / cancelFollow', {tuid: article_user_id}, function (data) {// Data format returned: if (data .status == "successed") {follow_wrap.html ('Follow'). attr ('id', 'follow'). css ('background', '# f90'); $ (". followNum strong"). html (-getFollowNum); $ ('# follow_list .face'). each (function () {var target_uid = $ (this) .attr ('data-uid'); if (target_uid == now_uid) {$ ( this) .remove ();}})} if (data.status == "failed") {alert (data.msg);}}); return false;}}});});}); / * var myface = "{$ _super ['uid'] | avatar}"; var myname = "{$ _super ['username']}"; var article_id = {$ article ['id']}; var article_user_id = {$ article ['mid']}; // Article author ID $ (function () {<notempty name = "clearnum"> // Reduce the number of reminders var count = parseInt ($ ("# noticeCount"). html ()); count = count-{$ clearnum}; $ ("# noticeCount"). html (count); if ( count

Outdoor Wall Light

When it comes to lighting, outdoor as well as Indoor Lighting is also a concern. Outdoor wall lights are in great demand. LED street lights, garden lights and all outdoor lights including parking lot lights are innovated to meet the high market demand. To compete with the best markets, LEDER has developed a range of outdoor wall lights, which are perfect for lighting a wide variety of outdoor applications. The exterior of the building or any living space associated with it should be very carefully accommodated, as the exterior areas reflect the atmosphere and aesthetics of the interior. Outdoor wall lights should be selected carefully as they help to form the expected first impression of the entire spatial area. For example, carefully arranged garden lights and street lights not only have a strong structure to withstand all weather conditions and influence factors, achieving the effect of safety is crucial, but also have rich shapes to help beautify gardens and lawns.

• 50,000 hour expected lifetime

• 3 year warranty
• Shatter proof diffusers
• Low glare lighting

Outdoor Wall Light

Outdoor Sconces,LED Wall Pack,Solar Wall Lights,Exterior Wall Lights

JIANGMEN LEDER LIGHTING CO., LTD , https://www.lederlight.com