CN115828945A - Industrial bar code reader debugging method, device and system - Google Patents

Industrial bar code reader debugging method, device and system Download PDF

Info

Publication number
CN115828945A
CN115828945A CN202310117639.7A CN202310117639A CN115828945A CN 115828945 A CN115828945 A CN 115828945A CN 202310117639 A CN202310117639 A CN 202310117639A CN 115828945 A CN115828945 A CN 115828945A
Authority
CN
China
Prior art keywords
bar code
scanning frequency
code scanning
reader
industrial
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202310117639.7A
Other languages
Chinese (zh)
Other versions
CN115828945B (en
Inventor
邱显涛
叶勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Huixiang Information Technology Co ltd
Original Assignee
Shenzhen Huixiang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Huixiang Information Technology Co ltd filed Critical Shenzhen Huixiang Information Technology Co ltd
Priority to CN202310117639.7A priority Critical patent/CN115828945B/en
Publication of CN115828945A publication Critical patent/CN115828945A/en
Application granted granted Critical
Publication of CN115828945B publication Critical patent/CN115828945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)
  • Character Input (AREA)

Abstract

The invention relates to the technical field of Internet of things, in particular to a debugging method, a device and a system of an industrial bar code reader, wherein the method comprises the following steps: receiving an identification trigger signal, and acquiring a product image at a set frequency; acquiring a bar code area on the acquired product image; setting code scanning frequency according to the ratio successfully acquired by the bar code area; identifying the bar code of the product according to the set code scanning frequency to obtain an identification result; judging whether the identification result is correct or not, and screening the correct identification result; adjusting the code scanning frequency according to the proportion of the correct recognition result; associating the adjusted code scanning frequency with the current orientation of the bar code reader; and outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader. The invention sets the code scanning frequency by collecting the product image, adjusts the code scanning frequency according to the code scanning accuracy, and inputs the orientation reference value according to the incidence relation between the orientation of the bar code reader and the adjusted code scanning frequency.

Description

Industrial bar code reader debugging method, device and system
Technical Field
The invention relates to the technical field of Internet of things, in particular to a debugging method, a debugging device and a debugging system for an industrial bar code reader.
Background
With the popularization of factory automation production, the bar code technology with the functions of product tracking, positioning and marking is widely used in factories. Industrial barcode readers for barcode recognition are used in large numbers in production lines and warehouses. Industrial barcode readers are very different from commercial barcode readers. The industrial bar code reader is generally fixedly installed on a production line and is unattended. The civil bar code reader is generally handheld, and can adjust the angle and distance at any time according to the bar code identification condition, so that the identification is convenient.
The industrial barcode reader is installed with the aim of improving code scanning efficiency as much as possible. The improvement of the code scanning efficiency includes two meanings, namely, the improvement of the accuracy of the bar code identification on one hand, and the reduction of the image acquisition frequency on the other hand.
In order to improve the code scanning efficiency, the industrial bar code reader needs to be debugged after being installed to find a proper angle and position. In the prior art, a debugging person can only adjust the industrial bar code reader by experience according to an output identification result of the bar code reader, and the mode has low efficiency and is difficult to determine the optimal installation direction.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus and a system for debugging an industrial barcode reader.
The embodiment of the invention is realized in such a way that the debugging method of the industrial bar code reader comprises the following steps:
receiving an identification trigger signal, and acquiring a product image at a set frequency;
acquiring a bar code area on the acquired product image;
setting code scanning frequency according to the ratio successfully acquired by the bar code area;
identifying the bar code of the product according to the set code scanning frequency to obtain an identification result;
judging whether the identification result is correct or not, and screening the correct identification result;
adjusting the code scanning frequency according to the proportion of the correct recognition result;
associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
In one embodiment, the invention provides an industrial barcode reader debugging device, comprising:
the trigger module is used for receiving the identification trigger signal and acquiring a product image at a set frequency;
the image acquisition module is used for acquiring a bar code area on the acquired product image;
the code scanning frequency setting module is used for setting code scanning frequency according to the ratio successfully acquired by the bar code area;
the identification module is used for identifying the bar code of the product according to the set code scanning frequency and acquiring an identification result;
the judging and screening module is used for judging whether the identification result is correct or not and screening the correct identification result;
the adjusting module is used for adjusting the code scanning frequency according to the proportion of the correct recognition result;
the association module is used for associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and the reference output module is used for outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
In one embodiment, the present invention provides an industrial barcode reader commissioning system, comprising:
the industrial bar code reader is used for bar code identification of products;
the camera is used for collecting images of products; and
according to the industrial bar code reader debugging device, the industrial bar code reader and the camera are respectively connected with the industrial bar code reader debugging device.
According to the invention, the code scanning frequency is set by collecting the product image, the existence of the bar code which can be used for identification is determined through image processing, then the code scanning frequency is set and a bar code reader is started for identification, so that invalid identification can be reduced; the set code scanning frequency is adjusted according to the identification accuracy, whether the orientation is optimal or not can be reflected by means of the size of the code scanning frequency, and in addition, in the later use process, the code scanning frequency can be set more reasonably according to the relation between the orientation and the code scanning frequency, so that invalid code scanning is reduced; and inputting a reference value of the orientation according to the incidence relation between the orientation of the industrial bar code reader and the adjusted code scanning frequency, so that debugging personnel can find a proper orientation more quickly, and the debugging efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a debugging method of an industrial barcode reader provided in one embodiment;
FIG. 2 is a flow diagram of an industrial barcode reader debugging method provided by an embodiment;
FIG. 3 is a block diagram of an industrial barcode reader debugging device according to an embodiment;
FIG. 4 is an elevation view of a hardware configuration of an industrial barcode reader debugging device according to an embodiment;
FIG. 5 is a perspective view of an industrial barcode reader debugging device according to an embodiment;
FIG. 6 is a block diagram of an industrial barcode reader debugging system according to an embodiment;
fig. 7 is a block diagram of an internal configuration of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms unless otherwise specified. These terms are only used to distinguish one element from another. For example, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script, without departing from the scope of the present disclosure.
Fig. 1 is a diagram of an application environment of the xx method provided in an embodiment, as shown in fig. 1, in the application environment, including a conveying line, an industrial barcode reader, a camera, and an industrial barcode reader debugging device.
In this application environment, the conveying line may be a package sorting line or a labeling and detecting line for products in factory production, and the invention is not particularly limited to the specific type of the conveying line. On the conveying line, products are conveyed along the conveying line, bar codes are pasted on the products, and the bar codes of the products are identified through an industrial bar code reader arranged right above the conveying line. In this embodiment, the present invention, such as the specific structure and principle of the industrial barcode reader, is not specifically limited, and belongs to the existing hardware.
In the application environment, the camera is installed in front of the industrial bar code reader, and the product is shot by the camera and then conveyed to a code scanning area of the industrial bar code reader. It should be noted that the camera is only used during installation and debugging, and the camera can be detached after the installation and debugging are completed. Furthermore, the camera and the industrial barcode reader are installed back to back or after the camera and the industrial barcode reader are closed, and a front-back installation mode of the camera and the industrial barcode reader is usually adopted. When debugging is carried out, a large number of products for testing sequentially pass through the conveying line to carry out online debugging.
In this embodiment, the industrial barcode reader debugging device sets the code scanning frequency of the industrial barcode reader according to the image of the product acquired by the camera by executing the industrial barcode reader debugging method provided by the invention; the set code scanning frequency is adjusted according to the identified accuracy, and the direction can be reflected to be optimal or not by means of the size of the code scanning frequency; and inputting a reference value of the orientation according to the incidence relation between the orientation of the industrial bar code reader and the adjusted code scanning frequency, so that debugging personnel can find a proper orientation more quickly, and the debugging efficiency is improved.
As shown in fig. 2, in the present embodiment, a method for debugging an industrial barcode reader is provided, and the present embodiment is mainly exemplified by applying the method to the device for debugging an industrial barcode reader in fig. 1. The method specifically comprises the following steps:
step S100, receiving an identification trigger signal, and collecting a product image at a set frequency;
step S200, acquiring a bar code area on the acquired product image;
step S300, setting code scanning frequency according to the ratio successfully acquired by the bar code area;
step S400, identifying the bar code of the product according to the set code scanning frequency to obtain an identification result;
step S500, judging whether the identification result is correct or not, and screening the correct identification result;
s600, adjusting code scanning frequency according to the proportion of the correct recognition result;
step S700, associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and step S800, outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
In this embodiment, the identification trigger signal is used for starting the camera to acquire an image of a product, the trigger signal can be detected by a photoelectric sensor arranged on the conveying line, a proximity switch and the like can be arranged, and a debugging person can control the generation of the trigger signal by operating an industrial barcode reader debugging device in the debugging process. In the embodiment, the setting frequency is related to the conveying speed of the conveying line, and the faster the conveying speed is, the higher the set image acquisition frequency is, for example, the conveying speed is 1m/s corresponding to the acquisition frequency of 60Hz, and the ratio between the conveying speed and the acquisition frequency can be set according to actual needs. In this embodiment, it should be noted that, for the same product, multiple times of acquisition may be performed according to a set acquisition frequency, where steps S100 to S700 are specific to a single product, and after a plurality of products respectively perform steps S100 to S700, associated information of a plurality of orientations and a code-scanning frequency may be obtained, and an orientation reference value may be output according to the associated information.
In this embodiment, after the product image is acquired, the barcode area on the product image needs to be further acquired, so as to determine whether barcode identification needs to be started, and this setting can reduce the invalid identification process.
In the embodiment, the barcode area can be successfully acquired through the acquired product image, and because the camera and the industrial barcode reader are arranged back to back or front and back, the angle is basically consistent, so that if the barcode area can be successfully acquired, the product is placed without problems for scanning the barcode, at the moment, whether the barcode information can be correctly identified mainly depends on the industrial barcode reader, and the adjustable parameters mainly include two parameters of orientation and code scanning frequency.
In this embodiment, the code scanning frequency is adjusted according to the occurrence ratio of the correct recognition result, and the higher the correct recognition result ratio is, the lower the code scanning frequency is, so that the invalid code scanning and the repeated code scanning can be reduced.
In this embodiment, the code scanning frequency is determined by whether a barcode region exists in the product image and the accuracy of the barcode identification (i.e., the ratio of the occurrence of the correct identification result), and can reflect whether the orientation of the industrial barcode reader is favorable for code scanning, so that the orientation reference value can be output through the association relationship between the orientation and the code scanning frequency, and thus, a debugging person can adjust the orientation of the industrial barcode reader according to the output reference value.
According to the invention, the code scanning frequency is set by collecting the product image, the existence of the bar code which can be used for identification is determined through image processing, then the code scanning frequency is set and a bar code reader is started for identification, so that invalid identification can be reduced; the set code scanning frequency is adjusted according to the identification accuracy, whether the orientation is optimal or not can be reflected by means of the size of the code scanning frequency, and in addition, in the later use process, the code scanning frequency can be set more reasonably according to the relation between the orientation and the code scanning frequency, so that invalid code scanning is reduced; and inputting a reference value of the orientation according to the incidence relation between the orientation of the industrial bar code reader and the adjusted code scanning frequency, so that a debugging person can find a proper orientation more quickly, and the debugging efficiency is improved.
As a preferred embodiment of the present invention, the acquiring a barcode region on a collected product image includes:
acquiring a plurality of preset straight lines, wherein the preset straight lines all pass through the middle point of a product image;
translating each preset straight line by a first set step distance along the length or width direction of the product image respectively to obtain the pixel value of the pixel through which the preset straight line passes after each movement;
and judging whether the image passes through a bar code area according to the pixel value of the pixel through which the preset straight line passes, and if so, intercepting the bar code area from the product image.
In this embodiment, the number of straight lines may include a 0 ° straight line, a 90 ° straight line, a 30 ° straight line, a 45 ° straight line, a 60 ° straight line, etc. (the above angles are determined by the angles of the straight lines with the positive direction of the horizontal axis), which intersect at the center of the image. In this embodiment, the straight lines are moved in the length or width direction of the product, and if both ends of any one straight line intersect with the length side of the image, the straight line is moved in the length direction of the image, and conversely, the straight line is moved in the width direction of the image. The movement is simultaneously to two opposite directions. In this embodiment, it can be understood that the preset direct movement is sequentially determined, and after any straight line is determined to pass through the barcode region, the straight line which is not moved any more.
In this embodiment, the first set step should not be greater than the minimum of the corresponding dimensions of the width and length of the barcode in the image, e.g., the image is 10cm × 10cm, while the dimension of the barcode (typically a paper sticker) in the image is 2mm × 4mm, and the first set step should not be greater than the minimum corresponding dimension of 2mm, which may be 1 mm,1.5 mm, etc.
In this embodiment, the pixel value of the pixel through which the preset straight line passes after each movement is obtained, that is, the pixel value of the pixel through which the straight line passes after each movement is obtained.
As a preferred embodiment of the present invention, the determining whether the barcode region passes through according to the pixel value of the pixel through which the preset straight line passes includes:
performing decoloring treatment on the product image;
arranging pixel values of pixels through which a preset straight line passes according to the selected direction to obtain a pixel value sequence;
calculating the deviation of two pixel values before and after the pixel value sequence, and classifying the two pixels before and after into a pixel group when the deviation of the two pixel values before and after is smaller than a first set threshold value;
calculating an average value of pixel values of each pixel group;
judging whether n adjacent pixel groups meet the following conditions: the number of pixels of each pixel group in the n pixel groups is smaller than a second set threshold value, and the absolute value of the difference between the average values of the pixel values of any two adjacent pixel groups is larger than a third set threshold value;
if yes, judging that the preset straight line passes through the bar code area.
In this embodiment, the black-and-white image can be obtained by performing a color removal process on the image, and the pixel value of the pixel in the black-and-white image is between 0 and 255. In this embodiment, the selected direction may be from left to right, from top to bottom, etc., and for a straight line inclined, the direction and the selection may be from the left lower side to the right upper side or from the left upper side to the right lower side, and the direction and the selection do not affect the result of this embodiment.
In this embodiment, it is necessary to define a straight line passing through a pixel, for example, the straight line passing through the pixel is considered to pass through the pixel only when the straight line passes through the inside of the pixel instead of coinciding with the boundary of the pixel, which can be customized by a user, and different defining manners do not affect the effect of the present invention.
In this embodiment, the deviation may be an absolute value for comparison, and the first set threshold may be 0 to 15, and the different values affect the accuracy, usually 5 to 10, so as to eliminate the interference of chromatic aberration.
In this embodiment, the adjacency here includes the cases of being adjacent left and right, adjacent up and down, and adjacent diagonally, because the adjacent way of the pixels through which straight lines with different inclination angles pass is different.
In this embodiment, the second set threshold is a ratio of the maximum width of the barcode black-and-white bar to the width or length (whichever is smaller) of a single pixel; a third set threshold is used to identify whether the neighboring pixel groups are respectively black and white, the larger the third set threshold value is, generally, 230 to 255, preferably 245 to 255 can be taken.
In this embodiment, it can be understood that if any one of the predetermined straight lines passes through the barcode region, it can be considered that the barcode region exists in the product image.
In this embodiment, it can be understood that, for any product, when the barcode region cannot be identified, the industrial barcode reader does not need to identify the product.
As a preferred embodiment of the present invention, the intercepting the barcode region from the product image includes:
translating the translated preset straight line passing through the bar code area by a second set step pitch, wherein the second set step pitch is smaller than the first set step pitch;
judging whether the preset straight line passes through the bar code area or not every time of moving, and if so, marking the pixel through which the preset straight line passes as a target pixel;
generating a rectangular frame to enable all target pixels to fall into the rectangular frame;
and intercepting the product image by the rectangular frame to obtain a bar code area.
In this embodiment, the second set step distance should be less than the minimum dimension (length or width) of the barcode, preferably 1/50-1/20 of the minimum dimension of the barcode. In this embodiment, the specific method for determining whether the straight line passes through the barcode region is described in the foregoing embodiment, and this embodiment is not described herein again.
In the present embodiment, among the plurality of rectangles including the target pixel, a rectangle having the smallest area is preferable, and one of the length or width of the rectangle is made parallel to the line of translation.
In this embodiment, it can be understood that, in the above steps, for any one of the plurality of preset straight lines, when the straight line moves through the barcode region by the first step distance, the straight line moves by the second step distance in two directions perpendicular to the straight line respectively based on the position where the straight line passes through the barcode region. For example, a 0 ° straight line is simultaneously moved upward and downward by a first step (for example, 50 pixels wide), wherein if the straight line moved downward by a first step is determined to pass through the barcode region, the straight line moved downward by a first step is moved downward by a second step, and then all target pixels in the moving process are found. Preferably, the total distance of movement in one direction (downward or upward) is less than the maximum dimension (length or width) of the barcode region when the line is moved in the second step.
As a preferred embodiment of the present invention, the setting of the code scanning frequency according to the ratio of successful acquisition of the barcode region includes:
reading a bar code number from the intercepted bar code area;
comparing the read bar code number with the input product number, and if the comparison is passed, successfully acquiring the bar code area;
calculating the ratio of successful acquisition of the barcode region
Figure SMS_1
And setting code scanning frequency according to the proportion of successfully acquired bar code areas by the following formula:
Figure SMS_2
wherein:
Figure SMS_4
is the set code scanning frequency;
Figure SMS_6
for a continuous acquisition cycle
Figure SMS_8
The number of in-acquired product images;
Figure SMS_5
for collection
Figure SMS_7
The number of the product images in the barcode region successfully acquired from the product images;
Figure SMS_9
to set an initial frequency, and
Figure SMS_10
Figure SMS_3
is the initial acquisition period of the set product image.
In this embodiment, the barcode not only uses black and white bars to represent information, but also represents the information by numbers, and can identify barcode numbers on the intercepted barcode area by a general image identification technology, and compare the acquired barcode numbers with the real numbers of the products, so as to determine whether the barcode is successfully acquired. The real number of the product can be input by debugging personnel or read by a handheld bar code identification device to be used as a standard for calibration.
In this embodiment, the barcode scanning frequency can be set through the above steps, and the barcode scanning frequency set in this way can eliminate the situation that the barcode cannot be identified due to product placement, barcode damage, deficiency and the like, so that the barcode scanning frequency is in direct proportion to the number of products capable of acquiring barcode regions, and invalid barcode scanning is reduced.
As a preferred embodiment of the present invention, the identifying the product barcode according to the set code scanning frequency to obtain the identification result includes:
starting a bar code reader to scan the bar code reader according to a set code scanning frequency;
and acquiring a series of scanning results output by the bar code reader.
In this embodiment, the process and principle of scanning a barcode and acquiring a scanning result by an industrial barcode reader belong to the prior art, and this part is not specifically limited in the embodiments of the present invention. In this embodiment, the difference is that the frequency of the barcode reader is determined through the foregoing embodiment.
As a preferred embodiment of the present invention, the adjusting the code scanning frequency according to the occurrence ratio of the correct recognition result includes:
calculating the proportion of correct recognition results for the same product;
calculating the average value of the proportion of correct recognition results for different products;
adding the calculated average value to a set minimum proportional value to obtain a proportional coefficient;
and calculating the product of the set code scanning frequency and the proportionality coefficient to obtain the adjusted code scanning frequency.
In this embodiment, the set minimum ratio is a ratio between the minimum frequency at which the industrial barcode reader normally operates and the aforementioned set code scanning frequency, and the set frequency is different from the other set frequency. For a plurality of different products, this minimum ratio takes the maximum value among the plurality of products.
As a preferred embodiment of the present invention, the outputting the orientation reference value according to the correlation result of the code scanning frequency and the barcode reader includes:
selecting a reference orientation;
determining the included angle between each orientation and the reference orientation;
marking the code scanning frequency after each orientation is adjusted;
calculating according to the interpolation to obtain the code scanning frequency of each orientation;
the orientation with the largest code scanning frequency is output as the reference orientation.
In this embodiment, optionally, a coordinate system is established with the reference direction as the positive Z-axis direction and the central point of the industrial barcode reader as the origin of coordinates, and each direction is represented by an angle with the positive direction of three coordinate axes, for example, the reference direction is 0 degree with the positive Z-axis direction and 90 degrees with the positive X-axis and Y-axis directions. The interpolation calculation refers to the interpolation of code scanning frequency according to the size of the included angle. For example, if the code scanning frequency in the positive direction of the Z axis is 100Hz, the included angle between a certain orientation and the positive direction of the Z axis is 50 degrees, the included angle between the certain orientation and the positive direction of the Y axis is 40 degrees, the included angle between the certain orientation and the positive direction of the X axis is 90 degrees, and the corresponding code scanning frequency is 200 Hz, the code scanning frequency in any orientation with the positive included angle range of the Z axis between 0 and 50 can be calculated through an interpolation method. In this embodiment, for any orientation, the orientation can be decomposed into angles with the positive directions of three coordinate axes, and the positive directions of two coordinate axes are obtained through interpolation by using code scanning frequencies of the positive directions of any two coordinate axesThe frequency of any included angle between the directions is finally determined by
Figure SMS_11
A code-sweeping frequency of any orientation is obtained, wherein,
Figure SMS_12
Figure SMS_13
Figure SMS_14
the components of the code scanning frequency in the direction of the three axes are respectively. It should be noted that, in the calculation, it is not necessary to obtain the code scanning frequencies in the X direction and the Y direction, since these two directions are perpendicular to the Z direction of the reference, and cannot be recognized generally, and the maximum code scanning frequency also appears near the Z axis, so it is only necessary to perform debugging near the Z axis.
In this embodiment, as another optional specific method, a plurality of orientations are tested near the Z axis to obtain code scanning frequencies of the plurality of orientations, the code scanning frequencies are projected onto respective coordinate planes, a series of code scanning frequency points can be obtained on each coordinate plane, and a code scanning frequency distribution curve on each coordinate plane can be obtained by curve fitting (quadratic curve or cubic curve) or interpolation; therefore, the maximum code scanning frequency on each coordinate plane can be obtained, and the direction with the maximum code scanning frequency, namely the corresponding frequency of the direction with the maximum code scanning frequency can be obtained by the square sum of the maximum code scanning frequency on the three coordinate planes.
In this embodiment, as another simple alternative, the reference orientation is the direction with the largest code-scanning frequency selected from all tested directions, and no interpolation process is required. This applies mainly to scenes where accuracy requirements are low in actual use.
The embodiment of the invention also provides a debugging device of the industrial bar code reader, which comprises the following components:
the trigger module is used for receiving the identification trigger signal and acquiring a product image at a set frequency;
the image acquisition module is used for acquiring a bar code area on the acquired product image;
the code scanning frequency setting module is used for setting code scanning frequency according to the ratio successfully acquired by the bar code area;
the identification module is used for identifying the bar code of the product according to the set code scanning frequency and acquiring an identification result;
the judging and screening module is used for judging whether the identification result is correct or not and screening the correct identification result;
the adjusting module is used for adjusting the code scanning frequency according to the proportion of the correct recognition result;
the association module is used for associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and the reference output module is used for outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
In this embodiment, the industrial barcode reader debugging apparatus is a module of the industrial barcode reader debugging method provided by the present invention, and the specific description of each module may refer to the explanation of the method part of the present invention, which is not described again in this embodiment. In this embodiment, as a hardware implementation of the foregoing apparatus, an embodiment of the present invention further provides an optional structure for implementing hardware of a debugging apparatus of an industrial barcode reader, as shown in fig. 4 and 5, in the hardware of the debugging apparatus of the industrial barcode reader, the optional structure includes:
1. a voltage-switching dial switch (+ 5V/OFF/+ 24V);
2. a power terminal (+ 5V/OFF/+ 24V);
3. a charging interface of a TypeC battery;
4. SMP-4P connecting terminals;
5. a serial port Sub-D interface;
6. a pin interface;
7. an XHP-4P wiring terminal;
8. a spring-type terminal block;
9. m12 threaded aviation terminals;
10. a buzzer;
11. testing the key;
12. a program switching dial switch;
13. an LED display;
14. a battery state monitoring terminal;
15. 5VDC power-on indicator/24 VDC power-on indicator;
16. a battery;
17. and (3) a support leg.
In this embodiment, the circuit components are mounted on a circuit board, the circuit board is mounted on the substrate, and the battery and the support legs are mounted on the bottom of the substrate. In this embodiment, the circuit board is further provided with an MCU, the method provided by the present invention is programmed and then burned into the MCU, and the method of the present invention is executed through each component and each peripheral connected to each interface. The industrial bar code reader and the camera are respectively connected with the hardware of the industrial bar code reader debugging device through any two of the interface components.
The embodiment of the invention also provides a debugging system of the industrial bar code reader, which comprises the following steps:
the industrial bar code reader is used for bar code identification of products;
the camera is used for collecting images of products; and
according to the industrial barcode reader debugging device in any one or more embodiments of the present invention, the industrial barcode reader and the camera are respectively connected to the industrial barcode reader debugging device.
According to the invention, the code scanning frequency is set by collecting the product image, the existence of the bar code which can be used for identification is determined through image processing, then the code scanning frequency is set and a bar code reader is started for identification, so that invalid identification can be reduced; the set code scanning frequency is adjusted according to the identification accuracy, whether the orientation is optimal or not can be reflected by means of the size of the code scanning frequency, and in addition, in the later use process, the code scanning frequency can be set more reasonably according to the relation between the orientation and the code scanning frequency, so that invalid code scanning is reduced; and inputting a reference value of the orientation according to the incidence relation between the orientation of the industrial bar code reader and the adjusted code scanning frequency, so that debugging personnel can find a proper orientation more quickly, and the debugging efficiency is improved.
FIG. 7 is a diagram illustrating an internal structure of a computer device in one embodiment. As shown in fig. 7, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. The memory comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program, and when the computer program is executed by the processor, the processor can realize the industrial barcode reader debugging method provided by the embodiment of the invention. The internal memory may also store a computer program, and when the computer program is executed by the processor, the processor may execute the industrial barcode reader debugging method provided by the embodiment of the present invention. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the inventive arrangements and is not intended to limit the computing devices to which the inventive arrangements may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In this embodiment, the industrial barcode reader debugging apparatus provided in the embodiment of the present invention may be implemented in a form of a computer program, and the computer program may be run on a computer device as shown in fig. 7. The memory of the computer device can store various program modules forming the debugging device of the industrial bar code reader, such as a triggering module, an image acquisition module, a code scanning frequency setting module, an identification module, a judgment and screening module, an adjustment module, an association module and a reference output module shown in fig. 3. The computer program consisting of the program modules causes the processor to execute the steps of the industrial barcode reader debugging method of the various embodiments of the present invention described in this specification.
For example, the computer device shown in fig. 7 may execute step S100 through a trigger module in the industrial barcode reader commissioning apparatus shown in fig. 3; the computer device may execute step S200 through the image acquisition module; the computer device may execute step S300 through the code scanning frequency setting module; the computer device may perform step S400 through the recognition module; the computer device may execute step S500 through the judgment and screening module; the computer device may execute step S600 through the adjusting module; the computer device may execute step S700 through the association module; the computer apparatus may perform step S800 by referring to the output module.
In this embodiment, a computer device is proposed, the computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving an identification trigger signal, and acquiring a product image at a set frequency;
acquiring a bar code area on the acquired product image;
setting code scanning frequency according to the ratio successfully acquired by the bar code area;
identifying the bar code of the product according to the set code scanning frequency to obtain an identification result;
judging whether the identification result is correct or not, and screening the correct identification result;
adjusting the code scanning frequency according to the proportion of the correct recognition result;
associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and outputting a direction reference value according to the code scanning frequency and the association result of the bar code reader.
In the present embodiment, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of:
receiving an identification trigger signal, and acquiring a product image at a set frequency;
acquiring a bar code area on the acquired product image;
setting code scanning frequency according to the ratio successfully acquired by the bar code area;
identifying the bar code of the product according to the set code scanning frequency to obtain an identification result;
judging whether the identification result is correct or not, and screening the correct identification result;
adjusting the code scanning frequency according to the proportion of the correct recognition result;
associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the present invention. It should be noted that various changes and modifications can be made by those skilled in the art without departing from the spirit of the invention, and these changes and modifications are all within the scope of the invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A debugging method of an industrial bar code reader is characterized by comprising the following steps:
receiving an identification trigger signal, and acquiring a product image at a set frequency;
acquiring a bar code area on the acquired product image;
setting code scanning frequency according to the ratio successfully acquired by the bar code area;
identifying the bar code of the product according to the set code scanning frequency to obtain an identification result;
judging whether the identification result is correct or not, and screening the correct identification result;
adjusting the code scanning frequency according to the proportion of the correct recognition result;
associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
2. The industrial barcode reader debugging method of claim 1, wherein the acquiring the barcode region on the collected product image comprises:
obtaining a plurality of preset straight lines, wherein the preset straight lines all pass through the midpoint of a product image;
translating each preset straight line by a first set step distance along the length or width direction of the product image respectively to obtain the pixel value of the pixel through which the preset straight line passes after each movement;
and judging whether the image passes through a bar code area according to the pixel value of the pixel through which the preset straight line passes, and if so, intercepting the bar code area from the product image.
3. The debugging method of the industrial barcode reader according to claim 2, wherein the determining whether the pixel value of the pixel passing through the preset straight line passes through the barcode region comprises:
performing decoloring treatment on the product image;
arranging pixel values of pixels through which a preset straight line passes according to the selected direction to obtain a pixel value sequence;
calculating the deviation of two pixel values before and after the pixel value sequence, and classifying the two pixels before and after into a pixel group when the deviation of the two pixel values before and after is smaller than a first set threshold value;
calculating an average value of pixel values of each pixel group;
judging whether n adjacent pixel groups meet the following conditions: the number of pixels of each pixel group in the n pixel groups is smaller than a second set threshold value, and the absolute value of the difference between the average values of the pixel values of any two adjacent pixel groups is larger than a third set threshold value;
if yes, judging that the preset straight line passes through the bar code area.
4. The industrial barcode reader debugging method of claim 2, wherein said intercepting the barcode region from the product image comprises:
translating the translated preset straight line passing through the bar code area by a second set step pitch, wherein the second set step pitch is smaller than the first set step pitch;
judging whether the preset straight line passes through the bar code area or not every time of moving, and if so, marking the pixel through which the preset straight line passes as a target pixel;
generating a rectangular frame to enable all target pixels to fall into the rectangular frame;
and intercepting the product image by the rectangular frame to obtain a bar code area.
5. The industrial barcode reader debugging method of claim 2, wherein the setting of the code scanning frequency according to the successfully obtained ratio of the barcode region comprises:
reading a bar code number from the intercepted bar code area;
comparing the read bar code number with the input product number, and if the comparison is passed, successfully acquiring the bar code area;
calculating the ratio of successful acquisition of the barcode region
Figure QLYQS_1
And setting code scanning frequency according to the proportion of successfully acquired bar code areas by the following formula:
Figure QLYQS_2
wherein:
Figure QLYQS_5
is the set code scanning frequency;
Figure QLYQS_7
for a continuous acquisition cycle
Figure QLYQS_9
The number of product images acquired internally;
Figure QLYQS_4
for harvesting
Figure QLYQS_6
The number of the product images in the barcode region successfully acquired from the product images;
Figure QLYQS_8
to set an initial frequency, and
Figure QLYQS_10
Figure QLYQS_3
is the initial acquisition period of the set product image.
6. The industrial barcode reader debugging method of claim 1, wherein the identifying the product barcode according to the set code scanning frequency to obtain the identification result comprises:
starting a bar code reader to scan the bar code reader according to a set code scanning frequency;
and acquiring a series of scanning results output by the bar code reader.
7. The industrial barcode reader debugging method of claim 1, wherein the adjusting of the code scanning frequency according to the occurrence ratio of the correct recognition result comprises:
calculating the proportion of correct recognition results for the same product;
calculating the average value of the proportion of correct recognition results for different products;
adding the calculated average value to a set minimum proportional value to obtain a proportional coefficient;
and calculating the product of the set code scanning frequency and the proportionality coefficient to obtain the adjusted code scanning frequency.
8. The industrial barcode reader debugging method of claim 1, wherein outputting the orientation reference value according to the correlation result of the code scanning frequency and the barcode reader comprises:
selecting a reference orientation;
determining the included angle between each orientation and the reference orientation;
marking the code scanning frequency after each orientation is adjusted;
calculating according to the interpolation to obtain the code scanning frequency of each orientation;
the orientation with the largest code scanning frequency is output as the reference orientation.
9. The industrial barcode reader debugging device is characterized by comprising:
the trigger module is used for receiving the identification trigger signal and acquiring a product image at a set frequency;
the image acquisition module is used for acquiring a bar code area on the acquired product image;
the code scanning frequency setting module is used for setting code scanning frequency according to the ratio successfully acquired by the bar code area;
the identification module is used for identifying the bar code of the product according to the set code scanning frequency and acquiring an identification result;
the judging and screening module is used for judging whether the identification result is correct or not and screening the correct identification result;
the adjusting module is used for adjusting the code scanning frequency according to the proportion of the correct recognition result;
the association module is used for associating the adjusted code scanning frequency with the current orientation of the bar code reader;
and the reference output module is used for outputting a direction reference value according to the code scanning frequency and the correlation result of the bar code reader.
10. An industrial barcode reader debugging system, comprising:
the industrial bar code reader is used for bar code identification of products;
the camera is used for collecting images of products; and
the industrial barcode reader debugging device of claim 9, the industrial barcode reader and the camera being separately connected to the industrial barcode reader debugging device.
CN202310117639.7A 2023-02-15 2023-02-15 Industrial bar code reader debugging method, device and system Active CN115828945B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310117639.7A CN115828945B (en) 2023-02-15 2023-02-15 Industrial bar code reader debugging method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310117639.7A CN115828945B (en) 2023-02-15 2023-02-15 Industrial bar code reader debugging method, device and system

Publications (2)

Publication Number Publication Date
CN115828945A true CN115828945A (en) 2023-03-21
CN115828945B CN115828945B (en) 2023-05-19

Family

ID=85521499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310117639.7A Active CN115828945B (en) 2023-02-15 2023-02-15 Industrial bar code reader debugging method, device and system

Country Status (1)

Country Link
CN (1) CN115828945B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4044227A (en) * 1975-08-07 1977-08-23 The Upjohn Company Bar code reader
JPH04209080A (en) * 1990-12-05 1992-07-30 Nec Eng Ltd Bar code scanner
JPH05298473A (en) * 1992-04-20 1993-11-12 Casio Comput Co Ltd Device for testing bar code reader
JP2011103085A (en) * 2009-11-11 2011-05-26 Nec Infrontia Corp Bar code reader and labeling system
CN105654000A (en) * 2015-12-22 2016-06-08 福建联迪商用设备有限公司 Test method for two-dimensional code scanning equipment performance based on different angles
CN208156674U (en) * 2018-04-24 2018-11-27 万达百汇科技(深圳)有限公司 Barcode scanning speed testing device
CN110717347A (en) * 2019-10-08 2020-01-21 珠海格力智能装备有限公司 Method and device for acquiring cargo information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4044227A (en) * 1975-08-07 1977-08-23 The Upjohn Company Bar code reader
JPH04209080A (en) * 1990-12-05 1992-07-30 Nec Eng Ltd Bar code scanner
JPH05298473A (en) * 1992-04-20 1993-11-12 Casio Comput Co Ltd Device for testing bar code reader
JP2011103085A (en) * 2009-11-11 2011-05-26 Nec Infrontia Corp Bar code reader and labeling system
CN105654000A (en) * 2015-12-22 2016-06-08 福建联迪商用设备有限公司 Test method for two-dimensional code scanning equipment performance based on different angles
CN208156674U (en) * 2018-04-24 2018-11-27 万达百汇科技(深圳)有限公司 Barcode scanning speed testing device
CN110717347A (en) * 2019-10-08 2020-01-21 珠海格力智能装备有限公司 Method and device for acquiring cargo information

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"扫描仪的分辨率与测试精度" *

Also Published As

Publication number Publication date
CN115828945B (en) 2023-05-19

Similar Documents

Publication Publication Date Title
CN110660066B (en) Training method of network, image processing method, network, terminal equipment and medium
Di Leo et al. A vision system for the online quality monitoring of industrial manufacturing
US11132786B2 (en) Board defect filtering method based on defect list and circuit layout image and device thereof and computer-readable recording medium
CN111507976B (en) Defect detection method and system based on multi-angle imaging
CN110865077B (en) Visual inspection system for appearance defects in RFID antenna production
CN111784674B (en) Element detection method, device, computer equipment and storage medium
CN111915485B (en) Rapid splicing method and system for feature point sparse workpiece images
CN108520514A (en) Printed circuit board electronics member device consistency detecting method based on computer vision
US6993177B1 (en) Gauging based on global alignment and sub-models
EP2286369A2 (en) Method and system for enhanced image alignment
TW201317904A (en) Tag detecting system, apparatus and method for detecting tag thereof
CN117571721B (en) Method and device for detecting surface defects of circuit board bonding pad and storage medium
CN112053333B (en) Square billet detection method, system, equipment and medium based on machine vision
CN116228678A (en) Automatic identification and processing method for chip packaging defects
CN116543247A (en) Data set manufacturing method and verification system based on photometric stereo surface reconstruction
CN110288040B (en) Image similarity judging method and device based on topology verification
CN117871416A (en) Grain coordinate sorting method and system
CN117152145B (en) Board card process detection method and device based on image
CN110532971A (en) Image procossing and device, training method and computer readable storage medium
US11989928B2 (en) Image processing system
CN115828945B (en) Industrial bar code reader debugging method, device and system
CN108564571B (en) Image area selection method and terminal equipment
CN115770731A (en) Method and system for eliminating bad workpieces based on laser vision
CN115631169A (en) Product detection method and device, electronic equipment and storage medium
CN114913118A (en) Industrial visual detection method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant