Machine vision-based color difference compensation method, device, equipment and medium
Patent Information
- Application Number
- CN202510414159.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2026-10-16
AI Technical Summary
[0005]有鉴于此,本发明实施例提供了一种基于机器视觉的色差补偿方法、装置、设备及介质,用以解决现有技术中色差问题归因不准确,导致色差补偿效率低问题
[0037] This invention provides a machine vision-based color difference compensation method, apparatus, device, and medium. A test image is obtained by inkjet printing based on image data to be printed. Image detection is performed on the test image to obtain ink dot position deviation and/or ink dot area deviation. The initial drive waveform and/or the image data to be printed are adjusted based on the ink dot position deviation and/or the ink dot area deviation. This method can automatically determine the cause of color differences without relying on user experience and automatically perform color difference compensation based on the cause, improving the efficiency and effectiveness of color difference compensation.
Smart Images

Figure CN122924696A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inkjet printing, and more particularly to a color difference compensation method, apparatus, device, and medium based on machine vision. Background Technology
[0002] With the widespread use of computers in graphics and word processing, printers have become increasingly common. Through printers, people can easily output text or graphics from their computers to media such as paper, glass, acrylic sheets, cardboard, wine bottles, and fabrics, for purposes such as advertisements, flyers, product labels, prints, and personalized images.
[0003] like Figure 1a As shown, to improve the ink dot area and printing efficiency of printed images, printer printheads are generally composed of multiple rows of nozzles; such as Figure 1b As shown, in order to increase the area that the printhead can cover in one scan (i.e. the height that can be printed in each scan), each printhead is composed of 4 small rows of nozzles. Due to the manufacturing differences of each hole of the nozzle, the amount of ink ejected from each hole of the printhead is not exactly the same, resulting in color differences in the printed image.
[0004] Color difference problems can be roughly divided into three categories: ink dot area error, ink dot position deviation, and deviations in both ink dot area and position. The solutions for different types of color difference problems are not the same. At present, it is difficult to scientifically determine the cause of color difference problems by means of the naked eye. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a color difference compensation method, apparatus, device and medium based on machine vision, to solve the problem of inaccurate attribution of color difference problems in the prior art, which leads to low efficiency of color difference compensation.
[0006] The technical solution adopted in this invention is:
[0007] In a first aspect, embodiments of the present invention provide a color difference compensation method based on machine vision, characterized in that the method includes:
[0008] The test image is obtained by inkjet printing based on the image data to be printed.
[0009] Image detection is performed on the test image to obtain the ink dot position deviation and / or ink dot area deviation;
[0010] The initial drive waveform and / or the image data to be printed are adjusted based on the ink dot position deviation and / or the ink dot area deviation.
[0011] Preferably, the step of performing image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation includes:
[0012] Obtain the predicted image based on the image data to be printed;
[0013] Compare the test image and the predicted image to obtain the ink dot position deviation and / or the ink dot area deviation.
[0014] Preferably, comparing the test image and the predicted image to obtain the ink spot position deviation and / or the ink spot area deviation includes:
[0015] The test image and the prediction image are divided into several test regions and several prediction regions according to a preset size.
[0016] Each test area is compared with the corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation of each test area.
[0017] Based on the ink dot position deviation and / or the ink dot position deviation of each test area, the ink dot position deviation and / or the ink dot position deviation of the test image are obtained.
[0018] Preferably, the ink dots include a first type of ink dot, a second type of ink dot, and a third type of ink dot, wherein the volume of the first type of ink dot is larger than the volume of the second type of ink dot, and the volume of the second type of ink dot is larger than the volume of the third type of ink dot. The step of comparing each test area with its corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation for each test area includes:
[0019] Image detection is performed on each of the test areas to obtain the ink dot area matrix of each test area, which is denoted as the actual ink dot area matrix.
[0020] Based on the image data to be printed, obtain the ink dot area matrix of each predicted region, denoted as the predicted ink dot area matrix;
[0021] Compare all the actual ink dot area matrices with the corresponding predicted ink dot area matrices to obtain the ink dot area deviation for each test area, wherein the ink dot area deviation includes a first ink dot area deviation, a second ink dot area deviation, and a third ink dot area deviation.
[0022] The ink dot area deviation of the test image is obtained based on the ink dot area deviation of each test area.
[0023] Preferably, the step of comparing each test area with the corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation of each test area further includes:
[0024] A two-dimensional coordinate system is established on the planes where the test image and the prediction image are located, and the ink dot positions of each test area and the prediction area are obtained, and recorded as the actual ink dot positions and the predicted ink dot positions, respectively.
[0025] Based on the actual ink dot position and the predicted ink dot position, the ink dot position deviation of the test image is obtained, wherein the ink dot position deviation includes a first ink dot position deviation, a second ink dot position deviation, and a third ink dot position deviation.
[0026] Preferably, adjusting the initial drive waveform and / or adjusting the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation includes:
[0027] The image data to be printed is adjusted based on the first type of ink dot area deviation, the second type of ink dot area deviation, and the third type of ink dot area deviation.
[0028] Preferably, the step of adjusting the initial drive waveform and / or setting the ink dot area compensation coefficient based on the ink dot position deviation and / or the ink dot area deviation further includes:
[0029] Based on the first type of ink dot position deviation, the second type of ink dot position deviation, and the third type of ink dot position deviation, the initial driving waveforms corresponding to the first type of ink dot, the second type of ink dot position deviation, and the third type of ink dot position deviation are adjusted respectively.
[0030] Secondly, embodiments of the present invention provide a color difference compensation device based on machine vision, characterized in that the device comprises:
[0031] An inkjet printing module is used to obtain a test image by inkjet printing based on the image data to be printed.
[0032] The image detection module is used to perform image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation;
[0033] A color difference compensation module is used to adjust the initial drive waveform and / or adjust the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation.
[0034] Thirdly, embodiments of the present invention provide a color difference compensation device based on machine vision, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein when the computer program instructions are executed by the processor, the method of the first aspect described above is implemented.
[0035] Fourthly, embodiments of the present invention provide a storage medium storing computer program instructions, which, when executed by a processor, implement the method of the first aspect described above.
[0036] In summary, the beneficial effects of the present invention are as follows:
[0037] This invention provides a machine vision-based color difference compensation method, apparatus, device, and medium. A test image is obtained by inkjet printing based on image data to be printed. Image detection is performed on the test image to obtain ink dot position deviation and / or ink dot area deviation. The initial drive waveform and / or the image data to be printed are adjusted based on the ink dot position deviation and / or the ink dot area deviation. This method can automatically determine the cause of color differences without relying on user experience and automatically perform color difference compensation based on the cause, improving the efficiency and effectiveness of color difference compensation. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.
[0039] Figure 1a This is a schematic diagram of the nozzle layout of the nozzle in the background art of this invention;
[0040] Figure 1b This is another schematic diagram of the nozzle layout of the spray head in the background art of this invention;
[0041] Figure 2 This is a flowchart of a color difference compensation method based on machine vision in an embodiment of the present invention;
[0042] Figure 3 This is a flowchart of a color difference compensation method based on machine vision in an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram showing the position of ink dots in an embodiment of the present invention;
[0044] Figure 5 This is a schematic diagram of the color difference compensation device based on machine vision in an embodiment of the present invention;
[0045] Figure 6 This is the structure of a color difference compensation device based on machine vision in an embodiment of the present invention.
[0046] Figure label:
[0047] 1. Spray head; 2. Nozzle. Detailed Implementation
[0048] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the invention.
[0049] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0050] Please see Figure 2 This invention provides a color difference compensation method based on machine vision, characterized in that the method includes:
[0051] S1: Obtain a test image by inkjet printing based on the image data to be printed;
[0052] S2: Perform image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation;
[0053] Specifically, the process begins by acquiring the image data to be printed, controlling the printer to perform a test print to obtain a test image, and then capturing the test image using a camera. This camera is a CCD camera. Currently, CCD (charge-coupled device) images are primarily generated by CCDs, which can convert light into electrical charges, store and transfer those charges, and also extract the stored charges to change the voltage. Therefore, CCDs are ideal camera elements, and CCD cameras are widely used due to their small size, light weight, immunity to magnetic fields, and resistance to vibration and impact. Finally, image detection is performed on the captured image to obtain ink dot position deviation and / or ink dot area deviation.
[0054] In one embodiment, see Figure 3 Step S2 specifically includes:
[0055] S21: Obtain the predicted image based on the image data to be printed;
[0056] S22: Compare the test image and the predicted image to obtain the ink dot position deviation and / or the ink dot area deviation.
[0057] First, a predicted image is obtained based on the image data to be printed. The predicted image is an ideal image without color differences. The image data to be printed is drawn on a canvas to obtain the predicted image. After obtaining the predicted image, the test image obtained by the CCD camera is compared with the predicted image to obtain the ink dot position deviation and / or ink dot area deviation of the test image.
[0058] In one embodiment, the comparison step S22 specifically includes:
[0059] S221: Divide the test image and the prediction image into several test regions and several prediction regions according to a preset size;
[0060] S222: Compare each test area with the corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation of each test area;
[0061] S223: Based on the ink dot position deviation and / or ink dot position deviation of each test area, obtain the ink dot position deviation and / or ink dot position deviation of the test image.
[0062] Specifically, the test image and the prediction image are divided into several regions according to a preset size, which are respectively denoted as the test region and the prediction region. The test region and the prediction region are compared with the corresponding prediction region to obtain the ink dot position deviation and / or ink dot position deviation of each test region. Based on the ink dot position deviation and / or ink dot position deviation of each test region, the ink dot position deviation and / or ink dot position deviation of the test image are obtained.
[0063] In the above embodiments, the test image and the prediction image are divided according to a fixed preset size. In high-density ink dot areas, this may lead to insufficient detection accuracy. To solve this problem, in this embodiment, step S221 includes:
[0064] S2211. Count the ink dots in the predicted image and the test image respectively to obtain the number of first ink dots in each pixel region of the predicted image and the number of second ink dots in the test image.
[0065] Specifically, the number of ink dots within a unit area is counted using pixels as the most basic unit (or even smaller discrete units). For prediction images, based on the image data to be printed, the number of ink dots or droplets can be calculated pixel by pixel. For test images, image detection and feature recognition methods are used to detect how many ink dots or the amount of ink accumulated at each pixel in the image obtained from the CCD image. For prediction images, the number of ink dots in the "ideal" state can be obtained directly based on the image drawing logic or printing instructions, without actual detection; pixel-level statistics can be performed according to the printer's instructions or the image data itself.
[0066] S2212. Generate a first density heat map based on the first number of ink dots and generate a second density heat map based on the second number of ink dots;
[0067] Specifically, the number of pixel ink dots obtained in the previous step is mapped to density values, resulting in a "heatmap". The first density heatmap reflects the ink dot distribution density under ideal printing conditions (predicted image); the second density heatmap reflects the ink dot distribution density of the actual printing result (test image). The number of ink dots for each pixel can be directly used as the density value, or a smoothing or filtering algorithm can be used to avoid excessively sharp changes in the density map due to local extreme values (noise). The generated heatmap is essentially a matrix of the same size as the original image, where each element represents the "ink dot density" at that location. In visualization, color gradients are typically used to represent different densities, facilitating subsequent analysis and region segmentation.
[0068] S2213. Generate an initial meshing strategy based on the first density heat map;
[0069] Since the predicted image can characterize which areas should theoretically have high-density ink dots and which areas should be sparse, a preliminary grid division strategy can be formulated first. This allows for finer or separate division of high-density areas, while coarser division can be used for low-density areas. Initially, only the density distribution of the predicted image (first density heatmap) is referenced to perform preliminary region division of the entire image. Multiple thresholds (e.g., 3 levels) or dynamic quantile values can be used to divide the ink dot density in the image into several levels.
[0070] If the ink dot density in a certain area is much higher than the global average, smaller grid cells can be used in that area to enhance detection accuracy; if the density in a certain area is very low, larger grid cells can be used to reduce unnecessary fine-grained detection. This results in an initial grid partitioning scheme, which records the boundaries or grid size allocation for each area.
[0071] S2214. Adjust the initial meshing strategy according to the second density heat map to obtain the target meshing strategy;
[0072] Specifically, the density distribution of the test image (second density heatmap) is compared with the initial mesh generation scheme to see if any unexpectedly high or low density appears in certain areas after actual printing. If any mismatch is found, the initial mesh is appropriately enlarged, reduced, or re-divided to obtain a final (target) mesh generation strategy that better reflects the actual situation.
[0073] S2215. Divide the test image and the prediction image according to the target grid division strategy to obtain several test regions and several prediction regions.
[0074] After completing the above adjustments, a "target grid" will be obtained that reflects both the theoretical high-density area and the actual distribution of the test image. The same grid strategy is used to divide the test image and the prediction image, thereby forming a one-to-one corresponding "test area" and "prediction area", which creates conditions for subsequent accurate comparison of differences in ink spot area, position, etc.
[0075] By first generating a density heatmap and then iteratively adjusting the mesh division strategy based on the difference between prediction and testing, the limitations of fixed-size mesh division can be overcome. This method provides more detailed detection capabilities for high-density areas while reducing unnecessary computation in low-density areas. The final target mesh division strategy not only reflects theoretical expectations (predicted image) but also incorporates feedback from actual ink application (test image), making subsequent color difference detection more targeted and accurate.
[0076] In one embodiment, step S2213 specifically includes:
[0077] Based on the ink dot density distribution information in the first density heatmap, the density threshold and relative difference are determined;
[0078] First, the ink dot density distribution information at each location in the first density heatmap is statistically analyzed, such as the maximum / minimum density value, average density, density distribution curve, or quantiles. Based on printing process experience, appropriate density thresholds and relative differences are determined. If a pixel density is greater than the density threshold, it may be classified as a high-density region. The relative difference is used to determine whether a pixel's density is sufficiently similar to the center pixel's density, thus deciding whether to merge it into the same connected region.
[0079] Based on the density threshold, an initial seed point is determined in the first density heatmap;
[0080] Based on the density threshold obtained in the previous step, all pixel densities are scanned in the first density heatmap. Locations exceeding the threshold are selected as candidate points, and then initial seed points are selected by distributing them from high to low density or by combining locations. These seed points should be as dispersed as possible to avoid duplication or excessive concentration, corresponding to those density pixels that are significantly higher than the average level or the most prominent in a local area. This yields a batch of initial seed points that can represent the high-density "core areas" in various locations, providing starting locations for subsequent neighbor connections and region growing.
[0081] Based on the initial seed point and the relative difference, a region growth process involving neighboring connections is performed to obtain several high-density connected regions.
[0082] After establishing the initial seed points, recursively / iteratively evaluate the pixels in their surrounding or multi-neighborhood (e.g., eight-neighborhood) using relative differences and a density threshold. If the density of a neighboring pixel is greater than the density threshold or its density difference with the current pixel is less than the relative difference, it is merged into the same connected region. The same evaluation is then performed on newly merged pixels, thus growing outwards until merging can no longer continue. This process is repeated for all initial seed points, performing region growth to form one or more independent "high-density connected regions," resulting in several spatially independent, clearly defined high-density connected regions, along with their coordinate ranges. Pixels not merged into high-density regions are automatically considered as medium- or low-density regions.
[0083] Based on the high-density connected regions and the remaining medium- and low-density regions, the grid cells are divided;
[0084] Using information from the previously identified high-density connected regions and relatively sparse medium-to-low-density regions, the fineness of the mesh division within each region is planned. High-density connected regions, due to their concentrated ink dots and high sensitivity to color differences, require finer-grained meshes. For example, this region can be divided into smaller mesh cells to capture more subtle deviations. Medium-to-low-density regions, with fewer ink dots or generally less sensitive to color differences, can use larger meshes to reduce unnecessary computation. Furthermore, based on the shape and size of the region, irregular boundaries can be initially subdivided to ensure that each mesh cell is of appropriate size and provides complete coverage, thus obtaining a preliminary mesh coverage scheme, where high-density regions correspond to smaller mesh cells, and medium-to-low-density regions correspond to relatively larger mesh cells.
[0085] Based on the boundaries and coverage of the grid cells, adjacent areas are merged or divided as necessary to obtain the initial grid partitioning strategy.
[0086] Finally, the grid boundaries within high-density connected regions, the grid layout within medium- and low-density regions, and the segmentation of their adjacent parts may require fine-tuning at the junctions, based on the determination of the grid for each region. For example:
[0087] If two high-density regions are very close to each other and have a transition zone in between, it can be determined whether they need to be merged or further subdivided. Mesh sizes that are too small or too large should be merged or divided proportionally to ensure a balance between overall detection accuracy and computational efficiency.
[0088] Through the above steps, a grid partitioning scheme covering the entire predicted image is obtained, distinguishing between high-density fine grid regions and medium-to-low-density coarse grid regions, and processing the boundaries of adjacent regions. This strategy will lay the foundation for subsequent detection and compensation, and can also be compared with the density heatmap of the test image for further adjustments.
[0089] In one embodiment, the ink droplet includes a first type of ink droplet, a second type of ink droplet, and a third type of ink droplet, wherein the volume of the first type of ink droplet is larger than the volume of the second type of ink droplet, and the volume of the second type of ink droplet is larger than the volume of the third type of ink droplet. Step S222 specifically includes:
[0090] S2221: Perform image detection on each of the test areas to obtain the ink dot area matrix of each of the test areas, which are denoted as the actual ink dot area matrix respectively.
[0091] S2222: Based on the image data to be printed, obtain the ink dot area matrix of each predicted region, denoted as the predicted ink dot area matrix;
[0092] S2223: Compare all the actual ink dot area matrices with the corresponding predicted ink dot area matrices to obtain the ink dot area deviation of each test area, wherein the ink dot area deviation includes a first ink dot area deviation, a second ink dot area deviation and a third ink dot area deviation.
[0093] S2224: Obtain the ink dot area deviation of the test image based on the ink dot area deviation of each test area.
[0094] Specifically, an image detection is performed on each of the test areas using a CCD camera to obtain the ink dot area matrix of each test area.
[0095] In one specific embodiment, the ink dot area matrix of a certain test area is as follows:
[0096]
[0097] Using the image data to be printed, the ink dot area matrix of the predicted region corresponding to the above-mentioned test area can be obtained. The ink dot area matrix of the predicted region is as follows:
[0098]
[0099] Ideally, the area coefficient of the first type of ink dot is 1.0, the area coefficient of the second type of ink dot is 0.5, and the area coefficient of the third type of ink dot is 0.3. Based on the area matrix of the test area and the prediction area, the ink dot area deviation of the test area can be obtained. The area deviation of the first type of ink dot is calculated using the following formula:
[0100]
[0101] The concentration deviation of the second type of ink dot is calculated using the following formula:
[0102]
[0103] The concentration deviation of the third type of ink dot is calculated using the following formula:
[0104]
[0105] After obtaining the ink dot area deviation of all test areas, the ink dot area deviation of the entire test image can be calculated.
[0106] In one embodiment, step S222 further includes:
[0107] S2225: Establish two-dimensional coordinate systems on the planes where the test image and the prediction image are located, respectively, and obtain the ink dot positions of each test area and the prediction area, which are recorded as the actual ink dot positions and the predicted ink dot positions, respectively.
[0108] S2226: Based on the actual ink dot position and the predicted ink dot position, obtain the ink dot position deviation of the test image, wherein the ink dot position deviation includes a first ink dot position deviation, a second ink dot position deviation and a third ink dot position deviation.
[0109] Specifically, a two-dimensional coordinate system is established on the plane containing the test image and the predicted image. The ink dot positions of each test region and the predicted region are obtained and recorded as the actual ink dot position and the predicted ink dot position, respectively. Based on the actual ink dot position and the predicted ink dot position, the ink dot position deviation of the test image is obtained. In a specific embodiment, such as... Figure 4 As shown, the dashed line represents the theoretical position of the ink dot, and the solid line represents the actual landing position of the ink dot. Figure 4 In the diagram, L represents the first type of ink dot, M represents the position of the second type of ink dot, and S represents the position of the third type of ink dot. Based on the coordinate data of the three types of ink dots, the ink dot position deviation of the test image can be obtained.
[0110] S3: Adjust the initial drive waveform and / or adjust the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation.
[0111] Specifically, color difference problems can be roughly divided into three categories: ink dot area error, ink dot position deviation, and deviations in both ink dot area and position. The solutions for different types of color difference problems are not the same. When there is an ink dot area deviation, the image data to be printed is adjusted according to the first type of ink dot area deviation, the second type of ink dot area deviation, and the third type of ink dot area deviation. For example, when the first type of ink dot area deviation exceeds a first preset threshold, the ink dot can be adjusted to the second ink dot and / or the third ink dot by adjusting the corresponding data in the image data to be printed. Similarly, when the second type of ink dot area deviation exceeds a second preset threshold, the ink dot can be adjusted to the third ink dot by adjusting the corresponding data in the image data to be printed.
[0112] When there is a deviation in the position of the ink dot, the initial driving waveform corresponding to the first ink dot, the initial driving waveform corresponding to the second ink dot, and the initial driving waveform corresponding to the third ink dot are adjusted according to the first ink dot position deviation, the second ink dot position deviation, and the third ink dot position deviation, respectively, so that the first ink dot, the second ink dot, and the third ink dot can fall into the ideal position.
[0113] When ink dot area deviation and ink dot position deviation exist simultaneously, the initial driving waveform corresponding to the first type of ink dot, the initial driving waveform corresponding to the second type of ink dot, and the initial driving waveform corresponding to the third type of ink dot can be adjusted according to the first type of ink dot position deviation, the second type of ink dot position deviation, and the third type of ink dot position deviation, respectively. Alternatively, the image data to be printed can be adjusted according to the first type of ink dot area deviation, the second type of ink dot area deviation, and the third type of ink dot area deviation.
[0114] This invention provides a machine vision-based color difference compensation method. A test image is obtained by inkjet printing based on the image data to be printed. Image detection is performed on the test image to obtain ink dot position deviation and / or ink dot area deviation. Based on the ink dot position deviation and / or the ink dot area deviation, the initial drive waveform and / or the image data to be printed are adjusted. This method can automatically determine the cause of color differences without relying on user experience and automatically perform color difference compensation based on the cause, thus improving the efficiency and effectiveness of color difference compensation.
[0115] Example 2
[0116] Please see Figure 5 This invention provides a color difference compensation device based on machine vision, characterized in that the device includes:
[0117] An inkjet printing module is used to obtain a test image by inkjet printing based on the image data to be printed.
[0118] The image detection module is used to perform image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation;
[0119] A color difference compensation module is used to adjust the initial drive waveform and / or adjust the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation.
[0120] In one embodiment, the image detection module includes:
[0121] A prediction image acquisition unit is used to acquire a prediction image based on the image data to be printed.
[0122] An image comparison unit is used to compare the test image and the predicted image to obtain the ink dot position deviation and / or the ink dot area deviation.
[0123] Comparing the test image and the predicted image to obtain the ink spot position deviation and / or the ink spot area deviation specifically includes:
[0124] Image detection is performed on each of the test areas to obtain the ink dot area matrix of each test area, which is denoted as the actual ink dot area matrix.
[0125] Based on the image data to be printed, obtain the ink dot area matrix of each predicted region, denoted as the predicted ink dot area matrix;
[0126] Compare all the actual ink dot area matrices with the corresponding predicted ink dot area matrices to obtain the ink dot area deviation for each test area, wherein the ink dot area deviation includes a first ink dot area deviation, a second ink dot area deviation, and a third ink dot area deviation.
[0127] The ink dot area deviation of the test image is obtained based on the ink dot area deviation of each test area.
[0128] Comparing the test image and the predicted image to obtain the ink dot position deviation and / or the ink dot area deviation further includes:
[0129] A two-dimensional coordinate system is established on the planes where the test image and the prediction image are located, and the ink dot positions of each test area and the prediction area are obtained, and recorded as the actual ink dot positions and the predicted ink dot positions, respectively.
[0130] Based on the actual ink dot position and the predicted ink dot position, the ink dot position deviation of the test image is obtained, wherein the ink dot position deviation includes a first ink dot position deviation, a second ink dot position deviation, and a third ink dot position deviation.
[0131] This invention provides a color difference compensation device based on machine vision. It obtains a test image by inkjet printing based on image data to be printed, performs image detection on the test image to obtain ink dot position deviation and / or ink dot area deviation, and adjusts the initial drive waveform and / or the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation. This device can automatically determine the cause of color differences without relying on user experience and automatically perform color difference compensation based on the cause, thus improving the efficiency and effectiveness of color difference compensation.
[0132] Furthermore, the machine vision-based color difference compensation method of the present invention described in conjunction with FIG1 can be implemented by a machine vision-based color difference compensation device. Figure 6 A schematic diagram of the hardware structure of a color difference compensation device based on machine vision provided in an embodiment of the present invention is shown.
[0133] Machine vision-based color difference compensation devices may include a processor and a memory storing computer program instructions.
[0134] Specifically, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0135] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0136] The processor reads and executes computer program instructions stored in memory to implement any of the machine vision-based color difference compensation methods in the above embodiments.
[0137] In one example, a machine vision-based color difference compensation device may also include a communication interface and a bus. For example, Figure 6 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.
[0138] The communication interface is mainly used to enable communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0139] A bus, including hardware, software, or both, couples components of a machine vision-based color difference compensation device together. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, a bus may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.
[0140] Furthermore, in conjunction with the machine vision-based color difference compensation method in the above embodiments, this invention can be implemented using a computer-readable storage medium. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the machine vision-based color difference compensation methods in the above embodiments.
[0141] In summary, the embodiments of the present invention provide a color difference compensation method, apparatus, device, and medium based on machine vision. By obtaining a test image through inkjet printing based on the image data to be printed, image detection is performed on the test image to obtain ink dot position deviation and / or ink dot area deviation. Based on the ink dot position deviation and / or the ink dot area deviation, the initial drive waveform and / or the image data to be printed are adjusted. This allows for automatic determination of the cause of color differences without relying on user experience, and automatic color difference compensation is performed based on the cause of the color differences, thus improving the efficiency and effectiveness of color difference compensation.
[0142] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0143] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0144] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0145] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A color difference compensation method based on machine vision, characterized in that, The method includes: The test image is obtained by inkjet printing based on the image data to be printed. Image detection is performed on the test image to obtain the ink dot position deviation and / or ink dot area deviation for each ink dot; The initial drive waveform and / or the image data to be printed are adjusted based on the ink dot position deviation and / or the ink dot area deviation.
2. The color difference compensation method based on machine vision according to claim 1, characterized in that, The step of performing image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation includes: Obtain the predicted image based on the image data to be printed; Compare the test image and the predicted image to obtain the ink dot position deviation and / or the ink dot area deviation.
3. The color difference compensation method based on machine vision according to claim 2, characterized in that, The step of comparing the test image and the predicted image to obtain the ink spot position deviation and / or the ink spot area deviation includes: The test image and the prediction image are divided into several test regions and several prediction regions according to a preset size. Each test area is compared with the corresponding prediction area to obtain the ink dot position deviation and / or ink dot area deviation of each test area. Based on the ink dot position deviation and / or ink dot area deviation of each test area, the ink dot position deviation and / or ink dot area deviation of the test image are obtained.
4. The color difference compensation method based on machine vision according to claim 2, characterized in that, The ink dots include a first type of ink dot, a second type of ink dot, and a third type of ink dot, wherein the volume of the first type of ink dot is larger than the volume of the second type of ink dot, and the volume of the second type of ink dot is larger than the volume of the third type of ink dot. The step of comparing each test area with its corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation for each test area includes: Image detection is performed on each of the test areas to obtain the ink dot area matrix of each test area, which is denoted as the actual ink dot area matrix. Based on the image data to be printed, obtain the ink dot area matrix of each predicted region, denoted as the predicted ink dot area matrix; Compare all the actual ink dot area matrices with the corresponding predicted ink dot area matrices to obtain the ink dot area deviation for each test area, wherein the ink dot area deviation includes a first ink dot area deviation, a second ink dot area deviation, and a third ink dot area deviation. The ink dot area deviation of the test image is obtained based on the ink dot area deviation of each test area.
5. The color difference compensation method based on machine vision according to claim 3, characterized in that, The step of comparing each test area with the corresponding prediction area to obtain the ink dot position deviation and / or ink dot position deviation of each test area further includes: A two-dimensional coordinate system is established on the planes where the test image and the prediction image are located, and the ink dot positions of each test area and the prediction area are obtained, and recorded as the actual ink dot positions and the predicted ink dot positions, respectively. Based on the actual ink dot position and the predicted ink dot position, the ink dot position deviation of the test image is obtained, wherein the ink dot position deviation includes a first ink dot position deviation, a second ink dot position deviation, and a third ink dot position deviation.
6. The color difference compensation method based on machine vision according to claim 4, characterized in that, The step of adjusting the initial drive waveform and / or adjusting the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation includes: The image data to be printed is adjusted based on the first type of ink dot area deviation, the second type of ink dot area deviation, and the third type of ink dot area deviation.
7. The color difference compensation method based on machine vision according to claim 5, characterized in that, The step of adjusting the initial drive waveform and / or setting the ink dot area compensation coefficient based on the ink dot position deviation and / or the ink dot area deviation further includes: Based on the first type of ink dot position deviation, the second type of ink dot position deviation, and the third type of ink dot position deviation, the initial driving waveforms corresponding to the first type of ink dot, the second type of ink dot position deviation, and the third type of ink dot position deviation are adjusted respectively.
8. A color difference compensation device based on machine vision, characterized in that, The device includes: An inkjet printing module is used to obtain a test image by inkjet printing based on the image data to be printed. The image detection module is used to perform image detection on the test image to obtain the ink dot position deviation and / or ink dot area deviation; A color difference compensation module is used to adjust the initial drive waveform and / or adjust the image data to be printed based on the ink dot position deviation and / or the ink dot area deviation.
9. A color difference compensation device based on machine vision, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-7.
10. A storage medium storing computer program instructions thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.