An image extraction-based disinfectant identification system

CN122965535APending Publication Date: 2026-10-23CHENGDU HAPPY HEALTH PHARMACEUTICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610852757.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]现有技术通常围绕像素信息、灰度分布、颜色特征、边缘轮廓、纹理结构、区域边界和目标形态进行采集、分离、增强、转换和识别处理,实际运作中更强调对图像整体视觉信息的提取和增强,面对消毒剂瓶表面的水滴光斑、透明瓶体反射、标签弯曲和条码局部遮挡时,容易将反光区域误判为有效纹理,将水滴边缘误判为标签边界,将瓶体弧面引起的条码弯折视为正常条码形态;由于边缘轮廓提取结果常受灰度突变和背景纹理共同影响,标签真实边界同瓶身折痕、印刷图案、反射高亮之间的区分度不足,边界截取位置可能发生偏移,导致标签区域残留背景像素或缺失边缘像素

Benefits of technology

[0014]与现有技术相比,本发明的优点和积极效果在于:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965535A_ABST
    Figure CN122965535A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image extraction, in particular to a disinfectant identification system based on image extraction, which comprises a water droplet light spot removal module, a gray value sequence is extracted according to a disinfectant bottle image, a rhombus matrix is set, and the gray value sequence is operated with the rhombus matrix. In the present application, the label isolated image is intercepted through the label continuous boundary line, and then the label isolated image is mapped by surface flattening according to the curvature of the label continuous boundary line, so that the influence of barcode compression, stretching and inclination caused by the arc surface of the bottle body can be weakened; through the dimension reduction projection superposition of each column of gray value, the adjacent element difference calculation and the alignment of the difference maximum value position coordinate item, the two-dimensional barcode pattern can be converted into a stable one-dimensional distribution vector parameter and a disinfectant barcode feature, so that the preset barcode feature library matching comparison has more clear edge reference and feature reference, thereby improving the accuracy of disinfectant identification result under complex shooting conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image extraction technology, and in particular to a disinfectant identification system based on image extraction. Background Technology

[0002] The field of image extraction technology mainly involves the acquisition, separation, enhancement, conversion, and recognition of pixel information, grayscale distribution, color features, edge contours, texture structures, region boundaries, and target shapes in images. By extracting effective visual information from images, it reduces interference from lighting, background, noise, and deformation.

[0003] Existing technologies typically focus on acquiring, separating, enhancing, converting, and recognizing pixel information, grayscale distribution, color features, edge contours, texture structures, region boundaries, and target morphology. In practice, they emphasize the extraction and enhancement of overall visual information. However, when faced with water droplet spots on the surface of disinfectant bottles, reflections from transparent bottles, label curvature, and partial barcode occlusion, they are prone to misjudging reflective areas as valid textures, water droplet edges as label boundaries, and barcode bending caused by the bottle's curvature as normal barcode shape. Furthermore, because edge contour extraction results are often affected by both abrupt grayscale changes and background textures, the distinction between the true label boundary and bottle creases, printed patterns, and reflective highlights is insufficient. The boundary truncation position may also be offset, resulting in residual background pixels or missing edge pixels in the label area. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a disinfectant identification system based on image extraction.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a disinfectant identification system based on image extraction includes: The water droplet spot removal module extracts a grayscale value sequence from the disinfectant bottle image, sets a rhombus matrix, performs operations on the grayscale value sequence and the rhombus matrix to obtain a bottom cap value set, and calculates and generates a high-gloss image sequence based on the bottom cap value set. The label boundary projection module extracts the edge pixel coordinates of the disinfectant label image from the sequence of images without highlights, establishes a quadratic polynomial parametric equation based on the set of edge pixel coordinates, substitutes the edge pixel coordinates into the quadratic polynomial parametric equation to perform least squares calculation, obtains the set of quadratic polynomial coefficients, constructs a three-dimensional parametric coordinate system, introduces the edge pixel coordinates into the three-dimensional parametric coordinate system, and calculates and generates node energy values. The label peak positioning module compares and determines the energy data of each node in the three-dimensional parameter coordinate system based on the node energy value, filters the node with the largest value in each local area, obtains the extreme value coordinate node item, substitutes the extreme value coordinate node item into the quadratic polynomial parametric equation to perform curve mapping calculation, extracts the curve equation parameters, and combines the curve equation parameters with the positional features of the label barcode pattern to fit the two-dimensional coordinate plane of the non-highlight image sequence to generate the label continuous boundary line.

[0006] Preferably, the system further includes: The barcode feature extraction module performs matrix boundary truncation on the internal region of the non-highlight image sequence to obtain an isolated label image. Based on the curvature of the continuous boundary lines of the label, it performs surface flattening mapping calculation on the isolated label image to generate a flattened label image. It then performs dimensionality reduction projection and superposition on the grayscale values ​​of each column of the flattened label image to extract a one-dimensional distribution vector parameter. Next, it performs difference calculation on adjacent elements of the one-dimensional distribution vector parameter to extract the coordinates of the maximum difference value. Finally, it aligns the coordinates of the maximum difference value with the edge position of the label barcode pattern and performs feature mapping calculation to generate disinfectant barcode features. The module then matches and compares these disinfectant barcode features with a preset barcode feature library to output the disinfectant identification result.

[0007] Preferably, the step of obtaining the specular-free image sequence is as follows: Read the row coordinates, column coordinates, and original color channel values ​​of each pixel in the disinfectant bottle image. Convert the original color channel values ​​of the same pixel into a single gray value. Arrange the single gray values ​​continuously in ascending order of row coordinates and column coordinates, and retain the original pixel coordinates corresponding to each single gray value to obtain a gray value sequence. Define the center node, horizontal extension nodes, vertical extension nodes, and diagonal connection nodes of the rhombus matrix. Perform a closing operation on the grayscale value sequence with the rhombus matrix, record the closing operation value corresponding to each pixel, subtract the grayscale value of the same coordinate in the grayscale value sequence from the closing operation value to obtain the bottom cap value set. Perform an opening operation on the grayscale value sequence with the rhombus matrix, record the opening operation value corresponding to each pixel, and subtract the opening operation value from the grayscale value of the same coordinate in the grayscale value sequence to obtain the top cap value set. Based on the grayscale value sequence, bottom cap value set, and top cap value set, the corresponding grayscale value, bottom cap value, and top cap value are called point by point according to the original pixel coordinates in the grayscale value sequence. First, the top cap value with the same coordinate is subtracted from the grayscale value to reduce the abrupt grayscale components of the water droplet spot in the grayscale value sequence. Then, the bottom cap value with the same coordinate is added to compensate for the missing grayscale components corresponding to the dark spot area of ​​the bottle. Finally, the values ​​after algebraic operation are rearranged according to the original pixel coordinate order to generate a sequence of images without highlights.

[0008] Preferably, the steps for obtaining the coefficient set of the quadratic polynomial are as follows: Read the grayscale value difference of adjacent pixels in the non-highlight image sequence line by line, and record the horizontal grayscale change position, vertical grayscale change position and diagonal grayscale change position respectively. Merge the coordinates of the horizontal grayscale change position, vertical grayscale change position and diagonal grayscale change position at the same position, remove discrete coordinate points that do not form a continuous label outline, and retain the row coordinates and column coordinates of the pixels located on the disinfectant label image outline to obtain the set of edge pixel coordinate points; Arrange the row coordinates of pixels in the edge pixel coordinate set in ascending order of the column coordinates. Use the column coordinates of pixels as the independent variable and the row coordinates of pixels as the dependent variable to establish a quadratic polynomial parametric equation. Substitute the column coordinates and the corresponding row coordinates of each pixel in the edge pixel coordinate set into the quadratic polynomial parametric equation. Calculate the residual value after substituting each edge pixel coordinate. Determine the coefficients of the quadratic term, the linear term, and the constant term according to the calculation criterion of minimizing the sum of squares of the residual values ​​to obtain the quadratic polynomial coefficient set.

[0009] Preferably, the step of obtaining the node energy value is as follows: Based on the set of edge pixel coordinates and the set of quadratic polynomial coefficients, a three-dimensional parametric coordinate system is constructed, consisting of coordinate axes for quadratic coefficients, linear coefficients, and constant coefficients. The set of edge pixel coordinates is introduced into the three-dimensional parametric coordinate system point by point. The value range of each coordinate axis is defined according to the numerical range of the quadratic coefficients, linear coefficients, and constant coefficients in the set of quadratic polynomial coefficients. For each node in the three-dimensional parametric coordinate system, the path fitting value from the curve corresponding to the node to the edge pixel coordinates is accumulated along the arrangement order of the set of edge pixel coordinates. The accumulated path fitting value is written into the corresponding three-dimensional parametric coordinate system node to generate the node energy value.

[0010] Preferably, the step of obtaining the extreme value coordinate node item is as follows: Based on the node energy value, read the quadratic coefficient coordinates, linear coefficient coordinates, constant coefficient coordinates, and energy data corresponding to each node in the three-dimensional parameter coordinate system. Compare the energy data of each node in the three-dimensional parameter coordinate system with the energy data of its adjacent nodes. Retain the three-dimensional parameter coordinate system node with the largest energy data value in its local area and remove the three-dimensional parameter coordinate system nodes whose energy data in the same local area does not reach the maximum value condition to obtain the extreme value coordinate node item.

[0011] Preferably, the step of obtaining the continuous boundary line of the label is as follows: Read the quadratic term coefficient coordinates, linear term coefficient coordinates, and constant term coefficient coordinates from the extreme value coordinate node item respectively. Substitute the quadratic term coefficient coordinates, linear term coefficient coordinates, and constant term coefficient coordinates into the quadratic polynomial parametric equation. Calculate the corresponding pixel row coordinates according to the increasing order of the pixel column coordinates in the specular image sequence. Record the curve coordinate sequence formed by each pixel column coordinate and the corresponding pixel row coordinates, and extract the curve equation parameters. The barcode pattern's positional features, including the barcode edge start coordinates, barcode edge end coordinates, and barcode extension direction, are read. The curve equation parameters are mapped onto the two-dimensional coordinate plane of the non-highlight image sequence. A boundary line fitting interval is defined according to the barcode edge start coordinates and barcode edge end coordinates. The row coordinate difference and column coordinate difference are compared between the coordinate values ​​at both ends of the broken curve segments within the fitting interval. The endpoints of the broken curve segments that meet the condition of consistent adjacent extension directions are connected and supplemented by calculation to generate a continuous boundary line for the label.

[0012] Preferably, the step of obtaining the flattened label image is as follows: The internal region of the non-highlight image sequence is subjected to matrix boundary cropping. The row coordinates, column coordinates, and grayscale values ​​of the pixels within the range enclosed by the continuous boundary line of the label are read. The matrix cropping boundary is determined according to the upper boundary coordinates, lower boundary coordinates, left boundary coordinates, and right boundary coordinates of the continuous boundary line of the label. The pixel coordinates and grayscale values ​​outside the matrix cropping boundary are removed, and the pixel coordinates and grayscale values ​​inside the matrix cropping boundary are rearranged according to the original row and column order to obtain the isolated label image. Read the row coordinate difference, column coordinate difference, and curvature direction change value of adjacent boundary points in the continuous boundary line of the label. Calculate the curvature change value of the continuous boundary line of the label at each column position. Correct the vertical displacement of the row coordinates of each pixel in the isolated label image according to the curvature change value. Correct the horizontal spacing of the column coordinates of each pixel in the isolated label image according to the curvature change value. Refill the corrected pixel grayscale values ​​according to the regular matrix position to generate a flattened label image.

[0013] Preferably, the step of obtaining the disinfectant identification result is as follows: The grayscale values ​​of the same column in the flattened label image are read column by column. The grayscale values ​​of the same column are projected and superimposed along the column direction. The projected superimposed values ​​of each column are arranged in ascending order of column coordinates. A one-dimensional distribution vector parameter is extracted. The difference between adjacent elements in the one-dimensional distribution vector parameter is calculated. The difference value and column coordinate position corresponding to each group of adjacent elements are recorded. The column coordinate position with the largest difference value is selected. The position coordinate item of the maximum difference value is extracted. The position coordinate item of the maximum difference value is aligned with the edge position of the label barcode pattern. Feature mapping calculation is performed according to the barcode edge start position, barcode edge end position and barcode width distribution to generate disinfectant barcode features. The disinfectant barcode features are matched and compared with the barcode benchmark features in the preset barcode feature library item by item. The disinfectant identification result is output according to the disinfectant category, disinfectant specification and disinfectant identification number corresponding to the matching item.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by extracting the grayscale value sequence from the disinfectant bottle image and introducing a rhombus matrix to perform calculations with the grayscale value sequence, the grayscale abrupt change component corresponding to the water droplet spot and the grayscale missing component corresponding to the bottle body dark spot can be processed separately, generating a speckle-free image sequence. This prevents the subsequent label area from being directly interfered with by reflective points, water droplet spots, and local shadows. Based on the speckle-free image sequence, the edge pixel coordinates of the disinfectant label image are extracted, and the edge direction is parameterized using a quadratic polynomial parametric equation, a quadratic polynomial coefficient set, and a three-dimensional parametric coordinate system. This transforms the label's curved boundary from being considered as scattered edge points into node energy values ​​with continuous geometric constraints. By comparing the magnitude of the node energy values, the node with the largest value in the local area is selected, and... Mapping extreme coordinate nodes to curve equation parameters enhances the curve response corresponding to the true label boundary and suppresses false boundary interference caused by background textures, bottle creases, and barcode lines. Extracting isolated label images by cropping them from continuous label boundary lines and then flattening them based on the curvature of the continuous boundary lines reduces the effects of barcode compression, stretching, and tilting caused by the bottle's curved surface. By overlaying the grayscale values ​​of each column through dimensionality reduction projection, calculating the difference between adjacent elements, and aligning the coordinates of the maximum difference value, the two-dimensional barcode pattern can be transformed into a stable one-dimensional distribution vector parameter and disinfectant barcode features. This provides a clearer edge benchmark and feature reference for matching and comparing the preset barcode feature library, thereby improving the accuracy of disinfectant identification results under complex shooting conditions. Attached Figure Description

[0015] Figure 1 A comparison curve of the correction effect for sequences without highlights; Figure 2 This is a heatmap showing the distribution of node energy values. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] Please see Figure 1-2 The present invention provides a technical solution: a disinfectant identification system based on image extraction, comprising: The water droplet spot removal module extracts the grayscale value sequence from the disinfectant bottle image, sets a rhombus matrix, performs operations on the grayscale value sequence and the rhombus matrix to obtain the bottom cap value set, and calculates and generates a sequence of images without highlights based on the bottom cap value set. The label boundary projection module extracts the edge pixel coordinates of the disinfectant label image from the sequence of images without highlights. It establishes a quadratic polynomial parametric equation based on the set of edge pixel coordinates, substitutes the edge pixel coordinates into the quadratic polynomial parametric equation for least squares calculation, obtains the set of quadratic polynomial coefficients, constructs a three-dimensional parametric coordinate system, introduces the edge pixel coordinates into the three-dimensional parametric coordinate system, and calculates and generates node energy values. The label peak positioning module compares and determines the energy data of each node in the three-dimensional parametric coordinate system based on the node energy value, filters the node with the largest value in each local area, obtains the extreme value coordinate node item, substitutes the extreme value coordinate node item into the quadratic polynomial parametric equation for curve mapping calculation, extracts the curve equation parameters, and combines the curve equation parameters with the positional features of the label barcode pattern to fit to the two-dimensional coordinate plane without specular image sequence to generate the label continuous boundary line. The barcode feature extraction module performs matrix boundary truncation on the internal regions of the non-highlight image sequence to obtain isolated label images. Based on the curvature of the continuous label boundary lines, it performs surface flattening mapping calculations on the isolated label images to generate flattened label images. The module then performs dimensionality reduction projection and overlay on the grayscale values ​​of each column of the flattened label images to extract one-dimensional distribution vector parameters. Difference calculations are performed on adjacent elements of the one-dimensional distribution vector parameters to extract the coordinates of the maximum difference value. These coordinates are then aligned with the edge of the label barcode pattern for feature mapping calculation to generate disinfectant barcode features. Finally, the disinfectant barcode features are matched and compared with a preset barcode feature library to output the disinfectant recognition result.

[0018] The steps to obtain a sequence without highlights are as follows: Read the row coordinates, column coordinates, and original color channel values ​​of each pixel in the disinfectant bottle image. Convert the original color channel values ​​of the same pixel into a single gray value. Arrange the single gray values ​​continuously in ascending order of row coordinates and column coordinates, and retain the original pixel coordinates corresponding to each single gray value to obtain a gray value sequence. Set the center node, horizontal extension nodes, vertical extension nodes, and diagonal connection nodes of the rhombus matrix. Perform a closing operation on the grayscale value sequence with the rhombus matrix and record the closing operation value corresponding to each pixel. Subtract the grayscale value at the same coordinate in the grayscale value sequence from the closing operation value to obtain the bottom cap value set. Perform an opening operation on the grayscale value sequence with the rhombus matrix and record the opening operation value corresponding to each pixel. Subtract the opening operation value from the grayscale value at the same coordinate in the grayscale value sequence to obtain the top cap value set. Based on the grayscale value sequence, the bottom cap value set, and the top cap value set, the corresponding grayscale value, bottom cap value, and top cap value are called point by point according to the original pixel coordinates in the grayscale value sequence. First, the top cap value with the same coordinate is subtracted from the grayscale value to reduce the abrupt grayscale components of the water droplet spot in the grayscale value sequence. Then, the bottom cap value with the same coordinate is added to compensate for the missing grayscale components corresponding to the dark spot area of ​​the bottle. Finally, the values ​​after algebraic operation are rearranged according to the original pixel coordinate order to generate a sequence of images without highlights.

[0019] Specifically, the process reads the row coordinates, column coordinates, and original color channel values ​​of each pixel in the disinfectant bottle image. Specifically, the input disinfectant bottle image, for example, a 1920x1080 pixel RGB image, is loaded into memory and scanned pixel by pixel. For the first pixel (0,0), its row coordinate 0, column coordinate 0, and the values ​​of its three RGB color channels are read, for example, (R:150, G:160, B:170). Then, a standard weighted average method is applied to convert these three color channel values ​​into a single grayscale value. The conversion process follows the formula: ,in This is the calculated grayscale value. R, G, and B are the original values ​​of the red, green, and blue channels of this pixel, respectively. The values ​​are calculated by substituting them into the example values. Rounding down to 158, a data structure is created to store both the grayscale value and its original coordinates, such as a list of tuples, where the first element is ((0, 0), 158). This process starts from the first pixel in the first row and first column, processing each pixel along the row to the end, then moving to the beginning of the next row, until the last pixel (1919, 1079) is processed. All pixels are processed in this "row-first, column-later" order, and the calculated single grayscale values ​​are arranged sequentially to form a one-dimensional numerical sequence. At the same time, the position index of each value in the sequence is associated with a data pair containing its original row and column coordinates, thus obtaining a grayscale numerical sequence that contains both image grayscale information and spatial location information.

[0020] Define the center node, horizontal extension nodes, vertical extension nodes, and diagonal connection nodes of the rhombus matrix. This rhombus matrix is ​​a structural element, and its size is preset based on the approximate size of the light and dark spots that may appear on the bottle surface. For example, define a rhombus structural element with a radius of 5, whose covered set of pixels is all those that meet the conditions. The coordinates (x, y) of the rhombus matrix are used to perform morphological closing operations on the two-dimensional image represented by the grayscale value sequence generated in the previous step. The closing operation involves first dilating the image and then eroding it. The dilution operation involves sliding the center of the rhombus matrix across each pixel and updating the pixel value of that point to the maximum pixel value within the matrix's coverage area. The erosion operation updates the value to the minimum value. After completing the closing operation, a closed image is obtained. The closing value corresponding to each pixel position is recorded. The closing operation values ​​are subtracted point by point from the original grayscale values ​​at the corresponding coordinates in the grayscale value sequence. The difference results form the bottom cap value set, which highlights the dark areas in the original image filled by the closing operation. Next, the same rhombus matrix is ​​used to perform morphological opening operation on the grayscale value sequence. The opening operation process is erosion followed by dilation. After the opening operation is completed, an opening operation image is obtained, and the opening operation value at each pixel position is recorded. Finally, the original grayscale values ​​at the corresponding coordinates in the grayscale value sequence are subtracted from these opening operation values, and the difference results form the top cap value set.

[0021] Based on the grayscale value sequence, the bottom cap value set, and the top cap value set, pixel-by-pixel grayscale correction is performed on the image. Specifically, the coordinates of each pixel in the image are traversed. For example, for the pixel with coordinates (i,j), its original grayscale value is first retrieved from the grayscale value sequence. Then, retrieve the top-hat value at the same coordinate from the top-hat value set. And retrieve the bottom cap values ​​at the same coordinate from the bottom cap value set. Then, an algebraic operation is performed to calculate the new grayscale value. The calculation method is to subtract the top cap value of the point from the original grayscale value, and then add it back to the bottom cap value of the point. This subtraction operation reduces the brightness of localized bright areas caused by water droplets or reflections, while the addition operation increases the brightness of localized dark areas caused by the curved surface of the bottle or occlusion. During the calculation process, the results need to be constrained within a certain range. Since grayscale values ​​are typically integers between 0 and 255, if the calculated values... If the value is less than 0, set it to 0; if the value is greater than 255, set it to 255 to ensure the validity of the value. Repeat this process for all pixels in the image and update all newly calculated grayscale values. Reorganize and arrange the data according to the same coordinate order as the original grayscale numerical sequence, i.e., row-first, column-later, to generate a sequence of images without highlights.

[0022] The steps to obtain the coefficient set of a quadratic polynomial are as follows: Read the grayscale differences of adjacent pixels in the non-highlight image sequence line by line, and record the horizontal grayscale change position, vertical grayscale change position, and diagonal grayscale change position respectively. Merge the coordinates of the horizontal grayscale change position, vertical grayscale change position, and diagonal grayscale change position at the same position, remove discrete coordinate points that do not form a continuous label outline, and retain the row coordinates and column coordinates of the pixels located on the disinfectant label image outline to obtain the set of edge pixel coordinate points; Arrange the row coordinates of pixels in the edge pixel coordinate set in ascending order of column coordinates. Use the column coordinates of pixels as the independent variable and the row coordinates of pixels as the dependent variable to establish a quadratic polynomial parametric equation. Substitute the column coordinates and corresponding row coordinates of each pixel in the edge pixel coordinate set into the quadratic polynomial parametric equation. Calculate the residual value after substituting each edge pixel coordinate. Determine the coefficients of the quadratic term, the linear term, and the constant term according to the calculation criterion of minimizing the sum of squares of the residual values ​​to obtain the quadratic polynomial coefficient set.

[0023] Specifically, the grayscale differences between adjacent pixels in the non-highlight image sequence are read line by line, and a grayscale abrupt change judgment threshold is first set. The threshold is set based on the overall gradient distribution of the image. For example, by calculating the Sobel gradient response of the entire sequence of images without highlights, the gradient magnitude of all pixels is obtained, and the average value of these gradient magnitudes is calculated. For example, calculations show that ,but Next, iterate through each pixel (x, y) in the sequence of pixels without highlights, calculate the absolute value of its grayscale difference with its neighboring pixels, and for the horizontal direction, calculate... If the value is greater than Then record (x, y) as the horizontal gray-level abrupt change location; similarly, calculate the vertical difference. and oblique differences and with The process involves comparing and recording the corresponding mutation locations. After traversing the entire process, coordinate merging is performed on all recorded mutation locations. That is, if a coordinate (x, y) is marked as a mutation location in at least one of the horizontal, vertical, or diagonal directions, it is considered a candidate edge point. Subsequently, discrete point elimination is performed. This process is achieved by analyzing the neighborhood of each candidate point. A neighborhood radius (e.g., 3 pixels) and a minimum number of candidate points in the neighborhood (e.g., 4) are set. For each candidate point, the number of other candidate points in its neighborhood is checked. If the number is less than 4, the point is considered an isolated noise point and is eliminated. After this step, the remaining points are considered to constitute part of the continuous label outline. Their row and column coordinates are summed to obtain the set of edge pixel coordinate points.

[0024] Arrange the row coordinates of pixels in ascending order of column coordinates in the edge pixel coordinate set. First, process all coordinate points in the set. Based on its column coordinates The values ​​are sorted in ascending order, and based on this, a column coordinate system is created. The independent variable is the row coordinate of the pixel. The quadratic polynomial parametric equation for the dependent variable has the following general form: Where a, b, and c are the coefficients of the quadratic term, the linear term, and the constant term, respectively. To determine the optimal values ​​of these three coefficients, the least squares method is used, which calculates the coefficients of each point in the set of edge pixel coordinates. Substitute all values ​​into the equation to calculate the residual between the theoretical prediction and the actual observation, i.e. The goal of the least squares method is to find a set (a, b, c) such that the sum of squared residuals of all edge points is equal to the sum of squared residuals. To minimize S, where N is the total number of edge pixel coordinates, we calculate the partial derivatives of S with respect to a, b, and c, and set them to zero. This will derive a system of linear equations with three unknowns (a, b, c). By solving this system of equations, for example using Cramer's rule or Gaussian elimination, we can uniquely determine the values ​​of the coefficients a, b, and c. The obtained (a, b, c) values ​​constitute the set of coefficients of the quadratic polynomial.

[0025] The steps to obtain node energy values ​​are as follows: Based on the set of edge pixel coordinates and the set of quadratic polynomial coefficients, a three-dimensional parametric coordinate system is constructed, consisting of quadratic coefficient coordinate axes, linear coefficient coordinate axes, and constant coefficient coordinate axes. The set of edge pixel coordinates is introduced into the three-dimensional parametric coordinate system point by point. The value range of each coordinate axis is limited according to the numerical range of the quadratic coefficient, linear coefficient, and constant coefficient in the set of quadratic polynomial coefficients. For each node in the three-dimensional parametric coordinate system, the path fitting value from the curve corresponding to the node to the edge pixel coordinates is accumulated along the arrangement order of the set of edge pixel coordinates. The accumulated path fitting value is written into the corresponding three-dimensional parametric coordinate system node to generate the node energy value.

[0026] Specifically, based on the set of edge pixel coordinates and the set of quadratic polynomial coefficients, a three-dimensional parametric coordinate system is constructed with quadratic coefficients *a*, linear coefficients *b*, and constant coefficients *c* as coordinate axes. This is a variant of Hough space. First, based on the previously calculated values ​​of the quadratic polynomial coefficient set, the range of values ​​for each coordinate axis and the discretization step size are determined. For example, if the calculated coefficient set is {a: 0.005, b: -0.2, c: 80}, the range of the a-axis can be set to [0, 0.01] with a step size of 0.0001, the range of the b-axis to [-0.5, 0.5] with a step size of 0.01, and the range of the c-axis to [0, 200] with a step size of 1. This defines a grid composed of a large number of discrete nodes in the three-dimensional parametric space. Each node uniquely corresponds to a set of (a, b, c) parameters, representing a potential quadratic curve. Then, for each node in the three-dimensional parametric coordinate system (a_j, b_j, ..., c_j), ... c_j) is used to calculate its energy value. The calculation method is to take each point in the set of edge pixel coordinates. "Vote" one by one for all possible curves that may pass through it; specifically, for a point... It falls on the curve In discrete space, a distance tolerance can be set. For example, 2 pixels, if Then the energy value of the node (a_j, b_j, c_j) is incremented by one. This process is called the accumulation of path fitting values. After traversing all edge pixel coordinates, the accumulated value of each node is its final node energy value, and this energy value is written into the data structure of the corresponding three-dimensional parameter coordinate system node.

[0027] The steps to obtain the extreme value coordinate node item are as follows: Based on the node energy value, read the quadratic coefficient coordinates, linear coefficient coordinates, constant coefficient coordinates, and energy data of each node in the three-dimensional parametric coordinate system. Compare the energy data of each node in the three-dimensional parametric coordinate system with the energy data of its adjacent nodes. Retain the three-dimensional parametric coordinate system node with the largest energy data value in its local area and remove the three-dimensional parametric coordinate system nodes whose energy data in the same local area does not reach the maximum value condition. Obtain the extreme value coordinate node term.

[0028] Specifically, based on the node energy values, local nonmaximum suppression is performed on the energy data in the 3D parametric coordinate system. First, the position coordinates (a, b, c) and corresponding energy data E(a, b, c) of each node in the 3D parametric coordinate system are read sequentially. For each node to be examined, a local region is defined, which is the set of neighboring nodes of the node in the 3D mesh. For example, a 3x3x3 cube neighborhood can be defined, containing the current node and its 26 surrounding neighboring nodes. Then, the energy data E(a, b, c) of the current node are processed. c) The energy data of the current node is compared one by one with the energy data of each of its 26 neighboring nodes. The criterion is that if the energy data of the current node is greater than or equal to the energy data of all 26 neighboring nodes, then the node is considered to be an energy peak point in a local region and is retained. Conversely, if the energy data of any neighboring node is greater than the energy data of the current node, then the current node is considered to be located on the "slope" of a certain energy peak, rather than the peak itself, and therefore does not meet the condition of the largest value, and is removed. This process traverses all nodes in the three-dimensional parametric coordinate system. Through this filtering mechanism, the discrete peak points that best represent the central curve characteristics of the data set can be extracted from the dense energy distribution. These retained three-dimensional parametric coordinate system nodes that have reached the maximum energy in their respective local regions together constitute the extreme value coordinate node item.

[0029] The steps to obtain the continuous boundary line of the label are as follows: Read the quadratic, linear, and constant coefficient coordinates of the extreme value coordinate node terms respectively. Substitute the quadratic, linear, and constant coefficient coordinates into the quadratic polynomial parametric equation. Calculate the corresponding pixel row coordinates according to the increasing order of the pixel column coordinates in the non-highlight image sequence. Record the curve coordinate sequence formed by each pixel column coordinate and the corresponding pixel row coordinates, and extract the curve equation parameters. The barcode pattern's positional features, including the barcode edge start coordinates, barcode edge end coordinates, and barcode extension direction, are read. The curve equation parameters are mapped to a two-dimensional coordinate plane without a specular image sequence. The boundary line fitting interval is defined according to the barcode edge start coordinates and barcode edge end coordinates. The row coordinate difference and column coordinate difference are compared between the coordinate values ​​at both ends of the broken curve segments within the fitting interval. The endpoints of the broken curve segments that meet the condition of consistent adjacent extension directions are connected and supplemented by calculation to generate a continuous boundary line for the label.

[0030] Specifically, the coordinates of the quadratic, linear, and constant terms in the extreme value coordinate node terms are read respectively. Each extreme value coordinate node term itself is a set of optimal quadratic polynomial coefficients {a, b, c}. These coefficients are then substituted into the preset quadratic polynomial parametric equation. In this process, a specific equation for a quadratic curve is determined. Next, to concretize this abstract mathematical curve as a sequence of pixels on an image, a curve mapping calculation is needed. This calculation involves moving the pixel column coordinates in the no-highlight image sequence in ascending order, starting from the leftmost column and moving column by column to the right. For each column coordinate x, the value ranges from 0 to the image width minus 1, and is substituted into the determined curve equation. In the calculation, the corresponding row coordinate y is calculated. Since the calculated y value is usually a floating-point number, while the pixel coordinate is an integer, a rounding operation is required, such as rounding to the nearest integer or rounding down. In this way, for each column coordinate x, a unique integer row coordinate y is obtained, forming a coordinate pair (x, y). Arranging all the coordinate pairs consisting of all column coordinates and their calculated corresponding row coordinates in ascending order of x constitutes a discretized curve coordinate sequence representing the quadratic curve. This sequence and the underlying equation coefficients {a, b, c} together form the curve equation parameters to be extracted.

[0031] The process reads the positional features of the label barcode pattern, including the start coordinates, end coordinates, and extension direction of the barcode edges. These positional features are predefined through analysis of standard disinfectant label samples. For example, a standard barcode might be recorded as {start coordinate type: left edge, end coordinate type: right edge, extension direction: vertical}, indicating that the barcode is vertically aligned. Then, the curve coordinate sequence defined by the curve equation parameters obtained in the previous step is mapped onto a two-dimensional coordinate plane without specular highlights. Using the types of the barcode edge start and end coordinates, combined with the label's general size information, a rough boundary line fitting interval is delineated on the image. For example, for curves on the left and right edges, the fitting interval is limited to the middle 80% of the label height to avoid overfitting. When fitting the top and bottom rounded corners of the label, within this range, due to noise or occlusion, the extracted curve equation parameters may correspond to multiple discontinuous curve segments. It is necessary to connect these broken curve segments. The specific method is to check the endpoints of all broken curve segments within the fitting range, calculate the difference in row coordinates and column coordinates between the nearest endpoints of two adjacent broken curve segments, and calculate the extension direction of the line connecting the two points based on the difference. If the angle between this extension direction and the preset barcode extension direction (e.g., the vertical direction) is less than a preset angle threshold (e.g., 10 degrees), then the two endpoints are considered to belong to the same boundary line, and they are connected using a straight line segment for supplementary calculation. By connecting all the broken points that meet the conditions, a complete and uninterrupted continuous label boundary line is finally generated.

[0032] The steps to obtain the flattened label image are as follows: The internal region of the non-highlight image sequence is subjected to matrix boundary cropping. The row coordinates, column coordinates, and grayscale values ​​of the pixels within the range enclosed by the continuous boundary line of the label are read. The matrix cropping boundary is determined according to the upper boundary coordinates, lower boundary coordinates, left boundary coordinates, and right boundary coordinates of the continuous boundary line of the label. The pixel coordinates and grayscale values ​​outside the matrix cropping boundary are removed, and the pixel coordinates and grayscale values ​​inside the matrix cropping boundary are rearranged according to the original row and column order to obtain the isolated label image. Read the row coordinate difference, column coordinate difference, and curvature direction change value of adjacent boundary points in the continuous boundary line of the label. Calculate the curvature change value of the continuous boundary line of the label at each column position. Correct the vertical displacement of the row coordinates of each pixel in the isolated label image according to the curvature change value. Correct the horizontal spacing of the column coordinates of each pixel in the isolated label image according to the curvature change value. Refill the corrected pixel grayscale values ​​according to the regular matrix position to generate a flattened label image.

[0033] Specifically, matrix boundary clipping is performed on the internal region of the non-highlight image sequence. First, a clipping range is determined using the generated continuous label boundary lines. Then, all coordinate points of the continuous label boundary lines are analyzed to find the maximum row coordinate (lower boundary coordinate), minimum row coordinate (upper boundary coordinate), maximum column coordinate (right boundary coordinate), and minimum column coordinate (left boundary coordinate). These four values ​​define a minimum rectangular boundary that can completely enclose the labels. Using this rectangular boundary as the basis for matrix clipping, each pixel in the non-highlight image sequence is traversed, and its row and column coordinates are checked to see if they simultaneously fall within the range of upper and lower boundaries. Within a rectangular region defined by the four boundary coordinates (left, right, and left), all pixels whose coordinates are outside the rectangle are discarded along with their corresponding pixel coordinates and grayscale values, and are not included in subsequent processing. For all pixels whose coordinates are inside the rectangle, their original row coordinates, column coordinates, and grayscale values ​​are retained. Then, these retained inner pixel data are rearranged into a new, smaller two-dimensional matrix according to their relative position in the original image, i.e., maintaining the original row and column order. The size of this new matrix is ​​determined by the previously determined boundary coordinates, with a width of (right boundary coordinates - left boundary coordinates + 1) and a height of (lower boundary coordinates - upper boundary coordinates + 1). Through this operation, the result is an isolated label image containing only the image data of the label's main body region.

[0034] Read the row coordinate difference, column coordinate difference, and curvature direction change values ​​of adjacent boundary points in the continuous boundary line of the label. Traverse every point on the continuous boundary line of the label and calculate its local curvature. The curvature can be approximated by analyzing the slope change of the small line segment formed by a point on the boundary line and its two nearest neighbors. For a point P(i) on the boundary line, its curvature is... It can be calculated from the coordinates of its neighboring points. A simplified method is to record the row coordinates corresponding to each column coordinate x on the upper and lower boundary lines. The degree of local curvature of the label in a column can be approximated by the change in the slope of the tangent line at that point. Then, based on the calculated curvature change values ​​corresponding to the column positions, a surface flattening mapping calculation is performed on the isolated label image. This process is divided into vertical and horizontal corrections. For vertical displacement correction, the pixels of each column in the isolated label image are treated as a whole, and a vertical offset is calculated based on the curvature value of that column. Pixels in areas with larger curvature (i.e., areas where the bottle body is more significantly curved) need to undergo larger displacement adjustments to simulate the effect of "straightening" them. For horizontal spacing correction, since the projection of the bottle body surface in the image will cause the area far from the center to be compressed, it is necessary to perform nonlinear stretching of the horizontal spacing of each column of pixels according to the curvature. The larger the curvature, the more severely the original physical width it represents is compressed, so a larger horizontal stretching is required. The gray values ​​of the corrected pixels are refilled according to the new, regular rectangular grid positions. Missing pixels can be obtained by interpolating the gray values ​​of neighboring pixels (such as bilinear interpolation), and finally, a flattened label image is generated.

[0035] The steps to obtain the disinfectant identification results are as follows: The grayscale values ​​of the same column in the flattened label image are read column by column. The grayscale values ​​of the same column are projected and superimposed along the column direction. The projected superimposed values ​​of each column are arranged in ascending order of column coordinates. A one-dimensional distribution vector parameter is extracted. The difference between adjacent elements in the one-dimensional distribution vector parameter is calculated. The difference value and column coordinate position corresponding to each group of adjacent elements are recorded. The column coordinate position with the largest difference value is selected. The coordinates of the position of the maximum difference value are extracted. The coordinates of the position of the maximum difference value are aligned with the edge position of the label barcode pattern. Feature mapping calculation is performed according to the barcode edge start position, barcode edge end position and barcode width distribution to generate disinfectant barcode features. The disinfectant barcode features are matched and compared with the barcode benchmark features in the preset barcode feature library item by item. The disinfectant identification result is output according to the disinfectant category, disinfectant specification and disinfectant identification number corresponding to the matching item.

[0036] Specifically, the grayscale values ​​of the same column in the flattened label image are read column by column. The grayscale values ​​of all pixels in each column are accumulated to obtain a projected superimposed value. This process is repeated for all columns of the flattened label image. The projected superimposed values ​​of each column are then arranged in ascending order from left to right, forming a one-dimensional array, i.e., a one-dimensional distribution vector parameter. This vector reflects the grayscale distribution intensity of the label image in the horizontal direction. Then, a first-order difference calculation is performed on this one-dimensional distribution vector parameter, i.e., the difference between every two adjacent elements is calculated, resulting in a new difference sequence. Each difference value and its corresponding original column coordinate position are recorded. The edges of the barcode area usually correspond to locations where grayscale values ​​change drastically, which manifests as peaks with large absolute values ​​in the difference sequence. Therefore, the absolute values ​​are searched and selected in the difference sequence. The column coordinates corresponding to the largest difference value are the coordinates of the maximum difference value. This position represents the most prominent edge of the barcode area. This maximum difference value coordinate is aligned with the edge position of the preset label barcode pattern (e.g., the left edge of the barcode). Based on this alignment point, and combined with known barcode width distribution, barcode start and end positions, feature mapping calculations are performed on the flattened label image to extract the binary sequence representing the barcode information, generating the disinfectant barcode feature. Finally, this extracted disinfectant barcode feature is matched item by item with the barcode baseline features in the preset barcode feature library in the database. Once a complete match is found, the disinfectant category, disinfectant specification, and disinfectant identification number associated with that match are read and output as the final result.

Claims

1. A disinfectant recognition system based on image extraction, characterized in that, The system includes: The water droplet spot removal module extracts a grayscale value sequence from the disinfectant bottle image, sets a rhombus matrix, performs operations on the grayscale value sequence and the rhombus matrix to obtain a bottom cap value set, and calculates and generates a high-gloss image sequence based on the bottom cap value set. The label boundary projection module extracts the edge pixel coordinates of the disinfectant label image from the sequence of images without highlights, establishes a quadratic polynomial parametric equation based on the set of edge pixel coordinates, substitutes the edge pixel coordinates into the quadratic polynomial parametric equation to perform least squares calculation, obtains the set of quadratic polynomial coefficients, constructs a three-dimensional parametric coordinate system, introduces the edge pixel coordinates into the three-dimensional parametric coordinate system, and calculates and generates node energy values. The label peak positioning module compares and determines the energy data of each node in the three-dimensional parameter coordinate system based on the node energy value, filters the node with the largest value in each local area, obtains the extreme value coordinate node item, substitutes the extreme value coordinate node item into the quadratic polynomial parametric equation to perform curve mapping calculation, extracts the curve equation parameters, and combines the curve equation parameters with the positional features of the label barcode pattern to fit the two-dimensional coordinate plane of the non-highlight image sequence to generate the label continuous boundary line.

2. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The system also includes: The barcode feature extraction module performs matrix boundary truncation on the internal region of the non-highlight image sequence to obtain an isolated label image. Based on the curvature of the continuous boundary lines of the label, it performs surface flattening mapping calculation on the isolated label image to generate a flattened label image. It then performs dimensionality reduction projection and superposition on the grayscale values ​​of each column of the flattened label image to extract a one-dimensional distribution vector parameter. Next, it performs difference calculation on adjacent elements of the one-dimensional distribution vector parameter to extract the coordinates of the maximum difference value. Finally, it aligns the coordinates of the maximum difference value with the edge position of the label barcode pattern and performs feature mapping calculation to generate disinfectant barcode features. The module then matches and compares these disinfectant barcode features with a preset barcode feature library to output the disinfectant identification result.

3. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The steps for obtaining the sequence of images without highlights are as follows: Read the row coordinates, column coordinates, and original color channel values ​​of each pixel in the disinfectant bottle image. Convert the original color channel values ​​of the same pixel into a single gray value. Arrange the single gray values ​​continuously in ascending order of row coordinates and column coordinates, and retain the original pixel coordinates corresponding to each single gray value to obtain a gray value sequence. Define the center node, horizontal extension nodes, vertical extension nodes, and diagonal connection nodes of the rhombus matrix. Perform a closing operation on the grayscale value sequence with the rhombus matrix, record the closing operation value corresponding to each pixel, subtract the grayscale value of the same coordinate in the grayscale value sequence from the closing operation value to obtain the bottom cap value set. Perform an opening operation on the grayscale value sequence with the rhombus matrix, record the opening operation value corresponding to each pixel, and subtract the opening operation value from the grayscale value of the same coordinate in the grayscale value sequence to obtain the top cap value set. Based on the grayscale value sequence, bottom cap value set, and top cap value set, the corresponding grayscale value, bottom cap value, and top cap value are called point by point according to the original pixel coordinates in the grayscale value sequence. First, the top cap value with the same coordinate is subtracted from the grayscale value to reduce the abrupt grayscale components of the water droplet spot in the grayscale value sequence. Then, the bottom cap value with the same coordinate is added to compensate for the missing grayscale components corresponding to the dark spot area of ​​the bottle. Finally, the values ​​after algebraic operation are rearranged according to the original pixel coordinate order to generate a sequence of images without highlights.

4. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The steps for obtaining the coefficient set of the quadratic polynomial are as follows: Read the grayscale value difference of adjacent pixels in the non-highlight image sequence line by line, and record the horizontal grayscale change position, vertical grayscale change position and diagonal grayscale change position respectively. Merge the coordinates of the horizontal grayscale change position, vertical grayscale change position and diagonal grayscale change position at the same position, remove discrete coordinate points that do not form a continuous label outline, and retain the row coordinates and column coordinates of the pixels located on the disinfectant label image outline to obtain the set of edge pixel coordinate points; Arrange the row coordinates of pixels in the edge pixel coordinate set in ascending order of the column coordinates. Use the column coordinates of pixels as the independent variable and the row coordinates of pixels as the dependent variable to establish a quadratic polynomial parametric equation. Substitute the column coordinates and the corresponding row coordinates of each pixel in the edge pixel coordinate set into the quadratic polynomial parametric equation. Calculate the residual value after substituting each edge pixel coordinate. Determine the coefficients of the quadratic term, the linear term, and the constant term according to the calculation criterion of minimizing the sum of squares of the residual values ​​to obtain the quadratic polynomial coefficient set.

5. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The steps for obtaining the node energy value are as follows: Based on the set of edge pixel coordinates and the set of quadratic polynomial coefficients, a three-dimensional parametric coordinate system is constructed, consisting of coordinate axes for quadratic coefficients, linear coefficients, and constant coefficients. The set of edge pixel coordinates is introduced into the three-dimensional parametric coordinate system point by point. The value range of each coordinate axis is defined according to the numerical range of the quadratic coefficients, linear coefficients, and constant coefficients in the set of quadratic polynomial coefficients. For each node in the three-dimensional parametric coordinate system, the path fitting value from the curve corresponding to the node to the edge pixel coordinates is accumulated along the arrangement order of the set of edge pixel coordinates. The accumulated path fitting value is written into the corresponding three-dimensional parametric coordinate system node to generate the node energy value.

6. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The steps for obtaining the extreme value coordinate node item are as follows: Based on the node energy value, read the quadratic coefficient coordinates, linear coefficient coordinates, constant coefficient coordinates, and energy data corresponding to each node in the three-dimensional parameter coordinate system. Compare the energy data of each node in the three-dimensional parameter coordinate system with the energy data of its adjacent nodes. Retain the three-dimensional parameter coordinate system node with the largest energy data value in its local area and remove the three-dimensional parameter coordinate system nodes whose energy data in the same local area does not reach the maximum value condition to obtain the extreme value coordinate node item.

7. The disinfectant recognition system based on image extraction according to claim 1, characterized in that, The steps for obtaining the continuous boundary line of the label are as follows: Read the quadratic term coefficient coordinates, linear term coefficient coordinates, and constant term coefficient coordinates from the extreme value coordinate node item respectively. Substitute the quadratic term coefficient coordinates, linear term coefficient coordinates, and constant term coefficient coordinates into the quadratic polynomial parametric equation. Calculate the corresponding pixel row coordinates according to the increasing order of the pixel column coordinates in the specular image sequence. Record the curve coordinate sequence formed by each pixel column coordinate and the corresponding pixel row coordinates, and extract the curve equation parameters. The barcode pattern's positional features, including the barcode edge start coordinates, barcode edge end coordinates, and barcode extension direction, are read. The curve equation parameters are mapped onto the two-dimensional coordinate plane of the non-highlight image sequence. A boundary line fitting interval is defined according to the barcode edge start coordinates and barcode edge end coordinates. The row coordinate difference and column coordinate difference are compared between the coordinate values ​​at both ends of the broken curve segments within the fitting interval. The endpoints of the broken curve segments that meet the condition of consistent adjacent extension directions are connected and supplemented to generate a continuous boundary line for the label.

8. The disinfectant recognition system based on image extraction according to claim 2, characterized in that, The steps for obtaining the flattened label image are as follows: The internal region of the non-highlight image sequence is subjected to matrix boundary cropping. The row coordinates, column coordinates, and grayscale values ​​of the pixels within the range enclosed by the continuous boundary line of the label are read. The matrix cropping boundary is determined according to the upper boundary coordinates, lower boundary coordinates, left boundary coordinates, and right boundary coordinates of the continuous boundary line of the label. The pixel coordinates and grayscale values ​​outside the matrix cropping boundary are removed, and the pixel coordinates and grayscale values ​​inside the matrix cropping boundary are rearranged according to the original row and column order to obtain the isolated label image. Read the row coordinate difference, column coordinate difference, and curvature direction change value of adjacent boundary points in the continuous boundary line of the label. Calculate the curvature change value of the continuous boundary line of the label at each column position. Correct the vertical displacement of the row coordinates of each pixel in the isolated label image according to the curvature change value. Correct the horizontal spacing of the column coordinates of each pixel in the isolated label image according to the curvature change value. Refill the corrected pixel grayscale values ​​according to the regular matrix position to generate a flattened label image.

9. The disinfectant recognition system based on image extraction according to claim 2, characterized in that, The steps for obtaining the disinfectant identification result are as follows: The grayscale values ​​of the same column in the flattened label image are read column by column. The grayscale values ​​of the same column are projected and superimposed along the column direction. The projected superimposed values ​​of each column are arranged in ascending order of column coordinates. A one-dimensional distribution vector parameter is extracted. The difference between adjacent elements in the one-dimensional distribution vector parameter is calculated. The difference value and column coordinate position corresponding to each group of adjacent elements are recorded. The column coordinate position with the largest difference value is selected. The position coordinate item of the maximum difference value is extracted. The position coordinate item of the maximum difference value is aligned with the edge position of the label barcode pattern. Feature mapping calculation is performed according to the barcode edge start position, barcode edge end position and barcode width distribution to generate disinfectant barcode features. The disinfectant barcode features are matched and compared with the barcode benchmark features in the preset barcode feature library item by item. The disinfectant identification result is output according to the disinfectant category, disinfectant specification and disinfectant identification number corresponding to the matching item.