Boundary point positioning method and device for one-dimensional code
A boundary point and two-dimensional code technology, applied in the field of image processing, can solve problems such as the inability to accurately locate the boundary point of one-dimensional codes, the presence of noise, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0048] figure 1 A schematic diagram of a one-dimensional code boundary point positioning process provided by an embodiment of the present invention, the process includes the following steps:
[0049] S101: Determine the gradient value of each pixel point on the scanning line in the one-dimensional code area, and determine the pixel point whose gradient direction changes as a reference point according to the gradient value of each pixel point.
[0050] A method for locating a boundary point of a one-dimensional code provided by an embodiment of the present invention is applied to an electronic device. The electronic device may be a barcode reading device such as a handheld barcode reader or a fixed barcode reader, or may be a terminal device such as a PC, a smart TV, a camera phone, or a tablet computer with a barcode decoding function.
[0051] The electronic device determines the scanning line in the one-dimensional code area along the direction of the long side of the one-d...
Embodiment 2
[0060] In order to accurately determine each peak point and valley point on the scanning line, on the basis of the above-mentioned embodiments, in the embodiment of the present invention, for the adjacent reference point, according to the pixel value of the adjacent reference point and the preset Set the pixel threshold to determine each peak and valley point on the scan line including:
[0061] Assuming that the current first reference point is a candidate peak point, determine whether the pixel value of a second reference point adjacent to the first reference point and located behind the first reference point is greater than the pixel value of the first reference point;
[0062] If yes, updating the second reference point as a candidate peak point;
[0063] If not, determine whether the absolute value of the difference between the pixel values of the second reference point and the first reference point is greater than a preset pixel threshold, if yes, determine the second ...
Embodiment 3
[0070] In order to further make each peak point and valley point on the determined scanning line more accurate, on the basis of the above embodiments, in the embodiment of the present invention, after the first reference point is determined as the peak point, the Methods also include:
[0071] updating the currently saved reference difference according to the absolute value of the difference between the peak point and the pixel value of the valley point before the peak point;
[0072] The determining the second reference point as a candidate valley point includes:
[0073] Determine the absolute value of the difference between the pixel values of the first reference point and the second reference point, determine whether the ratio of the absolute value of the difference to the reference difference is greater than a preset ratio threshold, and if so, convert the first Two reference points are determined as candidate valley points.
[0074]For the one-dimensional code area, ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

