Image color matching preprocessing method, image forming apparatus, electronic device, and storage medium

By performing image recognition processing on the image to be processed in the image forming device, acquiring image data, determining the processable area using the image information table, and performing color preprocessing, the problems of image white gaps and ghosting caused by inaccurate color registration are solved, thereby improving processing efficiency and resource utilization.

CN118748700BActive Publication Date: 2026-02-03ZHUHAI PANTUM ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411017163.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2026-02-03
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

Existing technologies in image forming equipment, especially in color printing, are prone to problems such as white gaps and ghosting caused by misregistration, and existing white gap or ghosting removal processes are not perfect.

Method used

Before printing, the image is processed by performing image recognition to obtain image data and using an image information table to determine the processable area. Color preprocessing is then performed based on the reference color, including color channel conversion and assignment, thus optimizing the color preprocessing process.

Benefits of technology

It shortens the image color registration preprocessing time, reduces program redundancy and hardware resource consumption, improves processing efficiency, and reduces color registration inaccuracies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748700B_ABST
    Figure CN118748700B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a color matching preprocessing method of an image, an image forming device, an electronic device and a storage medium. The method comprises: obtaining image data of a to-be-processed image and a specified reference color, wherein the image data comprises position information of each pixel point on the to-be-processed image and information of at least one processable region; the processable region is an image composed of pixel points with a color consistent with the reference color; the image data is obtained when image recognition processing is performed on the to-be-processed image before printing; determining a to-be-processed region from the at least one processable region according to the image data and the specified reference color, and a position of each pixel point in the to-be-processed region on the to-be-processed image; and performing color matching preprocessing on the to-be-processed region according to the position of each pixel point in the to-be-processed region on the to-be-processed image. The present application can reduce the consumption of hardware resources and further optimize the execution process of color matching preprocessing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to an image color preprocessing method, an image forming apparatus, an electronic device, and a storage medium. Background Technology

[0002] During the operation of image forming equipment, especially in color printing, problems such as white gaps and ghosting can easily occur due to misregistration. However, in existing technologies, some functions are still not perfect in the process of removing white gaps or ghosting from images. Summary of the Invention

[0003] In view of this, this application provides a method for color preprocessing of an image, an image forming apparatus, an electronic device, and a storage medium to help solve the problem of imperfections in the process of removing white gaps and / or ghosting in an image.

[0004] In a first aspect, embodiments of this application provide a color preprocessing method for an image, applied to an image forming apparatus, comprising:

[0005] The image data of the image to be processed and a specified reference color are obtained. The image data includes the position information of each pixel in the image to be processed and the information of at least one processable region. The processable region is an image composed of pixels whose color is consistent with at least one of the reference colors. The image data is the data obtained when performing image recognition processing on the image to be processed before printing.

[0006] Based on the image data and a specified reference color, a region to be processed is determined from at least one of the processable regions, and the position of each pixel in the region to be processed is determined on the image to be processed.

[0007] Based on the position of each pixel in the region to be processed on the image to be processed, color preprocessing is performed on the region to be processed.

[0008] In one possible implementation, the image data further includes information about unprocessable regions; the identification information of each pixel in the unprocessable regions is different from the identification information of each pixel in the processable regions.

[0009] The processable area can be obtained as follows:

[0010] Based on the image data, each pixel in the image to be processed is sequentially traversed, and at least one processable region is obtained based on the identification information of each pixel in the unprocessable region and the identification information of each pixel in the processable region.

[0011] In one possible implementation, the region to be processed is preprocessed by color matching based on the position of each pixel in the region to be processed on the image to be processed, and this process further includes:

[0012] After determining the region to be processed, the identification information of each pixel in the other processable regions is updated so that the processable region becomes the unprocessable region.

[0013] In one possible implementation, determining the region to be processed from at least one of the processable regions based on the image data and a specified reference color includes:

[0014] Based on a specified reference color, a corresponding first preset color threshold is obtained;

[0015] Compare the color threshold of each pixel in the processable region with the first preset color threshold;

[0016] The region to be processed is determined based on the comparison results.

[0017] In one possible implementation, obtaining a specified base color, prior to:

[0018] Obtain a color preprocessing instruction, wherein the color preprocessing instruction includes a specified base color, and the specified base color is any one of cyan, magenta, yellow and black.

[0019] In one possible implementation, color preprocessing is performed on the region to be processed based on the position of each pixel in the region to be processed on the image to be processed, including:

[0020] Obtain the color of each pixel in the RGB channel in the region to be processed;

[0021] Replace the color of each pixel in the RGB channel in the region to be processed with the background color in the RGB channel;

[0022] Perform color channel conversion on each pixel in the area to be processed to obtain the color of each pixel in the CMYK four-channel;

[0023] The color values ​​of each pixel in the region to be processed are reassigned to the other three channels besides the channel containing the specified reference color, according to the first color setting value, and the color values ​​of each pixel in the region to be processed are reassigned to the channel containing the specified reference color, according to the second color setting value.

[0024] In one possible implementation, the reassignment is followed by:

[0025] Take any pixel in the region to be processed as the center point;

[0026] Determine whether a preset number of pixels around the center point are all pixels in the area to be processed;

[0027] If so, then the color value of the center point in the channel containing the specified reference color is assigned to 0.

[0028] Secondly, embodiments of this application provide an image forming apparatus, comprising:

[0029] An acquisition unit is used to acquire image data of an image to be processed and a specified reference color. The image data includes the position information of each pixel in the image to be processed and information of at least one processable region. The processable region is an image composed of pixels whose color is consistent with at least one of the reference colors. The image data is data obtained when performing image recognition processing on the image to be processed before printing.

[0030] The determining unit is configured to determine, based on the image data and a specified reference color, a region to be processed from at least one processable region, and the position of each pixel in the region to be processed on the image to be processed;

[0031] The color matching preprocessing unit is used to perform color matching preprocessing on the region to be processed according to the position of each pixel in the region to be processed on the image to be processed.

[0032] Thirdly, embodiments of this application provide an electronic device, including:

[0033] processor;

[0034] Memory;

[0035] The memory stores a computer program that, when executed, causes the electronic device to perform the method described in any of the first aspects.

[0036] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in any of the first aspects.

[0037] The image color preprocessing method, apparatus, and electronic device provided in this application have at least the following technical effects:

[0038] This application discloses an image color preprocessing method, apparatus, and electronic device. Based on acquired image data of the image to be processed and a specified base color, the processing area is determined. Color preprocessing is then performed based on the position of each pixel within the processing area on the image to be processed. The image processing data is obtained during image recognition before printing the image to be processed, containing pixel position information and information about the processable area. This allows for full utilization of the information in the image data to complete the color preprocessing, helping to shorten processing time, reduce program redundancy, and decrease hardware resource consumption, thus further optimizing the execution process of color preprocessing. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0041] Figure 2 A schematic diagram illustrating color misregistration in an image forming apparatus provided in an embodiment of this application;

[0042] Figure 3 A schematic flowchart illustrating an image color preprocessing method provided in an embodiment of this application;

[0043] Figure 4 This is a schematic diagram illustrating pixel identification information provided in an embodiment of this application.

[0044] Figure 5 A schematic diagram of an image information table provided in an embodiment of this application;

[0045] Figure 6 A schematic flowchart of another image color preprocessing method provided in this application embodiment;

[0046] Figure 7 A schematic diagram illustrating the removal of white gaps and / or ghosting in an image, provided as an embodiment of this application;

[0047] Figure 8 This is a schematic diagram of the structure of an image forming apparatus provided in an embodiment of this application;

[0048] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0049] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0050] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0051] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0052] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0053] See Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of this application. For example... Figure 1 As shown, this application scenario includes a control device 110 and an image forming device 120, wherein the control device 110 and the image forming device 120 are interconnected via a wired or wireless communication network for information transmission. During the image forming process, the control device 110 converts the printing data into printer language and sends the printer language to the image forming device 120, which then performs the image forming operation.

[0054] The communication network between the control device 110 and the image forming device 120 can be a local area network (LAN) or a wide area network (WAN) relayed through a relay device. When the communication network is a LAN, for example, it can be a short-range communication network such as a Wi-Fi hotspot network, a Wi-Fi P2P network, a Bluetooth network, a Zigbee network, or a near field communication (NFC) network. When the communication network is a WAN, for example, it can be a 3G network, a 4G network, a 5G network, a future public land mobile network (PLMN), or the Internet.

[0055] It should be pointed out that, Figure 1 This is merely an illustrative description and should not be construed as limiting the scope of protection of this application. For example, the image forming apparatus 120 includes, but is not limited to, printers, copiers, fax machines, multi-function image making and copying devices, electrostatic printing devices, and any other similar electronic devices. The control device 110 includes, but is not limited to, electronic devices capable of communicating with the image forming apparatus 120, such as computers, mobile phones, tablets, enterprise internal servers, and cloud servers. In some possible implementations, the control device 110 may also be referred to as a host computer, mainframe, etc.

[0056] During the operation of image forming equipment, especially in color printing, problems such as white gaps and ghosting can easily occur due to misregistration of colors. Figure 2 As shown. To remove white gaps and / or ghosting in images, existing technologies typically use, for example, 3x3 or 5x5 windows to search for image pixels. However, window searching requires pre-caching 3 or 5 rows of data, leading to longer pixel search times and higher hardware resource consumption. Furthermore, during pixel search using a sliding window, each pixel may be searched more than once, resulting in repeated pixel searches and multiple calculations, which can lead to computational inefficiency in some cases. Moreover, the window size needs to be selected based on the specific task and the characteristics of the input data; an inappropriate selection may result in information loss or excessive computation.

[0057] To address the aforementioned issues, this application provides an image color preprocessing method, an image forming apparatus, an electronic device, and a storage medium. This application uses image data obtained during image recognition processing before printing the image to be processed to perform color preprocessing, which can shorten the image color preprocessing time, reduce program redundancy, and reduce the consumption of hardware resources, thereby helping to further optimize the execution process of color preprocessing.

[0058] The following is a detailed description with reference to the accompanying drawings.

[0059] See Figure 3 This is a schematic flowchart illustrating an image color preprocessing method provided in an embodiment of this application. This method can be applied to... Figure 1 In the application scenarios shown, such as Figure 3 As shown, it mainly includes the following steps.

[0060] S201: Obtain the image data of the image to be processed and a specified base color.

[0061] In this embodiment, the image data of the image to be processed, obtained by performing image recognition processing on the image to be processed before printing, can be directly acquired. "Before printing" refers to the image to be processed being transferred to the transfer belt. The image data of the image to be processed includes the position information of each pixel on the image to be processed, and information about at least one processable area.

[0062] In practice, image data can be obtained through the following image processing and recognition methods.

[0063] In scan and copy mode, edge detection and line pair detection can be performed on the image to be processed based on image segmentation algorithm to mark the position information of elements such as text, lines, blocks, and background in the image to be processed, obtain the position information of each pixel, and the correspondence between the identification information of each pixel and the position information of each pixel.

[0064] Using the PCL or PS language of the print driver, the components of the image to be processed can be obtained based on the print data generated by the page description language, such as PCL. These components include text, lines, blocks, backgrounds, etc. The imaging mode of PCL will record the coordinates of the components of the image to be processed in the image, with the width and height of the entire image as the maximum X and Y coordinates and (0,0) as the minimum coordinate. Based on these coordinates, the position information of text, lines, blocks and / or backgrounds in the image to be processed is marked, and the position information of each pixel and the correspondence between the identification information of each pixel and the position information of each pixel are obtained.

[0065] After obtaining the correspondence between the identification information of each pixel and the position information of each pixel, the identification information of each pixel can be stored sequentially according to the position of each pixel on the image to be processed to obtain an image information table. Based on the image information table, information of at least one processable region can be obtained.

[0066] Specifically, since the image information table records the identification information of each pixel in the image to be processed, and the identification information of each pixel in the image information table is stored according to the position of each pixel in the image to be processed, that is, there is a mapping relationship between the identification information of each pixel in the image information table and each pixel in the image to be processed. By searching the image information table, the pixel whose identification information meets the requirements can be obtained. Based on the mapping relationship, the information of at least one processable region in the image to be processed can be obtained. The information of the processable region includes the position information of each pixel in the processable region.

[0067] After obtaining the position information of each pixel in the image to be processed and the information of at least one processable region, the output is image data containing the position information of each pixel in the image to be processed and the information of at least one processable region.

[0068] The image data described above, which includes the position information of each pixel in the image to be processed and information about at least one processable region, is actually obtained during image recognition processing (such as color correction, image retouching, or enhancement) of the image to be processed before printing. This means the image data can be used in other image processing processes. Therefore, the embodiments of this application can directly utilize the image data obtained from image recognition processing before printing the image to be processed, without needing to perform additional image recognition processing on the image to be processed to regenerate another set of image data, saving image processing time and helping to reduce hardware resource consumption.

[0069] In one possible implementation, the image data may further include information about unprocessable regions, wherein the identification information of each pixel in the unprocessable region differs from the identification information of each pixel in the processable region. Based on this, the processable region can also be obtained as follows: by sequentially traversing each pixel in the image to be processed according to the image data, and based on the identification information of each pixel in the unprocessable region and the identification information of each pixel in the processable region, at least one processable region can be obtained.

[0070] In this embodiment, the aforementioned traversal means that each pixel in the image to be processed is accessed once and only once each time the image to be processed is read. Specifically, when the image data includes an image information table, that is, when the image data includes information about unprocessable regions, each pixel in the image to be processed can be traversed sequentially according to the image information table. The region composed of pixels in the image to be processed that meet the requirements for identification information is taken as the processable region, and the region composed of pixels in the image to be processed that do not meet the requirements for identification information is taken as the unprocessable region, thereby obtaining the information of the processable region.

[0071] In practice, when traversing each pixel in the image to be processed according to the image information table, it is generally necessary to start from the first row of pixels in the image to be processed and traverse to the last row. For each row of pixels, the traversal is performed from left to right. Simultaneously, while traversing each pixel in the image to be processed, the corresponding pixel's identifier information in the image information table is read and evaluated. If the identifier information meets the requirements, the current pixel is determined to be a pixel in the processable region; otherwise, the current pixel is determined to be a pixel in the unprocessable region.

[0072] This also shows that in this embodiment, the image to be processed has its own storage address, and each piece of data in the image information table also has its own storage address. The two storage addresses have a corresponding relationship. When traversing each pixel in the image to be processed according to the storage address of the image to be processed, a set step size can be used, such as a step size of 1. At the same time, the identification information of each pixel in the image information table can be searched according to the storage address of the image information table. That is, while searching for a pixel in the image to be processed, the corresponding identification information can be read from the image information table, thereby simultaneously determining whether the pixel is a pixel in the processable area. Of course, in practical applications, the mapping between the image to be processed and the image information table can also be achieved in other ways. For example, the identification information of each pixel in the image information table can be searched according to the storage address of the image information table. When a pixel whose identification information meets the requirements is found, the position information of the pixel in the image to be processed can be obtained according to the correspondence of the storage addresses, thereby obtaining the information of the processable area. This embodiment does not make specific requirements for this.

[0073] In this embodiment of the application, each data point on the image to be processed is traversed sequentially according to the image information table, which can prevent the problem of repeatedly searching for pixels, thereby avoiding repeated calculations of pixels, improving the processing efficiency of the image to be processed, and enhancing the user experience.

[0074] In practical applications, image forming equipment uses four printing inks: cyan (C), magenta (M), yellow (Y), and black (K). These inks are used to create toner images of cyan (C), magenta (M), yellow (Y), and black (K), respectively. A color image is formed by superimposing these different toner images. Therefore, color registration errors in image forming equipment are mainly due to problems with the superposition of different toner images, resulting in white gaps and / or ghosting in the output image.

[0075] Based on this, embodiments of this application can use cyan (C), magenta (M), yellow (Y), and black (K) as reference colors for the image forming apparatus. When misregistration occurs in the image content formed by the reference colors in the output image of the image forming apparatus, the user can use the reference color of the problematic image content as a designated reference color. For example, if the problematic image content is cyan (C), then cyan (C) will be used as the designated reference color. This is because, during color printing, even when forming a cyan (C) image, it can be formed by the superposition of toner images from the four reference colors. In practical applications, depending on the color of the image content causing the misregistration, the designated color can be any one of C, M, Y, or K. Specifically, embodiments of this application can add a reference color selection option to the settings page of the image forming apparatus or control device. The user can select the reference color through the panel of the image forming apparatus or through the control device, and the selected reference color is the designated reference color. After the user selects a reference color, the image forming device or control device generates a color registration preprocessing instruction based on the specified reference color. This instruction allows the image forming device to perform color registration preprocessing on the image to be processed. Color registration preprocessing refers to the preprocessing performed on the image before it is transferred to the transfer belt during the printing process, such as white gap removal, halo removal, and ghosting removal, to prevent inaccurate color registration after the image is transferred to the transfer belt.

[0076] In one possible implementation, the processable region is an image composed of pixels whose color matches at least one reference color. Therefore, the processable region can be determined based on the reference color. Specifically, when performing image recognition processing on the image to be processed, the identification information of pixels in the image to be processed whose color matches the reference color can be set as preset identification information, and the identification information of pixels in the image to be processed whose color does not match the reference color can be set as other identification information, thereby obtaining an image information table. The processable region is then determined based on whether the identification information of the pixels in the image information table matches the preset identification information.

[0077] In specific implementation, the information of each pixel may include an 8-bit data, where the eighth bit is the pixel's identification information. A 1 in this bit indicates that the pixel is a preset identifier, and a 0 indicates that the pixel is not a preset identifier. Other bits are not considered in this embodiment. Of course, in actual operation, a 0 in this bit can also indicate that the pixel is a preset identifier, and a 1 in this bit can indicate that the pixel is not a preset identifier. This embodiment does not specifically require this. Figure 4 As shown, where, Figure 4 The BOP bit in the image is the eighth bit. Therefore, the resulting image information table stores information with 0 and 1 values. When determining whether a pixel in the image to be processed is a pixel in a processable area based on the image information table, the judgment can be made based on the values ​​0 and 1. If the corresponding identifier information of a pixel in the image information table is 1, then the pixel is confirmed to be a pixel in a processable area. If the corresponding identifier information of a pixel in the image information table is 0, then the pixel is confirmed to be a pixel in an unprocessable area.

[0078] For example, taking text in the image to be processed as an example, if the text color matches the base color, the corresponding value in the image information table is marked as 1; otherwise, it is marked as 0. Figure 5 As shown in the figure, (a) is the image to be processed. The image information table in the black box in (a), that is, the BOP Bit, is shown in (b). The processable area can be obtained through (b).

[0079] The image information table in this embodiment records the identification information of each pixel in the image to be processed using the values ​​0 and 1. The recording method is simple and facilitates the judgment and acquisition of the area to be processed.

[0080] S202: Based on image data and a specified reference color, determine the region to be processed from at least one processable region, and the position of each pixel in the region to be processed on the image to be processed.

[0081] In this embodiment, since the processable area in the obtained image data may include multiple reference colors, and this embodiment only performs color preprocessing on an image with one reference color in a single color preprocessing step, it is necessary to determine the area to be processed from the processable area based on a specified reference color. Specifically, based on the specified reference color, a corresponding first preset color threshold is obtained. The color threshold of each pixel in the processable area is compared with the first preset color threshold, and the area to be processed is determined based on the comparison result.

[0082] In specific implementation, the region to be processed is determined based on the comparison results. Specifically, this includes: obtaining the pixels in the processable region whose color threshold is consistent with the first preset color threshold based on the comparison results, determining the region composed of these pixels as the region to be processed, and obtaining the position of each pixel in the region to be processed on the image to be processed based on the position of these pixels in the image data.

[0083] In one possible implementation, to facilitate subsequent color preprocessing of the image to be processed, the pixel identification information of non-processable images in the image information table can be updated. Specifically, after determining the region to be processed, the identification information of each pixel in other non-processable regions within the processable region is updated, for example, changing the identification information from 1 to 0, thereby changing other non-processable regions from processable regions to unprocessable regions.

[0084] The identification information of each pixel in the non-processable area of ​​the processable area is updated so that in the subsequent color matching preprocessing, the pixels with an identification information of 1 can be directly calculated and processed, while other pixels with an identification information of 0 can be ignored, thereby helping to save processing time.

[0085] Of course, in practical applications, you can also retain only the pixel identification information of the area to be processed in the image information table, while the pixel identification information of other non-processed areas is not retained in the image information table.

[0086] S203: Perform color preprocessing on the region to be processed based on the position of each pixel in the region to be processed on the image to be processed.

[0087] In this embodiment of the application, after determining the area to be processed and the position of each pixel in the area to be processed on the image to be processed, color preprocessing can be performed on the area to be processed based on the position of each pixel in the area to be processed on the image to be processed.

[0088] Specifically, the process involves obtaining the color of each pixel in the RGB channel within the processing area, replacing the RGB channel color of each pixel with the background color of the RGB channel, performing color channel conversion on each pixel in the processing area to obtain the color of each pixel in the CMYK four-channel processing area, reassigning the color values ​​of each pixel in the processing area to the other three channels besides the channel containing the specified base color according to a first color setting value, and reassigning the color value of each pixel in the processing area to the channel containing the specified base color according to a second color setting value. The first color setting value is 0.

[0089] In one possible implementation, after replacing the color of each pixel in the RGB channel in the area to be processed with the background color of the RGB channel, the color of each pixel in the area to be processed can be converted from the RGB channel to the CMYK channel according to the image information table. Then, the color of the channel containing one reference color is reassigned to 255, and the colors of the channels containing other reference colors are reassigned to 0, in order to avoid visual defects caused by misregistration such as white gaps and ghosting that appear near the image in the area to be processed.

[0090] For example, if a base color is specified as C, then after converting the color of each pixel in the area to be processed from the RGB channel to the CMYK channel, the color of the C channel can be assigned a value of 255, and the colors of the M, Y, and K channels can be assigned a value of 0, so that the image formed by the C base color will not produce white gaps or ghosting.

[0091] It should be noted that the conversion of the color of each pixel in the area to be processed from the RGB channel to the CMYK channel can be found in relevant technologies. For the sake of brevity, the embodiments of this application will not be described in detail here.

[0092] It should be noted that the embodiments of this application are applicable to the processing of image forming data of CMYK 8-bit data.

[0093] This application embodiment utilizes an image information table to sequentially traverse each pixel in the image to be processed, eliminating the need for additional data caching and thus reducing hardware resource consumption. Furthermore, this application embodiment also performs color preprocessing on each pixel in the processing area through the image information table, resulting in shorter positioning time for each pixel in the processing area and improved efficiency of image color preprocessing.

[0094] See Figure 6 This is a schematic flowchart illustrating another image color preprocessing method provided in this application embodiment. This method can be applied to... Figure 1 In the application scenarios shown, such as Figure 6 As shown, it mainly includes the following steps.

[0095] S601: Select a specified base color.

[0096] S602: Input the image to be processed.

[0097] S603: Obtain image data of the image to be processed using PS / PCL language, or S604: Obtain image data of the image to be processed using image segmentation.

[0098] Image data includes the position of each pixel in the image to be processed, as well as an image information table.

[0099] S605: Obtain the position of the pixel in the region to be processed based on the image data of the image to be processed;

[0100] S606: Update the image information table to obtain the image information table of the area to be processed. The image information table only retains the information of the pixels in the area to be processed.

[0101] S607: Replace the color of each pixel in the RGB channel in the area to be processed with the background color of the RGB channel.

[0102] S608: Perform color channel conversion on each pixel in the area to be processed to obtain the color of each pixel in the CMYK four-channel.

[0103] S609: Determine whether the pixel identifier information in the image information is 1.

[0104] If the value is equal to 1, it means that the location of the pixel is the location of the image in the area to be processed; if the value is not equal to 1, proceed to S613.

[0105] S610: Assign a color value of 255 to each pixel in the area to be processed in the channel corresponding to a specified base color, while assigning a color value of 0 to the other three channels.

[0106] For details of S601-S610, please refer to the descriptions in S301-S303. For the sake of brevity, this application will not repeat them here.

[0107] S611: Determine whether the surrounding pixels of each pixel in the region to be processed are all pixels in the region to be processed, i.e. whether the BOP bits are all equal to 1. If yes, proceed to S612; otherwise, proceed to S613.

[0108] S612: Specifies a base color with a channel color value of 0 and assigns a BOP bit value of 0.

[0109] In one possible implementation, any pixel in the area to be processed can be taken as the center point. It is determined whether all pixels surrounding the center point are pixels in the area to be processed. If all pixels surrounding the center pixel are pixels in the area to be processed, the channel containing a specified base color in the CMYK four-channel system is determined, and the color value of that channel is set to 0. Specifically, when the BOP bit in the image information table is 1, the corresponding pixel is considered the center pixel. The BOP bits of the eight pixels surrounding the center pixel are again checked against the BOP bit in the image information table. If all are 1, the channel containing a specified base color in the CMYK four-channel system is determined, and the color value of that channel is set to 0, thus achieving a punch-hole effect on the center pixel and saving ink. Furthermore, in this embodiment, when the image color of the channel containing the specified base color of the center pixel is set to 0, the BOP bit of the center pixel in the image information table is also set to 0 to prevent further checks.

[0110] In practice, if the BOP bits of the 8 pixels surrounding the center pixel are not all 1, then ink-saving processing will not be performed.

[0111] S613: Output image.

[0112] See Figure 7 This is a schematic diagram of image color preprocessing provided in an embodiment of this application. Figure 7 As shown, for the non-background image in Figure (a), i.e., the area to be processed, the image information table (OTmap) can be obtained through the PS / PCL printer language. The OTmap includes the BOP bit of each pixel. Then, based on the OTmap, the color of each pixel in the RGB channel in the area to be processed is replaced with the background color of the RGB channel. The processing result is shown in Figure (b). The color value of each pixel in the RGB channel in the area to be processed is converted to the color value of the CMYK channel. The conversion result is shown in Figure (c). Then, the color value assignment preprocessing described in S609-S612 is performed on the image to be processed. The processing result is shown in Figure (d). Finally, an image (e) consistent with the image to be processed is output.

[0113] The embodiments of this application not only eliminate the need for repeated pixel searches, thus consuming fewer hardware resources, but also enable intelligent ink saving during the image formation process.

[0114] Corresponding to the above embodiments, this application also provides a schematic diagram of the structure of an image forming apparatus.

[0115] See Figure 8This is a schematic diagram of the structure of an image forming apparatus provided in an embodiment of this application. Figure 8 As shown, the image forming apparatus 800 includes:

[0116] The acquisition unit 801 is used to acquire image data of the image to be processed and a specified reference color. The image data includes the position information of each pixel on the image to be processed and information of at least one processable region. The processable region is an image composed of pixels whose color is consistent with at least one reference color. The image data is the data obtained when performing image recognition processing on the image to be processed before printing.

[0117] The determining unit 802 is used to determine, based on image data and a specified reference color, a region to be processed from at least one processable region, and the position of each pixel in the region to be processed on the image to be processed.

[0118] The color matching preprocessing unit 803 is used to perform color matching preprocessing on the region to be processed based on the position of each pixel in the region to be processed on the image to be processed.

[0119] For details of the embodiments of this application, please refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.

[0120] Corresponding to the above embodiments, this application also provides an electronic device.

[0121] See Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 900 may include a processor 910, a memory 920, and a communication unit 930. These components communicate through one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It may be a bus-shaped structure or a star-shaped structure, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0122] The communication unit 930 is used to establish a communication channel, enabling the electronic device to communicate with other devices. It receives user data from other devices or sends user data to other devices.

[0123] The processor 910 serves as the control center of the electronic device, connecting various parts of the device via interfaces and lines. It executes software programs, instructions, and / or modules stored in the memory 920, and calls data stored in the memory to perform various functions and / or process data. The processor may be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 910 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.

[0124] The memory 920 is used to store the execution instructions of the processor 910. The memory 920 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0125] When the execution instructions in memory 720 are executed by processor 910, the electronic device 900 is able to perform operations. Figure 2 Some or all of the steps in the illustrated embodiments.

[0126] It should be noted that electronic device 900 can also be an image forming device.

[0127] In a specific implementation, this application also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps of the various embodiments of the image processing method provided by this invention. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0128] In a specific implementation, this application also provides a computer program product, wherein the computer program product includes executable instructions, which, when executed on a computer, cause the computer to perform some or all of the steps in the various embodiments of the image processing method provided in this application.

[0129] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application or some parts of the embodiments.

[0130] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

Claims

1. A method for color preprocessing of an image, characterized in that, Applied to image forming equipment, including: The image data of the image to be processed and a specified reference color are obtained. The image data includes the position information of each pixel in the image to be processed and the information of at least one processable region. The processable region is an image composed of pixels whose color is consistent with at least one of the reference colors. The image data is the data obtained when performing image recognition processing on the image to be processed before printing. The information of the processable region includes the position information of each pixel in the processable region. Based on the image data and a specified reference color, a region to be processed is determined from at least one of the processable regions, and the position of each pixel in the region to be processed is determined on the image to be processed. Based on the position of each pixel in the region to be processed on the image to be processed, color preprocessing is performed on the region to be processed; Based on the image data and a specified reference color, determining the region to be processed from at least one of the processable regions includes: Based on a specified reference color, a corresponding first preset color threshold is obtained; Compare the color threshold of each pixel in the processable region with the first preset color threshold; The region to be processed is determined based on the comparison results.

2. The method according to claim 1, characterized in that, The image data also includes information about unprocessable regions, which includes: the position information of each pixel in the unprocessable region; the identification information of each pixel in the unprocessable region, which is different from the identification information of each pixel in the processable region; and a preset mapping relationship between the position information and the identification information of each pixel. The processable area can be obtained as follows: Based on the image data, each pixel in the image to be processed is sequentially traversed, and at least one processable region is obtained based on the identification information of each pixel in the unprocessable region and the identification information of each pixel in the processable region.

3. The method according to claim 2, characterized in that, Based on the position of each pixel in the region to be processed on the image to be processed, color preprocessing is performed on the region to be processed, which includes the following steps beforehand: After determining the region to be processed, the identification information of each pixel in the other processable regions is updated so that the processable region becomes the unprocessable region.

4. The method according to claim 1, characterized in that, To obtain a specified base color, the preceding steps include: Obtain a color preprocessing instruction, wherein the color preprocessing instruction includes a specified base color, and the specified base color is any one of cyan, magenta, yellow and black.

5. The method according to claim 1, characterized in that, Based on the position of each pixel in the region to be processed on the image to be processed, color preprocessing is performed on the region to be processed, including: Obtain the color of each pixel in the RGB channel in the region to be processed; Replace the color of each pixel in the RGB channel in the region to be processed with the background color in the RGB channel; Perform color channel conversion on each pixel in the area to be processed to obtain the color of each pixel in the CMYK four-channel; The color values ​​of each pixel in the region to be processed are reassigned to the other three channels besides the channel containing the specified reference color, according to the first color setting value, and the color values ​​of each pixel in the region to be processed are reassigned to the channel containing the specified reference color, according to the second color setting value.

6. The method according to claim 5, characterized in that, The reassignment then includes: Take any pixel in the region to be processed as the center point; Determine whether a preset number of pixels around the center point are all pixels in the area to be processed; If so, then the color value of the center point in the channel containing the specified reference color is assigned to 0.

7. An image forming apparatus, characterized in that, include: An acquisition unit is used to acquire image data of an image to be processed and a specified reference color. The image data includes the position information of each pixel in the image to be processed and information of at least one processable region. The processable region is an image composed of pixels whose color is consistent with at least one of the reference colors. The image data is the data obtained when performing image recognition processing on the image to be printed before printing. The information of the processable area includes: the position information of each pixel in the processable area. The determining unit is configured to determine, based on the image data and a specified reference color, a region to be processed from at least one processable region, and the position of each pixel in the region to be processed on the image to be processed; A color preprocessing unit is used to perform color preprocessing on the region to be processed according to the position of each pixel in the region to be processed on the image to be processed; The determining unit is specifically used to obtain a corresponding first preset color threshold based on a specified reference color; compare the color threshold of each pixel in the processable area with the first preset color threshold; and determine the area to be processed based on the comparison result.

8. An electronic device, characterized in that, include: processor; Memory; The memory stores a computer program that, when executed, causes the electronic device to perform the method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Image processing method and apparatus, and storage medium

    CN108550101A

  • Image processing method and device, electronic device and computer readable storage medium

    CN109636753A