CN108304147A - Two tone image generation method and device - Google Patents
Two tone image generation method and device Download PDFInfo
- Publication number
- CN108304147A CN108304147A CN201810088380.7A CN201810088380A CN108304147A CN 108304147 A CN108304147 A CN 108304147A CN 201810088380 A CN201810088380 A CN 201810088380A CN 108304147 A CN108304147 A CN 108304147A
- Authority
- CN
- China
- Prior art keywords
- color
- brightness value
- value
- specified
- initial brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/12—Digital output to print unit, e.g. line printer, chain printer
- G06F3/1201—Dedicated interfaces to print systems
- G06F3/1202—Dedicated interfaces to print systems specifically adapted to achieve a particular effect
- G06F3/1203—Improving or facilitating administration, e.g. print management
- G06F3/1208—Improving or facilitating administration, e.g. print management resulting in improved quality of the output result, e.g. print layout, colours, workflows, print preview
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00002—Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for
- H04N1/00005—Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for relating to image data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/00127—Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture
- H04N1/00278—Connection or combination of a still picture apparatus with another apparatus, e.g. for storage, processing or transmission of still picture signals or of information associated with a still picture with a printing apparatus, e.g. a laser beam printer
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
本发明提供一种双色图像生成方法和装置。本发明双色图像生成方法,包括:获取彩色图像中每个像素点的初始亮度值。根据彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值。根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。本发明能够根据用户指定的颜色来设定双色图像的颜色,还能提升双色转换处理的质量。
The invention provides a two-color image generation method and device. The two-color image generation method of the present invention includes: acquiring the initial brightness value of each pixel in the color image. According to the type of the color image, the brightness value of the first designated color and the brightness value of the second designated color are determined. According to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, color replacement processing is performed on each initial brightness value to obtain each target brightness value of the two-color image. The invention can set the color of the two-color image according to the color specified by the user, and can also improve the quality of the two-color conversion process.
Description
技术领域technical field
本发明涉及打印技术领域,尤其涉及一种双色图像生成方法和装置。The present invention relates to the field of printing technology, in particular to a method and device for generating a two-color image.
背景技术Background technique
多色打印机能够对输入数据形成的彩色图像进行图形处理,得到彩色打印文档。对于大多数打印材料,完成双色打印便能够完成实际需求。Multi-color printers can perform graphic processing on color images formed by input data to obtain color printed documents. For most printing materials, two-color printing can meet the actual needs.
现有双色图像生成方法中,多色打印机通过根据颜色的深浅差异将彩色图像分为两种不同的颜色,生成双色图像文档。然而,现有双色图像生成方法中浅色易生成白色,深色易生成黑色,进而生成的双色图像文档会出现颜色还原不准确等现象。In the existing method for generating a two-color image, a multi-color printer generates a two-color image document by dividing the color image into two different colors according to the difference in color depth. However, in the existing two-color image generation method, the light color is easy to generate white, and the dark color is easy to generate black, and then the generated two-color image document may have inaccurate color reproduction and the like.
发明内容Contents of the invention
本发明提供一种双色图像生成方法和装置,以解决现有双色图像生成方法由于根据颜色深浅差异将彩色图像替换成双色图像而导致颜色还原不准确的问题。The invention provides a two-color image generation method and device to solve the problem of inaccurate color restoration caused by replacing the color image with the two-color image according to the difference in color depth in the existing two-color image generation method.
第一方面,本发明提供一种双色图像生成方法,包括:In a first aspect, the present invention provides a method for generating a two-color image, comprising:
取彩色图像中每个像素点的初始亮度值;Get the initial brightness value of each pixel in the color image;
根据所述彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值;determining the brightness value of the first specified color and the brightness value of the second specified color according to the type of the color image;
根据各初始亮度值、所述第一指定颜色的亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。According to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, perform color replacement processing on each initial brightness value to obtain each target brightness value of the two-color image.
可选地,所述根据各初始亮度值、所述第一指定颜色的亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值,包括:Optionally, according to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, performing color replacement processing on each initial brightness value to obtain each target brightness value of the two-color image ,include:
根据各初始亮度值以及所述第一指定颜色的亮度值,或者,根据各初始亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域;According to each initial brightness value and the brightness value of the first designated color, or according to each initial brightness value and the brightness value of the second designated color, perform color region division on each initial brightness value to obtain a first designated color region and a second specified color region;
分别对所述第一指定颜色区域的各初始亮度值和所述第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。Color replacement processing is performed on each initial brightness value of the first designated color area and each initial brightness value of the second designated color area to obtain each target brightness value of the two-color image.
可选地,当所述第一指定颜色对应的颜色通道为1个时,所述根据各初始亮度值以及所述第一指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域,包括:Optionally, when there is one color channel corresponding to the first designated color, according to each initial brightness value and the brightness value of the first designated color, each initial brightness value is divided into color regions to obtain the first A specified color area and a second specified color area, including:
在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足第一预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the sum of the differences between the color channel value corresponding to the first designated color and the remaining color channel values in the initial brightness value satisfies the first preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the the first designated color area;
在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足所述第一预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between the color channel value corresponding to the first designated color and the remaining color channel values in the initial brightness value does not meet the first preset range, determine the pixel point corresponding to the initial brightness value Belongs to said second designated color zone;
当所述第一指定颜色对应的颜色通道为1个时,所述根据各初始亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域,包括:When the color channel corresponding to the first designated color is one, according to the initial brightness values and the brightness value of the second designated color, each initial brightness value is divided into color regions to obtain the first designated color region and a second specified color region, consisting of:
在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足第二预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value does not meet the second preset range, determine that the pixel point corresponding to the initial brightness value belongs to the the first designated color area;
在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足所述第二预设范围时,确定所述初始像素对应的像素点属于所述第二指定颜色区域。When the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value satisfies the second preset range, it is determined that the pixel point corresponding to the initial pixel belongs to the the second specified color area.
可选地,当所述第一指定颜色对应的颜色通道为2个或大于2个时,所述根据各初始亮度值以及所述第一指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域,还包括:Optionally, when the number of color channels corresponding to the first designated color is 2 or more, the color region is performed on each initial brightness value according to each initial brightness value and the brightness value of the first designated color. Divide to obtain the first specified color area and the second specified color area, and also include:
在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color satisfies a third preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the the first designated color area;
在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和不满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color does not meet the third preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the the second designated color area;
当所述第二指定颜色对应的颜色通道为2个或大于2个时,所述根据各初始亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域,包括:When the number of color channels corresponding to the second specified color is 2 or greater, the initial luminance values are divided into color regions according to the initial luminance values and the luminance values of the second specified color, to obtain the first luminance value. A specified color area and a second specified color area, including:
在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和不满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the sum of the difference between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color does not meet the fourth preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the the first designated color area;
在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域。When the sum of the difference between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color satisfies the fourth preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the The second specifies the color region.
可选地,所述分别对所述第一指定颜色区域的各初始亮度值和所述第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值,包括:Optionally, performing color replacement processing on each initial brightness value of the first designated color area and each initial brightness value of the second designated color area to obtain each target brightness value of a two-color image, including:
当所述第一指定颜色为彩色时,将所述第一指定颜色区域的初始亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第一指定颜色区域的初始亮度值中其余颜色通道值均设置为第一预设颜色通道值,得到所述双色图像的目标亮度值;When the first specified color is a color, set the color channel value corresponding to the first specified color in the initial brightness value of the first specified color area as the maximum color channel value, and set the first specified color to The rest of the color channel values in the initial brightness value of the color area are all set as the first preset color channel value to obtain the target brightness value of the two-color image;
当所述第二指定颜色为彩色时,将所述第二指定颜色区域的初始亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第二指定颜色区域的初始亮度值中其余颜色通道值均设置为第二预设颜色通道值,得到所述双色图像的目标亮度值;或者,When the second specified color is a color, set the color channel value corresponding to the second specified color in the initial brightness value of the second specified color area as the maximum color channel value, and set the second specified color to The remaining color channel values in the initial brightness value of the color area are all set to the second preset color channel value to obtain the target brightness value of the two-color image; or,
当所述第二指定颜色为非彩色时,将所述第二指定颜色区域的初始亮度值中所有颜色通道值均设置为第三预设颜色通道值,得到所述双色图像的目标亮度值。When the second designated color is an achromatic color, all color channel values in the initial brightness value of the second designated color area are set as the third preset color channel value to obtain the target brightness value of the two-color image.
可选地,所述第一预设颜色通道值、所述第二预设颜色通道值为所述初始亮度值中所有颜色通道值的最大值、最小值和平均值中的任一,所述第三预设颜色通道值为所述初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the first preset color channel value and the second preset color channel value are any one of the maximum value, minimum value and average value of all color channel values in the initial brightness value, the The third preset color channel value is a minimum value or an average value of all color channel values in the initial brightness value.
可选地,所述方法还包括:Optionally, the method also includes:
获取得到的所述双色图像中满足预设条件的目标亮度值,其中,所述预设条件为所述目标亮度值中的所有颜色通道值均为颜色通道值的极值,且所述目标亮度值对应的初始亮度值中的所有颜色通道值不全相等;Acquiring target brightness values satisfying a preset condition in the two-color image obtained, wherein the preset condition is that all color channel values in the target brightness value are extreme values of color channel values, and the target brightness All color channel values in the initial brightness value corresponding to the value are not all equal;
对所述目标亮度值进行颜色修正处理,将所述目标亮度值替换为修正后的亮度值。Perform color correction processing on the target brightness value, and replace the target brightness value with the corrected brightness value.
可选地,所述对各目标亮度值进行颜色修正处理,包括:Optionally, performing color correction processing on each target brightness value includes:
将所述目标亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第四预设颜色通道值;或者Setting the color channel value corresponding to the first specified color in the target brightness value as the maximum color channel value, and setting the remaining color channel values as the fourth preset color channel value; or
将所述目标亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第五预设颜色通道值。Set the color channel value corresponding to the second specified color in the target brightness value as the maximum color channel value, and set the other color channel values as the fifth preset color channel value.
可选地,所述第四预设颜色通道值为与所述目标亮度值对应的初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the fourth preset color channel value is a minimum value or an average value of all color channel values in the initial brightness value corresponding to the target brightness value.
第二方面,本发明提供一种双色图像生成装置,包括:In a second aspect, the present invention provides a two-color image generating device, comprising:
获取模块,用于获取彩色图像中每个像素点的初始亮度值;An acquisition module, configured to acquire the initial brightness value of each pixel in the color image;
确定模块,用于根据所述彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值;A determination module, configured to determine the brightness value of the first specified color and the brightness value of the second specified color according to the type of the color image;
处理模块,用于根据各初始亮度值、所述第一指定颜色的亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。The processing module is configured to perform color replacement processing on each initial brightness value according to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, so as to obtain each target brightness value of the two-color image.
可选地,所述处理模块包括:划分单元和替换单元;Optionally, the processing module includes: a division unit and a replacement unit;
所述划分单元,用于根据各初始亮度值以及所述第一指定颜色的亮度值,或者,根据各初始亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域;The dividing unit is configured to divide each initial brightness value into a color region according to each initial brightness value and the brightness value of the first designated color, or according to each initial brightness value and the brightness value of the second designated color , get the first specified color area and the second specified color area;
所述替换单元,用于分别对所述第一指定颜色区域的各初始亮度值和所述第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。The replacement unit is configured to perform color replacement processing on each initial brightness value of the first designated color region and each initial brightness value of the second designated color region to obtain each target brightness value of the two-color image.
可选地,所述划分单元,具体用于当所述第一指定颜色对应的颜色通道为1个时,在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足第一预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;Optionally, the dividing unit is specifically configured to, when there is one color channel corresponding to the first designated color, the value of the color channel corresponding to the first designated color and other colors in the initial brightness value When the sum of the differences of the channel values satisfies the first preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the first designated color area;
在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足所述第一预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between the color channel value corresponding to the first designated color and the remaining color channel values in the initial brightness value does not meet the first preset range, determine the pixel point corresponding to the initial brightness value Belongs to said second designated color zone;
当所述第二指定颜色对应的颜色通道为1个时,在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足第二预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When there is one color channel corresponding to the second specified color, the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value does not satisfy the second predetermined value. When setting the range, it is determined that the pixel point corresponding to the initial brightness value belongs to the first specified color area;
在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足所述第二预设范围时,确定所述初始像素对应的像素点属于所述第二指定颜色区域。When the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value satisfies the second preset range, it is determined that the pixel point corresponding to the initial pixel belongs to the the second specified color area.
可选地,所述划分单元,具体还用于当所述第一指定颜色对应的颜色通道为2个或大于2个时,在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;Optionally, the dividing unit is specifically further configured to, when the number of color channels corresponding to the first designated color is 2 or greater, the value of each color channel of the initial brightness value and the first designated color When the sum of the difference values of the respective color channel values corresponding to the color satisfies a third preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the first designated color area;
在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和不满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color does not meet the third preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the the second designated color area;
当所述第二指定颜色对应的颜色通道为2个或大于2个时,在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和不满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the number of color channels corresponding to the second designated color is 2 or more than 2, the sum of the differences between the values of the respective color channels of the initial brightness value and the values of the respective color channels corresponding to the second designated color is not When the fourth preset range is satisfied, it is determined that the pixel corresponding to the initial brightness value belongs to the first designated color region;
在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域。When the sum of the difference between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color satisfies the fourth preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the The second specifies the color region.
可选地,所述替换单元,具体用于当所述第一指定颜色为彩色时,将所述第一指定颜色区域的初始亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第一指定颜色区域的初始亮度值中其余颜色通道值均设置为第一预设颜色通道值,得到所述双色图像的目标亮度值;Optionally, the replacement unit is specifically configured to set the color channel value corresponding to the first specified color in the initial brightness value of the first specified color region when the first specified color is a color The maximum color channel value, and the remaining color channel values in the initial brightness value of the first specified color area are all set as the first preset color channel value to obtain the target brightness value of the two-color image;
当所述第二指定颜色为彩色时,将所述第二指定颜色区域的初始亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第二指定颜色区域的初始亮度值中其余颜色通道值均设置为第二预设颜色通道值,得到所述双色图像的目标亮度值;或者,When the second specified color is a color, set the color channel value corresponding to the second specified color in the initial brightness value of the second specified color area as the maximum color channel value, and set the second specified color to The remaining color channel values in the initial brightness value of the color area are all set to the second preset color channel value to obtain the target brightness value of the two-color image; or,
当所述第二指定颜色为非彩色时,将所述第二指定颜色区域的初始亮度值中所有颜色通道值均设置为第三预设颜色通道值,得到所述双色图像的目标亮度值。When the second designated color is an achromatic color, all color channel values in the initial brightness value of the second designated color area are set as the third preset color channel value to obtain the target brightness value of the two-color image.
可选地,所述第一预设颜色通道值、所述第二预设颜色通道值为所述初始亮度值中所有颜色通道值的最大值、最小值和平均值中的任一,所述第三预设颜色通道值为所述初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the first preset color channel value and the second preset color channel value are any one of the maximum value, minimum value and average value of all color channel values in the initial brightness value, the The third preset color channel value is a minimum value or an average value of all color channel values in the initial brightness value.
可选地,所述方法还包括:Optionally, the method also includes:
所述获取模块,还用于获取得到的所述双色图像中满足预设条件的目标亮度值,其中,所述预设条件为所述目标亮度值中的所有颜色通道值均为颜色通道值的极值,且所述目标亮度值对应的初始亮度值中的所有颜色通道值不全相等;The obtaining module is also used to obtain the obtained target brightness value satisfying a preset condition in the two-color image, wherein the preset condition is that all color channel values in the target brightness value are color channel values Extreme value, and all color channel values in the initial brightness value corresponding to the target brightness value are not all equal;
修正模块,用于对所述目标亮度值进行颜色修正处理,将所述目标亮度值替换为修正后的亮度值。A correction module, configured to perform color correction processing on the target brightness value, and replace the target brightness value with a corrected brightness value.
可选地,所述修正模块,具体用于将所述目标亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第四预设颜色通道值;或者,Optionally, the correction module is specifically configured to set the color channel value corresponding to the first specified color in the target brightness value as the maximum color channel value, and set the remaining color channel values as the fourth preset color channel value; or,
将所述目标亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第五预设颜色通道值。Set the color channel value corresponding to the second specified color in the target brightness value as the maximum color channel value, and set the other color channel values as the fifth preset color channel value.
可选地,所述第四预设颜色通道值为与所述目标亮度值对应的初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the fourth preset color channel value is a minimum value or an average value of all color channel values in the initial brightness value corresponding to the target brightness value.
第三方面,本发明提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面所述的双色图像生成方法。In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the two-color image generation method described in the first aspect is implemented.
第四方面,本发明提供一种双色图像生成装置,包括:In a fourth aspect, the present invention provides a two-color image generating device, comprising:
处理器;以及processor; and
存储器,用于存储所述处理器的可执行指令;a memory for storing executable instructions of the processor;
其中,所述处理器配置为经由执行所述可执行指令来执行第一方面所述的双色图像生成方法。Wherein, the processor is configured to execute the two-color image generation method described in the first aspect by executing the executable instructions.
本发明提供的双色图像生成方法和装置,通过获取彩色图像中每个像素点的初始亮度值,根据彩色图像的类型,确定第一指定颜色的亮度值或者第二指定颜色的亮度值。再根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。本发明解决了现有双色图像生成方法由于根据颜色深浅差异将彩色替换成双色而导致颜色还原不准确的问题,能够根据用户实际需求指定双色图像的颜色,对彩色图像进行区域划分和颜色替换处理,实现了对彩色图像的双色转换处理,且提高了双色转换的质量。The two-color image generation method and device provided by the present invention determine the brightness value of the first specified color or the brightness value of the second specified color according to the type of the color image by acquiring the initial brightness value of each pixel in the color image. Then, according to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, color replacement processing is performed on each initial brightness value to obtain each target brightness value of the two-color image. The invention solves the problem of inaccurate color restoration caused by replacing the color with two colors according to the difference in color depth in the existing two-color image generation method, and can specify the color of the two-color image according to the actual needs of users, and perform region division and color replacement processing on the color image , realizing the two-color conversion processing of the color image, and improving the quality of the two-color conversion.
附图说明Description of drawings
图1为本发明提供的双色图像生成方法的流程图一;Fig. 1 is the flowchart one of the two-color image generating method provided by the present invention;
图2为本发明提供的双色图像生成方法的流程图二;Fig. 2 is the second flow chart of the two-color image generation method provided by the present invention;
图3为本发明提供的双色图像生成方法的流程图三;Fig. 3 is a flow chart three of the two-color image generation method provided by the present invention;
图4为本发明提供的双色图像生成装置的结构示意图一;Fig. 4 is a structural schematic diagram 1 of a two-color image generating device provided by the present invention;
图5为本发明提供的双色图像生成装置的结构示意图二;Fig. 5 is the second structural schematic diagram of the two-color image generating device provided by the present invention;
图6为本发明提供的双色图像生成装置的结构示意图三。FIG. 6 is the third structural schematic diagram of the two-color image generating device provided by the present invention.
具体实施方式Detailed ways
图1为本发明提供的双色图像生成方法的流程图一,如图1所示,本实施例的双色图像生成方法可以包括:Fig. 1 is the flowchart one of the two-color image generating method provided by the present invention, as shown in Fig. 1, the two-color image generating method of the present embodiment may include:
S101、获取彩色图像中每个像素点的初始亮度值。S101. Acquire an initial brightness value of each pixel in the color image.
具体地,本实施例中彩色图像可为用户通过用户界面输入数据得到对应的彩色图像,用户界面可为诸如打印机的图像形成装置的操作面板、驱动界面、网页webpage、其他应用程序app界面中的任一。本实施例对此不做限定。Specifically, in this embodiment, the color image may be a corresponding color image obtained by the user inputting data through a user interface, and the user interface may be an operation panel, a driver interface, a web page, or an app interface of an image forming device such as a printer. Either. This embodiment does not limit it.
进一步地,本实施例还需确实彩色图像上每个像素点的亮度值,本实施例对彩色图像的类型不做限定。可选地,彩色图像的类型据包括RGB图像或者CMYK图像。例如,当彩色图像的类型为RGB图像,则彩色图像上每个像素点的亮度值为RGB值(r,g,b)。当彩色图像的类型为CMYK图像,则彩色图像上每个像素点的亮度值为CMYK值(c,m,y,k)。Furthermore, in this embodiment, the brightness value of each pixel on the color image needs to be confirmed, and the type of the color image is not limited in this embodiment. Optionally, the type data of the color image includes RGB image or CMYK image. For example, when the type of the color image is an RGB image, the brightness value of each pixel on the color image is an RGB value (r, g, b). When the type of the color image is a CMYK image, the brightness value of each pixel on the color image is a CMYK value (c, m, y, k).
具体确定彩色图像中的每个像素点的初始亮度值为本领域技术人员的常规技术,在此不进行冗述。Determining the initial brightness value of each pixel in the color image is a conventional technique for those skilled in the art, and will not be repeated here.
S102、根据彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值。S102. Determine the brightness value of the first specified color and the brightness value of the second specified color according to the type of the color image.
具体地,本实施例中双色图像是基于用户在诸如打印机的图像形成装置的用户界面上指定的两种颜色所形成的,具体地,双色图像的颜色包括第一指定颜色和第二指定颜色。且本实施例可选定第一指定颜色为彩色,对第二指定颜色不做限定,其中,彩色为非黑色或者非灰色的颜色,非彩色为黑色或者灰色。例如,用户可设定红色为第一指定颜色,黑色为第二指定颜色,或者,用户可设定红色为第一指定颜色,蓝色为第二指定颜色。本实施例对第一指定颜色和第二指定颜色的具体颜色不做限定。Specifically, the two-color image in this embodiment is formed based on two colors specified by the user on the user interface of the image forming apparatus such as a printer. Specifically, the colors of the two-color image include a first specified color and a second specified color. In addition, in this embodiment, the first specified color may be selected as chromatic, and the second specified color is not limited. The chromatic color is a color other than black or gray, and the non-color is black or gray. For example, the user may set red as the first specified color and black as the second specified color, or the user may set red as the first specified color and blue as the second specified color. In this embodiment, the specific colors of the first specified color and the second specified color are not limited.
进一步地,由于本实施例中打印形成的文档为双色的,因此,本实施例中将彩色图像替换后的打印文档只有第一指定颜色和第二指定颜色这两种颜色,进而本实施例可根据彩色图像的类型,确定第一指定颜色的亮度值或者第二指定颜色的亮度值。本实施例对第一指定颜色的亮度值和第二指定颜色的亮度值的具体实现形式不做限定。Further, since the printed document in this embodiment is two-color, the printed document after replacing the color image in this embodiment has only two colors, the first specified color and the second specified color, and this embodiment can According to the type of the color image, the brightness value of the first designated color or the brightness value of the second designated color is determined. This embodiment does not limit the specific implementation forms of the brightness value of the first designated color and the brightness value of the second designated color.
例如,当彩色图像的类型为RGB图像时,若选定红色为第一指定颜色或第二指定颜色,则红色的亮度值为RGB值(255,0,0),其中255为颜色通道值的最大值;若选定黑色为第一指定颜色或第二指定颜色,则黑色的亮度值为RGB值(0,0,0);若选定蓝色为第一指定颜色或第二指定颜色,蓝色的亮度值为RGB值(0,0,255)。For example, when the type of the color image is an RGB image, if red is selected as the first specified color or the second specified color, the brightness value of red is the RGB value (255, 0, 0), where 255 is the value of the color channel The maximum value; if black is selected as the first specified color or the second specified color, the brightness value of black is the RGB value (0, 0, 0); if blue is selected as the first specified color or the second specified color, The brightness value of blue is the RGB value (0, 0, 255).
又如,当彩色图像的类型为CMYK图像时,若选定红色为第一指定颜色或第二指定颜色,则红色的亮度值为CMYK值(0,100,100,0),其中100为颜色通道值的最大值;若选定黑色为第一指定颜色或第二指定颜色,则黑色的亮度值为CMYK值(0,0,0,100);若选定蓝色为第一指定颜色或第二指定颜色,则蓝色的亮度值为CMYK值(100,100,0,0)。As another example, when the type of color image is a CMYK image, if red is selected as the first specified color or the second specified color, the brightness value of red is CMYK value (0, 100, 100, 0), where 100 is the color The maximum value of the channel value; if black is selected as the first specified color or the second specified color, the brightness value of black is the CMYK value (0, 0, 0, 100); if blue is selected as the first specified color or The second specified color, the brightness value of blue is CMYK value (100, 100, 0, 0).
S103、根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。S103. According to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, perform color replacement processing on each initial brightness value to obtain each target brightness value of the two-color image.
具体地,本实施例中各初始亮度值能够根据第一指定颜色的亮度值和第二指定颜色的亮度值进行颜色替换处理,使得各初始亮度值各自变成各目标亮度值。Specifically, in this embodiment, each initial brightness value can perform color replacement processing according to the brightness value of the first designated color and the brightness value of the second designated color, so that each initial brightness value becomes each target brightness value.
本实施例提供的双色图像生成方法,通过获取彩色图像中每个像素点的初始亮度值,根据彩色图像的类型,确定第一指定颜色的亮度值或者第二指定颜色的亮度值。再根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。本实施例解决了现有双色图像生成方法由于根据颜色深浅差异将彩色替换成双色而导致颜色还原不准确的问题,能够根据用户实际需求指定双色图像的颜色,对彩色图像进行颜色替换处理,实现了对彩色图像的双色转换处理,且提高了双色转换的质量。The two-color image generation method provided in this embodiment determines the brightness value of the first specified color or the brightness value of the second specified color according to the type of the color image by acquiring the initial brightness value of each pixel in the color image. Then, according to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, color replacement processing is performed on each initial brightness value to obtain each target brightness value of the two-color image. This embodiment solves the problem that the existing two-color image generation method replaces the color with two colors according to the difference in color depth and causes inaccurate color restoration. It can specify the color of the two-color image according to the actual needs of the user, and perform color replacement processing on the color image. The two-color conversion processing of the color image is improved, and the quality of the two-color conversion is improved.
在上述实施例的基础上,对本实施例中双色图像生成方法的技术方案进行详细的说明。On the basis of the above embodiments, the technical solution of the method for generating a two-color image in this embodiment will be described in detail.
首先,本实施例中对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值的具体实现方式不做限定。为了便于说明,下面结合图2,对本实施例的双色图像生成方法的具体实现方式进行详细的说明。First, in this embodiment, the specific implementation manner of performing color replacement processing on each initial brightness value to obtain each target brightness value of a two-color image is not limited. For the convenience of description, the specific implementation manner of the two-color image generation method of this embodiment will be described in detail below with reference to FIG. 2 .
图2为本发明提供的双色图像生成方法的流程图二,如图2所示,本实施例的双色图像生成方法包括:Fig. 2 is the flow chart two of the two-color image generation method provided by the present invention, as shown in Fig. 2, the two-color image generation method of the present embodiment comprises:
S201、获取彩色图像中每个像素点的初始亮度值。S201. Acquire an initial brightness value of each pixel in the color image.
S202、根据彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值。S202. Determine the brightness value of the first specified color and the brightness value of the second specified color according to the type of the color image.
其中,S201、S202分别与图1实施例中的S101、S102的实现方式类似,本实施例此处不再赘述。Wherein, the implementation manners of S201 and S202 are similar to those of S101 and S102 in the embodiment of FIG. 1 , and will not be repeated here in this embodiment.
S203、根据各初始亮度值以及第一指定颜色的亮度值,或者,根据各初始亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域。S203. According to each initial brightness value and the brightness value of the first designated color, or according to each initial brightness value and the brightness value of the second designated color, perform color region division on each initial brightness value, and obtain the first designated color region and the second designated color region. Two specifies the color area.
S204、分别对第一指定颜色区域的各初始亮度值和第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。S204. Perform color replacement processing on each initial brightness value of the first designated color area and each initial brightness value of the second designated color area, respectively, to obtain each target brightness value of the two-color image.
具体地,本实施例可将彩色图像中的像素点划分为两个区域,分别为第一指定颜色区域和第二指定颜色区域。针对彩色图像上的任一像素点而言,本实施例可通过根据第一指定颜色和该初始亮度值,来判断该初始亮度值对应的像素点是否为第一指定颜色区域。例如,当第一指定颜色为红色时,需要判断彩色图像上的各像素点是否属于红色区域。其中,本实施例对第一预设范围的具体大小和具体形式皆不做限定。Specifically, in this embodiment, the pixels in the color image can be divided into two areas, which are respectively the first specified color area and the second specified color area. For any pixel on the color image, this embodiment can determine whether the pixel corresponding to the initial brightness value is the first designated color area according to the first designated color and the initial brightness value. For example, when the first designated color is red, it is necessary to determine whether each pixel on the color image belongs to the red area. Wherein, this embodiment does not limit the specific size and specific form of the first preset range.
进一步地,当一部分像素点属于第一指定颜色区域时,剩余部分的像素点属于第二指定颜色区域;当一部分像素点不属于第一指定颜色区域时,这部分像素点属于第二指定颜色区域,剩余部分的像素点属于第一指定颜色区域。Further, when some pixels belong to the first specified color area, the remaining pixels belong to the second specified color area; when some pixels do not belong to the first specified color area, these pixels belong to the second specified color area , the rest of the pixels belong to the first specified color area.
对应地,针对彩色图像上的任一像素点而言,本实施例还可通过判断该初始亮度值和第二指定颜色,来判断该亮度值对应的像素点是否属于第二指定颜色区域。例如,当第二指定颜色为蓝色时,需要判断彩色图像上的各像素点是否属于蓝色区域。其中,本实施例对第一预设范围的具体大小和具体形式皆不做限定。Correspondingly, for any pixel point on the color image, this embodiment can also judge whether the pixel point corresponding to the brightness value belongs to the second designated color area by judging the initial brightness value and the second designated color. For example, when the second designated color is blue, it is necessary to determine whether each pixel on the color image belongs to the blue area. Wherein, this embodiment does not limit the specific size and specific form of the first preset range.
进一步地,当一部分的初始像素点属于第二指定颜色区域时,剩余部分的初始像素点属于第一指定颜色区域;当一部分的初始像素点不属于第二指定颜色区域时,这部分的初始像素点属于第一指定颜色区域,剩余部分的初始像素点属于第二指定颜色区域。Further, when a part of the initial pixels belong to the second specified color area, the remaining part of the initial pixels belong to the first specified color area; when a part of the initial pixels do not belong to the second specified color area, this part of the initial pixels The points belong to the first designated color area, and the remaining initial pixel points belong to the second designated color area.
进一步地,由于本实施例可将彩色图像上各像素点划分为第一指定颜色区域和第二指定颜色区域,这样,本实施例便可根据第一指定颜色的亮度值以及各初始亮度值,对第一指定颜色区域的各初始像素点进行第一指定颜色的替换处理,还可根据第二指定颜色的亮度值以及各初始亮度值,对第二指定颜色区域的各初始像素点进行第二指定颜色的替换处理,使得彩色图像上的任一像素点对应的亮度值属于第一指定颜色区域或第二指定颜色区域,实现彩色图像向双色图像的转换过程。Further, since this embodiment can divide each pixel point on a color image into a first designated color area and a second designated color area, in this way, this embodiment can, according to the brightness value of the first designated color and each initial brightness value, Perform the replacement process of the first designated color on each initial pixel in the first designated color area, and perform a second replacement process on each initial pixel in the second designated color area according to the brightness value of the second designated color and each initial brightness value. The replacement process of the specified color makes the brightness value corresponding to any pixel point on the color image belong to the first specified color area or the second specified color area, realizing the conversion process from the color image to the two-color image.
本实施例提供的双色图像生成方法,通过获取彩色图像中每个像素点的初始亮度值,根据彩色图像的类型,确定第一指定颜色的亮度值或者第二指定颜色的亮度值。再根据各初始亮度值以及第一指定颜色的亮度值,或者,根据各初始亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域。接着,分别对第一指定颜色区域的各初始亮度值和第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。本实施例解决了现有双色图像生成方法由于根据颜色深浅差异将彩色替换成双色而导致颜色还原不准确的问题,能够根据用户实际需求指定双色图像的颜色,且依据彩色图像中各像素点的颜色区域,对各像素点对应的各亮度值进行颜色替换处理,实现彩色图像向双色图像的转换过程,提高了双色转换的质量,并且本实施例是先基于用户指定的颜色进行颜色区域区分,再进行颜色替换,提高了颜色转换的准确率。The two-color image generation method provided in this embodiment determines the brightness value of the first specified color or the brightness value of the second specified color according to the type of the color image by acquiring the initial brightness value of each pixel in the color image. Then, according to each initial brightness value and the brightness value of the first designated color, or, according to each initial brightness value and the brightness value of the second designated color, each initial brightness value is divided into color regions to obtain the first designated color region and the second designated color region. Specifies the color region. Next, color replacement processing is performed on each initial brightness value of the first designated color area and each initial brightness value of the second designated color area to obtain each target brightness value of the two-color image. This embodiment solves the problem of inaccurate color reproduction caused by replacing the color with two colors according to the difference in color depth in the existing two-color image generation method, and can specify the color of the two-color image according to the actual needs of the user, and according to the color of each pixel in the color image In the color area, the color replacement process is performed on each brightness value corresponding to each pixel point to realize the conversion process from a color image to a two-color image, which improves the quality of the two-color conversion, and in this embodiment, the color area is firstly distinguished based on the color specified by the user. Then perform color replacement to improve the accuracy of color conversion.
其次,本实施例S203中能够根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,将彩色图像中各初始亮度值对应的像素点进行颜色区域的划分,得到第一指定颜色区域的各初始亮度值和第二指定颜色区域的各初始亮度值。本实施例中对各像素点进行颜色区域划分的具体方式包括多种,本实施例对此不做限定。Secondly, in this embodiment S203, according to each initial brightness value, the brightness value of the first specified color, and the brightness value of the second specified color, the pixel points corresponding to each initial brightness value in the color image can be divided into color regions to obtain the first Each initial brightness value of a designated color region and each initial brightness value of a second designated color region. In this embodiment, there are various specific manners for dividing the color regions of each pixel, which are not limited in this embodiment.
具体地,当第一指定颜色对应的颜色通道为1个时,本实施例可采用下面两种实现方式对各像素点进行颜色区域划分的具体过程进行详细的说明。Specifically, when there is one color channel corresponding to the first specified color, the following two implementation manners may be used in this embodiment to describe in detail the specific process of dividing the color regions of each pixel.
一种可行的实现方式,在初始亮度值中与第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足第一预设范围时,确定初始亮度值对应的像素点属于第一指定颜色区域。In a feasible implementation, when the sum of the differences between the color channel value corresponding to the first specified color and the remaining color channel values in the initial brightness value satisfies the first preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the first A specified color area.
在初始亮度值中与第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足第一预设范围时,确定初始亮度值对应的像素点属于第二指定颜色区域。When the sum of the differences between the color channel value corresponding to the first designated color and the remaining color channel values in the initial brightness value does not meet the first preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the second designated color area.
具体地,针对彩色图像中任一初始亮度值,该初始亮度值中包括多个颜色通道值,多个颜色通道值分别对应与不同的颜色,且存在一个颜色通道值或多个颜色通道值与第一指定颜色对应,也存在一个颜色通道值或多个颜色通道值与第二指定颜色对应。例如,RGB图像中任一初始亮度值包括三个颜色通道值,CMYK图像中任一初始亮度值包括四个颜色通道值。Specifically, for any initial brightness value in a color image, the initial brightness value includes multiple color channel values, the multiple color channel values respectively correspond to different colors, and there is one color channel value or multiple color channel values and Corresponding to the first designated color, there is also a color channel value or multiple color channel values corresponding to the second designated color. For example, any initial brightness value in an RGB image includes three color channel values, and any initial brightness value in a CMYK image includes four color channel values.
进一步地,当一个颜色对应的颜色通道为1个时,本实施例可将与第一指定颜色对应的颜色通道值与其余颜色通道值作差,得到差值之和,再确定差值之和是否在第一预设范围,若其差值之和满足第一预设范围,则说明该初始亮度值属于第一指定颜色区域,反之,该初始亮度值属于第二指定颜色区域。其中,本实施例对第一预设范围的取值范围可根据实际情况进行设定,本实施例对此不做限定。Further, when one color corresponds to one color channel, this embodiment can make a difference between the color channel value corresponding to the first specified color and the remaining color channel values to obtain the sum of the differences, and then determine the sum of the differences Whether it is in the first preset range, if the sum of the differences satisfies the first preset range, it means that the initial brightness value belongs to the first designated color area; otherwise, the initial brightness value belongs to the second designated color area. Wherein, the value range of the first preset range in this embodiment can be set according to the actual situation, which is not limited in this embodiment.
另一种可行的实现方式,在初始亮度值中与第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足第二预设范围时,确定初始亮度值对应的像素点属于第一指定颜色区域。Another feasible implementation is to determine the pixel corresponding to the initial brightness value when the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value does not meet the second preset range Belongs to the first designated color area.
在初始亮度值中与第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足第二预设范围时,确定初始像素对应的像素点属于第二指定颜色区域。When the sum of differences between the color channel value corresponding to the second designated color and the remaining color channel values in the initial brightness value satisfies a second preset range, it is determined that the pixel point corresponding to the initial pixel belongs to the second designated color area.
对应地,本实施例还可将与第二指定颜色对应的颜色通道值与其余颜色通道值作差,得到差值之和,再确定差值之和是否在第二预设范围内,若其差值之和满足第二预设范围,则说明该初始亮度值属于第二指定颜色区域,反之,该初始亮度值属于第一指定颜色区域。其中,本实施例对第二预设范围的取值范围可根据实际情况进行设定,且本实施例中第二预设范围和第一预设范围可相等,也可不等,本实施例对此不做限定。Correspondingly, this embodiment can also make a difference between the color channel value corresponding to the second designated color and other color channel values to obtain the sum of the differences, and then determine whether the sum of the differences is within the second preset range, if it is If the sum of the differences satisfies the second preset range, it means that the initial brightness value belongs to the second specified color area; otherwise, the initial brightness value belongs to the first specified color area. Wherein, in this embodiment, the value range of the second preset range can be set according to the actual situation, and in this embodiment, the second preset range and the first preset range can be equal or unequal. This is not limited.
此处需要说明的是,本实施例中差值取的是绝对值之后的差值,即差值之和一般大于或者等于0,后续关于差值的描述均满足这个条件,后续不再冗述。It should be noted here that the difference in this embodiment is the difference after the absolute value, that is, the sum of the differences is generally greater than or equal to 0, and the subsequent descriptions about the difference all meet this condition, and will not be repeated in the future. .
例如,选定红色为第一指定颜色,且红色的亮度值为(255,0,0),第一预设范围和第二预设范围取为大于160时,若某一像素点的初始亮度值为(238,58,140),则(238-58)+(238-140)=278满足第一预设范围,这样该像素点属于第一指定颜色区域。若某一像素点的初始亮度值为(0,14,39),则(14-0)+(39-0)=53,53不满足第一预设范围,这样该像素点属于第二指定颜色区域。同理,选定红色为第二指定颜色也可根据上述方式完成颜色区域的划分。For example, if red is selected as the first designated color, and the brightness value of red is (255, 0, 0), when the first preset range and the second preset range are set to be greater than 160, if the initial brightness of a certain pixel The value is (238, 58, 140), then (238-58)+(238-140)=278 satisfies the first preset range, so that the pixel belongs to the first specified color area. If the initial brightness value of a pixel is (0, 14, 39), then (14-0)+(39-0)=53, 53 does not meet the first preset range, so the pixel belongs to the second designation color area. Similarly, selecting red as the second specified color can also complete the division of color regions according to the above method.
进一步地,当第一指定颜色对应的颜色通道为2个或大于2个时,本实施例可采用下面两种实现方式对各像素点进行颜色区域划分的具体过程进行详细的说明。Further, when the number of color channels corresponding to the first specified color is 2 or more, this embodiment may adopt the following two implementation manners to describe in detail the specific process of color region division for each pixel.
一种可行的实现方式,在初始亮度值的各个颜色通道值和第一指定颜色对应的各个颜色通道值的差值之和满足第三预设范围时,确定初始亮度值对应的像素点属于第一指定颜色区域;In a feasible implementation, when the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color satisfies a third preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the first specified color. a specified color area;
在初始亮度值的各个颜色通道值和第一指定颜色对应的各个颜色通道值的差值之和不满足第三预设范围时,确定初始亮度值对应的像素点属于第二指定颜色区域。When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color does not satisfy the third preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the second specified color area.
具体地,当一个颜色对应的颜色通道为多个时,本实施例可将初始亮度值的各个颜色通道值与第一指定颜色对应的各个颜色通道值作差,得到差值之和,再确定差值之和是否在第三预设范围,若其差值之和满足第三预设范围,则说明该初始亮度值属于第一指定颜色区域,反之,该初始亮度值属于第二指定颜色区域。其中,本实施例对第三预设范围的取值范围可根据实际情况进行设定,本实施例对此不做限定。Specifically, when there are multiple color channels corresponding to one color, this embodiment can make a difference between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color to obtain the sum of the differences, and then determine Whether the sum of the differences is within the third preset range, if the sum of the differences satisfies the third preset range, it means that the initial brightness value belongs to the first designated color area, otherwise, the initial brightness value belongs to the second designated color area . Wherein, the value range of the third preset range in this embodiment can be set according to the actual situation, which is not limited in this embodiment.
另一种可行的实施方式,在初始亮度值的各个颜色通道值和第二指定颜色对应的各个颜色通道值的差值之和不满足第四预设范围时,确定初始亮度值对应的像素点属于第一指定颜色区域;In another feasible implementation manner, when the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color does not meet the fourth preset range, determine the pixel point corresponding to the initial brightness value Belongs to the first designated color zone;
在初始亮度值的各个颜色通道值和第二指定颜色对应的各个颜色通道值的差值之和满足第四预设范围时,确定初始亮度值对应的像素点属于第二指定颜色区域,When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color satisfies a fourth preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the second specified color area,
对应地,当一个颜色对应的颜色通道为多个时,本实施例可将初始亮度值的各个颜色通道值与第二指定颜色对应的各个颜色通道值作差,得到差值之和,再确定差值之和是否在第四预设范围,若其差值之和满足第四预设范围,则说明该初始亮度值属于第二指定颜色区域,反之,该初始亮度值属于第一指定颜色区域。其中,本实施例对第四预设范围的取值范围可根据实际情况进行设定,本实施例对此不做限定。Correspondingly, when there are multiple color channels corresponding to one color, this embodiment can make a difference between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color to obtain the sum of the differences, and then determine Whether the sum of the differences is in the fourth preset range, if the sum of the differences satisfies the fourth preset range, it means that the initial brightness value belongs to the second specified color area, otherwise, the initial brightness value belongs to the first specified color area . Wherein, the value range of the fourth preset range in this embodiment can be set according to the actual situation, which is not limited in this embodiment.
例如,选定紫色为第一指定颜色,且紫色的亮度值为(255,0,255),第一预设范围和第二预设范围取为大于160时,若某一像素点的初始亮度值为(238,58,140),则(255-238)+(58-0)+(255-140)=190满足第一预设范围,这样该像素点属于第一指定颜色区域。若某一像素点的初始亮度值为(255,14,201),则(255-255)+(14-0)+(255-201)=68不满足第一预设范围,这样该像素点属于第二指定颜色区域。同理,选定紫色为第二指定颜色也可根据上述方式完成颜色区域的划分。For example, if purple is selected as the first specified color, and the brightness value of purple is (255, 0, 255), when the first preset range and the second preset range are set to be greater than 160, if the initial brightness of a certain pixel If the value is (238, 58, 140), then (255-238)+(58-0)+(255-140)=190 satisfies the first preset range, so that the pixel belongs to the first designated color area. If the initial brightness value of a pixel is (255, 14, 201), then (255-255)+(14-0)+(255-201)=68 does not meet the first preset range, so the pixel Belongs to the second designated color area. Similarly, selecting purple as the second designated color can also complete the division of color regions according to the above method.
进一步地,本实施例中第一指定颜色对应的颜色通道有1个,且第二指定颜色对应的颜色通道有2个或者2个以上也可完成对各像素点进行颜色区域划分。同样地,第二指定颜色对应的颜色通道有1个,且第一指定颜色对应的颜色通道有2个或者2个以上亦可完成对各像素点进行颜色区域划分。本实施例中不限定第一指定颜色和第二指定颜色对应的颜色通道的个数。Further, in this embodiment, there is one color channel corresponding to the first specified color, and there are two or more color channels corresponding to the second specified color, which can also complete the color area division of each pixel. Similarly, there is one color channel corresponding to the second specified color, and there are two or more color channels corresponding to the first specified color, so that the color region division of each pixel can be completed. In this embodiment, the number of color channels corresponding to the first specified color and the second specified color is not limited.
接着,本实施例S204中对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值的具体实现方式有多种,本实施例对此不做限定。本领域技术人员可以理解,第一种情况,当第一指定颜色为彩色时,第二指定颜色可为彩色,也可为非彩色。第二中情况,当第二指定颜色为彩色时,第一指定颜色可为彩色,也可为非彩色。本实施例以第一种情况为例,对得到双色图像的各目标亮度值的具体方式进行详细的说明。Next, in S204 of this embodiment, the color replacement process is performed on each initial brightness value to obtain each target brightness value of the two-color image. There are many specific implementation manners, which are not limited in this embodiment. Those skilled in the art can understand that in the first case, when the first specified color is chromatic, the second specified color can be chromatic or achromatic. In the second case, when the second specified color is chromatic, the first specified color can be either chromatic or achromatic. In this embodiment, the first case is taken as an example to describe in detail the specific manner of obtaining each target brightness value of the two-color image.
一方面,当第一指定颜色为彩色时,将第一指定颜色区域的初始亮度值中与第一指定颜色对应的颜色通道值设置为最大颜色通道值,且将第一指定颜色区域的初始亮度值中其余颜色通道值均设置为第一预设颜色通道值,得到双色图像的目标亮度值。On the one hand, when the first specified color is a color, set the color channel value corresponding to the first specified color in the initial brightness value of the first specified color area as the maximum color channel value, and set the initial brightness of the first specified color area to The remaining color channel values in the value are all set to the first preset color channel value to obtain the target brightness value of the two-color image.
具体地,当彩色图像的类型为RGB图像时,若确定初始亮度值对应的像素点属于第一指定颜色区域,且第一指定颜色为红色,以红色的亮度值中各个颜色通道值为r的颜色通道值为255,g的颜色通道值和b的颜色通道值均为0为例,则初始亮度值对应的目标像素值中,r的颜色通道值为255,g的颜色通道值和b的颜色通道值为第一预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点属于红色区域。Specifically, when the type of the color image is an RGB image, if it is determined that the pixel point corresponding to the initial brightness value belongs to the first designated color area, and the first designated color is red, the value of each color channel in the red brightness value is r The color channel value is 255, the color channel value of g and the color channel value of b are both 0 as an example, then in the target pixel value corresponding to the initial brightness value, the color channel value of r is 255, the color channel value of g and b’s The color channel value is the first preset color channel value. In this way, color replacement is performed on the initial brightness value of the pixel, so that the pixel corresponding to the target brightness value belongs to the red area.
进一步地,当彩色图像的类型为CMYK图像时,若确定初始亮度值对应的像素点属于第一指定颜色区域,且第一指定颜色选为红色,以红色的亮度值中各个颜色通道值为c的颜色通道值和k的颜色通道值均为0,m的颜色通道值和y的颜色通道值均为100为例,则初始亮度值对应目标亮度值中,m的颜色通道值和y的颜色通道值均为100,c的颜色通道值和k的颜色通道值为第一预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点便属于红色区域。Further, when the type of the color image is a CMYK image, if it is determined that the pixel point corresponding to the initial brightness value belongs to the first designated color area, and the first designated color is selected as red, the value of each color channel in the red brightness value is c The color channel value of and the color channel value of k are both 0, the color channel value of m and the color channel value of y are both 100 as an example, then the initial brightness value corresponds to the color channel value of m and the color of y in the target brightness value The channel values are both 100, the color channel value of c and the color channel value of k are the first preset color channel value, so that the initial brightness value of the pixel is replaced by color, so that the pixel corresponding to the target brightness value It belongs to the red area.
另一方面,当第二指定颜色为彩色时,将第二指定颜色区域的初始亮度值中与第二指定颜色对应的颜色通道值设置为最大颜色通道值,且将第二指定颜色区域的初始亮度值中其余颜色通道值均设置为第二预设颜色通道值,得到双色图像的目标亮度值。On the other hand, when the second specified color is chromatic, set the color channel value corresponding to the second specified color in the initial brightness value of the second specified color area as the maximum color channel value, and set the initial brightness value of the second specified color area to The rest of the color channel values in the brightness value are all set to the second preset color channel value to obtain the target brightness value of the two-color image.
当第二指定颜色为非彩色时,将第二指定颜色区域的初始亮度值中所有颜色通道值均设置为第三预设颜色通道值,得到双色图像的目标亮度值。When the second designated color is achromatic, all color channel values in the initial brightness value of the second designated color area are set to the third preset color channel value to obtain the target brightness value of the two-color image.
具体地,当彩色图像的类型为RGB图像时,若确定初始亮度值对应的像素点属于第二指定颜色区域,且第二指定颜色为蓝色,以蓝色的亮度值中各个颜色通道值为r的颜色通道值和g的颜色通道值均为0,b的颜色通道值为255为例,则初始亮度值中,b的颜色通道值为255,r的颜色通道值和g的颜色通道值均为第二预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点属于蓝色区域。Specifically, when the type of the color image is an RGB image, if it is determined that the pixel point corresponding to the initial brightness value belongs to the second specified color area, and the second specified color is blue, the value of each color channel in the blue brightness value is The color channel value of r and the color channel value of g are both 0, and the color channel value of b is 255 as an example, then in the initial brightness value, the color channel value of b is 255, the color channel value of r and the color channel value of g are the second preset color channel values, so that the initial brightness value of the pixel is replaced by color, so that the pixel corresponding to the target brightness value belongs to the blue area.
进一步地,当彩色图像的类型为CMYK图像时,若确定初始亮度值对应的像素点属于第二指定颜色区域,且第二指定颜色选为蓝色,以蓝色的亮度值中各个颜色通道值为c的颜色通道值和m的颜色通道值均为100,y的颜色通道值和k的颜色通道值均为0为例,则初始亮度值中,c的颜色通道值和m的颜色通道值为100,y的颜色通道值和k的颜色通道值为第二预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点属于蓝色区域。Further, when the type of the color image is a CMYK image, if it is determined that the pixel point corresponding to the initial brightness value belongs to the second specified color area, and the second specified color is selected as blue, the value of each color channel in the blue brightness value The color channel value of c and the color channel value of m are both 100, the color channel value of y and the color channel value of k are both 0 as an example, then in the initial brightness value, the color channel value of c and the color channel value of m is 100, the color channel value of y and the color channel value of k are the second preset color channel value, so that the initial brightness value of the pixel is replaced by color, so that the pixel corresponding to the target brightness value belongs to blue area.
进一步地,当彩色图像的类型为RGB图像时,若确定初始亮度值对应的像素点属于第二指定颜色区域,且第二指定颜色为黑色,则初始亮度值中,r的颜色通道值、b的颜色通道值和g的颜色通道值均为第三预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点属于黑色区域。Further, when the type of the color image is an RGB image, if it is determined that the pixel corresponding to the initial brightness value belongs to the second specified color area, and the second specified color is black, then in the initial brightness value, the color channel value of r, b The color channel value of and the color channel value of g are both the third preset color channel value, so that the initial brightness value of the pixel is replaced by color, so that the pixel corresponding to the target brightness value belongs to the black area.
进一步地,当彩色图像的类型为CMYK图像时,若确定初始亮度值对应的像素点属于第二指定颜色区域,且第二指定颜色选为黑色,则初始亮度值中,c的颜色通道值、m的颜色通道值、y的颜色通道值和k的颜色通道值为第三预设颜色通道值,这样,便对该像素点的初始亮度值进行颜色替换,使得该目标亮度值对应的像素点属于黑色区域。Further, when the type of the color image is a CMYK image, if it is determined that the pixel point corresponding to the initial brightness value belongs to the second specified color area, and the second specified color is selected as black, then in the initial brightness value, the color channel value of c, The color channel value of m, the color channel value of y and the color channel value of k are the third preset color channel value, so that the initial brightness value of the pixel is replaced by color, so that the pixel corresponding to the target brightness value belong to the black area.
其中,本实施例对第一预设颜色通道值、第二预设颜色通道值和第三预设颜色通道值的具体实现方式和大小不做限定。可选地,第一预设颜色通道值、第二预设颜色通道值为初始亮度值中所有颜色通道值的最大值、最小值和平均值中的任一,第三预设颜色通道值为初始亮度值中所有颜色通道值的最小值或平均值。Wherein, this embodiment does not limit the specific implementation manner and size of the first preset color channel value, the second preset color channel value, and the third preset color channel value. Optionally, the first preset color channel value and the second preset color channel value are any of the maximum value, minimum value and average value of all color channel values in the initial brightness value, and the third preset color channel value is The minimum or average of all color channel values in the initial luminosity value.
最后,采用上述颜色替换得到双色图像的过程中,各目标亮度值对应的像素点中可能会出现一些错误的白色区域,即当彩色图像中初始像素点的亮度值较浅时,经过颜色替换处理后,容易将其替换为白色像素点,从而导致图像内容丢失,给用户带来不便,因此,为了提高颜色还原的准确率,下面结合图3,本实施例对双色图像生成方法的具体实现方式进行详细的说明。Finally, in the process of using the above color replacement to obtain a two-color image, some wrong white areas may appear in the pixels corresponding to each target brightness value, that is, when the brightness value of the initial pixel point in the color image is lighter, after color replacement processing Afterwards, it is easy to replace it with white pixels, thereby causing the image content to be lost and causing inconvenience to the user. Therefore, in order to improve the accuracy of color restoration, below in conjunction with FIG. 3, the specific implementation of the two-color image generation method in this embodiment Give a detailed explanation.
图3为本发明提供的双色图像生成方法的流程图三,如图3所示,本实施例的双色图像生成方法可以包括:Fig. 3 is a flow chart three of the method for generating a two-color image provided by the present invention. As shown in Fig. 3, the method for generating a two-color image in this embodiment may include:
S301、获取彩色图像中每个像素点的初始亮度值。S301. Acquire an initial brightness value of each pixel in the color image.
S302、根据彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值。S302. Determine the brightness value of the first specified color and the brightness value of the second specified color according to the type of the color image.
S303、根据各初始亮度值、第一指定颜色的亮度值以及第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。S303. According to each initial brightness value, the brightness value of the first specified color, and the brightness value of the second specified color, perform color replacement processing on each initial brightness value to obtain each target brightness value of the two-color image.
其中,S301、S302和S303分别与图1实施例中的S101、S102和S103的实现方式类似,本实施例此处不再赘述。Wherein, S301, S302, and S303 are respectively similar to S101, S102, and S103 in the embodiment of FIG.
进一步地,本实施例中对目标亮度值对应的初始亮度值进行颜色修正处理,且将目标亮度值替换为修正后的初始亮度值的具体实现方式具有多种,本实施例对此不做限定。Further, in this embodiment, the color correction process is performed on the initial brightness value corresponding to the target brightness value, and there are many specific implementation methods for replacing the target brightness value with the corrected initial brightness value, which is not limited in this embodiment .
S304、获取得到的双色图像中满足预设条件的目标亮度值,其中,预设条件为目标亮度值中的所有颜色通道值均为颜色通道值的极值,且目标亮度值对应的初始亮度值中的所有颜色通道值不全相等。S304. Obtain the target brightness value satisfying the preset condition in the obtained two-color image, wherein the preset condition is that all the color channel values in the target brightness value are extreme values of the color channel values, and the target brightness value corresponds to an initial brightness value Not all color channel values in are equal.
S305、对目标亮度值进行颜色修正处理,将目标亮度值替换为修正后的亮度值。S305. Perform color correction processing on the target brightness value, and replace the target brightness value with the corrected brightness value.
具体地,本实施例中颜色通道值的极值不做限定。当颜色图像类型为RGB时,预设条件为目标亮度值中的所有颜色通道值均为颜色通道值的最大值,目标像素值对应的初始像素值中的所有颜色通道值不全相等;当图像类型为CMYK时,预设条件为目标亮度值中的所有颜色通道值均为颜色通道值的最小值,目标像素值对应的初始像素值中的所有颜色通道值不全相等。Specifically, the extreme values of the color channel values in this embodiment are not limited. When the color image type is RGB, the preset condition is that all the color channel values in the target brightness value are the maximum value of the color channel value, and all the color channel values in the initial pixel value corresponding to the target pixel value are not all equal; when the image type When it is CMYK, the preset condition is that all the color channel values in the target brightness value are the minimum value of the color channel value, and all the color channel values in the initial pixel value corresponding to the target pixel value are not all equal.
进一步地,在已经得到的双色图像中,本实施例可获取所有颜色通道值均为颜色通道值的极值,且目标像素值对应的初始亮度值中的所有颜色通道值不全相等对应的目标亮度值,即这些像素点经过颜色替换处理后变成白色像素点,因此,本实施例便可对这些目标亮度值进行颜色修正处理,且将目标亮度值替换为修正后的亮度值,使得这些像素点能够在双色图像中显示出,从而解决彩色图像的内容丢失的问题。Furthermore, in the two-color image that has been obtained, this embodiment can obtain the target brightness corresponding to all color channel values that are extreme values of color channel values, and all color channel values in the initial brightness value corresponding to the target pixel value are not all equal Values, that is, these pixels become white pixels after color replacement processing. Therefore, this embodiment can perform color correction processing on these target brightness values, and replace the target brightness values with the corrected brightness values, so that these pixels Dots can be displayed in a two-color image, thereby solving the problem of color image content loss.
可选地,将目标亮度值中与第一指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第四预设颜色通道值;或者,Optionally, set the color channel value corresponding to the first specified color in the target brightness value as the maximum color channel value, and set the remaining color channel values as the fourth preset color channel value; or,
将目标亮度值中与第二指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第五预设颜色通道值。Set the color channel value corresponding to the second specified color in the target brightness value as the maximum color channel value, and set the other color channel values as the fifth preset color channel value.
例如,当彩色图像类型为RGB时,当第一指定颜色为红色时,经过颜色替换处理的像素点的像素值为(255,255,255),但对应的初始像素点的像素值为(0,255,255),由于(255-0)+(255-0)=510,510满足第一预设范围(如大于160),即对应的初始像素点属于红色区域,经过颜色替换后,该初始像素点对应的目标像素点为(255,255,255)为全白像素点,不属于第一颜色区域,出现了图像内容丢失,因此,需要进行颜色修正处理,具体地,将目标像素点的像素值(255,255,255)修正为(255,0,0),从而使得经过颜色修正后的像素点与对应的初始像素点属于同一颜色区域。For example, when the color image type is RGB, when the first specified color is red, the pixel value of the pixel after the color replacement process is (255, 255, 255), but the pixel value of the corresponding initial pixel is (0 , 255, 255), since (255-0)+(255-0)=510, 510 satisfies the first preset range (such as greater than 160), that is, the corresponding initial pixel belongs to the red area, after color replacement, the The target pixel corresponding to the initial pixel is (255, 255, 255) which is an all-white pixel, which does not belong to the first color area, and the image content is lost. Therefore, color correction processing is required. Specifically, the target pixel The pixel value of (255, 255, 255) is corrected to (255, 0, 0), so that the color-corrected pixel and the corresponding initial pixel belong to the same color region.
进一步地,当彩色图像类型为CMYK时,当第一指定颜色为红色时,红色对应的CMYK值为(0,100,100,0),经过颜色替换处理的像素点的像素值为(0,0,0,0),但对应的初始像素点的像素值为(0,0,100,100),由于(0-0)+(100-0)+(100-100)+(100-0)=200,200满足第一预设范围(如大于160),即对应的初始像素点属于红色区域,经过颜色替换后,该初始像素点对应的目标像素点为(0,0,0,0)为全白像素点,不属于第一颜色区域,出现了图像内容丢失,因此,需要进行颜色修正处理,具体地,将目标像素点的像素值(0,0,0,0)修正为(0,100,100,0),从而使得经过颜色修正后的像素点与对应的初始像素点属于同一颜色区域。Further, when the color image type is CMYK, when the first designated color is red, the CMYK value corresponding to red is (0, 100, 100, 0), and the pixel value of the pixel point processed by color replacement is (0, 0, 0, 0), but the pixel value of the corresponding initial pixel point is (0, 0, 100, 100), because (0-0)+(100-0)+(100-100)+(100-0 )=200, 200 satisfies the first preset range (such as greater than 160), that is, the corresponding initial pixel point belongs to the red area, after color replacement, the target pixel point corresponding to the initial pixel point is (0, 0, 0, 0 ) is an all-white pixel point, which does not belong to the first color area, and the image content is lost. Therefore, color correction processing is required, specifically, the pixel value (0, 0, 0, 0) of the target pixel point is corrected to ( 0, 100, 100, 0), so that the color-corrected pixel and the corresponding initial pixel belong to the same color region.
其中,本实施例对第四预设颜色通道值和第五预设颜色通道值的具体实现方式不做限定。可选地,第四预设颜色通道值和第五预设颜色通道值为与目标亮度值对应的初始亮度值中所有颜色通道值的最小值或平均值。Wherein, this embodiment does not limit the specific implementation manners of the fourth preset color channel value and the fifth preset color channel value. Optionally, the fourth preset color channel value and the fifth preset color channel value are the minimum value or the average value of all the color channel values in the initial brightness value corresponding to the target brightness value.
进一步地,本实施例能够有效地将双色图像中可能会出现错误白色区域对应的图像进行修正,使得各目标亮度值更加精准,提高了双色图像的画像品质,避免了颜色丢失的现象。Further, this embodiment can effectively correct the image corresponding to the white area that may appear in the two-color image, making each target brightness value more accurate, improving the image quality of the two-color image, and avoiding the phenomenon of color loss.
在一个具体的实施例中,以彩色图像为RGB图像,红色和黑色分别为第一指定颜色和第二指定颜色,根据各初始亮度值和红色的亮度值的差值是否满足第一预设范围,且第一预设范围和第二预设范围均取大于160,第一预设颜色通道和第二预设颜色通道均为各初始亮度值中所有颜色通道值的最大值为例,对本实施例中的双色图像生成方法进行详细的说明。In a specific embodiment, the color image is an RGB image, and red and black are respectively the first specified color and the second specified color, according to whether the difference between each initial brightness value and the brightness value of red satisfies the first preset range , and both the first preset range and the second preset range are greater than 160, the first preset color channel and the second preset color channel are the maximum value of all color channel values in each initial brightness value as an example, for this implementation The two-color image generation method in the example is described in detail.
1、获取RGB图像中每个像素点的初始亮度值,如仅取三像素点为例,第一像素点的初始亮度值为RGB值(238,48,167)和第二像素点的初始亮度值为RGB值(92,72,38)以及第三像素点的初始亮度值为RGB值(72,118,255)。1. Obtain the initial brightness value of each pixel in the RGB image. If only three pixels are taken as an example, the initial brightness value of the first pixel is the RGB value (238, 48, 167) and the initial brightness of the second pixel The value is RGB value (92, 72, 38) and the initial brightness value of the third pixel is RGB value (72, 118, 255).
2、根据RGB图像的类型,确定红色的亮度值为RGB值(255,0,0),黑色的亮度值为RGB值(0,0,0)。2. According to the type of the RGB image, determine that the brightness value of red is RGB value (255, 0, 0), and the brightness value of black is RGB value (0, 0, 0).
3、计算第一像素点的初始亮度值为RGB值(238,48,167)中与红色对应的颜色通道值与其余颜色通道的差值之和为(238-48)+(238-167)=261>160,满足第一预设范围,则第一像素点属于红色区域。3. Calculate the initial luminance value of the first pixel. The sum of the difference between the color channel value corresponding to red and the remaining color channels in the RGB value (238, 48, 167) is (238-48)+(238-167) =261>160, if the first preset range is satisfied, then the first pixel point belongs to the red area.
计算第二像素点的初始亮度值(92,72,38)中与红色对应的颜色通道值与其余颜色通道的差值之和为(92-72)+(92-38)=74<160,不满足第一预设范围,则第二像素点属于黑色区域。Calculate the sum of the difference between the color channel value corresponding to red and the remaining color channels in the initial brightness value (92,72,38) of the second pixel point as (92-72)+(92-38)=74<160, If the first preset range is not satisfied, the second pixel belongs to the black area.
计算第三像素点的初始亮度值(72,118,255)中与红色对应的颜色通道值与其余颜色通道的差值之和为(118-72)+(255-72)=229,229>160,满足第一预设范围,则第三像素点属于红色区域。Calculate the sum of the difference between the color channel value corresponding to red and the remaining color channels in the initial brightness value (72, 118, 255) of the third pixel point as (118-72)+(255-72)=229, 229> 160. If the first preset range is met, the third pixel belongs to the red area.
4、将第一像素点的初始亮度值(238,48,167)中的r的颜色通道值设置为255,g的颜色通道值和b的颜色通道值为167,则第一像素点的目标亮度值为(255,167,167)。4. Set the color channel value of r in the initial brightness value (238, 48, 167) of the first pixel to 255, the color channel value of g and the color channel value of b to 167, then the target of the first pixel Brightness values are (255, 167, 167).
将第二像素点的初始亮度值(92,72,38)中的r的颜色通道值、g的颜色通道值以及b的颜色通道值设置为92,则第二像素点的目标亮度值为(92,92,92)。Set the color channel value of r, the color channel value of g and the color channel value of b in the initial brightness value (92, 72, 38) of the second pixel to 92, then the target brightness value of the second pixel is ( 92, 92, 92).
将第三像素点的初始亮度值(72,118,255)中的r的颜色通道值设置为255,将g的颜色通道值以及d的颜色通道值设置均为255,则第三像素点的目标亮度值为(255,255,255)。Set the color channel value of r in the initial brightness value (72, 118, 255) of the third pixel to 255, set the color channel value of g and the color channel value of d to 255, then the third pixel's The target brightness value is (255, 255, 255).
5、将彩色图像中其余初始亮度值按照步骤3和4的方式进行区域划分和颜色替换处理,得到双色图像中的各目标亮度值。5. Perform region division and color replacement processing on the rest of the initial brightness values in the color image according to steps 3 and 4, to obtain each target brightness value in the two-color image.
6、第三像素点的目标亮度值标识为白色的亮度值,因此,还需对第三像素点的目标亮度值进行颜色修正处理,将第三像素点的初始亮度值(72,118,255)中的r的颜色通道值设置为255,g的颜色通道值以及b的颜色通道值设置为最小值118,则第三目标亮度值为(255,118,118),属于红色区域。6. The target luminance value of the third pixel is marked as the luminance value of white, therefore, it is necessary to perform color correction processing on the target luminance value of the third pixel, and the initial luminance value of the third pixel (72, 118, 255 The color channel value of r in ) is set to 255, the color channel value of g and the color channel value of b are set to the minimum value of 118, then the third target brightness value is (255, 118, 118), which belongs to the red area.
本发明实施例提供一种计算机可读存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现本发明上述各方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。An embodiment of the present invention provides a computer-readable storage medium, including: a readable storage medium and a computer program, the computer program is used to implement the technical solutions of the above-mentioned method embodiments of the present invention, and its implementation principle and technical effect are similar. Here, I won't repeat them here.
图4为本发明提供的双色图像生成装置的结构示意图一,如图4所示,本实施例的双色图像生成装置可以包括:Fig. 4 is a schematic structural diagram of a two-color image generating device provided by the present invention. As shown in Fig. 4, the two-color image generating device of this embodiment may include:
获取模块11,用于获取彩色图像中每个像素点的初始亮度值;An acquisition module 11, configured to acquire the initial brightness value of each pixel in the color image;
确定模块12,用于根据所述彩色图像的类型,确定第一指定颜色的亮度值和第二指定颜色的亮度值;A determining module 12, configured to determine a brightness value of a first specified color and a brightness value of a second specified color according to the type of the color image;
处理模块13,用于根据各初始亮度值、所述第一指定颜色的亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。A processing module 13, configured to perform color replacement processing on each initial brightness value according to each initial brightness value, the brightness value of the first designated color, and the brightness value of the second designated color, to obtain each target brightness value of the two-color image .
可选地,所述处理模块13包括:划分单元131和替换单元132;Optionally, the processing module 13 includes: a division unit 131 and a replacement unit 132;
所述划分单元131,用于根据各初始亮度值以及所述第一指定颜色的亮度值,或者,根据各初始亮度值以及所述第二指定颜色的亮度值,对各初始亮度值进行颜色区域划分,得到第一指定颜色区域和第二指定颜色区域;The dividing unit 131 is configured to carry out color division of each initial brightness value according to each initial brightness value and the brightness value of the first designated color, or according to each initial brightness value and the brightness value of the second designated color. Divide to obtain the first specified color area and the second specified color area;
所述替换单元132,用于分别对所述第一指定颜色区域的各初始亮度值和所述第二指定颜色区域的各初始亮度值进行颜色替换处理,得到双色图像的各目标亮度值。The replacement unit 132 is configured to perform color replacement processing on each initial brightness value of the first designated color region and each initial brightness value of the second designated color region to obtain each target brightness value of the two-color image.
可选地,所述划分单元131,具体用于当所述第一指定颜色对应的颜色通道为1个时,在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足第一预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;Optionally, the dividing unit 131 is specifically configured to, when there is one color channel corresponding to the first specified color, the value of the color channel corresponding to the first specified color in the initial brightness value and the rest When the sum of the differences of the color channel values satisfies the first preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the first designated color area;
在所述初始亮度值中与所述第一指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足所述第一预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between the color channel value corresponding to the first designated color and the remaining color channel values in the initial brightness value does not meet the first preset range, determine the pixel point corresponding to the initial brightness value Belongs to said second designated color zone;
当所述第二指定颜色对应的颜色通道为1个时,在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和不满足第二预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When there is one color channel corresponding to the second specified color, the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value does not satisfy the second predetermined value. When setting the range, it is determined that the pixel point corresponding to the initial brightness value belongs to the first specified color area;
在所述初始亮度值中与所述第二指定颜色对应的颜色通道值和其余颜色通道值的差值之和满足所述第二预设范围时,确定所述初始像素对应的像素点属于所述第二指定颜色区域。When the sum of the differences between the color channel value corresponding to the second specified color and the remaining color channel values in the initial brightness value satisfies the second preset range, it is determined that the pixel point corresponding to the initial pixel belongs to the the second specified color area.
可选地,所述划分单元131,具体还用于当所述第一指定颜色对应的颜色通道为2个或大于2个时,在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;Optionally, the dividing unit 131 is specifically further configured to, when the number of color channels corresponding to the first designated color is 2 or greater, between each color channel value of the initial brightness value and the first color channel value When the sum of the difference values of the respective color channel values corresponding to the specified color satisfies a third preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the first specified color area;
在所述初始亮度值的各个颜色通道值和所述第一指定颜色对应的各个颜色通道值的差值之和不满足第三预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域;When the sum of the differences between each color channel value of the initial brightness value and each color channel value corresponding to the first specified color does not meet the third preset range, it is determined that the pixel point corresponding to the initial brightness value belongs to the the second designated color area;
当所述第二指定颜色对应的颜色通道为2个或大于2个时,在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和不满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第一指定颜色区域;When the number of color channels corresponding to the second designated color is 2 or more than 2, the sum of the differences between the values of the respective color channels of the initial brightness value and the values of the respective color channels corresponding to the second designated color is not When the fourth preset range is satisfied, it is determined that the pixel corresponding to the initial brightness value belongs to the first designated color region;
在所述初始亮度值的各个颜色通道值和所述第二指定颜色对应的各个颜色通道值的差值之和满足第四预设范围时,确定所述初始亮度值对应的像素点属于所述第二指定颜色区域。When the sum of the difference between each color channel value of the initial brightness value and each color channel value corresponding to the second specified color satisfies the fourth preset range, it is determined that the pixel corresponding to the initial brightness value belongs to the The second specifies the color region.
可选地,所述替换单元132,具体用于当所述第一指定颜色为彩色时,将所述第一指定颜色区域的初始亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第一指定颜色区域的初始亮度值中其余颜色通道值均设置为第一预设颜色通道值,得到所述双色图像的目标亮度值;Optionally, the replacement unit 132 is specifically configured to set the color channel value corresponding to the first specified color in the initial brightness value of the first specified color region when the first specified color is a color is the maximum color channel value, and the remaining color channel values in the initial brightness value of the first specified color area are all set as the first preset color channel value to obtain the target brightness value of the two-color image;
当所述第二指定颜色为彩色时,将所述第二指定颜色区域的初始亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,且将所述第二指定颜色区域的初始亮度值中其余颜色通道值均设置为第二预设颜色通道值,得到所述双色图像的目标亮度值;或者,When the second specified color is a color, set the color channel value corresponding to the second specified color in the initial brightness value of the second specified color area as the maximum color channel value, and set the second specified color to The remaining color channel values in the initial brightness value of the color area are all set to the second preset color channel value to obtain the target brightness value of the two-color image; or,
当所述第二指定颜色为非彩色时,将所述第二指定颜色区域的初始亮度值中所有颜色通道值均设置为第三预设颜色通道值,得到所述双色图像的目标亮度值。When the second designated color is an achromatic color, all color channel values in the initial brightness value of the second designated color area are set as the third preset color channel value to obtain the target brightness value of the two-color image.
可选地,所述第一预设颜色通道值、所述第二预设颜色通道值为所述初始亮度值中所有颜色通道值的最大值、最小值和平均值中的任一,所述第三预设颜色通道值为所述初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the first preset color channel value and the second preset color channel value are any one of the maximum value, minimum value and average value of all color channel values in the initial brightness value, the The third preset color channel value is a minimum value or an average value of all color channel values in the initial brightness value.
图5为本发明提供的双色图像生成装置的结构示意图二,如图5所示,本实施例的双色图像生成装置在图4所示装置结构的基础上,还包括:Fig. 5 is a structural schematic diagram II of the two-color image generating device provided by the present invention. As shown in Fig. 5, the two-color image generating device of this embodiment further includes:
所述获取模块11,还用于获取得到的所述双色图像中满足预设条件的目标亮度值,其中,所述预设条件为所述目标亮度值中的所有颜色通道值均为颜色通道值的极值,且所述目标亮度值对应的初始亮度值中的所有颜色通道值不全相等;The acquiring module 11 is further configured to acquire target luminance values in the obtained two-color image that satisfy a preset condition, wherein the preset condition is that all color channel values in the target luminance value are color channel values , and all color channel values in the initial brightness value corresponding to the target brightness value are not all equal;
修正模块14,用于对所述目标亮度值进行颜色修正处理,将所述目标亮度值替换为修正后的亮度值。The correction module 14 is configured to perform color correction processing on the target brightness value, and replace the target brightness value with a corrected brightness value.
可选地,所述修正模块14,具体用于将所述目标亮度值中与所述第一指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第四预设颜色通道值;或者,Optionally, the correction module 14 is specifically configured to set the color channel value corresponding to the first specified color in the target brightness value as the maximum color channel value, and set the remaining color channel values as the fourth preset color channel value; or,
当所述第二指定颜色为彩色时,将所述目标亮度值中与所述第二指定颜色对应的颜色通道值设置为最大颜色通道值,其余颜色通道值均设置为第五预设颜色通道值。When the second designated color is color, set the color channel value corresponding to the second designated color in the target brightness value as the maximum color channel value, and set the remaining color channel values as the fifth preset color channel value.
可选地,所述第四预设颜色通道值和所述第五预设颜色通道值为与所述目标亮度值对应的初始亮度值中所有颜色通道值的最小值或平均值。Optionally, the fourth preset color channel value and the fifth preset color channel value are a minimum value or an average value of all color channel values in the initial brightness value corresponding to the target brightness value.
本实施例的双色图像生成装置,可以用于执行上述双色图像生成方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The two-color image generation device of this embodiment can be used to implement the technical solution of the above-mentioned two-color image generation method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
本发明中可以根据上述方法示例对双色图像生成装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本发明各实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the present invention, the functional modules of the two-color image generating device can be divided according to the above method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in each embodiment of the present invention is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
图6为本发明提供的双色图像生成装置的结构示意图三,如图6所示,本实施例的双色图像生成装置可以包括:Fig. 6 is a structural schematic diagram III of a two-color image generating device provided by the present invention. As shown in Fig. 6, the two-color image generating device of this embodiment may include:
处理器21;以及processor 21; and
存储器22,用于存储所述处理器21的可执行指令;a memory 22, configured to store executable instructions of the processor 21;
其中,所述处理器21配置为经由执行所述可执行指令来执行上述所述的双色图像生成方法。Wherein, the processor 21 is configured to execute the above-mentioned two-color image generation method by executing the executable instructions.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above method embodiments can be completed by program instructions and related hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810088380.7A CN108304147B (en) | 2018-01-30 | 2018-01-30 | Two-color image generation method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810088380.7A CN108304147B (en) | 2018-01-30 | 2018-01-30 | Two-color image generation method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108304147A true CN108304147A (en) | 2018-07-20 |
| CN108304147B CN108304147B (en) | 2021-02-19 |
Family
ID=62867216
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810088380.7A Active CN108304147B (en) | 2018-01-30 | 2018-01-30 | Two-color image generation method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108304147B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110473282A (en) * | 2019-08-22 | 2019-11-19 | 腾讯科技(深圳)有限公司 | Dyeing treatment, device, computer equipment and the storage medium of object model |
| WO2022150968A1 (en) * | 2021-01-12 | 2022-07-21 | 深圳市艾比森光电股份有限公司 | Marker display method and relevant product |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101150653A (en) * | 2006-09-20 | 2008-03-26 | 村田机械株式会社 | Image processing apparatus and image processing method |
| CN102055882A (en) * | 2009-10-30 | 2011-05-11 | 夏普株式会社 | Image processing apparatus, image forming apparatus, image processing method, and computer-readable recording medium on which image processing program is recorded |
| CN102710888A (en) * | 2011-03-28 | 2012-10-03 | 富士施乐株式会社 | Bi-color -image-signal generating apparatus, image forming system, bi-color -image-signal generation method, and computer-readable medium |
| US9324010B2 (en) * | 2014-07-15 | 2016-04-26 | Canon Kabushiki Kaisha | Image forming apparatus |
| CN205249321U (en) * | 2015-09-28 | 2016-05-18 | 天津光电通信技术有限公司 | Print data system |
| CN106340025A (en) * | 2016-08-28 | 2017-01-18 | 张朝阳 | Background replacement visual communication method based on chromatic adaptation transformation |
| CN107580158A (en) * | 2017-10-17 | 2018-01-12 | 珠海奔图电子有限公司 | Image color edge removal method and device |
-
2018
- 2018-01-30 CN CN201810088380.7A patent/CN108304147B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101150653A (en) * | 2006-09-20 | 2008-03-26 | 村田机械株式会社 | Image processing apparatus and image processing method |
| CN102055882A (en) * | 2009-10-30 | 2011-05-11 | 夏普株式会社 | Image processing apparatus, image forming apparatus, image processing method, and computer-readable recording medium on which image processing program is recorded |
| CN102710888A (en) * | 2011-03-28 | 2012-10-03 | 富士施乐株式会社 | Bi-color -image-signal generating apparatus, image forming system, bi-color -image-signal generation method, and computer-readable medium |
| US9324010B2 (en) * | 2014-07-15 | 2016-04-26 | Canon Kabushiki Kaisha | Image forming apparatus |
| CN205249321U (en) * | 2015-09-28 | 2016-05-18 | 天津光电通信技术有限公司 | Print data system |
| CN106340025A (en) * | 2016-08-28 | 2017-01-18 | 张朝阳 | Background replacement visual communication method based on chromatic adaptation transformation |
| CN107580158A (en) * | 2017-10-17 | 2018-01-12 | 珠海奔图电子有限公司 | Image color edge removal method and device |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110473282A (en) * | 2019-08-22 | 2019-11-19 | 腾讯科技(深圳)有限公司 | Dyeing treatment, device, computer equipment and the storage medium of object model |
| WO2022150968A1 (en) * | 2021-01-12 | 2022-07-21 | 深圳市艾比森光电股份有限公司 | Marker display method and relevant product |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108304147B (en) | 2021-02-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5553139B2 (en) | Image processing apparatus and image processing program | |
| CN102211476B (en) | Image processing apparatus | |
| KR20190013657A (en) | Image processing apparatus, image processing method, and storage medium | |
| CN101123669A (en) | Image conversion method and device, and imaging device having same | |
| KR20180087842A (en) | Image processing apparatus and method for controlling the same | |
| JP5095667B2 (en) | Output instruction apparatus, image forming system, output instruction method, control program, and recording medium therefor | |
| JP2017126869A (en) | Image processing apparatus, image processing method, and program | |
| US20160165094A1 (en) | Image processing device, image forming system, image processing method, and computer program product | |
| JP6107706B2 (en) | Data processing apparatus and computer program | |
| JP2010016661A (en) | Image processing device | |
| CN108304147B (en) | Two-color image generation method and device | |
| US9218552B2 (en) | Image processing apparatus and image processing method | |
| US8743422B2 (en) | Image processing apparatus, image processing method, image processing program and printing device | |
| JP6087334B2 (en) | Image processing apparatus and image forming apparatus | |
| JP5625664B2 (en) | Image processing apparatus, image processing method, image forming apparatus, and image processing program | |
| JP2020187665A (en) | Color conversion method, color conversion device, and program | |
| JP2006094039A (en) | Image processor, processing method and program | |
| JP2021192489A (en) | Image forming apparatus, method for controlling image forming apparatus, and program | |
| JP2016139868A (en) | Image processing apparatus | |
| JP7490447B2 (en) | Image processing device, control method thereof, and program | |
| US11531855B2 (en) | Image processing apparatus, image processing method, and storage medium | |
| JP2015051610A (en) | Image forming apparatus and image processing method in image forming apparatus | |
| JP2005210339A (en) | Image processing apparatus, print control apparatus, image processing method, and image processing program | |
| JP2009159284A (en) | Color data conversion apparatus, color data conversion method and color data conversion program | |
| JP2018107649A (en) | Image processing device and computer program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |