A method, system and device for intelligent comparison of printed samples under visual assistance

By applying a visually assisted image processing method in the quality inspection machine, including determining the target important area and main blur direction, calculating the blur loss index and designing the blur kernel, the problem of poor de-blurry effect of printing label images in the prior art is solved, and higher accuracy and accuracy are achieved.

CN119444618BActive Publication Date: 2025-03-28CHANGSHA KECHEN PRINTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510047027.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-03-28
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

When used in the printed label inspection machine, the defuzzing effect is poor and it is difficult to meet the requirements of high-precision comparison.

Method used

By obtaining the image of this frame and the image of the upper frame of the printed label, the target important area and its projection area are determined, the pixel points are traversed to determine the vibration blur area and the main blur direction, the label information blur loss index is calculated, and the image blur core is designed for defuzzy enhancement.

Benefits of technology

It improves the effect of image defuzzing enhancement, reduces interference in the unstable operation of the transmission system of the quality inspection machine, and enhances the accuracy of printing label quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444618B_ABST
    Figure CN119444618B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and specifically to a method, system and device for intelligent comparison of printed samples under visual assistance, the method comprising: obtaining the current frame and the previous frame image of the printed label, determining the target important area of ​​the current frame image and the target projection area of ​​the previous frame image; determining the vibration blur area by using the hue difference between adjacent pixel points before and after traversal; determining the main blur direction of the target important area, and determining the main blur area by using the vibration blur area; determining the label information blur loss index by using the projection relationship between the main blur area and the target important area; using the label information blur loss index, determining the blur kernel of the current frame image to deblur and enhance the current frame image, and then determining the label printing quality. Through the method for intelligent comparison of printed samples under visual assistance of the present invention, the deblurring and enhancement effect is improved, the influence of blur on the printed label image is reduced, and the accuracy of printed label quality detection is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a method, system and device for intelligently comparing printed samples under visual assistance. Background Art

[0002] During the printing production process, it is necessary to compare the actual printing samples with the design draft, color card or predetermined standards to ensure that the final printing effect is consistent with customer needs, design requirements and quality standards. With the continuous improvement of the quality requirements of the printing industry, traditional manual visual inspection has been unable to meet the high-precision and high-speed production needs. Machine vision technology simulates human vision to automatically identify and analyze defects in printed products, such as color deviation, misregistration, foreign matter, missing prints, etc., to ensure that each product meets the predetermined quality standards.

[0003] In the actual inspection process, the quality inspection machine is usually used to collect the printed label image, and the printed label sample is used for comparison to detect label printing defects. However, in the case of long-term operation, the mechanical structure in the transmission system of the quality inspection machine may have problems such as wear and insufficient lubrication, which will reduce the stability of the transmission system in transporting labels. In the process of collecting label images, content motion blur is prone to occur. However, in the existing deblurring scheme, the image blur kernel is estimated by analyzing the blurred area, and the blurred area is often simplified to a one-way blur. When faced with a low-stability quality inspection machine transmission system, it is difficult to meet the high-precision comparison requirements of the labels in the image, that is, the deblurring effect is poor, and it is necessary to further optimize the deblurring process and the quality inspection process of printed labels. Summary of the invention

[0004] In order to solve the technical problem that the existing image deblurring solution has poor deblurring effect when applied to the quality inspection machine of printed labels, the purpose of the present invention is to provide a method, system and device for intelligent comparison of printed samples under visual assistance. The technical solution adopted is as follows:

[0005] The present invention provides a visually assisted printing sample intelligent comparison method, the method comprising:

[0006] Obtaining a current frame image and a previous frame image of the printed label, and determining a target important area in the current frame image and a corresponding target projection area in the previous frame image;

[0007] Traverse the pixel points of the target important area, and determine the vibration blur area in the target important area by using the hue difference between adjacent pixel points before and after the traversal;

[0008] Determine the main blur direction of the target important area relative to the target projection area, and use the vibration blur area to determine the main blur area corresponding to the main blur direction;

[0009] The projection relationship between the main fuzzy area and the target important area is used to determine the fuzzy loss index of the label information of the target important area.

[0010] The blur loss index of the label information is used to determine the blur kernel of the current frame image, and the blur kernel is used to deblur and enhance the current frame image;

[0011] The deblurred and enhanced current frame image is compared with the printed sample image to determine the label printing quality.

[0012] Furthermore, the step of determining the target important area in the current frame image includes:

[0013] Determine the difference pixel points between the current frame image and the previous frame image and mark the difference pixel points in the current frame image;

[0014] Determine a saturation sequence composed of the saturations of the different pixel points and arranged in descending order;

[0015] Determine the two sequence elements with the largest adjacent saturation difference in the saturation sequence;

[0016] Determine the pixel points corresponding to all sequence elements before the later sequence element of the two sequence elements as the pixel points of important label information;

[0017] The important areas of the target are determined by using the label important information pixels in this frame image.

[0018] Furthermore, the step of determining the target important area in the current frame image and the corresponding target projection area in the previous frame image includes:

[0019] Determine the correlation coefficient of the image features between the target important area of ​​the current frame image and the important area in the previous frame image;

[0020] Determine the centroid distance between the target important area and the important area in the previous frame image;

[0021] Using the correlation coefficient and the centroid distance, the probability of label information displacement between the important area of ​​the target and the important area in the previous frame image is calculated;

[0022] The displacement probability of the label information is used to determine the target projection area that is the same area as the target important area in the previous frame image.

[0023] Furthermore, the step of traversing the pixel points of the target important area and determining the vibration blurred area in the target important area by using the hue difference between adjacent pixel points before and after the traversal includes:

[0024] Traverse the pixel points of the target important area according to the preset direction, calculate the hue difference between each adjacent pixel point before and after the traversal, and form a hue difference value sequence according to the traversal order;

[0025] The hue difference sequence is used to set the first objective function, and when the first objective function is calculated to obtain a maximum value, a vibration blur region in the target important region is obtained.

[0026] Furthermore, the step of determining the main blur direction of the target important area relative to the target projection area includes:

[0027] Determine the centroid line from the target important area to the target projection area, and use the directional centroid line as the main fuzzy direction.

[0028] Further, the step of using the vibration blur area to determine the main blur area corresponding to the main blur direction includes:

[0029] Determine a main blur starting pixel point in a main blur starting position of an important target area;

[0030] Determine the fuzzy evaluation pixel point with the largest hue value difference between the main fuzzy starting pixel point and the adjacent pixel points;

[0031] Determine a fuzzy evaluation area by using fuzzy evaluation pixels and a vibration fuzzy area;

[0032] Traverse the pixels in the fuzzy evaluation area to determine the hue value and saturation of the currently traversed pixel;

[0033] Using the hue value and saturation of the currently traversed pixel point and setting the second objective function, the fuzzy trajectory of the currently traversed pixel point is calculated when the second objective function is the minimum value;

[0034] Based on the blur trajectory of each currently traversed pixel point, the main blur area corresponding to the main blur direction is obtained.

[0035] Further, the step of determining the fuzzy loss index of the label information of the target important area by using the projection relationship between the main fuzzy area and the target important area includes:

[0036] Determine the slope variance of each pixel in the fuzzy trajectory;

[0037] Determine the projection length of the target important area along the main fuzzy area;

[0038] The slope variance and projection length are used to calculate the fuzzy loss index of the label information in the important area of ​​the target.

[0039] Furthermore, the step of determining the blur kernel of the current frame image by using the blur loss index of the label information includes:

[0040] Determine the gray value variance of each fuzzy track in the main fuzzy area corresponding to the target important area;

[0041] The blur kernel of the current frame image is calculated using the gray value variance and the label information blur loss index.

[0042] The present invention also provides a visually assisted printing sample intelligent comparison system, the system is used to implement the visually assisted printing sample intelligent comparison method as described in any one of the above items; the system comprises:

[0043] An image acquisition module is used to obtain a current frame image and a previous frame image of the printed label, and determine a target important area in the current frame image and a corresponding target projection area in the previous frame image;

[0044] A fuzzy identification module is used to traverse the pixel points of the target important area, and determine the vibration fuzzy area in the target important area by using the hue difference between adjacent pixel points before and after the traversal; determine the main fuzzy direction of the target important area relative to the target projection area, and determine the main fuzzy area corresponding to the main fuzzy direction by using the vibration fuzzy area;

[0045] The image enhancement module is used to determine the label information blur loss index of the target important area by using the projection relationship between the main blur area and the target important area; determine the blur kernel of the current frame image by using the label information blur loss index, and deblur and enhance the current frame image by using the blur kernel;

[0046] The image comparison module is used to compare the deblurred and enhanced current frame image with the printed sample image to determine the label printing quality.

[0047] The present invention also provides a visually assisted intelligent comparison device for printed samples, which includes a processor, a memory, and a visually assisted intelligent comparison program for printed samples stored in the memory and executable by the processor, wherein when the visually assisted intelligent comparison program for printed samples is executed by the processor, the steps of the visually assisted intelligent comparison method for printed samples as described in any of the above items are implemented.

[0048] The present invention has the following beneficial effects:

[0049] The present invention proposes a method for intelligent comparison of printed samples under visual assistance, which uses the image acquisition device of the inspection machine to obtain the current printed label image, uses the frame difference method to obtain the image area representing the important information of the label, and then uses the previous frame image to determine the main blur direction, and determines the vibration blur area of ​​the important area of ​​the label, and then uses the vibration blur area to analyze the blur trajectory in the main blur direction and determine the blur area; analyzes the information loss amount of the blur area according to the vibration blur characteristics of the label, and designs an image blur kernel in combination with the blur areas of different important areas of the label to perform deblurring and enhancement processing on the image. Compared with the existing methods, the blur kernel analysis process considers multiple unstable factors that may be generated by the inspection machine during label printing inspection, and further adjusts the image blur degree processing process, reduces the unstable operation interference of the transmission system of the inspection machine, improves the blur enhancement effect, reduces the impact of blur on the printed label image, and increases the accuracy of printed label quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flowchart of the steps of a method for intelligently comparing printed samples with visual assistance provided by an embodiment of the present invention.

[0052] Figure 2 A detailed flow chart of step S1 in a method for intelligently comparing printed samples with visual assistance provided by an embodiment of the present invention.

[0053] Figure 3 A detailed flow chart of step S1 in a method for intelligently comparing printed samples with visual assistance provided by another embodiment of the present invention.

[0054] Figure 4 A detailed flow chart of step S3 in a method for intelligently comparing printed samples with visual assistance provided by an embodiment of the present invention.

[0055] Figure 5 It is a schematic diagram of the structure of the hardware operating environment of the visually assisted printing sample intelligent comparison device involved in the embodiment of the present invention.

[0056] Figure 6 It is a schematic diagram of the framework structure of the visually assisted printing sample intelligent comparison system involved in the embodiment of the present invention.

[0057] Figure 7The diagram is a schematic diagram of the operation of a printed label product on a quality inspection machine according to an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a visually assisted printed sample intelligent comparison method proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0059] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0060] The specific scheme of the method for intelligently comparing printed samples with visual assistance provided by the present invention is described in detail below with reference to the accompanying drawings.

[0061] Embodiment 1:

[0062] For the visually assisted intelligent comparison method of printed samples provided by the present invention, please refer to Figure 1 , which shows a flowchart of the steps of a method for intelligent comparison of printed samples with visual assistance provided by an embodiment of the present invention.

[0063] The method comprises:

[0064] Step S1, obtaining a current frame image and a previous frame image of a printed label, and determining a target important area in the current frame image and a corresponding target projection area in the previous frame image;

[0065] For this embodiment, the scenarios targeted are:

[0066] Label printing sample comparison is usually in the post-production proofreading stage in the printing production process, and its purpose is to ensure the quality of printed products. In the process of label printing, a visual inspection machine can usually be used to collect the images of the printed labels produced, and the label printing quality can be tested by comparing them with the printed sample template.

[0067] When the mechanical parts of the inspection machine (such as bearings and strips of the transmission system) run for a long time, the parts may wear out, rust, and other problems, causing the transmission process to fail, resulting in poor transmission of printed labels (products) or unstable machine operation. When collecting printed label images, the unsmooth label transmission process may cause different degrees of motion blur in multiple frames of images, and the image blur of different frames needs to be analyzed.

[0068] Please refer to Figure 7 , Figure 7 This is a schematic diagram of the operation of a printed label product on a quality inspection machine according to an embodiment of the present invention. A high-resolution camera installed on the quality inspection machine continuously collects images of the printed label product. The specific collection process is as follows:

[0069] On the quality inspection machine, move the camera to the appropriate position, tighten the bolts and turn the height adjustment lever to place the camera at the appropriate imaging height;

[0070] Start the corresponding operating system, set the parameters for stable operation of the equipment, install the printed label to be tested, use the tension roller and other equipment to make the printed label continuously pass through the camera imaging area, and continuously collect the printed label image;

[0071] The collected image is sent to the data processing module. The printed label collected by the camera is usually in RGB image format;

[0072] Printed label information is mainly reflected by the text, pattern texture and other parts in the image, and the image is grayed out;

[0073] In addition, there are differences in the information, printing methods, and printing color characteristics contained in different types of labels. In order to reflect the differences in surface characteristics caused by the label printing color and printing method, the pixel values ​​corresponding to the image pixels in the HSV (Hue, Saturation, Value) space are obtained at the same time;

[0074] The preprocessed image and the corresponding grayscale and HSV information are input into the data processing module of the quality inspection machine.

[0075] The above method can be used to obtain the current frame image and the previous frame image of the printed label, as well as the grayscale and HSV information of each frame image.

[0076] In a specific embodiment, please refer to Figure 2 , the step of determining the target important area in the current frame image includes:

[0077] Step S10, determining the difference pixel points between the current frame image and the previous frame image and marking the difference pixel points in the current frame image;

[0078] Step S11, determining a saturation sequence composed of the saturations of the different pixel points and arranged in descending order;

[0079] Step S12, determining two sequence elements with the largest adjacent saturation difference in the saturation sequence;

[0080] Step S13, determining the pixel points corresponding to all sequence elements before the later sequence element of the two sequence elements as the pixel points of important label information;

[0081] Step S14, using the label important information pixels in the current frame image to determine the target important area.

[0082] When using printed samples to compare and inspect printed labels, images of printed labels on the transmission system passing through the camera are continuously collected. After the mechanical parts on the transmission system of the inspection machine have been running for a long time, they may wear or rust due to insufficient lubricating oil, which may affect the stability of the transmission system. Such problems usually cause varying degrees of motion blur in the image. In order to eliminate motion blur in the printed label images collected by the inspection machine, the moving parts of the label in the current image need to be screened.

[0083] The frame difference method (image feature difference between adjacent frames) is used to calculate the difference pixels between the current frame image and the previous frame image, and the difference pixels are marked in the current frame image.

[0084] According to the above analysis, the difference pixels are usually caused by the position difference and blurred area of ​​the same information area (such as text, pattern, etc.) on the printed label during the movement in different directions. In order to analyze the blur degree of the current image (the same as the current frame image) later, it is necessary to first determine the label information area of ​​the current label through the difference pixels; in order to highlight the label content (such as text, pattern, etc.), the printing process usually selects a more saturated and more eye-catching color to highlight the label content, and the motion blur in the label is mainly the blurred part with lower saturation;

[0085] The saturation of the current difference pixel is obtained, and the saturation is arranged in descending order as a saturation sequence. Then, the two sequence elements with the largest adjacent saturation difference are selected, and the pixel corresponding to the sequence element before the latter element of the two sequence elements is defined as the label important information pixel. Then, the connected domain detection processing is performed on the label important information pixel, and each connected domain is defined as the label important information area, that is, the target important area.

[0086] In another specific embodiment, please refer to Figure 3 , the step of determining the target important area in the current frame image and the corresponding target projection area in the previous frame image includes:

[0087] Step S100, determining the correlation coefficient of the image features between the target important area of ​​the current frame image and the important area in the previous frame image;

[0088] Step S110, determining the centroid distance between the target important area and the important area in the previous frame image;

[0089] Step S120, using the correlation coefficient and the centroid distance, calculate the probability of label information displacement between the target important area and the important area in the previous frame image;

[0090] Step S130 , using the label information displacement probability, determining the target projection area in the previous frame image that is the same area as the target important area.

[0091] When the transmission system of the inspection machine transports printed labels, if the transmission system runs for too long and has weak stability, the printed labels may experience vibrations of different characteristics during the transmission process; therefore, the differences in the image are not completely reflected by the transmission process of the printed labels, that is, there may be multiple motion blur directions in the image.

[0092] To deblur the current printed label image, it is necessary to evaluate the blur direction of each label's important information area. The blur caused by the label's transportation process caused by the inspection machine's transmission system always exists in each frame of the image. Therefore, the local vibration direction of different label important areas can be analyzed by comparing the image features of different label important information areas in multiple frames.

[0093] The important information area (referred to as the important area) of the label of the previous frame image is obtained in the same manner as in the above embodiment, that is, the previous frame image is taken as the current frame image, and then the previous frame image is determined.

[0094] To analyze the local vibration blur direction of the current frame image, it is necessary to select the target important area corresponding to the current frame image in combination with the important area in the previous frame image, and evaluate the local vibration direction through the change of the pixel position of each important information area;

[0095] In printed labels, the important information area is usually composed of text and pattern parts. When comparing the similarity of the important information areas in the current frame image and the previous frame image, it is necessary to conduct a comprehensive analysis in combination with their color and shape differences;

[0096] Obtain the paired geometric histogram (PGH) of the outer edges of each important information area of ​​the current frame (i.e., this frame) and the previous frame image and the H channel pixel value histogram of the outer edges of each important information area. The two histograms respectively represent the regional contour features and regional color features in the image features;

[0097] The important information area obtained by the frame difference method is usually small, and the regional characteristics can be summarized quickly by directly using the statistical characteristics of the histogram. After obtaining the two histograms, the difference in shape and color of the corresponding area of ​​the image is expressed by comparing the histogram difference between the important information areas of the current frame and the previous frame;

[0098] Calculate the correlation coefficients of the paired geometric histograms and the H channel pixel value histograms of each important information area of ​​the current frame and the previous frame respectively .

[0099] During the transmission of printed labels, the displacement of labels within one frame is usually small. Therefore, in order to avoid the analysis of the local vibration direction of important information areas with the same information at different positions in the label, it is also necessary to combine the positions of the important areas of the two frames in the image for evaluation. The probability S of label information displacement between the current frame and the previous frame is calculated. The specific calculation process can be expressed by the following formula:

[0100]

[0101] In the above formula, d represents the coordinate distance between the centroids of the two important information regions, that is, the centroid distance, and after adjusting the logical relationship, it is combined with the contour information and color information of the important information region. S represents the probability of label information displacement of the two important regions. The larger the value, the higher the probability that the two important regions are the same region of the label after displacement in different frames. When the probability of label information displacement S is the highest, the target projection region is determined and the target projection region is projected in the current frame image.

[0102] Step S2, traversing the pixel points of the target important area, and determining the vibration blurred area in the target important area by using the hue difference between adjacent pixel points before and after the traversal;

[0103] Specifically, step S2 includes:

[0104] Traverse the pixel points of the target important area according to the preset direction, calculate the hue difference between each adjacent pixel point before and after the traversal, and form a hue difference value sequence according to the traversal order;

[0105] The hue difference sequence is used to set the first objective function, and when the first objective function is calculated to obtain a maximum value, a vibration blur region in the target important region is obtained.

[0106] According to the above embodiment, when the stability of the transmission system of the inspection machine is reduced, the label may vibrate during the transmission process, resulting in motion blur in multiple directions of the label in the image acquisition result. In order to improve the image enhancement effect, it is necessary to determine the blur areas in different directions respectively. After calculating the label information displacement probability of different important information areas, select the previous frame area with the maximum label information displacement probability of a certain important information area in the current frame, that is, the target projection area, and project the target projection area into the current frame image.

[0107] Under the traction of the transmission system, the label image usually does not have vibration blur in the horizontal 0 degree direction (x-axis direction), and the vibration blur of the transmission system is mainly reflected in the vertical 90 degree direction (y-axis direction); in order to further improve the accuracy of blur kernel estimation, it is necessary to analyze the blurred areas generated at the upper and lower edges of each important information area of ​​the current frame label. The important information area is divided into two parts in the horizontal 0 degree direction with the midpoint of the projection of the edge of the target important area in the 90 degree direction as the boundary, where the image information outside the edge of the upper half can reflect the blurred area generated by the downward vibration of the label transmission process, and the image information outside the edge of the lower half reflects the blurred area generated by the upward vibration of the label transmission process.

[0108] The vibration blur area caused by the vibration of the transmission system is relatively mild compared to the displacement. In order to highlight the label content, the difference between the important information in the label and the label background is relatively high. Therefore, the vibration blur area can be analyzed by evaluating the color difference between the traversed pixels. Taking the edge as an example, select each edge pixel, traverse the pixel points in the 90-degree upward direction, and calculate the hue value difference between the current traversed pixel point and the adjacent previous traversed pixel point. , and form a hue difference value sequence in the traversal order;

[0109] For the vibration blurred area, its hue usually shows the blurred superposition characteristics of the background area and the important information area. Therefore, during the traversal process, the difference between its hue values ​​is relatively small. When the blur of the important information area disappears, the pixel hue is only composed of the background area. Therefore, the vibration area can be evaluated and analyzed by calculating the difference in pixel hue values ​​during different traversal processes;

[0110] Set the maximum traversal distance as the distance between the nearest edge point of the target important area and the corresponding projection area; analyze each The first objective function is set in the sequence to evaluate the current vibration blur range, that is, the objective function value is calculated once for each pixel point. When the objective function is calculated to obtain the maximum value, the last traversal distance is used as the vibration blur length to obtain the vibration blur area. The first objective function A can be expressed by the following formula:

[0111]

[0112] In the above formula, n represents the number of pixels on the edge of the target important area, m represents the number of traversals, Represents the hue value of the i-th edge pixel, That is, it represents the hue value difference between the i-th edge pixel and its adjacent pixel on the previous traversal. Indicates the mean hue value of the target important area. To prevent the denominator from being a constant of 0, it can be set as needed. According to the above analysis, in order to improve the accuracy of the hue value difference of the traversed pixels, the difference between the hue of the edge pixels and the average hue of the region is calculated to amplify the traversal process of the hue value pixels that can better represent the important information area; in addition, since the vibration blur area is relatively weak, the blur distance is usually small, so As a penalty, It is set according to actual needs so that the first objective function can obtain the maximum value in the initial stage of traversal as much as possible.

[0113] Step S3, determining the main blur direction of the target important area relative to the target projection area, and using the vibration blur area to determine the main blur area corresponding to the main blur direction;

[0114] Specifically, the step of determining the main blur direction of the target important area relative to the target projection area includes:

[0115] Determine the centroid line from the target important area to the target projection area, and use the directional centroid line as the main fuzzy direction.

[0116] After obtaining the line from the target important area to the centroid of the corresponding projection area, there is a fuzzy area in the target important area in this direction, which is defined as the main fuzzy reverse direction.

[0117] For details, please refer to Figure 4 The step of using the vibration blur area to determine the main blur area corresponding to the main blur direction includes:

[0118] Step S30, determining a main blur starting pixel point in a main blur starting position of the target important area;

[0119] Step S31, determining the fuzzy evaluation pixel point having the largest hue value difference with the adjacent pixels among the main fuzzy starting pixels;

[0120] Step S32, determining a fuzzy evaluation area using the fuzzy evaluation pixel points and the vibration fuzzy area;

[0121] Step S33, traversing the pixel points in the fuzzy evaluation area, and determining the hue value and saturation of the currently traversed pixel point;

[0122] Step S34, using the hue value and saturation of the currently traversed pixel point and setting a second objective function, and calculating the fuzzy trajectory of the currently traversed pixel point when the second objective function is a minimum value;

[0123] Step S35, based on the blur trajectory of each currently traversed pixel point, a main blur area corresponding to the main blur direction is obtained.

[0124] After obtaining the vibration blur area of ​​the target important area, the main blur area of ​​the current main blur direction can be selected through the blur information of the vibration blur area. The main blur starting position of the target important area is screened using a method similar to the upper and lower edge selection: the projection midpoint of the edge of the target important area parallel to the main blur direction is used as the boundary, and the important information area is divided into two parts perpendicular to the main blur direction, where the outer side of the edge close to the projection area is the main blur starting position.

[0125] According to the above analysis, the label image may have a certain amount of blur in other directions. The blur information is mainly caused by the vibration during the movement of the label. The blur degree in different directions varies according to the degree of vibration: the longer the vertical vibration blur length is, the stronger the interference to the main blur direction is. In order to accurately evaluate the blur area in the main blur direction, it is also necessary to combine the vibration blur length, that is, the vibration blur area.

[0126] When the main blurred area is affected by vibration blur, when evaluating each edge pixel at each blur starting position, for edge parts with similar image features, it is difficult to distinguish the blurring effect of vibration blur of other pixels on the current pixel. In order to reduce the interference caused by this factor, the blurred area can be evaluated by selecting a special pixel at the main blur starting position: according to the above analysis, this pixel should have a certain difference from other adjacent edge pixels.

[0127] Calculate the hue value difference between each main fuzzy starting pixel and the adjacent pixel, and select the pixel with the largest difference as the fuzzy evaluation pixel of the main fuzzy area in the target important area;

[0128] For the fuzzy evaluation pixel point, a fuzzy evaluation area with a width equal to the sum of the upper and lower vibration blur lengths of the target important area and parallel to the main blur direction is set to reduce the impact of vibration blur on the current fuzzy evaluation process, wherein the width of the fuzzy evaluation area is the upper vibration blur length of the target important area above the fuzzy evaluation pixel point perpendicular to the main blur direction;

[0129] The traversal process of the fuzzy evaluation area is as follows: after selecting the first traversal pixel point in the main fuzzy direction, select the pixel point whose hue value is closest to the current traversal pixel point in the next column of pixels in the main fuzzy direction perpendicular to the current traversal pixel point in the fuzzy evaluation area; the reason for selecting this point is that the fuzzy trajectory of the evaluation pixel point may jump in the evaluation area after being affected by the vibration blur on the current main blur, and the fuzzy evaluation pixel point is a pixel point with a large difference in hue value from other edge pixels, so the next traversal pixel point is selected in the fuzzy evaluation area;

[0130] For the fuzzy trajectory of the fuzzy evaluation pixel, the color characteristics of the fuzzy pixel are close to those of the evaluation pixel, and after being motion blurred, the saturation of the pixel is relatively low; in addition, since there is a certain color difference between the evaluation pixel and other edge pixels, the color of the fuzzy traversal point should also be different from that of other pixels in the same column of fuzzy evaluation area;

[0131] Set the second objective function B and the maximum traversal distance (the same as the aforementioned maximum traversal distance), calculate the objective function once each time the fuzzy evaluation area is traversed, and select the minimum value of the objective function, use the pixel point and the traversal trajectory as the fuzzy trajectory of the current area, and select the fuzzy trajectories corresponding to other edge pixels as the main fuzzy area; the objective function B can be expressed by the following formula:

[0132]

[0133] In the above formula, It represents the difference between the hue value of the current traversed pixel and the fuzzy evaluation pixel, S represents the saturation of the current traversed pixel, It represents the average value of the hue difference between the current traversed pixel and other pixels in the same column in the fuzzy evaluation area. To prevent zero constant, it can be set as needed.

[0134] Step S4, using the projection relationship between the main fuzzy area and the target important area, determining the fuzzy loss index of the label information of the target important area;

[0135] Specifically, step S4 includes:

[0136] Determine the slope variance of each pixel in the fuzzy trajectory;

[0137] Determine the projection length of the target important area along the main fuzzy area;

[0138] The slope variance and projection length are used to calculate the fuzzy loss index of the label information in the important area of ​​the target.

[0139] After obtaining the main blur area, for the blur area with vibration, the more tortuous the blur trajectory at different pixel positions is and the longer the length is, the greater the interference of vibration blur is on the current motion blur process. At the same time, the larger the image range affected by the blur area is, the higher the information loss caused by the blur is for the image enhancement process.

[0140] For the main blurred area, calculate the slope variance of each pixel in the blurred trajectory , this value indicates the degree of tortuosity of the fuzzy trajectory in the current fuzzy area. The larger the value, the higher the degree of tortuosity of the current fuzzy trajectory.

[0141] In addition, for the label blurred area, the longer the projection length of the important information area along the main blurred area and the richer the internal information, the greater the impact of motion blur on the important information area;

[0142] The projection length h of the target important area along the main blurred area is calculated. The greater the information loss caused by motion blur inside the target important area.

[0143] According to the above analysis, the label information fuzzy loss index L of the target important area is calculated:

[0144]

[0145] The tanh function is used to place the calculation result between (0, 1), and L represents the fuzzy loss index of the label information of the region.

[0146] Step S5, using the blur loss index of the label information to determine the blur kernel of the current frame image, and using the blur kernel to deblur and enhance the current frame image;

[0147] Specifically, step S5 includes:

[0148] Determine the gray value variance of each fuzzy track in the main fuzzy area corresponding to the target important area;

[0149] The blur kernel of the current frame image is calculated using the gray value variance and the label information blur loss index.

[0150] In order to reduce the influence of vibration blur during the enhancement process, the blur kernel can be designed as a square whose side length is closest to the average width of the blur evaluation area;

[0151] In the image affected by vibration, the blurred area is affected by multi-angle displacement. In order to avoid the blur kernel only being able to enhance the motion blur in a certain direction, the Gaussian blur kernel is used to simulate the motion blur caused by the vibration of the transmission system in the imaging device. The standard deviation parameter of the Gaussian blur kernel is It is expressed by the following formula:

[0152]

[0153] In the above formula, Indicates the number of label important information areas in the image (the number of target important areas), It represents the gray value variance of each blur track in the main blur area corresponding to the jth label important information area. The label important information area with large blur information loss is amplified by L, and the actual grayscale change of the blur area is used as the parameter body. For the motion blur part of a certain important information area, the higher the grayscale discreteness, the stronger the motion blur simulated by the blur kernel.

[0154] According to the blur kernel The image of this frame is subjected to non-blind deconvolution to realize image reconstruction, and an enhanced image is obtained. Non-blind deconvolution is a prior art and will not be described in detail here.

[0155] Step S6, comparing the deblurred and enhanced current frame image with the printed sample image to determine the label printing quality.

[0156] After obtaining the enhanced current frame image, the pre-collected label printing sample is compared with the current frame image to detect and analyze the defects in the label, and the defective labels are marked in time. The specific process is as follows:

[0157] Use the image acquisition equipment of the quality inspection machine to collect static label printing sample images, input the standard sample images into the quality inspection machine system, and create templates through software analysis;

[0158] Through the built-in image processing software, each frame of the product to be inspected is analyzed to extract key features (such as color, shape, text, etc.);

[0159] Compare the extracted features with the previously input sample information and calculate the difference;

[0160] According to the preset threshold, determine whether the product to be inspected is qualified: if the difference is within the acceptable range, it is judged as qualified; otherwise, it is judged as unqualified;

[0161] For products judged to be unqualified, further inspection is required to determine the cause of the problem and take appropriate measures.

[0162] The present invention proposes a method for intelligent comparison of printed samples under visual assistance, which uses the image acquisition device of the inspection machine to obtain the current printed label image, uses the frame difference method to obtain the image area representing the important information of the label, and then uses the previous frame image to determine the main blur direction, and determines the vibration blur area of ​​the important area of ​​the label, and then uses the vibration blur area to analyze the blur trajectory in the main blur direction and determine the blur area; analyzes the information loss amount of the blur area according to the vibration blur characteristics of the label, and designs an image blur kernel in combination with the blur areas of different important areas of the label to perform deblurring and enhancement processing on the image. Compared with the existing methods, the blur kernel analysis process considers multiple unstable factors that may be generated by the inspection machine during label printing inspection, and further adjusts the image blur degree processing process, reduces the unstable operation interference of the transmission system of the inspection machine, improves the blur enhancement effect, reduces the impact of blur on the printed label image, and increases the accuracy of printed label quality inspection.

[0163] Embodiment 2:

[0164] The embodiment of the present invention also provides a visually assisted intelligent comparison device for printed samples, which can be a data computing and processing device such as a printed label inspection machine, a computer, a server, or a combination of multiple devices.

[0165] like Figure 5 As shown, Figure 5 It is a structural diagram of the hardware operating environment of the visually assisted printing sample intelligent comparison device involved in the embodiment of the present invention.

[0166] like Figure 5 As shown, the visually assisted printed sample intelligent comparison device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display (Display), an input unit such as a control panel, and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WIFI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001. The memory 1005 as a computer storage medium may include a visually assisted printed sample intelligent comparison program.

[0167] Those skilled in the art will understand that Figure 5 The hardware structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0168] Continue to refer to Figure 5 , Figure 5 The memory 1005 as a computer-readable storage medium may include an operating system, a user interface module, a network communication module, and a visually assisted printing sample intelligent comparison program.

[0169] exist Figure 5 In the embodiment, the network communication module is mainly used to connect to the server and can communicate data with the server; and the processor 1001 can call the visually assisted printing sample intelligent comparison program stored in the memory 1005 and execute the steps in the above embodiments.

[0170] The hardware structure of the above-mentioned visually assisted intelligent comparison device for printed samples is used to implement various embodiments of the visually assisted intelligent comparison method for printed samples of the present invention.

[0171] In addition, the present invention also provides a visually assisted printing sample intelligent comparison system, please refer to Figure 6 The visually assisted printing sample intelligent comparison system comprises:

[0172] The image acquisition module A10 is used to obtain the current frame image and the previous frame image of the printed label, and determine the target important area in the current frame image and the corresponding target projection area in the previous frame image;

[0173] The blur identification module A20 is used to traverse the pixel points of the target important area, and determine the vibration blur area in the target important area by using the hue difference between adjacent pixel points before and after the traversal; determine the main blur direction of the target important area relative to the target projection area, and determine the main blur area corresponding to the main blur direction by using the vibration blur area;

[0174] The image enhancement module A30 is used to determine the label information blur loss index of the target important area by using the projection relationship between the main blur area and the target important area; determine the blur kernel of the current frame image by using the label information blur loss index, and deblur and enhance the current frame image by using the blur kernel;

[0175] The image comparison module A40 is used to compare the deblurred and enhanced current frame image with the printed sample image to determine the label printing quality.

[0176] Furthermore, the image acquisition module A10 is also used for:

[0177] Determine the difference pixel points between the current frame image and the previous frame image and mark the difference pixel points in the current frame image;

[0178] Determine a saturation sequence composed of the saturations of the different pixel points and arranged in descending order;

[0179] Determine the two sequence elements with the largest adjacent saturation difference in the saturation sequence;

[0180] Determine the pixel points corresponding to all sequence elements before the later sequence element of the two sequence elements as the pixel points of important label information;

[0181] The important areas of the target are determined by using the label important information pixels in this frame image.

[0182] Furthermore, the image acquisition module A10 is also used for:

[0183] Determine the correlation coefficient of the image features between the target important area of ​​the current frame image and the important area in the previous frame image;

[0184] Determine the centroid distance between the target important area and the important area in the previous frame image;

[0185] Using the correlation coefficient and the centroid distance, the probability of label information displacement between the important area of ​​the target and the important area in the previous frame image is calculated;

[0186] The displacement probability of the label information is used to determine the target projection area that is the same area as the target important area in the previous frame image.

[0187] Furthermore, the fuzzy identification module A20 is also used for:

[0188] Traverse the pixel points of the target important area according to the preset direction, calculate the hue difference between each adjacent pixel point before and after the traversal, and form a hue difference value sequence according to the traversal order;

[0189] The hue difference sequence is used to set the first objective function, and when the first objective function is calculated to obtain a maximum value, a vibration blur region in the target important region is obtained.

[0190] Furthermore, the fuzzy identification module A20 is also used for:

[0191] Determine the centroid line from the target important area to the target projection area, and use the directional centroid line as the main fuzzy direction.

[0192] Furthermore, the fuzzy identification module A20 is also used for:

[0193] Determine a main blur starting pixel point in a main blur starting position of an important target area;

[0194] Determine the fuzzy evaluation pixel point with the largest hue value difference between the main fuzzy starting pixel point and the adjacent pixel points;

[0195] Determine a fuzzy evaluation area by using fuzzy evaluation pixels and a vibration fuzzy area;

[0196] Traverse the pixels in the fuzzy evaluation area to determine the hue value and saturation of the currently traversed pixel;

[0197] Using the hue value and saturation of the currently traversed pixel point and setting the second objective function, the fuzzy trajectory of the currently traversed pixel point is calculated when the second objective function is the minimum value;

[0198] Based on the blur trajectory of each currently traversed pixel point, the main blur area corresponding to the main blur direction is obtained.

[0199] Furthermore, the image enhancement module A30 is also used for:

[0200] Determine the slope variance of each pixel in the fuzzy trajectory;

[0201] Determine the projection length of the target important area along the main fuzzy area;

[0202] The slope variance and projection length are used to calculate the fuzzy loss index of the label information in the important area of ​​the target.

[0203] Furthermore, the image enhancement module A30 is also used for:

[0204] Determine the gray value variance of each fuzzy track in the main fuzzy area corresponding to the target important area;

[0205] The blur kernel of the current frame image is calculated using the gray value variance and the label information blur loss index.

[0206] The specific implementation of the visually assisted printing sample intelligent comparison system of the present invention is basically the same as the embodiments of the visually assisted printing sample intelligent comparison method described above, and will not be repeated here.

[0207] In addition, the present invention also provides a computer-readable storage medium. The computer-readable storage medium of the present invention stores a visually assisted printing sample intelligent comparison program, wherein when the visually assisted printing sample intelligent comparison program is executed by a processor, the steps of the visually assisted printing sample intelligent comparison method as described above are implemented.

[0208] Among them, the method implemented when the visually assisted printing sample intelligent comparison program is executed can refer to the various embodiments of the visually assisted printing sample intelligent comparison method of the present invention, and will not be repeated here.

[0209] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0210] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0211] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0212] The above description is only a preferred embodiment of the present invention, and does not limit the protection scope of the present invention. All equivalent structural / method transformations made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the protection scope of the present invention.

Claims

1. A visually assisted printing sample intelligent comparison method, characterized in that: The method comprises: Obtaining a current frame image and a previous frame image of the printed label, and determining a target important area in the current frame image and a corresponding target projection area in the previous frame image; Traverse the pixel points of the target important area, and determine the vibration blur area in the target important area by using the hue difference between adjacent pixel points before and after the traversal; Determine the main blur direction of the target important area relative to the target projection area, and use the vibration blur area to determine the main blur area corresponding to the main blur direction; The projection relationship between the main fuzzy area and the target important area is used to determine the fuzzy loss index of the label information of the target important area. The blur loss index of the label information is used to determine the blur kernel of the current frame image, and the blur kernel is used to deblur and enhance the current frame image; the deblurred and enhanced current frame image is compared with the printed sample image to determine the label printing quality; wherein, The step of determining the main blur area corresponding to the main blur direction by using the vibration blur area comprises: Determine a main blur starting pixel point in a main blur starting position of an important target area; Determine the fuzzy evaluation pixel point with the largest hue value difference between the main fuzzy starting pixel point and the adjacent pixel points; Determine a fuzzy evaluation area by using fuzzy evaluation pixels and a vibration fuzzy area; Traverse the pixels in the fuzzy evaluation area to determine the hue value and saturation of the currently traversed pixel; Using the hue value and saturation of the currently traversed pixel point and setting the second objective function, the fuzzy trajectory of the currently traversed pixel point is calculated when the second objective function is the minimum value; Based on the blur trajectory of each currently traversed pixel point, the main blur area corresponding to the main blur direction is obtained; The step of determining the fuzzy loss index of the label information of the target important area by using the projection relationship between the main fuzzy area and the target important area includes: Determine the slope variance of each pixel in the fuzzy trajectory; Determine the projection length of the target important area along the main fuzzy area; Using the slope variance and projection length, the fuzzy loss index of label information in the important area of ​​the target is calculated; The steps of determining the blur kernel of the current frame image by using the blur loss index of the label information include: Determine the gray value variance of each fuzzy track in the main fuzzy area corresponding to the target important area; The blur kernel of the current frame image is calculated using the gray value variance and the label information blur loss index.

2. The method for intelligent comparison of printed samples under visual assistance according to claim 1, characterized in that: The steps of determining the target important area in the current frame image include: Determine the difference pixel points between the current frame image and the previous frame image and mark the difference pixel points in the current frame image; Determine a saturation sequence composed of the saturations of the different pixel points and arranged in descending order; Determine the two sequence elements with the largest adjacent saturation difference in the saturation sequence; Determine the pixel points corresponding to all sequence elements before the later sequence element of the two sequence elements as the pixel points of important label information; The important areas of the target are determined by using the label important information pixels in this frame image.

3. The method for intelligent comparison of printed samples with visual assistance according to claim 1, characterized in that: The step of determining the target important area in the current frame image and the corresponding target projection area in the previous frame image includes: Determine the correlation coefficient of the image features between the target important area of ​​the current frame image and the important area in the previous frame image; Determine the centroid distance between the target important area and the important area in the previous frame image; Using the correlation coefficient and the centroid distance, the probability of label information displacement between the important area of ​​the target and the important area in the previous frame image is calculated; The displacement probability of the label information is used to determine the target projection area that is the same area as the target important area in the previous frame image.

4. The method for intelligent comparison of printed samples with visual assistance according to claim 1, characterized in that: The step of traversing the pixel points of the target important area and determining the vibration blurred area in the target important area by using the hue difference between adjacent pixel points before and after the traversal includes: Traverse the pixel points of the target important area according to the preset direction, calculate the hue difference between each adjacent pixel point before and after the traversal, and form a hue difference value sequence according to the traversal order; The hue difference sequence is used to set the first objective function, and when the first objective function is calculated to obtain a maximum value, a vibration blur region in the target important region is obtained.

5. The method for intelligent comparison of printed samples with visual assistance according to claim 1, characterized in that: The step of determining the main blur direction of the target important area relative to the target projection area comprises: Determine the centroid line from the target important area to the target projection area, and use the directional centroid line as the main fuzzy direction.

6. A visually assisted printing sample intelligent comparison system, characterized in that: The system is used to implement the visually assisted intelligent comparison method of printed samples as described in any one of claims 1 to 5; the system comprises: An image acquisition module is used to obtain a current frame image and a previous frame image of the printed label, and determine a target important area in the current frame image and a corresponding target projection area in the previous frame image; A fuzzy identification module is used to traverse the pixel points of the target important area, and determine the vibration fuzzy area in the target important area by using the hue difference between adjacent pixel points before and after the traversal; determine the main fuzzy direction of the target important area relative to the target projection area, and determine the main fuzzy area corresponding to the main fuzzy direction by using the vibration fuzzy area; The image enhancement module is used to determine the label information blur loss index of the target important area by using the projection relationship between the main blur area and the target important area; determine the blur kernel of the current frame image by using the label information blur loss index, and deblur and enhance the current frame image by using the blur kernel; The image comparison module is used to compare the deblurred and enhanced current frame image with the printed sample image to determine the label printing quality.

7. A visually assisted printed sample intelligent comparison device, characterized in that: The visually assisted intelligent comparison device for printed samples includes a processor, a memory, and a visually assisted intelligent comparison program for printed samples stored in the memory and executable by the processor, wherein when the visually assisted intelligent comparison program for printed samples is executed by the processor, the steps of the visually assisted intelligent comparison method for printed samples as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Foreign matter visual detection method in wine canning production process

    CN118096727A