Method, device and equipment for determining area rate of printing dots based on image processing
By using image processing technology to automatically detect and filter printed dots, the problem of low calculation efficiency and accuracy caused by manual judgment is solved, and efficient and accurate calculation of printed dot area ratio is achieved.
Patent Information
- Application Number
- CN202511164448.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, the manual determination of dot spacing results in low efficiency and accuracy in calculating the area ratio of printed dots.
Image processing technology is used to acquire printed images and perform preprocessing, detect and filter circular spots, calculate the area ratio of printed dots, including diameter median filtering and overlap filtering, and automate the image processing process.
It improves the calculation efficiency and accuracy of printing dot area ratio, and realizes fully automated, efficient and accurate calculation.
Smart Images

Figure CN120997283A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus and equipment for determining the area ratio of printed halftone dots based on image processing. Background Technology
[0002] In offset printing, the graphic to be printed needs to be layered with different colored inks and dotted. These dots are then engraved onto an aluminum plate. After inking with the corresponding colored aluminum plate, the ink is transferred to paper. In other words, all inks are applied to the substrate in a dotted manner. For halftone dots, dot area ratio is the most important parameter, directly reflecting the chromaticity of the corresponding monochromatic color. The representation of different colors in printing is mainly achieved by adjusting the dot area ratio to meet the requirements of inspection and reproduction.
[0003] In existing technology, printed materials are photographed using a high-magnification camera, and color separation is performed according to color channels to divide the image into dot regions and non-dot regions. The dot spacing is manually determined, and the dot area ratio is calculated based on the dot spacing and dot parameters using geometric relationships.
[0004] However, the above method requires manual determination of the center of the dots to measure the dot spacing, which leads to lower efficiency and accuracy in calculating the dot area ratio. Summary of the Invention
[0005] This application provides a method, apparatus, and device for determining the area ratio of printed halftone dots based on image processing, which can improve the calculation efficiency and accuracy of halftone dot area ratio.
[0006] In a first aspect, embodiments of this application provide a method for determining the area ratio of printed halftone dots based on image processing, comprising:
[0007] Acquire a printed image of the printed material to be processed; and preprocess the printed image to obtain a grayscale image corresponding to the printed image;
[0008] Spot detection is performed on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein, the first spot set includes at least one first circular spot;
[0009] The first set of spots is filtered to obtain a second set of spots corresponding to the printed image; wherein, the second set of spots includes at least one second circular spot; the second circular spot represents a printing dot in the printed image;
[0010] Based on the second set of spots, the printing dot area ratio corresponding to the printed image is determined; wherein, the printing dot area ratio is used for printing processing.
[0011] In one possible implementation, the step of performing spot filtering on the first spot set to obtain a second spot set corresponding to the printed image includes:
[0012] Based on the diameter of each of the first circular spots, the first spot set is filtered to obtain a third spot set corresponding to the printed image; wherein, the third spot set includes at least one third circular spot;
[0013] The third set of spots is subjected to overlap filtering to obtain the second set of spots corresponding to the printed image.
[0014] In one possible implementation, filtering the first set of spots based on the diameter of each of the first circular spots to obtain a third set of spots corresponding to the printed image includes:
[0015] Determine the first median corresponding to the diameter of all first circular spots in the first spot set;
[0016] Determine the diameter error between the diameter of the first circular spot and the first median;
[0017] Delete the first circular spots in the first spot set whose diameter error is greater than or equal to a preset threshold to obtain the third spot set corresponding to the printed image.
[0018] In one possible implementation, the step of performing overlap filtering on the third set of spots to obtain the second set of spots corresponding to the printed image includes:
[0019] Determine the first mean of the diameters of all third circular spots in the third spot set;
[0020] Determine the first center distance between the third circular spot and every other third circular spot except the third circular spot;
[0021] If it is determined that the first center distances corresponding to the third circular spot are all greater than the first average value, then the third circular spot is determined to be the second circular spot in the second spot set.
[0022] In one possible implementation, determining the printing dot area ratio corresponding to the printed image based on the second dot set includes:
[0023] Determine the second mean value corresponding to the diameter of all second circular spots in the second spot set;
[0024] Determine the second center distance between the second circular spot and every other second circular spot except the second circular spot; and determine the minimum value among the second center distances, which is the nearest center distance corresponding to the second circular spot;
[0025] The printing dot area ratio corresponding to the printed image is determined based on the second mean and the nearest center distance of each of the second circular spots.
[0026] In one possible implementation, determining the printing dot area ratio corresponding to the printed image based on the second mean and the nearest center distance corresponding to each of the second circular spots includes:
[0027] Determine the second median among the nearest center distances corresponding to each of the second circular spots;
[0028] The printing dot area ratio corresponding to the printed image is determined based on the second mean and each of the second medians.
[0029] In one possible implementation, performing spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image includes:
[0030] The grayscale image corresponding to the printed image is binarized to obtain the binarized image corresponding to the printed image;
[0031] Morphological operations are performed on the binarized image corresponding to the printed image to obtain the processed binarized image;
[0032] Spot detection is performed on the processed binarized image to obtain the first spot set corresponding to the printed image.
[0033] Secondly, embodiments of this application provide an apparatus for determining the area ratio of printed halftone dots based on image processing, comprising:
[0034] The preprocessing module is used to acquire the printed image of the printed matter to be processed; and to preprocess the printed image to obtain a grayscale image corresponding to the printed image.
[0035] The detection module is used to perform spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein, the first spot set includes at least one first circular spot;
[0036] A filtering module is used to perform spot filtering on the first spot set to obtain a second spot set corresponding to the printed image; wherein, the second spot set includes at least one second circular spot; the second circular spot represents a printing dot in the printed image;
[0037] The determining module is used to determine the printing dot area ratio corresponding to the printed image based on the second dot set; wherein the printing dot area ratio is used for printing processing.
[0038] In one possible implementation, the filtering module is specifically configured to: filter the first set of spots according to the diameter of each of the first circular spots to obtain a third set of spots corresponding to the printed image; wherein the third set of spots includes at least one third circular spot; and perform overlap filtering on the third set of spots to obtain a second set of spots corresponding to the printed image.
[0039] In one possible implementation, the filtering module is specifically used to: determine the first median corresponding to the diameter of all first circular spots in the first spot set; determine the diameter error between the diameter of the first circular spot and the first median; delete the first circular spots in the first spot set whose diameter error is greater than or equal to a preset threshold, and obtain a third spot set corresponding to the printed image.
[0040] In one possible implementation, the filtering module is further configured to: determine a first average diameter of all third circular spots in the third spot set; determine a first center distance between the third circular spot and each other third circular spot except the third circular spot; and if it is determined that the first center distances corresponding to the third circular spots are all greater than the first average, then determine that the third circular spot is a second circular spot in the second spot set.
[0041] In one possible implementation, the determining module is specifically configured to: determine a second mean value corresponding to the diameter of all second circular spots in the second spot set; determine a second center distance between the second circular spot and each other second circular spot except the second circular spot; and determine the minimum value among the second center distances as the nearest center distance corresponding to the second circular spot; and determine the printing dot area ratio corresponding to the printed image based on the second mean value and the nearest center distance corresponding to each second circular spot.
[0042] In one possible implementation, the determining module is further specifically configured to: determine the second median among the nearest center distances corresponding to each of the second circular spots; and determine the printing dot area ratio corresponding to the printed image based on the second mean and each of the second medians.
[0043] In one possible implementation, the detection module is specifically used to: binarize the grayscale image corresponding to the printed image to obtain a binarized image corresponding to the printed image; perform morphological operations on the binarized image corresponding to the printed image to obtain a processed binarized image; and perform spot detection on the processed binarized image to obtain a first set of spots corresponding to the printed image.
[0044] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0045] The memory stores computer-executed instructions;
[0046] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0047] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0048] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0049] The method, apparatus, and device for determining the printing dot area ratio based on image processing provided in this application embodiment preprocess the printed image of the printed matter to be processed to obtain a grayscale image, then detect circular spots in the grayscale image, and filter all detected circular spots to obtain the final circular spots to represent the printing dots in the printed image. The printing dot area ratio is calculated from these final circular spots for use in printing processing. Furthermore, by fully automating the image processing of the printed image of the printed matter to be processed and calculating the printing dot area ratio, the calculation efficiency and accuracy of the printing dot area ratio can be improved. Attached Figure Description
[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0051] Figure 1 This application provides an illustration of an application scenario.
[0052] Figure 2 A flowchart illustrating a method for determining the area ratio of printed halftone dots based on image processing, provided in an embodiment of this application;
[0053] Figure 3 A schematic diagram illustrating a process for determining the area ratio of printed halftone dots, provided as an embodiment of this application;
[0054] Figure 4 An example diagram illustrating an image preprocessing effect provided in an embodiment of this application;
[0055] Figure 5 A flowchart illustrating another method for determining the area ratio of printed halftone dots based on image processing, provided in an embodiment of this application;
[0056] Figure 6 An example image of a spot detection result for a printed image provided in an embodiment of this application;
[0057] Figure 7 An example diagram showing the spot filtering result of a printed image provided in an embodiment of this application;
[0058] Figure 8 A schematic diagram of the structure of a device for determining the area ratio of printed halftone dots based on image processing, provided in an embodiment of this application;
[0059] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0060] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0062] Figure 1 This application provides an illustration of an application scenario, such as... Figure 1 As shown, the specific application scenario of this application is as follows: Printed materials are photographed using a high-magnification camera. Based on the color channels, device 101 performs color separation on the printed material image, dividing the image into halftone areas and non-halftone areas. User 102 manually determines the dot spacing and, based on the dot spacing and dot parameters, calculates the dot area ratio using geometric relationships.
[0063] Based on the above scenarios, it is clear that manually determining the center of the dots to measure the dot spacing leads to lower efficiency and accuracy in calculating the dot area ratio.
[0064] The method for determining the printing dot area ratio based on image processing provided in this application calculates the printing dot area ratio by fully automating the image processing of the printed image of the printed matter to be processed, which can improve the calculation efficiency and accuracy of the printing dot area ratio.
[0065] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0066] Figure 2 A flowchart illustrating a method for determining the area ratio of printed halftone dots based on image processing, as provided in this application embodiment, is shown below. Figure 2 As shown, the method includes:
[0067] 201. Acquire the printed image of the printed material to be processed; and preprocess the printed image to obtain the corresponding grayscale image.
[0068] For example, the execution subject of this embodiment may be an electronic device. Figure 3 This is a schematic diagram illustrating a process for determining the area ratio of printed halftone dots, as provided in an embodiment of this application. Figure 3 As shown, a high-magnification camera is used to photograph the printed material to be processed for dot area ratio calculation, resulting in a microscopic image of the printed material in the form of halftone dots, referred to as digital image 1. Electronic devices can acquire this image from the high-magnification camera. Based on image processing technology, the acquired image is preprocessed; specifically, Figure 4 An example image of an image preprocessing effect provided in an embodiment of this application is shown below. Figure 4 As shown, a high-magnification camera is used to photograph the monochrome printed material, resulting in a printed image. Using the minimum brightness color-to-grayscale conversion method, the printed image, i.e., digital image 1, is converted from a color image to a grayscale image, retaining only one color channel, which is called digital image 2. This yields the corresponding grayscale image of the printed material.
[0069] The formula for calculating the minimum brightness color to black and white conversion is: gray=min(red, green, blue); where red, green, and blue represent the red channel value, green channel value, and blue channel value, respectively.
[0070] For example, when reading a printed image, which is typically stored in RGB (red, green, blue) format, each pixel in the image is represented by three components (R, G, B). For each pixel in the printed image, a grayscale value is calculated based on its RGB values. The calculated grayscale value replaces the RGB values in the original image, generating a new grayscale image.
[0071] 202. Perform spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein the first spot set includes at least one first circular spot.
[0072] For example, combined Figure 3 Based on a preset target detection algorithm, spot detection processing is performed on the grayscale image corresponding to the printed image, i.e., digital image 2. Specifically, a preset function is used to read digital image 2; parameters for spot detection are set, such as color, area, roundness, convexity, and inertia ratio; a spot detector is created; a function method is called to detect spots in digital image 2; the detected spots are drawn on digital image 2 using image processing tools; and the image with spots is displayed using an image processing display component, thereby obtaining a first spot set, which includes multiple detected first circular spots.
[0073] 203. Perform spot filtering on the first spot set to obtain a second spot set corresponding to the printed image; wherein, the second spot set includes at least one second circular spot; the second circular spot represents the printing dots in the printed image.
[0074] For example, combined Figure 3 Based on a preset target detection algorithm and filtering algorithm, each spot in the detected first spot set is detected, and the area of each first circular spot can be calculated. If the area of the first circular spot is determined to be less than a preset threshold, it is determined that the first circular spot does not closely resemble the real printing dots, and the first circular spot needs to be filtered out and deleted. If the area of the first circular spot is determined to be greater than or equal to the preset threshold, the first circular spot is retained to obtain the final second spot set, which includes at least one second circular spot. Each second circular spot represents the real printing dots in the printed image.
[0075] 204. Based on the second set of spots, determine the printing dot area ratio corresponding to the printed image; wherein, the printing dot area ratio is used for printing processing.
[0076] For example, combined Figure 3Based on the obtained second set of spots, the image coordinates of each second circular spot in the corresponding printed image can be determined by establishing an image coordinate system. According to a preset calculation formula, the image coordinates of all second circular spots in the second set are calculated to obtain the printing dot area ratio corresponding to the printed image. This printing dot area ratio can be used for printing inspection of the printed material to which the image belongs, to determine the printing quality of the printed material; alternatively, it can be used for printing restoration processing of the printed material to which the image belongs.
[0077] For example, the image coordinates of all the second circular spots in the second spot set corresponding to the printed image are calculated to obtain the area occupied by all the second circular spots in the second spot set in the printed image. Then, the image area of the printed image is determined, and the percentage of the area of the region relative to the image area is determined as the printing dot area ratio corresponding to the printed image.
[0078] This embodiment provides a method for determining the printing dot area ratio based on image processing. By fully automating the image processing of the printed image of the printed matter to be processed, the printing dot area ratio is calculated, which can improve the calculation efficiency of the printing dot area ratio. By filtering the circular spots to obtain more realistic and closer circular spots to the printed dots, the accuracy and precision of the printing dot area ratio calculation can be improved.
[0079] Figure 5 A flowchart illustrating another method for determining the area ratio of printed halftone dots based on image processing, as provided in this application embodiment, is shown below. Figure 5 As shown, the method includes:
[0080] 301. Acquire the printed image of the printed material to be processed; and preprocess the printed image to obtain the corresponding grayscale image.
[0081] For example, this step can be referred to as step 201, which will not be repeated here.
[0082] 302. Perform spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein the first spot set includes at least one first circular spot.
[0083] For example, this step can be referred to as step 202, which will not be repeated here.
[0084] In one possible implementation, step 302 includes the following steps:
[0085] The first step is to binarize the grayscale image corresponding to the printed image to obtain the binarized image corresponding to the printed image.
[0086] The second step is to perform morphological operations on the binarized image corresponding to the printed image to obtain the processed binarized image.
[0087] The third step is to perform spot detection on the processed binarized image to obtain the first set of spots corresponding to the printed image.
[0088] Specifically, a threshold (T) is determined, and each pixel in the grayscale image is traversed. Pixels are classified according to the threshold; specifically, pixels with values above the threshold are set to white (usually 255), and pixels below the threshold are set to black (usually 0). The processed pixel values are then combined to form a new image, resulting in a binarized image. Based on a preset morphological algorithm, the binarized image is subjected to erosion and then dilation to obtain the processed binarized image. Based on a preset target detection algorithm, spot detection is performed on the processed binarized image to obtain the first set of spots corresponding to the printed image.
[0089] For example, Figure 6 An example image of a spot detection result for a printed image provided in an embodiment of this application, such as... Figure 6 As shown, blob detection is performed using a preset simple blob detector (such as the Simple Blob Detector class). Multiple parameters for the blob detection tool can be configured, including: minimum grayscale value (min Threshold) = 100, maximum grayscale value (max Threshold) = 200, area filter switch (filter By Area) = False, roundness filter switch (filter By Circularity) = True, minimum roundness value (min Circularity) = 0.1, convexity filter switch (filter By Convexity) = True, minimum convexity value (min Convexity) = 0.8, inertia ratio filter switch (filter By Inertia) = True, minimum inertia ratio (min Inertia Ratio) = 0.01.
[0090] 303. Based on the diameter of each first circular spot, filter the first spot set to obtain the third spot set corresponding to the printed image; wherein the third spot set includes at least one third circular spot.
[0091] For example, the diameters of all first circular spots in the first spot set can be determined, and the mean of the diameters of all first circular spots can be calculated. The absolute value of the difference between the diameter of each first circular spot and the mean can also be calculated. If the absolute value of the difference corresponding to the first circular spot is less than or equal to a preset threshold, the first circular spot is retained. If the absolute value of the difference corresponding to the first circular spot is greater than the preset threshold, the first circular spot is deleted. All the retained first circular spots are then determined as the third circular spots in the third spot set.
[0092] In one possible implementation, step 303 includes the following steps:
[0093] The first step is to determine the first median corresponding to the diameter of all the first circular spots in the first spot set.
[0094] The second step is to determine the diameter error between the diameter of the first circular spot and the first median.
[0095] The third step is to delete the first circular spots in the first spot set whose diameter error is greater than or equal to a preset threshold, and obtain the third spot set corresponding to the printed image.
[0096] Specifically, the diameters of all first circular spots in the first spot set are calculated, and the median corresponding to the diameters of all first circular spots is calculated, i.e., the first median. The absolute value of the difference between the diameter of each first circular spot and the first median is calculated, and this absolute value of the difference is determined as the diameter error. A preset threshold is applied, and the diameter error corresponding to each first circular spot is compared with the preset threshold. If the diameter error corresponding to the first circular spot is determined to be greater than or equal to the preset threshold, the first circular spot is deleted; otherwise, the first circular spot is retained. Then, all the retained first circular spots are determined as the third circular spots in the third spot set.
[0097] In another example, the diameter d of all first circular spots in the first spot set is calculated, and the median of the diameters of all first circular spots is calculated, denoted as MED. blob_d According to the preset formula: E med_blod_d =abs(MED) blob_d -d) / MED blob_d For each first circular spot, the diameter d and the median MED blob_d Calculations were performed to obtain the diameter error E corresponding to each first circular spot. med_blod_d Retain diameter error E med_blod_d Less than the preset threshold ths med_blod_d The first circular spot is denoted as the third circular spot. The preset threshold ths... med_blod_d It can be set to 0.1.
[0098] When faced with changes in the data (such as adding or removing a small number of data points), the median is more stable. Therefore, by calculating the median diameter and the diameter error, circular spots that do not closely resemble the actual printed dots can be filtered out to obtain a more accurate set of dots, which can further improve the accuracy of the calculation of the printed dot area ratio.
[0099] 304. Perform overlap filtering on the third set of spots to obtain the second set of spots corresponding to the printed image.
[0100] For example, Figure 7 An example image of a blot filtering result for a printed image provided in an embodiment of this application is shown below. Figure 7 As shown, by analyzing the shape characteristics (such as area, perimeter, and aspect ratio) of each third circular spot in the third spot set, it can be determined whether there is complete overlap of spots. Specifically, an edge detection algorithm (such as Canny edge detection) is used to identify the boundary of each third circular spot. By analyzing the shape and position of the contour, it can be determined whether the third circular spot completely overlaps with other third circular spots. If it is determined that the third circular spot completely overlaps with other third circular spots, the area of each third circular spot that completely overlaps is calculated, and the third circular spots with smaller areas are deleted. The remaining third circular spots are identified as the second circular spots in the second spot set, corresponding one-to-one with the actual printed dots.
[0101] By calculating the diameter of the detected circular spots and filtering each circular spot twice, a more accurate circular spot characterizing the printing dots can be obtained, thereby improving the accuracy of the calculation of the printing dot area ratio.
[0102] In one possible implementation, step 304 includes:
[0103] Step 1: Determine the first mean of the diameters of all third circular spots in the third spot set.
[0104] Step 2: Determine the first center distance between the third circular spot and every other third circular spot except the third circular spot.
[0105] Step 3: If it is determined that the first center distances corresponding to the third circular spot are all greater than the first mean, then the third circular spot is determined to be the second circular spot in the second spot set.
[0106] Specifically, the diameter of each third circular spot in the third spot set is calculated, and the average diameter of all third circular spots is calculated, which is the first average. For each third circular spot, the distance between the center of this third circular spot and the center of every other third circular spot is calculated, resulting in multiple first center distances corresponding to this third circular spot. Each first center distance corresponding to this third circular spot is compared with the first average. If it is determined that all first center distances corresponding to this third circular spot are greater than the first average, it means that there is no spot overlap for this third circular spot, and this third circular spot is retained; otherwise, other overlapping third circular spots in this third circular spot are deleted, and then all the retained third circular spots are determined as the second circular spots in the second spot set.
[0107] By filtering out overlapping circular spots, circular spots that are identical to the actual printed dots are obtained, further improving the accuracy of the spot filtering results. Consequently, the accuracy of the calculation of the printed dot area ratio can be further improved.
[0108] 305. Determine the second mean value corresponding to the diameter of all second circular spots in the second spot set.
[0109] For example, the diameter of each second circular spot in the second spot set is calculated using a target detection algorithm, and the average of the diameters of all second circular spots is calculated to obtain a second average.
[0110] 306. Determine the second center distance between the second circular spot and every other second circular spot except the second circular spot; and determine the minimum value among the second center distances, which is the nearest center distance corresponding to the second circular spot.
[0111] For example, in the image coordinate system, for each second circular spot, the distance between the center of the second circular spot and every other second circular spot is calculated to obtain the second center distance. All the second center distances corresponding to the second circular spot are compared with each other, and the minimum value among the various second center distances is determined. This minimum value is then determined as the nearest center distance corresponding to the second circular spot.
[0112] In one example, calculate the mean (MEAN) of the diameters of all second circular spots. final_d For each second circular spot (denoted as the selected point), the following preset formula is applied:
[0113] ,
[0114] Calculate the center distance dis of the nearest spot to the selected point. neighbour_minWhere (x, y) are the image coordinates of the selected point center, (x...y...) i y i ) represents the center image coordinates of the i-th selected point, excluding the selected point itself.
[0115] 307. Determine the printing dot area ratio corresponding to the printed image based on the second mean and the nearest center distance of each second circular spot.
[0116] For example, according to a preset algorithm, the obtained second mean (MEAN) is... final_d The mean distance between the nearest centers of all the second circular spots is calculated. Specifically, the mean distance between the nearest centers of all the second circular spots can be calculated to obtain the third mean, dis. neighbour_ave It can be calculated according to the preset formula: P = (Π * (MEAN) final_d / 2) 2 ) / (dis neighbour_ave ) 2 The area ratio P of the printed halftone dots corresponding to the printed image is calculated.
[0117] By applying median diameter filtering and overlap filtering to the circular spots, more realistic and closer circular spots to printed dots are obtained. Furthermore, by automatically calculating the center distance, the accuracy and precision of the printed dot area ratio can be further improved.
[0118] In one possible implementation, step 307 includes:
[0119] Step 1: Determine the second median among the nearest center distances for each second circular spot.
[0120] Step 2: Determine the printing dot area ratio corresponding to the printed image based on the second mean and each second median.
[0121] Specifically, the nearest center distance dis corresponding to all second circular spots is calculated. neighbour_min The median between the two is the second median. neighbour_median According to the preset algorithm, the obtained second mean (MEAN) is... final_d Second median dis neighbour_median The calculation is performed, specifically according to the preset formula: P = (Π * (MEAN)) final_d / 2) 2 ) / (dis neighbour_median ) 2 The area ratio of printing dots corresponding to the printed image is calculated.
[0122] In this embodiment, based on the above embodiments, on the one hand, by fully automating the image processing of the printed image of the printed matter to be processed, the printing dot area ratio can be calculated, which can improve the calculation efficiency of the printing dot area ratio; on the other hand, by performing diameter median filtering and overlap filtering on the circular spots, more realistic and closer to the printed dots are obtained for use in calculating the printing dot area ratio, which can further improve the accuracy and precision of the printing dot area ratio.
[0123] Figure 8 A schematic diagram of a device for determining the area ratio of printed halftone dots based on image processing, provided in an embodiment of this application, is shown below. Figure 8 As shown, the device includes:
[0124] The preprocessing module 401 is used to acquire the printed image of the printed matter to be processed; and to preprocess the printed image to obtain the grayscale image corresponding to the printed image.
[0125] The detection module 402 is used to perform spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein, the first spot set includes at least one first circular spot;
[0126] The filtering module 403 is used to perform spot filtering on the first spot set to obtain a second spot set corresponding to the printed image; wherein, the second spot set includes at least one second circular spot; the second circular spot represents the printing dots in the printed image;
[0127] The determining module 404 is used to determine the printing dot area ratio corresponding to the printed image based on the second dot set; wherein the printing dot area ratio is used for printing processing.
[0128] In one possible implementation, the filtering module 403 is specifically used to: filter the first set of spots according to the diameter of each first circular spot to obtain a third set of spots corresponding to the printed image; wherein the third set of spots includes at least one third circular spot; and perform overlap filtering on the third set of spots to obtain a second set of spots corresponding to the printed image.
[0129] In one possible implementation, the filtering module 403 is specifically used to: determine the first median corresponding to the diameter of all first circular spots in the first spot set; determine the diameter error between the diameter of the first circular spot and the first median; delete the first circular spots in the first spot set whose diameter error is greater than or equal to a preset threshold, and obtain a third spot set corresponding to the printed image.
[0130] In one possible implementation, the filtering module 403 is further specifically configured to: determine a first average diameter of all third circular spots in the third spot set; determine a first center distance between the third circular spot and each other third circular spot except the third circular spot; if it is determined that the first center distances corresponding to the third circular spots are all greater than the first average, then determine that the third circular spot is a second circular spot in the second spot set.
[0131] In one possible implementation, the determining module 404 is specifically configured to: determine the second mean value corresponding to the diameter of all second circular spots in the second spot set; determine the second center distance between the second circular spot and each other second circular spot except the second circular spot; and determine the minimum value among the second center distances as the nearest center distance corresponding to the second circular spot; and determine the printing dot area ratio corresponding to the printed image based on the second mean value and the nearest center distance corresponding to each second circular spot.
[0132] In one possible implementation, the determining module 404 is further specifically used to: determine the second median among the nearest center distances corresponding to each second circular spot; and determine the printing dot area ratio corresponding to the printed image based on the second mean and each second median.
[0133] In one possible implementation, the detection module 402 is specifically used to: binarize the grayscale image corresponding to the printed image to obtain a binarized image corresponding to the printed image; perform morphological operations on the binarized image corresponding to the printed image to obtain a processed binarized image; and perform spot detection on the processed binarized image to obtain a first set of spots corresponding to the printed image.
[0134] The apparatus in this embodiment can execute the technical solutions in the above method. Its specific implementation process and technical principles are the same, and will not be repeated here.
[0135] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes: a memory 501 and a processor 502; the memory 501 is a memory used to store instructions executable by the processor 502.
[0136] The processor 502 is configured to perform the method provided in the above embodiments.
[0137] The electronic device also includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.
[0138] The specific implementation process of the processor can be found in the above method embodiments, and its implementation principle and technical effect are similar, so it will not be repeated here.
[0139] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0140] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed on a computer, cause the computer to perform the technical solutions described above.
[0141] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0142] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. The readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in a device.
[0143] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, it can implement the technical solutions in the above embodiments.
[0144] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0145] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0146] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0147] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as magnetic disks or optical disks.
[0148] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for determining the area ratio of printed halftone dots based on image processing, characterized in that, include: Acquire images of the printed materials to be processed; The printed image is then preprocessed to obtain a grayscale image corresponding to the printed image. Spot detection is performed on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein, the first spot set includes at least one first circular spot; The first set of spots is filtered to obtain a second set of spots corresponding to the printed image; wherein, the second set of spots includes at least one second circular spot; the second circular spot represents a printing dot in the printed image; Based on the second set of spots, the printing dot area ratio corresponding to the printed image is determined; wherein, the printing dot area ratio is used for printing processing.
2. The method according to claim 1, characterized in that, The step of performing spot filtering on the first spot set to obtain the second spot set corresponding to the printed image includes: Based on the diameter of each of the first circular spots, the first spot set is filtered to obtain a third spot set corresponding to the printed image; wherein, the third spot set includes at least one third circular spot; The third set of spots is subjected to overlap filtering to obtain the second set of spots corresponding to the printed image.
3. The method according to claim 2, characterized in that, The step of filtering the first set of spots according to the diameter of each of the first circular spots to obtain the third set of spots corresponding to the printed image includes: Determine the first median corresponding to the diameter of all first circular spots in the first spot set; Determine the diameter error between the diameter of the first circular spot and the first median; Delete the first circular spots in the first spot set whose diameter error is greater than or equal to a preset threshold to obtain the third spot set corresponding to the printed image.
4. The method according to claim 2, characterized in that, The process of performing overlap filtering on the third set of spots to obtain the second set of spots corresponding to the printed image includes: Determine the first mean of the diameters of all third circular spots in the third spot set; Determine the first center distance between the third circular spot and every other third circular spot except the third circular spot; If it is determined that the first center distances corresponding to the third circular spot are all greater than the first average value, then the third circular spot is determined to be the second circular spot in the second spot set.
5. The method according to claim 1, characterized in that, The step of determining the printing dot area ratio corresponding to the printed image based on the second dot set includes: Determine the second mean value corresponding to the diameter of all second circular spots in the second spot set; Determine the second center distance between the second circular spot and every other second circular spot except the second circular spot; and determine the minimum value among the second center distances, which is the nearest center distance corresponding to the second circular spot; The printing dot area ratio corresponding to the printed image is determined based on the second mean and the nearest center distance of each of the second circular spots.
6. The method according to claim 5, characterized in that, The step of determining the printing dot area ratio corresponding to the printed image based on the second mean and the nearest center distance corresponding to each of the second circular spots includes: Determine the second median among the nearest center distances corresponding to each of the second circular spots; The printing dot area ratio corresponding to the printed image is determined based on the second mean and each of the second medians.
7. The method according to any one of claims 1-6, characterized in that, The step of performing spot detection on the grayscale image corresponding to the printed image to obtain a first set of spots corresponding to the printed image includes: The grayscale image corresponding to the printed image is binarized to obtain the binarized image corresponding to the printed image; Morphological operations are performed on the binarized image corresponding to the printed image to obtain the processed binarized image; Spot detection is performed on the processed binarized image to obtain the first spot set corresponding to the printed image.
8. A device for determining the area ratio of printed halftone dots based on image processing, characterized in that, include: The preprocessing module is used to acquire images of the printed materials to be processed. The printed image is then preprocessed to obtain a grayscale image corresponding to the printed image. The detection module is used to perform spot detection on the grayscale image corresponding to the printed image to obtain a first spot set corresponding to the printed image; wherein, the first spot set includes at least one first circular spot; A filtering module is used to perform spot filtering on the first spot set to obtain a second spot set corresponding to the printed image; wherein, the second spot set includes at least one second circular spot; the second circular spot represents a printing dot in the printed image; The determining module is used to determine the printing dot area ratio corresponding to the printed image based on the second dot set; wherein the printing dot area ratio is used for printing processing.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.