A method and system for remotely acquiring inkjet printing image data
By constructing a color palette and index map, dynamically adjusting the window size, and combining multidimensional spatial moment features and hash functions, the problem of uncompressed duplicate data in inkjet printing image compression is solved, achieving efficient and lossless image transmission and storage.
Patent Information
- Application Number
- CN202511204815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Existing technologies fail to effectively utilize the repetitiveness of patterns and the limitations of colors when compressing inkjet printing images, resulting in uncompressed repetitive data, low transmission and storage efficiency, and serious bandwidth and storage redundancy problems.
By constructing a color palette and index map, dynamically adjusting the initial window size, capturing similar patterns based on multidimensional spatial moment features and hash functions, constructing a repeating pattern dictionary, and using seed filling and run-length encoding to compress uncovered pixels, the color palette and pattern dictionary are compressed independently.
It achieves efficient and lossless compression of printing patterns, reduces data volume, avoids edge misalignment caused by traditional block division, adapts to low bandwidth environments, and improves transmission and storage efficiency.
Smart Images

Figure CN120726146B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing. In particular, it relates to a method and system for remotely acquiring inkjet printing image data. Background Technology
[0002] In the inkjet printing industry, achieving high-precision image remote transmission is crucial for distributed production. With the rapid development of digital printing technology, the resolution of design files has undergone a qualitative leap, increasing dramatically from the traditional 300dpi to over 1200dpi, causing the data size of a single image to climb to hundreds of MB. Directly outputting the design file after pattern design is completed results in slow transmission speeds and increased bandwidth costs due to the large amount of pattern data. When the same pattern file is transmitted to multiple terminals, each terminal needs to retain a complete copy of the file, leading to storage redundancy as disk usage increases linearly with the number of factories. Furthermore, when the server converts the original image to a low-resolution preview, the low-resolution image loses the color palette and vector-level pattern information, preventing the client from changing colors in real time or scaling 1:1, resulting in the compression of pattern details.
[0003] Currently widely used image compression algorithms have significant shortcomings when dealing with inkjet printing images. They fail to fully consider several key characteristics of images in this field, such as a limited color palette and repetitive pattern units. General lossless compression algorithms fail to effectively utilize the repetitiveness of patterns and the limitations of color when processing such images. This results in the repetitive data not being compressed, while critical information that should not be distorted is irreversibly destroyed, thus creating a triple bottleneck of bandwidth, timeliness, and image quality across the entire design-production-sales chain. Summary of the Invention
[0004] To address the problem that existing technologies directly compress printed patterns using photo processing methods, resulting in redundant data that cannot be fully compressed and unsatisfactory compression efficiency, this invention provides solutions in the following aspects.
[0005] In a first aspect, a method for remotely acquiring inkjet printing image data includes: acquiring an RGB image of the printing image, setting a color difference threshold and merging similar RGB values to construct a color palette, and acquiring an index map based on the color palette; setting an initial window, sliding and scanning the index map based on the initial window to completely capture the printing pattern, dynamically adjusting the size of the initial window based on the completeness of the pattern within the initial window as a target window, and outputting a collection of position and size information of each target window; calculating the multidimensional spatial moment features of each target window based on the color frequency, local connectivity, and color difference degree of each pixel within each target window as weights, constructing a printing feature vector containing color statistics and multidimensional spatial moment features, projecting the printing feature vector of each target window onto similar patterns based on a hash function, and constructing a repeating pattern dictionary based on the similar patterns; sequentially compressing the color palette and pattern dictionary based on a compression algorithm, and reconstructing the original printing pattern block by block in reverse during decoding.
[0006] It promotes the full compression of highly repetitive printed patterns, improves the compression efficiency and effect of printed patterns, and significantly reduces the data volume compared to the original image of the printed pattern by constructing a color palette and index map. The initial window is dynamically expanded based on the integrity of the pattern, ensuring that a complete printed unit is captured in a single capture, avoiding edge misalignment or artifacts caused by traditional block segmentation. Similar patterns are captured by hashing, and the template and position index are stored only once to construct a repeating pattern dictionary, eliminating redundancy and improving the compression effect of the printed pattern. The color palette and dictionary are compressed independently to avoid global redundancy and adapt to low bandwidth environments.
[0007] Preferably, the method for evaluating the integrity of the pattern within the initial window is as follows: count the number of pixel index values that change at the boundary of the initial window and divide it by the total number of pixels in the initial window to obtain the boundary change rate; count the number of connected components that are truncated at the boundary of the initial window and divide it by the total number of connected components in the initial window to obtain the connected component truncation rate; and use the boundary change rate and the connected component truncation rate as weights to quantify the integrity of the pattern within the initial window.
[0008] Boundary mutation rate directly quantifies the discontinuity of the window edge pattern, while connected component truncation rate locks in geometric pattern breaks. For continuous lines commonly seen in printing, this indicator can detect whether the window has truncated the connectivity of the lines. Based on boundary mutation rate and connected component truncation rate, the accuracy of judging the integrity of the pattern within the window is improved.
[0009] Preferably, the method for dynamically adjusting the initial window size is as follows: a target completeness is preset, the initial windows with a pattern completeness lower than the target completeness are equally divided to obtain multiple sub-windows, and the completeness of the pattern in each sub-window is recursively evaluated; based on the similarity of color distribution, multiple adjacent initial windows with pattern completeness that meet the target completeness requirement are merged; an upper limit size and a lower limit size of the target window are set, and the dynamic adjustment stops when the size of the target window reaches the upper limit size or the lower limit size.
[0010] Window segments with pattern completeness below the target completeness are segmented according to requirements, ensuring the detail integrity of highly complex patterns. For adjacent windows with pattern completeness that meet the target, they are identified as areas of the same color using a color palette and merged to avoid dictionary expansion caused by over-segmentation.
[0011] Preferably, the color frequency is calculated by counting the frequency of each index color within the target window as the color frequency.
[0012] Preferably, the local connectivity is calculated as follows: the ratio of the number of pixels of the same color to the number of pixels in the neighborhood of each pixel within the target window is used as the local connectivity.
[0013] Preferably, the color difference degree is calculated as follows: calculate the color difference distance of each pixel in the target window pairwise, normalize the distance, and select the minimum color difference distance of each pixel after normalization as the color difference degree.
[0014] Preferably, the calculation method of the multidimensional spatial moment feature is as follows: multiply the local connectivity by the amplification coefficient and add 1 to obtain the local connectivity factor; multiply the color difference degree by the attenuation coefficient and perform an exponential operation to obtain the color difference degree factor; calculate the product of the color frequency, the local connectivity factor, and the color difference degree factor as the weight function of the multidimensional spatial moment feature; and calculate the sum of the products of the spatial geometric features of all pixels in the target window and the weight function as the multidimensional spatial moment feature.
[0015] Multidimensional spatial moment features fuse three heterogeneous information of pixel color frequency, local connectivity and color difference into a lightweight, fine-tunable weighted spatial moment, enabling printed images to be transmitted and reconstructed with high fidelity and robustness even at ultra-low bitrates.
[0016] Preferably, the method further includes: constructing directional chain encoding to segment pixels of the printed pattern that are not covered by the pattern dictionary, obtaining multiple closed regions and open boundary regions, filling the closed regions based on a seed filling algorithm, recording the color index value and boundary information of the closed regions, and traversing the pixels within the open boundary regions in scan line order based on run-length encoding and recording the run-length encoding sequence.
[0017] Preferably, the color palette, pattern dictionary, boundary chain code, and fill area encoding data are compressed sequentially based on a compression algorithm, and then restored block by block in reverse during decoding to reconstruct the original print pattern without loss.
[0018] By reorganizing the remaining pixels not covered by the pattern dictionary into two types of geometric primitives—closed regions and open boundaries—and compressing them using seed filling and run-length encoding respectively, the compression efficiency of the printed pattern is further improved.
[0019] In a second aspect, a remote acquisition system for inkjet printing image data includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the remote acquisition method for inkjet printing image data described in any one of the claims is implemented.
[0020] The present invention has the following effects:
[0021] 1. It promotes the full compression of highly repetitive printed patterns, improves the compression efficiency and effect of printed patterns. By constructing a color palette and index map, the amount of data is significantly reduced compared to the original image of the printed pattern. The initial window is dynamically expanded based on the integrity of the pattern, ensuring that a complete printed unit is captured in a single capture, avoiding edge misalignment or artifacts caused by traditional block segmentation. Similar patterns are captured by hashing, and the template and position index are stored only once to construct a repeating pattern dictionary, eliminating redundancy and improving the compression effect of printed patterns. The color palette and dictionary are compressed independently to avoid global redundancy and adapt to low bandwidth environments.
[0022] 2. Boundary mutation rate directly quantifies the discontinuity of the window edge pattern, and connected component truncation rate locks the geometric pattern break. For continuous lines commonly seen in printing, this indicator can detect whether the window has truncated the connectivity of the lines. Based on boundary mutation rate and connected component truncation rate, the accuracy of judging the integrity of the pattern within the window is improved. Windows with pattern integrity lower than the target integrity are segmented as required to ensure the detail integrity of highly complex patterns. For adjacent windows with pattern integrity that meet the standard, they are judged as the same color area by the color palette and merged to avoid dictionary expansion caused by over-segmentation.
[0023] 3. By reorganizing the remaining pixels not covered by the pattern dictionary into two types of geometric primitives, namely closed regions and open boundaries, and compressing them separately using seed filling and run-length encoding, the compression efficiency of the printed pattern is further improved. Attached Figure Description
[0024] Figure 1 This is a flowchart of steps S1-S4 in the remote acquisition method of inkjet printing image data of the present invention.
[0025] Figure 2 This is a structural block diagram of a remote acquisition system for inkjet printing image data according to the present invention. Detailed Implementation
[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0027] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0028] Reference Figure 1 A method for remotely acquiring inkjet printing image data includes steps S1-S4, as follows:
[0029] S1: Obtain the RGB (Red, Green, Blue) image of the printed image, preset the color difference threshold and merge similar RGB values to construct a color palette, and obtain the index image based on the color palette.
[0030] Obtain the original RGB image matrix, perform denoising on the original image to eliminate the influence of noise, and obtain the RGB values present in the original image. Calculate the color difference distance between each pair of RGB values, and preset a color difference threshold based on human visual color difference perception. Specifically, the preset color difference threshold can be 2, which is imperceptible to the human eye. Compare each calculated color difference distance with the color difference threshold, merge RGB values with a color difference distance less than the threshold into the same index color, and use the average RGB value of the merged class as the RGB value of this index color, encoding it as... And build a color palette.
[0031] For each pixel in an RGB image, the index color on the color palette that is closest to the RGB value of that pixel can be found. The original RGB pixel value is compressed into the corresponding color palette index value. Based on the color palette, an index map is obtained and used to replace the original RGB image. This achieves a more efficient image representation method that is more in line with the characteristics of inkjet printing and effectively solves the problem of color redundancy in the original RGB image.
[0032] S2: Preset initial window, slide scan index map based on initial window to fully capture printed pattern, dynamically adjust the size of initial window based on the completeness of pattern in initial window, use as target window, and output the set of position and size information of each target window.
[0033] When processing inkjet printed patterns, selecting an appropriate window size is crucial for determining duplicate images. Traditional methods with fixed window sizes are insufficient for complex printing scenarios. Changes in pattern size can lead to pattern cropping or the inclusion of redundant background within the window. Dynamically adjusting the window size allows for a better match to the actual pattern size in the inkjet printing process.
[0034] Set the initial window size to [size missing]. ,in This is the initial window width value. The initial window height is set based on the printed pattern size. In this embodiment, and The default value is 32. In other implementations... and The default value can be flexibly adjusted according to the actual size of the printed pattern.
[0035] Based on the initial window size, the sliding scan index map is used. In this embodiment, the sliding step size can be the initial window width value. Half of the initial window overlaps with the index map during scanning to ensure pattern capture continuity. In other implementations, the sliding step size of the initial window scanning the index map can be flexibly adjusted according to the differences in the printed pattern.
[0036] The integrity of the initial window is evaluated by combining the boundary abrupt change rate and the connected component truncation rate. The boundary abrupt change rate represents the frequency of differences in the index values of adjacent pixels at the boundary of the initial window, and is used to quantify the degree to which the window cuts off the pattern edges. The formula for calculating the boundary abrupt change rate is: ;in, Indicates the boundary mutation rate. This represents the mutation count at the initial window boundaries. Along the four boundaries of the window, a mutation is considered to occur if the index value of a pixel differs from that of its neighboring pixels. The mutation count... Used to count the number of pixel pairs whose initial window boundary index values change. This is the initial window width value. The initial window height value, and the boundary mutation rate. After the calculation is completed, normalization is performed.
[0037] The connectivity truncation rate is used to represent the proportion of connected components that are truncated by the boundary within the initial window.
[0038] The formula for calculating the connected component truncation rate is: ;in, This represents the connectivity cutoff rate of the initial window. This indicates the total number of connected components within the initial window. This represents the number of connected components truncated by the initial window boundary, and the connectivity truncation rate. After the calculation is completed, normalization is performed.
[0039] The integrity of the initial window is evaluated by combining the boundary mutation rate and the connected component truncation rate. The specific formula is as follows: λ μ ;in, This indicates the integrity of the initial window. Let λ represent the boundary mutation rate. The weight, The initial window's connectivity cutoff rate is represented by μ, where μ represents the connectivity cutoff rate. The weights. Wherein In this embodiment, The value of λ can be 0.6, and the value of μ can be 0.4. In other embodiments, the values of λ and μ can be flexibly adjusted according to the characteristics of the printed pattern. The integrity of the window is considered to meet the requirements.
[0040] Based on the integrity of each initial window The initial window size is dynamically adjusted to obtain the target window. Specifically, in At that time, the initial window is equally divided into four sub-windows, and the integrity of each sub-window is recursively evaluated using the window integrity evaluation method described above. If four adjacent initial windows are all complete and have highly similar color distributions, they are merged into one large window, with the size of the merged window being [size missing]. When the recursion depth of the initial window is greater than 3, that is, when the size of the target window after splitting or merging reaches the lower limit (8×8) or the upper limit (128×128), the dynamic adjustment of the window terminates to avoid the window being over-segmented.
[0041] Output a collection of position and size information for each target window: ,in and Indicates the first The coordinates of the target window. Indicates the first The width of the target window, Indicates the first The height of the target window.
[0042] S3: Calculate the multidimensional spatial moment features of each target window based on the color frequency, local connectivity, and color difference of each pixel within each target window as weights, construct a printing feature vector containing color statistics and multidimensional spatial moment features, project the printing feature vector of each target window onto the target window based on a hash function and capture similar patterns, and construct a repeating pattern dictionary based on similar patterns.
[0043] Existing image compression techniques do not consider the periodic repetition of patterns in printed patterns, resulting in low compression efficiency. To further improve the compression effect of printed patterns, this step judges the similarity of patterns within each target window, groups similar pattern target windows together, stores the original pixel data only once for each group, and records the positions of all target windows within the group to construct a repeating pattern dictionary.
[0044] To ensure the reliability of the similarity pattern judgment for each target, the multidimensional spatial moment features of each target window are calculated based on the color frequency, local connectivity, and color difference of each pixel within each target window as weights.
[0045] Color frequency Used to represent pixels Corresponding index color The frequency of occurrence within the target window makes common colors contribute more to the calculation of multidimensional spatial moment features, while rare colors contribute less.
[0046] The local connectivity of a pixel is calculated as the ratio of the number of pixels of the same color to the number of its neighbors within the target window. The formula for calculating local connectivity is: ,in, Indicates local connectivity. Indicates the number of connected pixels of the same color. In this embodiment, the number of pixel neighbors is represented. The value is 8. In other implementations, it can be flexibly adjusted according to the characteristics of the printed pattern. The value of is determined by the number of pixels in a neighborhood of a pixel. If a pixel has many pixels of the same color, it indicates strong local connectivity. If a pixel has no pixels of the same color in its neighborhood, it indicates that the pixel is an isolated target point. By calculating the local connectivity of each pixel, the pixel weights of connected regions are increased, while the weights of isolated pixels are decreased. This allows the multidimensional spatial moment feature to focus more on blocky pixel regions rather than discrete noise points.
[0047] The local connectivity factor of each pixel is calculated by multiplying its local connectivity by the magnification factor and then adding 1. The formula for calculating the local connectivity factor is as follows: ;in Indicates local connectivity. In this embodiment, the magnification factor is used. The value is 0.4, in other implementations The value can be adjusted according to the characteristics of the printed pattern.
[0048] Color difference degree is used to represent the color difference between pixels within a target window. Colors that are too unique within the target window may be noise or irrelevant details. If a pixel differs significantly from all other colors, its weight is reduced; if a pixel's color is similar to another pixel's color, its weight remains essentially unchanged. By using color difference degree as a weighting factor in calculating multidimensional spatial moment features, the weight of perceptually unique colors can be suppressed, while visually similar colors are treated equally.
[0049] The calculation method for using the degree of color difference as a weighting factor is as follows: ;in, For pixels The degree of color difference represents the normalized pixel. The minimum color difference distance, In this embodiment, the attenuation coefficient is represented. A value of 0.6 effectively reduces noticeable noise colors without excessively suppressing transitional colors that differ only slightly from the main color group. In other implementations, The value can be flexibly adjusted according to the differences in the color of the printed pattern. Indicates exponentiation. When When it is very large, When the value approaches 0, the weight is strongly suppressed. When I was very young, As the value approaches 1, the weight remains almost unchanged.
[0050] The three weighting factors—color frequency, local connectivity, and color difference—are used as the weighting function for calculating the multidimensional spatial moment features. The weighting function is calculated as follows:
[0051] ;
[0052] in, This represents a weighting function that is dynamically adjusted based on color frequency, local connectivity, and the degree of color difference. Represents pixels Corresponding index color Frequency of appearance within the target window; Indicates local connectivity. This is the magnification factor; Represents the normalized pixel Minimum color difference distance in the global color palette Indicates the attenuation coefficient. This indicates exponentiation.
[0053] The calculation method for the multidimensional space moment characteristics is as follows: ;in, The multidimensional spatial moment features representing the target window. This represents a weighting function that is dynamically adjusted based on color frequency, local connectivity, and the degree of color difference. Indicates the width of the target window. Indicates the height of the target window. Represents pixels Several spatial characteristics, and is a non-negative integer, representing the order of the multidimensional space moment; specifically, and The combinations are: , , , , , There are six in total, and the multidimensional spatial moment features of each target window are calculated as a six-dimensional vector.
[0054] The printing feature vector of the target window is constructed based on multidimensional spatial moment features and color statistical information: ;in, Represents the feature vector of the print. This indicates color statistics. , , , , , It represents the characteristics of six-dimensional space moments.
[0055] Based on the projection of the print feature vectors of each target window using a hash function and the capture of similar patterns, the hash function will identify similar print feature vectors. Mapped to the same integer hash value, but with significantly different print feature vectors Mapped to different integer hash values.
[0056] In inkjet printing scenarios, this embodiment uses a hash function to detect pattern windows with similar color distributions and spatial layouts. Traditional methods may only use color histograms, while combining the mixed features of similar color distributions and spatial layouts with a hash function can more accurately capture visually similar patterns, even if they are statistically identical in color but have different spatial structures (such as horizontal stripes and vertical stripes), thus improving the accuracy of pattern similarity recognition.
[0057] For each target window, calculate its hash value using a hash function. Target windows with the same hash value are grouped together, considered as similar patterns. The original pixel data for each group is stored only once as one pattern in the dictionary, serving as the pattern data for the repeating dictionary. The positions of all target windows within the group are recorded as the position matrix for the repeating dictionary.
[0058] S4: Based on the compression algorithm, the color palette and pattern dictionary are compressed sequentially, and the original print pattern is restored block by block in reverse during decoding.
[0059] When compressing printed patterns, the input includes a color palette and pattern dictionary information. For the color palette, arithmetic coding is used, constructing an encoding model based on the usage frequency of color indices and converting the index sequence into a binary bitstream. For the pattern data in the pattern dictionary, arithmetic coding combined with the visual importance weights of the patterns is used for encoding. The position matrix uses differential coding; the position coordinates are first sorted, the difference values are calculated, and then Huffman coding is performed. The encoder encodes the color palette and pattern dictionary sequentially according to the above encoding strategy, continuously monitoring bit consumption and dynamically adjusting encoding parameters to ensure overall compression performance.
[0060] When decompressing the printed pattern, the decoder receives the compressed bitstream, parses the bitstream header information in sequence, decodes the optimized color palette, parses the bitstream of the pattern dictionary part, recovers the pattern data and position matrix, and performs image reconstruction in the reverse order of the compression end to recover the original inkjet printed image.
[0061] In other embodiments, due to the differences in different printing patterns, especially some printing patterns with more complex patterns, the dynamically adjusted target windows cannot fully cover the index image. The remaining pixels of the index image that are not covered by the target windows will still occupy a certain space. In order to further compress the printing pattern, the remaining pixels at the boundary of the index image can be further compressed.
[0062] The input consists of the remaining pixels in non-repeating regions, i.e., pixel areas not covered by the pattern dictionary. These regions typically contain irregular boundaries and internal fill areas. When processing these remaining pixels, the Sobel operator is used to calculate the gradient magnitude of the index map to detect edges. A morphological thinning algorithm is applied to thin the edges to a single pixel width. A directional chain encoding is constructed based on the boundary information, and the interior of the boundary regions is filled.
[0063] When constructing the directional chain code, pixels are scanned row by row and column by column. The top left edge pixel is taken as the starting point. Starting from this point, the next edge point is searched clockwise within the 8-neighborhood. The directional code is recorded according to the Freeman chain code table (0-7, where 0 represents east, 1 represents northeast, 2 represents north, 3 represents northwest, 4 represents west, 5 represents southwest, 6 represents south, and 7 represents southeast). This process is repeated until the starting point is returned to form a closed boundary or an open boundary cannot be formed. The boundary chain code information is output, which includes the starting point coordinates and the chain code sequence.
[0064] The boundaries described by the boundary chain code information are filled, and the boundary lines are redrawn using the chain code sequence, dividing all remaining pixels into several regions. For regions enclosed by closed boundaries, since the interior of a closed region is a continuous, identical color, a seed fill algorithm is used to determine the interior region. The seed fill algorithm can be flood fill. Specifically, a seed point is selected inside the boundary, for example, the center point of the bounding box. If the center point is inside the boundary, it is used; otherwise, a nearby point is found, and then the entire region is filled. The fill color (i.e., the color index value of the region) and boundary information (represented by chain code) of this region are recorded.
[0065] For open boundary regions that cannot form closed boundaries, run-length encoding is used to traverse the pixels within the region in scan line order. Pixel segments with the same color index that are consecutive within the same scan line are represented by a single (length, color index) tuple.
[0066] When compressing the boundary information of the printed pattern, the boundary chain code is encoded using predictive coding, the direction code prediction error of the chain code sequence is Huffman encoded, and the starting point coordinates are encoded using fixed-length coding.
[0067] The closed region filling information of the filled region uses fixed-length encoding for the seed point coordinates and arithmetic encoding for the color index; the run-length encoding sequence of the open region uses gamma encoding for the length value and arithmetic encoding for the color index.
[0068] The encoder encodes the color palette, pattern dictionary, boundary chain code, and fill area encoding data sequentially according to the above encoding strategy, and dynamically adjusts the encoding parameters in real time to ensure the overall compression effect.
[0069] After receiving the compressed bitstream, the decoder sequentially parses the bitstream header information to decode the optimized color palette; it parses the bitstream of the pattern dictionary part to recover the pattern data and position matrix; it decodes the boundary chain code part to reconstruct the boundary information; it decodes the fill area encoding part to recover the fill information; and finally, it performs image reconstruction in the reverse order of the compressed end to recover the original inkjet printing image.
[0070] Reference Figure 2 The system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement a method for remotely acquiring inkjet printing image data according to the first aspect of the present invention.
[0071] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0072] The present invention provides a method and system for remote acquisition of inkjet printing image data, which effectively solves the problem of redundancy in the periodic repeating pattern structure in the printed pattern and improves the compression rate.
[0073] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for remotely acquiring inkjet printing image data, characterized in that, include: Obtain the RGB image of the printed image, preset the color difference threshold and merge similar RGB values to construct a color palette, and obtain the index image based on the color palette; The system presets an initial window, then uses the sliding scan index map to completely capture the printed pattern based on the initial window. The size of the initial window is dynamically adjusted based on the completeness of the pattern within the initial window, and this window is used as the target window. The system also outputs a collection of position and size information for each target window. The multidimensional spatial moment features of each target window are calculated based on the color frequency, local connectivity, and color difference of each pixel within each target window as weights. A printing feature vector containing color statistics and multidimensional spatial moment features is constructed. The printing feature vector of each target window is projected onto the target window based on a hash function to capture similar patterns. A dictionary of repeating patterns is constructed based on the similar patterns. The color palette and pattern dictionary are compressed sequentially using a compression algorithm, and then restored block by block in reverse during decoding to reconstruct the original printed pattern without loss. The method for evaluating the completeness of the pattern within the initial window is as follows: count the number of pixel index values that jump at the boundary of the initial window and divide it by the total number of pixels in the initial window to obtain the boundary jump rate; count the number of connected components truncated at the boundary of the initial window and divide it by the total number of connected components in the initial window to obtain the connected component truncation rate; and use the boundary jump rate and the connected component truncation rate as weights to quantify the completeness of the pattern within the initial window. The method for dynamically adjusting the initial window size is as follows: preset the target completeness, equally divide the initial window where the pattern completeness is lower than the target completeness to obtain multiple sub-windows, and recursively evaluate the completeness of the pattern in each sub-window; Based on the similarity of color distribution, merge multiple adjacent initial windows whose pattern completeness meets the target completeness requirement; Set the upper and lower limits of the target window size. Stop dynamically adjusting when the target window size reaches the upper or lower limit.
2. The method for remote acquisition of inkjet printing image data according to claim 1, characterized in that, The color frequency is calculated by counting the frequency of each index color within the target window.
3. The method for remote acquisition of inkjet printing image data according to claim 1, characterized in that, Local connectivity is calculated as follows: the ratio of the number of pixels of the same color to the number of pixels in their neighborhood within the target window is used as the local connectivity.
4. The method for remote acquisition of inkjet printing image data according to claim 1, characterized in that, The method for calculating the degree of color difference is as follows: calculate the color difference distance of each pixel in the target window pairwise, normalize the distance, and select the minimum color difference distance of each pixel after normalization as the degree of color difference.
5. The method for remote acquisition of inkjet printing image data according to claim 1, characterized in that, The calculation method for multidimensional space moment characteristics is as follows: The local connectivity factor is obtained by multiplying the local connectivity factor by the magnification factor and adding 1. The color difference factor is obtained by multiplying the color difference factor by the attenuation factor and performing an exponential operation. The product of the color frequency, the local connectivity factor, and the color difference factor is used as the weight function of the multidimensional spatial moment feature. The sum of the products of the spatial geometric features of all pixels in the target window and the weight function is used as the multidimensional spatial moment feature.
6. The method for remote acquisition of inkjet printing image data according to claim 1, characterized in that, Also includes: Construct directional chain codes to segment pixels of the printed pattern that are not covered by the pattern dictionary, obtain multiple closed regions and open boundary regions, and output boundary chain code information. Fill the closed regions based on the seed fill algorithm, record the color index value and boundary information of the closed regions, and traverse the pixels in the open boundary regions in scan line order based on run-length encoding and record the run-length encoding sequence.
7. The method for remotely acquiring inkjet printing image data according to claim 6, characterized in that, The original print pattern is reconstructed by sequentially compressing the color palette, pattern dictionary, boundary chain code, color index value and boundary information of closed regions, and run-length encoding sequence of open boundary regions using a compression algorithm. During decoding, the original print pattern is restored block by block in reverse order.
8. A remote acquisition system for inkjet printing image data, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the remote acquisition method for inkjet printing image data according to any one of claims 1-7.
Citation Information
Patent Citations
Progressive window colour quantisation
AU2009233625A1
Real-time image compression and reduction method based on plurality of palettes
CN102523367A