Color enhancement method, device and storage medium for restoring images from PRN files

By using color correction and enhancement technology for PRN files, combined with deep learning methods, the color distortion and noise problems of images restored from PRN files are solved, high-quality image conversion and processing are achieved, and user experience and production efficiency are improved.

CN119130844BActive Publication Date: 2025-09-09GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411171126.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-09-09
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Images restored directly from PRN files have problems such as color distortion, salt and pepper noise, insufficient contrast, and noise interference, which affect image quality and processability.

Method used

By parsing PRN files, applying color correction and enhancement techniques, including gamma shift, data normalization, and Gaussian filtering, combined with deep learning methods such as convolutional neural networks and generative adversarial networks, noise is removed and image quality is improved.

Benefits of technology

The visual effect of the restored image is significantly improved, the image quality is enhanced, and PRN files can be directly restored to processable RGB or PNG formats, enhancing user experience and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119130844B_ABST
    Figure CN119130844B_ABST
Patent Text Reader

Abstract

The present invention discloses a color enhancement method for restoring an image from a PRN file, comprising the following steps: S1, acquiring an image, reading and storing the PRN file to be restored; S2, image conversion, converting the image into a floating-point type through image analysis based on the image acquired in S1, and obtaining a floating-point data packet after image digitization; S3, color enhancement; S4, data normalization; S5, image conversion; and S6, noise removal. The present invention enables the direct restoration of a PRN file into an image file such as a JPG or PNG file in an RGB color space, making the image more processable and facilitating image processing by users in the PRN file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to digital image processing technology, in particular to a color enhancement method, device and storage medium for restoring a picture from a PRN file. Background Art

[0002] A method and system for significantly improving the image quality of images restored from a Printer Ready (PRN) file through color enhancement and noise removal techniques. PRN files, as printer control files, contain printing instructions for image data. However, in practical applications, images restored directly from PRN files often suffer from color distortion and a large amount of salt-and-pepper noise in the restored image, resulting in color deviation, insufficient contrast, and noise interference, which affects the image's usability and the possibility of further processing. The present invention aims to address these issues by establishing a new image processing algorithm, ensuring that the quality of the restored image approaches or even reaches the level of the original image. Summary of the Invention

[0003] In response to the problems existing in the above-mentioned background technology, the present invention proposes a color enhancement method, device and storage medium for restoring pictures from PRN files. By parsing the PRN files, the image data can be efficiently restored, and on this basis, advanced color correction, enhancement technology and noise suppression algorithms are applied to significantly improve the visual effect of the restored image and enhance the image quality.

[0004] The color enhancement method for restoring an image from a PRN file includes the following steps:

[0005] S1, acquire the image, read and store the PRN file to be restored;

[0006] S2, image conversion, based on the image obtained in S1, converts the image into a floating-point type through image analysis to obtain a floating-point data packet after image digitization;

[0007] S3, color enhancement, based on the floating-point data packet obtained in S2, performs gamma change on each floating-point RGB data of the data packet to obtain the gamma-changed RGB data;

[0008] S4, data normalization, based on the RGB data obtained in S3, normalizes the RGB data to 0-255, and obtains the normalized RGB data;

[0009] S5, image conversion, based on the RGB data normalized by the data obtained in S4, converts the floating point type image into an 8-bit image to obtain an image;

[0010] S6, noise removal, based on the image obtained in S5, performs Gaussian filtering on the entire image to remove salt and pepper noise while preserving the original texture of the image, and finally obtains an image with noise removed and color enhanced.

[0011] In step S1, the user uploads the PRN file to be processed through the GUI, and the system starts the PRN file parsing module to read the file and extract image data.

[0012] In step S1, the file source of the PRN file to be restored is obtained, it is determined whether the color space of the PRN file belongs to RGB or YMCK, and the determination result is saved.

[0013] In step S2, the image is converted to a floating-point type based on the judgment result. If the judgment result is RGB, it is converted to a floating-point type of RBG. If the judgment result is YMCK, it is first converted to YMCK, and each pixel in the YMCK color mode is converted to the corresponding pixel in the RGB color mode.

[0014] In step S3, the basic formula of the gamma change is: Output = Input^Gamma, where Input is the original RGB component value, which ranges from 0 to 1, Gamma is the gamma value, which ranges from 1.8 to 2.2, and Output is the RGB component value after gamma change.

[0015] In step S5, the floating-point image is converted into an 8-bit image using the conversion formula output_pixel=round((input_pixel-min_val)*255 / (max_val-min_val)), and values ​​less than 0 in the floating-point image are set to 0, and values ​​greater than 1 are set to 1, which are then multiplied by 255 and converted to an 8-bit data type.

[0016] A device for restoring color enhancement of an image from a PRN file includes a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the method steps for converting a prepress PRN file into a previewable image are implemented.

[0017] A storage medium stores computer program instructions, which, when executed by a processor, implement the method steps for converting a prepress PRN file into a previewable image.

[0018] The beneficial effects of the present invention are:

[0019] The present invention solves the problems of color deviation, insufficient contrast, and noise interference that images restored directly from PRN files often suffer from due to color distortion and a large amount of salt and pepper noise in the restored images; it realizes the direct restoration of PRN files into image files such as JPG or PNG in RGB color space, making the images more processable and facilitating user processing of images in PRN files.

[0020] In summary, this method effectively solves the technical complexity, compatibility issues, and image quality loss problems in the PRN file conversion process through automated and precise color conversion. This not only improves production efficiency and reduces operational difficulty, but also greatly enhances the user experience, making the entire process from design to printing smoother and more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the color enhancement method for restoring an image from a PRN file according to the present invention. DETAILED DESCRIPTION

[0022] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present application. Rather, they are merely examples of methods and systems consistent with certain aspects of the present application, as detailed in the appended claims.

[0023] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0024] The following describes in detail the specific implementation methods, features and effects of the present invention in conjunction with the accompanying drawings and preferred embodiments.

[0025] Example 1

[0026] S1, acquire an image, read and store the PRN file to be restored. Specifically, through the GUI system, read the PRN file to be restored, read and save the file into the conversion module, and determine whether the color space of the PRN file belongs to RGB or YMCK by obtaining the file source of the PRN file to be restored, and save the determination result. In the printer file, the PRN file includes not only image information but also printing instructions and other information. In addition to reading the image information of the PRN file, the conversion module also needs to read the printing information of the PRN file, thereby determining the type of the printer where the PRN file is located, and finally determining whether the printing color space of the printer belongs to RGB or YMCK.

[0027] S2, image conversion, based on the image obtained in S1, converts the image into a floating-point type through image analysis to obtain a floating-point data packet after image digitization. Through relevant algorithms, convert the read PRN file into a floating-point data packet and save the data packet. After the judgment result in S1, the image is converted into a floating-point type. If the judgment result is RGB, it is converted into a floating-point type of RBG. If the judgment result is YMCK, it is first converted into YMCK, and each pixel in the YMCK color mode is converted into the corresponding pixel in the RGB color mode;

[0028] S3, color enhancement, based on the floating-point data packet obtained in S2, performs gamma transformation on each floating-point RGB data in the data packet to obtain the gamma-transformed RGB data. The basic formula of the gamma transformation is: Output = Input^Gamma, where Input is the original RGB component value, which ranges from 0 to 1, Gamma is the gamma value, which ranges from 1.8 to 2.2, and Output is the RGB component value after gamma transformation;

[0029] S4, data normalization, based on the RGB data obtained in S3, normalizes the RGB data to 0-255, and obtains the normalized RGB data;

[0030] S5, image conversion, based on the RGB data normalized by the data obtained in S4, converts the floating-point type image into an 8-bit image, and converts the floating-point type image into an 8-bit image. The conversion formula is output_pixel = round((input_pixel-min_val)*255 / (max_val-min_val)), and sets the values ​​less than 0 in the floating-point image to 0, and the values ​​greater than 1 to 1, and then multiplies it by 255 and converts it to 8-bit data type;

[0031] S6, noise removal, based on the image obtained in S5, performs Gaussian filtering on the entire image to remove salt and pepper noise while preserving the original texture of the image, and finally obtains an image with noise removed and color enhanced.

[0032] In step S1, the user uploads the PRN file to be processed through the GUI, and the system starts the PRN file parsing module to read the file and extract image data.

[0033] A device for color enhancement of images restored from PRN files includes a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the method steps for converting prepress PRN files into previewable images are implemented.

[0034] A storage medium stores computer program instructions, which, when executed by a processor, implement the method steps for converting a prepress PRN file into a previewable image.

[0035] This embodiment solves the problems of color deviation, insufficient contrast, and noise interference caused by color distortion and a large amount of salt and pepper noise in the restored image when the image is restored directly from the PRN file; it realizes that the PRN file can be directly restored into a picture file such as JPG or PNG in the RGB color space, making the picture more processable and convenient for users to process the image in the PRN file.

[0036] Example 2

[0037] In order to solve the problem of visual color difference, this embodiment adds a color contrast and correction method as follows:

[0038] S1, acquiring an image, and reading and storing a PRN file to be restored using a first image processing software;

[0039] S2, opening the acquired image file in a second image processing software and taking a screenshot, saving the screenshot; in the PRN file reading, taking a screenshot of the PRN file and saving the screenshot, directly reading the color information of the screenshot, and expressing the color information in the form of RGB or CMYK;

[0040] S3, first image conversion, based on the image obtained in S1, converts the image into a floating point type through image analysis to obtain a first floating point data packet after the image is converted into data;

[0041] S4, a second time, converting the image into a floating point type through image analysis based on the image obtained in S2, to obtain a second floating point data packet after the image is converted into data;

[0042] S5, merging the first floating-point data packet and the second floating-point data packet, and obtaining floating-point data after visual color difference is balanced by calculating an average value;

[0043] S5, color enhancement, based on the floating-point data packet obtained in S5, performs gamma change on each floating-point RGB data of the data packet to obtain the gamma-changed RGB data;

[0044] S4, data normalization, based on the RGB data obtained in S3, normalizes the RGB data to 0-255, and obtains the normalized RGB data;

[0045] S5, image conversion, based on the RGB data normalized by the data obtained in S4, converts the floating point type image into an 8-bit image to obtain an image;

[0046] S6, noise removal, based on the image obtained in S5, performs Gaussian filtering on the entire image to remove salt and pepper noise while preserving the original texture of the image, and finally obtains an image with noise removed and color enhanced.

[0047] A device for color enhancement of images restored from PRN files includes a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the method steps for converting prepress PRN files into previewable images are implemented.

[0048] A storage medium stores computer program instructions, which, when executed by a processor, implement the method steps for converting a prepress PRN file into a previewable image.

[0049] Example 3

[0050] A method for color enhancement of images restored from PRN files. In the PRN file restoration method based on deep learning, a deep neural network is used to learn the mapping relationship between PRN files and images, thereby achieving effective PRN file restoration images.

[0051] A convolutional neural network (CNN) is established, which consists of convolutional layers, pooling layers and fully connected layers. The features of the image are extracted through convolution operations, and then the features of the PRN file restoration image are gradually learned to achieve PRN file restoration image.

[0052] Generative adversarial networks, including generators and discriminators.

[0053] The generator generates realistic PRN file restoration images, and the discriminator determines whether the input image is a real clean image or an image generated by the generator, and the two are trained in adversarial manner.

[0054] For example, the Noise2Noise method uses a GAN architecture to restore images without a clean image as a reference.

[0055] And generate the next level of adversarial network for image color enhancement and image denoising.

[0056] When training these deep neural networks, a large number of noisy images and corresponding clean image pairs are usually required as datasets. Common datasets include BSD68, Set12, etc.

[0057] In order to improve the denoising effect, some technologies are also used, such as:

[0058] Residual learning: Let the network learn the residual between noisy images and clean images instead of directly learning the clean images.

[0059] Multi-scale learning: simultaneously processing image features at different scales to better capture noise patterns.

[0060] Adversarial Network for Image Color Enhancement Based on Deep Learning

[0061] Principle: The system consists of a generator and a discriminator. The generator produces color-enhanced images, while the discriminator determines whether the generated images are realistic and the color enhancement is good. Through adversarial training, the generator continuously improves its output to produce more realistic and colorful images.

[0062] For example, CycleGAN can perform style transfer and color enhancement without paired training data.

[0063] The mapping relationship of color enhancement can be learned by designing a deep convolutional neural network.

[0064] For example, multiple convolutional layers and nonlinear activation functions are used to extract image features and adjust color channels.

[0065] The autoencoder compresses the input image into a low-dimensional representation, and the decoder performs color enhancement when reconstructing the image.

[0066] The introduction of the attention mechanism enables the network to focus on important areas in the image, thereby performing color enhancement more targetedly.

[0067] Multimodal learning combines information from multiple image modalities, such as brightness, saturation, and hue, to perform more comprehensive color enhancement.

[0068] In practical applications, multiple techniques are often combined to improve color enhancement. For example, a pre-trained convolutional neural network is used to extract features, which are then fed into a generative adversarial network for color enhancement.

[0069] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as above in terms of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can, without departing from the scope of the technical solution of the present invention, make some changes or modifications to equivalent embodiments using the technical contents disclosed above. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A color enhancement method for restoring an image from a PRN file, characterized by: The steps include: S1, acquire the image, read and store the PRN file to be restored; S2, image conversion, based on the image obtained in S1, converts the image into a floating-point type through image analysis to obtain a floating-point data packet after image digitization; S3, color enhancement, based on the floating-point data packet obtained in S2, performs gamma change on each floating-point RGB data of the data packet to obtain the gamma-changed RGB data; S4, data normalization, based on the RGB data obtained in S3, normalizes the RGB data to 0~255, and obtains the normalized RGB data; S5, image conversion, based on the RGB data normalized by the data obtained in S4, converts the floating point type image into an 8-bit image to obtain an image; S6, noise removal, based on the image obtained in S5, performs Gaussian filtering on the entire image to remove salt and pepper noise while preserving the original texture of the image, and finally obtains an image with noise removed and color enhanced.

2. The color enhancement method for restoring an image from a PRN file according to claim 1, characterized in that: In step S1, the user uploads the PRN file to be processed through the GUI, and the system starts the PRN file parsing module to read the file and extract image data.

3. The color enhancement method for restoring an image from a PRN file according to claim 1, characterized in that: In step S1, the file source of the PRN file to be restored is obtained, it is determined whether the color space of the PRN file belongs to RGB or YMCK, and the determination result is saved.

4. The color enhancement method for restoring an image from a PRN file according to claim 1, characterized in that: In step S2, the image is converted into a floating-point type according to the judgment result. If the judgment result is RGB, it is converted into a floating-point type of RBG. If the judgment result is YMCK, it is first converted into YMCK, and each pixel in the YMCK color mode is converted into a corresponding pixel in the RGB color mode.

5. The color enhancement method for restoring an image from a PRN file according to claim 1, characterized in that: In step S3, the basic formula for the gamma change is: Output = Input ^ Gamma, where Input is the original RGB component value, the range of Input is between 0 and 1, Gamma is the gamma value, the range of Gamma is between 1.8 and 2.2, and Output is the RGB component value after gamma change.

6. The color enhancement method for restoring an image from a PRN file according to claim 1, characterized in that: In step S5, the floating-point image is converted to an 8-bit image using the formula output_pixel = round((input_pixel - min_val) * 255 / (max_val - min_val)) , and values ​​less than 0 in the floating-point image are set to 0, and values ​​greater than 1 are set to 1, and then multiplied by 255 and converted to an 8-bit data type.

7. A device for restoring color enhancement of an image from a PRN file, comprising a processor, a memory, and computer program instructions stored in the memory, wherein when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.

8. A storage medium having computer program instructions stored thereon, which implement the method according to any one of claims 1 to 6 when the computer program instructions are executed by a processor.

Citation Information

Patent Citations

  • Saturation enhancement method and device and computer readable storage medium

    CN111147837A

  • Apparatus and Method for Decoding Extended Color Space Data

    US20090167955A1