Scanning anomaly identification method based on image analysis
Through image analysis technology, the comprehensive features of the barcode scanned image are extracted and abnormal characterization values and types are identified, which solves the problem that scanning abnormalities cannot be analyzed in the prior art, and realizes the abnormal identification and screening of the barcode scanning process.
Patent Information
- Application Number
- CN202411640939.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-12-27
AI Technical Summary
Existing barcode scanning technology cannot determine the degree of abnormality, type of abnormality, number of abnormalities and abnormal changes during scanning based on the quality changes of barcode graphics.
Using the scanning abnormality recognition method based on image analysis, the comprehensive features of the sample image are extracted, and whether it is qualified is determined by acquiring the scanning abnormality recognition values of the unqualified image, and comparing it with the threshold to generate a scanning abnormality degree signal to identify Exception type and number.
It realizes accurate identification of the degree, type and quantity of abnormalities during the barcode scanning process, provides multi-directional and multi-angle analysis and judgment, and helps technicians conduct subsequent maintenance.
Smart Images

Figure CN119204061A_ABST
Abstract
Description
[0001] This divisional application is a divisional application of the Chinese patent application with application date of September 11, 2024, application number 2024112696629, and invention name “Scanning anomaly recognition method and system based on image analysis”. Technical Field
[0002] The present invention relates to the technical field of barcode scanning, and in particular to a scanning anomaly recognition method and system based on image analysis. Background Art
[0003] Barcode scanning refers to the process of using a barcode scanner (also known as a barcode reader, barcode scanner, etc.) to read the information contained in a barcode (including one-dimensional barcodes and two-dimensional barcodes). The barcode scanner decodes the content of the barcode through optical principles and transmits it to a computer or other device via a data cable or wirelessly; Chinese patent CN104200189B discloses a barcode scanning device and a processing method thereof, which are used to scan a target object in an object to obtain a barcode, and the processing method comprises: capturing at least one original image containing the object; generating depth information of the object according to the at least one original image; obtaining target information corresponding to the target object in the depth information according to the depth information; emitting a controlled intensity of a supplementary light according to the depth information; capturing a second image containing the object under the controlled intensity of the supplementary light; matching the target information to the second image to obtain a target image; and locating the barcode according to the target image to analyze the information of the barcode; In the prior art, when a barcode scanning device collects a barcode, it obtains a barcode video. Currently, a barcode image that meets the requirements is selected from the barcode video for recognition. However, it is not possible to perform multi-dimensional and multi-angle analysis and judgment on the degree of abnormality, type of abnormality, number of abnormalities and abnormal changes that occur during scanning based on the quality changes of the collected barcode graphics. Summary of the invention
[0004] The purpose of the present invention is to provide a scanning anomaly recognition method and system based on image analysis. The technical problems solved by the present invention are: Currently, a barcode image that meets the requirements is selected from the barcode video for recognition. However, it is not possible to conduct multi-dimensional and multi-angle analysis and judgment on the degree of abnormality, type of abnormality, number of abnormalities and abnormal changes that occur during scanning based on the quality changes of the collected barcode graphics.
[0005] The purpose of the present invention can be achieved by the following technical solutions: The scanning abnormality recognition method based on image analysis includes the following steps: Step 1: Obtain scanned image data and analyze it to extract comprehensive features of the sample image; Step 2: Extract the comprehensive features of the sample image and determine whether the sample image is qualified; Wherein, whether the sample image is qualified includes a qualified sample barcode image or an unqualified sample barcode image; Step 3: Analyze the unqualified sample barcode image to obtain the scanning abnormality characterization value, compare it with the threshold value, and generate a scanning abnormality degree signal; The scanning abnormality degree signal includes a large scanning abnormality degree signal or a small scanning abnormality degree signal.
[0006] As a further solution of the present invention: in step 1, the comprehensive features include image body features and code body features; the image body features include single-point grayscale values of the image body area; and the code body features include single-point grayscale values of the code body area.
[0007] As a further solution of the present invention: the process of extracting comprehensive features is: According to the location of the barcode, the sample barcode image is divided into regions, the barcode region is marked as the code body region, and the non-barcode region is marked as the image body region; A plurality of grayscale acquisition points are respectively arranged in the code body region and the image body region to obtain a single-point grayscale value of the code body region and a single-point grayscale value of the image body region.
[0008] As a further solution of the present invention: in step 2, if any one of the image body feature and the code body feature is not within the standard feature range, an unqualified sample barcode image is generated.
[0009] As a further solution of the present invention: if both the image body feature and the code body feature are within the standard feature range, a qualified sample barcode image is generated.
[0010] As a further solution of the present invention: in step 3, the scanning abnormality characterization value analysis process is: By formula , the scanning abnormality characterization value ZSY is calculated; where Km is the influencing factor of the gray value of the characteristic peak point, and ZHm represents the ordinate value of each unqualified image feature point.
[0011] As a further solution of the present invention: the process of obtaining the ordinate value ZHm of each unqualified image feature point is as follows: With the acquisition time as the X-axis and the abnormal gray value as the Y-axis, a two-dimensional coordinate system is constructed, and the acquisition time and abnormal gray value corresponding to the unqualified sample barcode image are substituted into the coordinate system to obtain the coordinate point, and then the grayscale polyline of the unqualified sample barcode image is drawn; The feature points of the grayscale polyline of the unqualified sample barcode image are extracted and marked as unqualified image feature points, and the coordinate value (Tm, ZHm) of each unqualified image feature peak point is obtained, where m represents the number of unqualified sample barcode images.
[0012] As a further solution of the present invention: the process of obtaining the abnormal grayscale value of the unqualified sample barcode image is as follows: The acquisition time corresponding to the unqualified sample barcode image is obtained, and the grayscale value corresponding to the unqualified grayscale acquisition point in the unqualified sample barcode image is obtained, and the mean value is calculated to obtain the abnormal grayscale value of the unqualified sample barcode image.
[0013] As a further solution of the present invention: if the scanning abnormality characterization value ZSY is greater than or equal to the scanning abnormality characterization threshold, a large scanning abnormality degree signal is generated.
[0014] As a further solution of the present invention: if the scanning abnormality characterization value ZSY is less than the scanning abnormality characterization threshold, a small scanning abnormality degree signal is generated.
[0015] As a further solution of the present invention: the influence factor Km of the gray value of the characteristic peak point is calculated by adding the first time interval interference factor KT1 and the second time interval interference factor KT2.
[0016] As a further solution of the present invention: the process of obtaining the first time interval interference factor KT1 is: Obtain the coordinate value of any unqualified image feature peak point, mark it as the coordinate value of the analysis feature peak point, and then obtain the coordinate value of the unqualified image feature peak point adjacent to the analysis feature peak point, mark it as the coordinate value of the adjacent analysis feature peak point; The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic wave peak points and the horizontal coordinates of the analysis characteristic wave peak points is calculated, and then the sum is added to obtain the analysis characteristic double peak point time interval value TFFm. , calculate the first time interval interference factor KT1; where TZ is the total duration of barcode video acquisition.
[0017] As a further solution of the present invention: the process of obtaining the second time interval interference factor KT2 is: The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic trough points and the horizontal coordinates of the analysis characteristic trough points is calculated, and then the sum is added to obtain the analysis characteristic trough point time interval value TFGm. , the second time interval interference factor KT2 is calculated; where TZ is the total duration of barcode video acquisition.
[0018] As a further solution of the present invention: the following steps are also included: Step 4: When a small signal of scanning abnormality or a large signal of scanning abnormality is obtained, the fault factor of scanning abnormality is identified. The specific identification process is as follows: Based on the grayscale polyline of the unqualified sample barcode image, any unqualified image feature trough point adjacent to the analysis feature peak point is connected to obtain a trough connection line, and a feature graph is constructed between the trough connection line and the grayscale polyline; All characteristic graphics are overlapped and compared to obtain dissimilar graphics, and based on the analysis of each dissimilar graphic, the type and quantity of abnormalities existing in each dissimilar graphic are determined; the abnormal types and the total number of abnormal types existing in all dissimilar graphics are obtained to obtain the scan abnormality types and quantities.
[0019] As a further solution of the present invention: the process of overlapping and comparing all characteristic patterns is as follows: Select any two characteristic patterns, take the center point of the trough line and the trough line as the reference line, overlap the center points and the reference line of the two characteristic patterns, compare the two characteristic patterns, extract the overlapping area of the characteristic patterns and the non-overlapping area of the characteristic patterns, calculate the ratio of the non-overlapping area of the characteristic patterns to the overlapping area of the characteristic patterns, and obtain the non-overlapping ratio of the characteristic patterns; If the feature pattern non-overlap ratio is greater than or equal to the feature pattern non-overlap ratio threshold, a feature pattern low overlap signal is generated, and the two feature patterns are marked as dissimilar patterns.
[0020] As a further solution of the present invention: the process of determining the number of abnormal types of each dissimilar graph is as follows: Obtain each dissimilar graph, compare each dissimilar graph with a standard graph in a data storage system, and based on the comparison result, determine the type of anomaly that exists in each dissimilar graph.
[0021] Scanning anomaly recognition system based on image analysis, including: Acquisition module: obtains scanned image data and analyzes it to obtain the comprehensive features of the extracted sample image; Analysis module: extracts comprehensive features of sample images and determines whether the sample images are qualified; Wherein, whether the sample image is qualified includes a qualified sample barcode image or an unqualified sample barcode image; Degree recognition module: According to the unqualified sample barcode image, analyze the scan abnormality representation value, compare it with the threshold, and generate a scan abnormality degree signal; The scanning abnormality degree signal includes a large scanning abnormality degree signal or a small scanning abnormality degree signal.
[0022] As a further solution of the present invention: comprising: Type identification module: When a small signal of scanning abnormality or a large signal of scanning abnormality is obtained, the fault factor of scanning abnormality is identified. The specific identification process is as follows: Based on the grayscale polyline of the unqualified sample barcode image, any unqualified image feature trough point adjacent to the analysis feature peak point is connected to obtain a trough connection line, and a feature graph is constructed between the trough connection line and the grayscale polyline; All characteristic graphics are overlapped and compared to obtain dissimilar graphics, and based on the analysis of each dissimilar graphic, the type and quantity of abnormalities existing in each dissimilar graphic are determined; the abnormal types and the total number of abnormal types existing in all dissimilar graphics are obtained to obtain the scan abnormality types and quantities.
[0023] Beneficial effects of the present invention: The present invention obtains scanned image data, analyzes it to obtain comprehensive features of extracted sample images; extracts comprehensive features of sample images to determine whether the sample images are qualified; analyzes and obtains scanning abnormality characterization values based on unqualified sample barcode images, and compares them with threshold values to generate scanning abnormality degree signals; the present invention performs frame number analysis on the acquired video, and then completes the judgment of whether the image is qualified through grayscale value features, and then completes the abnormality degree of the barcode graphics acquired by the scanning device through grayscale value features based on each unqualified image, so the present invention realizes the recognition and judgment of the abnormality degree of the barcode scanning process based on image analysis, and includes the recognition and judgment of the abnormality of a specific frame number image; The present invention identifies the fault type based on the scanning abnormality degree signal and obtains the scanning abnormality type and quantity; the scanning abnormality type and quantity can effectively feedback the type and quantity of abnormal items in the barcode scanning process; the present invention further analyzes the grayscale line graph of the unqualified sample barcode image, firstly performs coincidence comparison analysis of the characteristic graphics of the grayscale line graph to achieve preliminary screening of the scanning abnormality type and quantity, and then performs coincidence comparison analysis on the obtained dissimilar graphics to achieve accurate screening of the scanning abnormality type and quantity. Therefore, the present invention realizes accurate identification of the abnormality type and quantity of the barcode scanning process, which is convenient for technicians to perform subsequent maintenance according to the scanning abnormality type and quantity; In summary, the scanning anomaly recognition method and system based on image analysis of the present invention can realize multi-dimensional and multi-angle analysis and judgment of the degree of anomaly, type of anomaly, number of anomalies and changes of anomalies occurring during scanning according to the quality changes of the acquired barcode graphics. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The present invention will be further described below in conjunction with the accompanying drawings.
[0025] Figure 1 is a flowchart of Embodiment 1 of the present invention; Figure 2 is a flowchart of Embodiment 2 of the present invention; Figure 3 is a flowchart of Embodiment 3 of the present invention; Figure 4 It is a system block diagram of embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Example 1: Please refer to Figure 1 As shown, the present invention is a scanning abnormality recognition method based on image analysis, comprising the following steps: Step 1: Obtain scanned image data and analyze it to extract comprehensive features of the sample image; In some embodiments, a barcode video on each object is acquired through a barcode acquisition device, and each frame of a barcode image is obtained based on the barcode video and marked as a sample barcode image; The comprehensive features of the sample image are extracted by using the image comprehensive feature extraction method; Among them, the comprehensive features include image body features and code body features; the image body features include the single point grayscale value of the image body area; the code body features include the single point grayscale value of the code body area; Specifically, the comprehensive feature extraction process is: Obtain each sample barcode image, perform binarization processing on the sample barcode image, and transform the sample barcode image into an image to be analyzed; According to the location of the barcode, the image to be analyzed is divided into regions, the barcode region is marked as the code body region, and the non-barcode region is marked as the image body region; A plurality of grayscale acquisition points are respectively set in the code body area and the image body area to obtain a single-point grayscale value ZHi of the code body area and a single-point grayscale value ZHj of the image body area; The grayscale acquisition points may be arranged in a grid, i represents the number of grayscale acquisition points in the code body area, and j represents the number of grayscale acquisition points in the image body area; Step 2: Extract the comprehensive features of the sample image and determine whether the sample image is qualified; Wherein, whether the sample image is qualified includes a qualified sample barcode image or an unqualified sample barcode image; In some embodiments, according to the figure body feature and the code body feature obtained in step 1, the figure body feature and the code body feature are respectively compared with the corresponding standard feature range; If both the image body features and the code body features are within the standard feature range, a qualified sample barcode image is generated; If any of the image body features and code body features is not within the standard feature range, an unqualified sample barcode image is generated; Exemplarily, the specific process of comparing the image body feature and the code body feature with the corresponding standard feature range is as follows: First, obtain the single-point grayscale value of the code body area, and compare the single-point grayscale value of the code body area with the single-point grayscale range value of the code body area; If the single-point grayscale value of the code body area is within the single-point grayscale range value of the code body area, the grayscale acquisition point is marked as a qualified grayscale acquisition point; If the single-point grayscale value of the code body area is not within the single-point grayscale range value of the code body area, the grayscale acquisition point is marked as an unqualified grayscale acquisition point; If all grayscale acquisition points in the code body area are qualified grayscale acquisition points, a high-quality barcode area is generated, otherwise a low-quality barcode area is generated; Similarly, firstly, the single-point grayscale value of the image body region is obtained, and the single-point grayscale value of the image body region is compared with the single-point grayscale range value of the image body region respectively; If the single-point grayscale value of the image body region is within the single-point grayscale range value of the image body region, the grayscale acquisition point is marked as a qualified grayscale acquisition point; If the single-point grayscale value of the image body area is not within the single-point grayscale range value of the image body area, the grayscale acquisition point is marked as an unqualified grayscale acquisition point; If all the grayscale acquisition points in the image body area are qualified grayscale acquisition points, a high-quality image body area is generated, otherwise a low-quality image body area is generated; Then, a comprehensive analysis is performed. If both a high-quality barcode area and a high-quality image body area are obtained, the sample barcode image is marked as a qualified sample barcode image. Otherwise (the otherwise case includes at least a low-quality barcode area or a low-quality image body area), the sample barcode image is marked as an unqualified sample barcode image. Step 3: Analyze the unqualified sample barcode image to obtain the scanning abnormality characterization value, compare it with the threshold value, and generate a scanning abnormality degree signal; Wherein, the scanning abnormality degree signal includes a scanning abnormality degree large signal or a scanning abnormality degree small signal; In some embodiments, the acquisition time corresponding to the unqualified sample barcode image is obtained, and the grayscale value corresponding to the unqualified grayscale acquisition point in the unqualified sample barcode image is obtained, and the mean value is calculated to obtain the abnormal grayscale value of the unqualified sample barcode image; With the acquisition time as the X-axis and the abnormal gray value as the Y-axis, a two-dimensional coordinate system is constructed, and the acquisition time and abnormal gray value corresponding to the unqualified sample barcode image are substituted into the coordinate system to obtain the coordinate point, and then the grayscale polyline of the unqualified sample barcode image is drawn; Extract the feature points of the grayscale polyline of the unqualified sample barcode image (wherein the feature points include the peak points and trough points of the grayscale polyline of the unqualified sample barcode image), mark them as unqualified image feature points, and obtain the coordinate value (Tm, ZHm) of each unqualified image feature peak point, where m represents the number of unqualified sample barcode images; By formula , calculate and obtain the scanning abnormality characterization value ZSY; where Km is the influence factor of the gray value of the characteristic peak point, which represents the proportional coefficient corresponding to the ordinate value ZHm of each unqualified image feature point, that is, the influence coefficient on the ordinate value ZHm of the unqualified image feature point; Compare the scanning abnormality characterization value ZSY with the scanning abnormality characterization threshold; If the scanning abnormality representation value ZSY is greater than or equal to the scanning abnormality representation threshold, it means that through the analysis of the sample barcode image, the abnormal images in the currently collected barcode video have a high frequency, a fast quality change, a large grayscale difference, etc., and a large scanning abnormality signal is generated; If the scanning abnormality representation value ZSY is less than the scanning abnormality representation threshold, it means that through the analysis of the sample barcode image, the abnormal images in the currently collected barcode video have a low frequency, a slow quality change, a small grayscale difference, etc., and a small scanning abnormality degree signal is generated; It should be noted that the scanning abnormality characterization threshold is used to evaluate the degree of abnormality of the barcode video acquired by the current barcode acquisition device. The specific value of the scanning abnormality characterization threshold is preset by a person skilled in the art based on experimental data. Among them, the acquisition process of the influencing factor Km of the characteristic peak point gray value is: Obtain the coordinate value of any unqualified image feature peak point, mark it as the coordinate value of the analysis feature peak point, and then obtain the coordinate value of the unqualified image feature peak point adjacent to the analysis feature peak point, mark it as the coordinate value of the adjacent analysis feature peak point; The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic wave peak points and the horizontal coordinates of the analysis characteristic wave peak points is calculated, and then the sum is added to obtain the analysis characteristic double peak point time interval value TFFm. , calculate the first time interval interference factor KT1; where TZ is the total duration of barcode video acquisition; Obtain the coordinate value of any unqualified image feature peak point, mark it as the coordinate value of the analysis feature peak point, and then obtain the coordinate value of the unqualified image feature trough point adjacent to the analysis feature peak point, mark it as the coordinate value of the adjacent analysis feature trough point; The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic trough points and the horizontal coordinates of the analysis characteristic trough points is calculated, and then the sum is added to obtain the analysis characteristic trough point time interval value TFGm. , calculate the second time interval interference factor KT2; where TZ is the total duration of barcode video acquisition; The first time interval interference factor KT1 and the second time interval interference factor KT2 are added together to obtain the influence factor Km of the gray value of the characteristic peak point; It should be explained that: the first time interval interference factor KT1 reflects: during the image acquisition process, the grayscale polyline of the unqualified sample barcode image is analyzed to evaluate the time interval between adjacent peak points. Therefore, the smaller the first time interval interference factor KT1 is, the more frequent the sample barcode image abnormalities are, and the higher the abnormality corresponding to the characteristic peak point is; the second time interval interference factor KT2 reflects: during the image acquisition process, the grayscale polyline of the unqualified sample barcode image is analyzed to evaluate the time interval between adjacent peak points and trough points. Therefore, the smaller the second time interval interference factor KT2 is, the faster the abnormal changes of the sample barcode image are, and the higher the abnormality corresponding to the characteristic peak point is. The technical solution of the embodiment of the present invention is as follows: scanning image data is acquired and analyzed to obtain comprehensive features of extracted sample images; comprehensive features of sample images are extracted to determine whether the sample images are qualified; based on unqualified sample barcode images, a scanning abnormality characterization value is analyzed and compared with a threshold value to generate a scanning abnormality degree signal; the present invention performs frame number analysis on the acquired video, and then uses grayscale value features to complete the judgment of whether the image is qualified, and then based on each unqualified image, uses grayscale value features to complete the abnormality degree of the barcode graphics acquired by the scanning device, so the present invention realizes the recognition and judgment of the abnormality degree of the barcode scanning process based on image analysis, and includes the recognition and judgment of the abnormality of a specific frame number of images.
[0028] Example 2: Please refer to Figure 2 As shown, the present invention is a scanning abnormality recognition method based on image analysis, which also includes the following steps: Step 4: Based on the scanning abnormality degree signal, the fault type is identified to obtain the scanning abnormality type and quantity; In some implementation schemes, when a small signal of scanning abnormality or a large signal of scanning abnormality is obtained, the fault factor of scanning abnormality is identified. The specific identification process is as follows: Based on the grayscale polyline of the unqualified sample barcode image, any unqualified image feature trough point adjacent to the analysis feature peak point is connected to obtain a trough connection line, and a feature graph is constructed between the trough connection line and the grayscale polyline; All characteristic graphics are overlapped and compared to obtain dissimilar graphics, and based on the analysis of each dissimilar graphic, the type and quantity of abnormalities existing in each dissimilar graphic are determined; the abnormal types and the total number of abnormal types existing in all dissimilar graphics are obtained to obtain the type and quantity of scan abnormalities; First, specifically, the process of overlapping and comparing all feature graphics is as follows: Select any two characteristic patterns, take the center point of the trough line and the trough line as the reference line, overlap the center points and the reference line of the two characteristic patterns, compare the two characteristic patterns, extract the overlapping area of the characteristic patterns and the non-overlapping area of the characteristic patterns, calculate the ratio of the non-overlapping area of the characteristic patterns to the overlapping area of the characteristic patterns, and obtain the non-overlapping ratio of the characteristic patterns; comparing the feature pattern non-overlap ratio value with the feature pattern non-overlap ratio threshold value; If the feature pattern non-overlap ratio is greater than or equal to the feature pattern non-overlap ratio threshold, a feature pattern low overlap signal is generated, and the two feature patterns are marked as dissimilar patterns; If the feature pattern non-overlap ratio is less than the feature pattern non-overlap ratio threshold, a feature pattern high overlap signal is generated, and the two feature patterns are marked as similar patterns; Second, specifically, the process of determining the number of abnormal types of each dissimilar graph is as follows: Obtain each dissimilar graph, and compare each dissimilar graph with the standard graph in the data storage system (the comparison method is whether the graph shape is similar, and the comparison method can refer to the process of overlapping comparison of all characteristic graphs), and based on the comparison results, the abnormal type of each dissimilar graph; Among them, a large number of different standard graphics are stored in the data storage system, and each standard graphic corresponds to a different scanning abnormality type, which can be one scanning abnormality type, a combination of two scanning abnormality types, or a combination of multiple scanning abnormality types. For example, the scanning abnormality type includes barcode scanning device abnormality (including scanning head failure, decoding circuit board failure, power supply failure), external environment abnormality (including light problem, environmental problem, operation problem); The technical solution of the embodiment of the present invention: based on the scanning abnormality degree signal, the fault type is identified to obtain the scanning abnormality type and quantity; the scanning abnormality type and quantity can effectively feedback the type and quantity of abnormal items that appear in the barcode scanning process; the present invention is based on the grayscale line graph of the unqualified sample barcode image for further analysis, firstly, the characteristic graphics of the grayscale line graph are overlapped and compared to achieve preliminary screening of the scanning abnormality type and quantity, and then the obtained dissimilar graphics are overlapped and compared to achieve accurate screening of the scanning abnormality type and quantity. Therefore, the present invention realizes the accurate identification of the abnormality type and quantity of the barcode scanning process, which is convenient for technical personnel to perform subsequent maintenance according to the scanning abnormality type and quantity.
[0029] Example 3: Please refer to Figure 3 As shown, the present invention is a scanning abnormality recognition method and system based on image analysis, which also includes the following steps: Step 5: Based on the number of anomalies existing in each dissimilar graph, the scanning fault inducibility is analyzed to obtain a scanning anomaly inducibility signal; Wherein, the scanning abnormality inducing signal includes a scanning abnormality inducing low signal or a scanning abnormality inducing high signal; In some implementation schemes, the number of anomalies existing in each dissimilar graph during the scanning process is obtained, and a scanning anomaly number set {S1, S2, S3...Sx} is constructed in the order of scanning time from the beginning to the end, where Sx represents the number of scanning anomalies of the x-th dissimilar graph; The difference of the subsets in the adjacent scan anomaly number set is calculated to obtain the adjacent scan anomaly number difference Cy, and then the adjacent scan anomaly number difference set {C1, C2, C3...Cy} is constructed in the order of the scan time from the beginning to the end, where y=x-1; If a subset in the adjacent scan anomaly number difference set is compared with the next subset in size; If all subsets are larger than the next subset, or the first half of the subsets in the adjacent scan abnormality quantity difference set are respectively equal to the next subset, and the next half of the subsets are larger than the next subset, then a scan abnormality inducing high signal is generated; otherwise, a scan abnormality inducing low signal is generated; It should be explained that: the high signal of scanning abnormality inducing means: in the scanning process, scanning abnormalities appear in the early stage, and as the scanning time increases, the number of scanning abnormalities increases, which can reflect that the scanning abnormality type appearing in the early stage of scanning has a greater probability of causing the increase of other scanning abnormality types, that is, the scanning abnormality type appearing in the early stage of scanning has a greater inducing effect, so that in the subsequent scanning process, the scanning abnormality type appearing in the early stage of scanning can be warned and the inspection frequency can be increased; The technical solution of the embodiment of the present invention: based on the number of anomalies existing in each dissimilar graph, the triggering of the scanning fault is analyzed to obtain a scanning anomaly triggering signal; the present invention performs a triggering analysis based on the number of anomalies occurring in different time periods of the above-mentioned scanning fault, and completes whether other scanning anomalies are triggered when scanning anomalies occur in the early stage, thereby realizing the identification of the triggering changes of scanning anomalies. Based on this, an early warning can be issued for the type of scanning anomalies occurring in the early stage of the scan, and the inspection frequency can be increased.
[0030] Example 4: Please refer to Figure 4 As shown, the present invention is a scanning anomaly recognition system based on image analysis, comprising: Acquisition module: obtains scanned image data and analyzes it to obtain the comprehensive features of the extracted sample image; Analysis module: extracts comprehensive features of sample images and determines whether the sample images are qualified; Wherein, whether the sample image is qualified includes a qualified sample barcode image or an unqualified sample barcode image; Degree recognition module: According to the unqualified sample barcode image, analyze the scan abnormality representation value, compare it with the threshold, and generate a scan abnormality degree signal; Wherein, the scanning abnormality degree signal includes a scanning abnormality degree large signal or a scanning abnormality degree small signal; Type identification module: When a small signal of scanning abnormality or a large signal of scanning abnormality is obtained, the fault factor of scanning abnormality is identified. The specific identification process is as follows: Based on the grayscale polyline of the unqualified sample barcode image, any unqualified image feature trough point adjacent to the analysis feature peak point is connected to obtain a trough connection line, and a feature graph is constructed between the trough connection line and the grayscale polyline; All characteristic graphics are overlapped and compared to obtain dissimilar graphics, and based on the analysis of each dissimilar graphic, the type and quantity of abnormalities existing in each dissimilar graphic are determined; the abnormal types and the total number of abnormal types existing in all dissimilar graphics are obtained to obtain the type and quantity of scan abnormalities; Triggering recognition module: Obtain the number of anomalies existing in each dissimilar graph during the scanning process, and construct a set of scanning anomaly numbers {S1, S2, S3...Sx} in the order of scanning time from the beginning to the end, where Sx represents the number of scanning anomalies of the x-th dissimilar graph; The difference of the subsets in the adjacent scan anomaly number set is calculated to obtain the adjacent scan anomaly number difference Cy, and then the adjacent scan anomaly number difference set {C1, C2, C3...Cy} is constructed in the order of the scan time from the beginning to the end, where y=x-1; If a subset in the adjacent scan anomaly number difference set is compared with the next subset in size; If all subsets are larger than the next subset, or the first half of the subsets in the adjacent scanning abnormality number difference set are equal to the next subset, and the second half of the subsets are larger than the next subset, a scanning abnormality-inducing high signal is generated; otherwise, a scanning abnormality-inducing low signal is generated.
[0031] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0032] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A scanning anomaly recognition method based on image analysis, characterized in that: The following steps are involved: Step 1: Obtain scanned image data and analyze it to extract comprehensive features of the sample image; Step 2: Extract the comprehensive features of the sample image and determine whether the sample image is qualified; Wherein, whether the sample image is qualified includes a qualified sample barcode image or an unqualified sample barcode image; Step 3: Analyze the unqualified sample barcode image to obtain the scanning abnormality characterization value, compare it with the threshold value, and generate a scanning abnormality degree signal; Wherein, the scanning abnormality degree signal includes a scanning abnormality degree large signal or a scanning abnormality degree small signal; In step 3, the scanning abnormality characterization value analysis process is: By formula , calculate the scanning abnormality characterization value ZSY; where Km is the influencing factor of the gray value of the characteristic peak point, and ZHm represents the ordinate value of each unqualified image feature point; In step 1, the comprehensive features include image body features and code body features; the image body features include the single point grayscale value of the image body area; the code body features include the single point grayscale value of the code body area; The process of extracting comprehensive features is as follows: According to the location of the barcode, the sample barcode image is divided into regions, the barcode region is marked as the code body region, and the non-barcode region is marked as the image body region; A plurality of grayscale acquisition points are respectively set in the code body area and the image body area to obtain a single-point grayscale value of the code body area and a single-point grayscale value of the image body area; In step 2, if any of the image body feature and the code body feature is not within the standard feature range, an unqualified sample barcode image is generated; If both the image body features and the code body features are within the standard feature range, a qualified sample barcode image is generated; The process of obtaining the ordinate value ZHm of each unqualified image feature point is as follows: With the acquisition time as the X-axis and the abnormal gray value as the Y-axis, a two-dimensional coordinate system is constructed, and the acquisition time and abnormal gray value corresponding to the unqualified sample barcode image are substituted into the coordinate system to obtain the coordinate point, and then the grayscale polyline of the unqualified sample barcode image is drawn; Extract the feature points of the grayscale polyline of the unqualified sample barcode image, mark them as unqualified image feature points, and obtain the coordinate value (Tm, ZHm) of each unqualified image feature peak point, where m represents the number of unqualified sample barcode images; Step 5: Based on the number of anomalies existing in each dissimilar graph, the scanning fault inducibility is analyzed to obtain a scanning anomaly inducibility signal; The scanning abnormality inducing signal includes a scanning abnormality inducing low signal or a scanning abnormality inducing high signal.
2. The scanning anomaly recognition method based on image analysis according to claim 1 is characterized in that: The process of obtaining the abnormal grayscale value of the unqualified sample barcode image is as follows: The acquisition time corresponding to the unqualified sample barcode image is obtained, and the grayscale value corresponding to the unqualified grayscale acquisition point in the unqualified sample barcode image is obtained, and the mean value is calculated to obtain the abnormal grayscale value of the unqualified sample barcode image.
3. The scanning anomaly recognition method based on image analysis according to claim 2 is characterized in that: If the scanning abnormality characterization value ZSY is greater than or equal to the scanning abnormality characterization threshold, a large scanning abnormality degree signal is generated.
4. The scanning anomaly recognition method based on image analysis according to claim 3 is characterized in that: If the scanning abnormality characterization value ZSY is less than the scanning abnormality characterization threshold, a small scanning abnormality degree signal is generated.
5. The scanning anomaly recognition method based on image analysis according to claim 4 is characterized in that: The influence factor Km of the characteristic peak point gray value is calculated by adding the first time interval interference factor KT1 and the second time interval interference factor KT2.
6. The scanning anomaly recognition method based on image analysis according to claim 5 is characterized in that: The process of obtaining the first time interval interference factor KT1 is: Obtain the coordinate value of any unqualified image feature peak point, mark it as the coordinate value of the analysis feature peak point, and then obtain the coordinate value of the unqualified image feature peak point adjacent to the analysis feature peak point, mark it as the coordinate value of the adjacent analysis feature peak point; The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic wave peak points and the horizontal coordinates of the analysis characteristic wave peak points is calculated, and then the sum is added to obtain the analysis characteristic double peak point time interval value TFFm. , calculate the first time interval interference factor KT1; where TZ is the total duration of barcode video acquisition.
7. The scanning anomaly recognition method based on image analysis according to claim 6 is characterized in that: The process of obtaining the second time interval interference factor KT2 is as follows: The absolute value difference between the horizontal coordinates of the adjacent analysis characteristic trough points and the horizontal coordinates of the analysis characteristic trough points is calculated, and then the sum is added to obtain the analysis characteristic trough point time interval value TFGm. , the second time interval interference factor KT2 is calculated; where TZ is the total duration of barcode video acquisition.
8. The scanning anomaly recognition method based on image analysis according to claim 7 is characterized in that: The following steps are also included: Step 4: When a small signal of scanning abnormality or a large signal of scanning abnormality is obtained, the fault factor of scanning abnormality is identified. The specific identification process is as follows: Based on the grayscale polyline of the unqualified sample barcode image, any unqualified image feature trough point adjacent to the analysis feature peak point is connected to obtain a trough connection line, and a feature graph is constructed between the trough connection line and the grayscale polyline; All characteristic graphics are overlapped and compared to obtain dissimilar graphics, and based on the analysis of each dissimilar graphic, the type and quantity of abnormalities existing in each dissimilar graphic are determined; the abnormal types and the total number of abnormal types existing in all dissimilar graphics are obtained to obtain the scan abnormality types and quantities.
9. The scanning anomaly recognition method based on image analysis according to claim 8, characterized in that: The process of overlapping and comparing all feature graphics is as follows: Select any two characteristic patterns, take the center point of the trough line and the trough line as the reference line, overlap the center points and the reference line of the two characteristic patterns, compare the two characteristic patterns, extract the overlapping area of the characteristic patterns and the non-overlapping area of the characteristic patterns, calculate the ratio of the non-overlapping area of the characteristic patterns to the overlapping area of the characteristic patterns, and obtain the non-overlapping ratio of the characteristic patterns; If the feature pattern non-overlap ratio is greater than or equal to the feature pattern non-overlap ratio threshold, a feature pattern low overlap signal is generated, and the two feature patterns are marked as dissimilar patterns; The process of determining the type and quantity of anomalies in each dissimilar graph is as follows: Each dissimilar graph is obtained, and each dissimilar graph is compared with a standard graph in a data storage system, and based on the comparison result, the type and quantity of anomalies existing in each dissimilar graph are obtained.
10. The scanning anomaly recognition method based on image analysis according to claim 1, characterized in that: In step 5, the number of anomalies existing in each dissimilar graph during the scanning process is obtained, and a scanning anomaly number set {S1, S2, S3...Sx} is constructed in the order of scanning time from the beginning to the end, where Sx represents the number of scanning anomalies of the x-th dissimilar graph; The difference of the subsets in the adjacent scan anomaly number set is calculated to obtain the adjacent scan anomaly number difference Cy, and then the adjacent scan anomaly number difference set {C1, C2, C3...Cy} is constructed in the order of the scan time from the beginning to the end, where y=x-1; If a subset in the adjacent scan anomaly number difference set is compared with the next subset in size; If all subsets are larger than the next subset, or the first half of the subsets in the adjacent scanning abnormality number difference set are equal to the next subset, and the second half of the subsets are larger than the next subset, a scanning abnormality-inducing high signal is generated; otherwise, a scanning abnormality-inducing low signal is generated.
