WO2022160945A1 - 一种渐变颜色效果处理方法、装置、设备及存储介质 - Google Patents

一种渐变颜色效果处理方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022160945A1
WO2022160945A1 PCT/CN2021/135952 CN2021135952W WO2022160945A1 WO 2022160945 A1 WO2022160945 A1 WO 2022160945A1 CN 2021135952 W CN2021135952 W CN 2021135952W WO 2022160945 A1 WO2022160945 A1 WO 2022160945A1
Authority
WO
WIPO (PCT)
Prior art keywords
gradient
value
target
color
target pixel
Prior art date
Application number
PCT/CN2021/135952
Other languages
English (en)
French (fr)
Inventor
徐力有
赵陈翔
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2022160945A1 publication Critical patent/WO2022160945A1/zh
Priority to US18/357,651 priority Critical patent/US20240005573A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation

Definitions

  • the present disclosure relates to the field of data processing, and in particular, to a method, device, device and storage medium for processing gradient color effects.
  • the present disclosure provides a gradient color effect processing method, device, device and storage medium, which can realize the effect processing of the object to be processed based on the distance field image, and satisfy the user's effect. Process demand.
  • the present disclosure provides a gradient color effect processing method, the method comprising:
  • the gradient direction vector is used to represent the color gradient direction
  • the method before determining the gradient value corresponding to the target pixel point based on the position information of the target pixel point and the gradient direction vector, the method further includes:
  • a gradient direction vector is determined; wherein the gradient direction vector has a corresponding relationship with the selected angle of the rotating slider.
  • the gradient value belongs to the numerical range from the preset first boundary value to the preset second boundary value;
  • the target gradient color includes the first target color and the second target color, and the gradient value corresponding to the first target color is the specified value.
  • the preset second boundary value, and the gradient value corresponding to the second target color is the preset first boundary value;
  • the determining the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color including:
  • the color value of the target pixel is determined according to the gradient value corresponding to the target pixel, the target gradient color, the preset first boundary value and the preset second boundary value.
  • the preset first boundary value is 0, and the preset second boundary value is 1;
  • the sum of the first numerical value and the second numerical value is determined as the color value of the target pixel point.
  • the target object includes target text
  • the method before determining the gradient value corresponding to the target pixel point based on the position information of the target pixel point and the gradient direction vector, the method further includes:
  • the method before determining the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color, the method further includes:
  • determining the color value of the target pixel according to the gradient value corresponding to the target pixel and the target gradient color includes:
  • the color value of the target pixel is determined according to the gradient value corresponding to the target pixel, the color transparency value and the target gradient color.
  • the gradient value belongs to a numerical range from a preset third boundary value to a preset fourth boundary value;
  • the target gradient color includes a third target color and a fourth target color, and the first The gradient value corresponding to the three target colors is the preset fourth boundary value, and the gradient value corresponding to the fourth target color is the preset third boundary value;
  • the method Before determining the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color, the method further includes:
  • the target gradual change position belongs to a numerical range from the preset third boundary value to the preset fourth boundary value;
  • the fourth target color is determined as the color value of the target pixel; otherwise, the third target color is determined as the color value of the target pixel.
  • the present disclosure provides a gradient color effect processing device, the device comprising:
  • the first determination module is used to determine the gradient value corresponding to the target pixel point based on the position information of the target pixel point and the gradient direction vector; wherein, the gradient direction vector is used to represent the color gradient direction;
  • a second determination module configured to determine the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color
  • a drawing module configured to draw a gradient color effect image corresponding to the target object based on the color value of the target pixel.
  • the present disclosure provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is made to implement the above method.
  • the present disclosure provides a device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program, Implement the above method.
  • the present disclosure provides a computer program product, wherein the computer program product includes a computer program/instruction, and the computer program/instruction implements the above method when executed by a processor.
  • the embodiment of the present disclosure provides a gradient color effect processing method. First, based on the position information of the target pixel point and the gradient direction vector, the gradient value corresponding to the target pixel point is determined. Further, the color value of the target pixel is determined according to the gradient value corresponding to the target pixel and the target gradient color. Finally, based on the color value of the target pixel, a gradient color effect image corresponding to the target object is drawn. In the embodiment of the present disclosure, the color value is determined according to the position information of the target pixel, so as to realize the drawing of the gradient color effect image of the target object. It can be seen that the embodiments of the present disclosure can realize the gradient color effect of the target object and meet the user's effect processing requirements.
  • FIG. 1 is a flowchart of a method for processing a gradient color effect according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a gradient color effect image provided by an embodiment of the present disclosure
  • FIG. 3 is an effect diagram of a rapid gradient provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of a gradient and luminous effect image of target text according to an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of a device for processing a gradient color effect according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a device for processing a gradient color effect according to an embodiment of the present disclosure.
  • a distance field image is used to record the shortest distance value of each pixel inside and outside the object in the image from the object outline (also known as the boundary), also known as the distance field value. .
  • the distance field value of the pixel points in the inner area is set as a negative number
  • the distance field value of the pixel points in the outer area around the object is set as a positive number. The inventor found that it is easier to process the gradient color effect of the object based on the distance field image.
  • an embodiment of the present disclosure provides a gradient color effect processing method. First, based on the position information of the target pixel point and the gradient direction vector, the gradient value corresponding to the target pixel point is determined. Then, the color value of the target pixel is determined according to the corresponding gradient value of the target pixel, the target gradient color and the target gradient position. Finally, based on the color value of the target pixel, a gradient color effect image corresponding to the target object is drawn.
  • the color value is determined according to the position information of the target pixel, so as to realize the drawing of the gradient color effect image of the target object. It can be seen that the embodiments of the present disclosure can realize the gradient color effect of the target object and meet the user's effect processing requirements.
  • an embodiment of the present disclosure provides a method for processing a gradient color effect.
  • a flowchart of a method for processing a gradient color effect provided by an embodiment of the present disclosure includes:
  • S101 Determine the gradient value corresponding to the target pixel point based on the position information of the target pixel point and the gradient direction vector; wherein the gradient direction vector is used to represent the color gradient direction.
  • the direction vector (x) pointing from the texture coordinate (x0, y0) of the center point of the target object to the texture coordinate value (x, y) is determined. -x0, y-y0), and then calculate the result of the dot product of the direction vector (x-x0, y-y0) and the gradient direction vector (dx, dy) (x-x0, y-y0) dot(dx, dy), as the gradient value corresponding to the target pixel.
  • the gradient direction vector can be determined by the user, that is, the user can adjust the gradient direction of the gradient effect in the gradient color effect image corresponding to the target object. Specifically, the user can determine the gradient direction vector by rotating the angle of the slider.
  • the selected angle of the rotating slider is determined, and then the gradient direction vector corresponding to the selected angle is determined. For example, if the user adjusts the angle of the rotating slider to 180°, the gradient direction vector can be determined to be (1,0), which represents the gradient direction from left to right.
  • the target pixel point In practical applications, before executing S101, first determine the target pixel point. Specifically, in the directional distance field image of the target object, the pixel points whose distance field values belong to a preset numerical range may be determined as the target pixel points corresponding to the target object.
  • the target object may be a target text, a target image, or the like. Specifically, before the gradient color effect processing is performed on the target object, a distance field image of the target object is obtained first.
  • the directional distance field image of the target object is obtained first, and then, based on the distance field values of each pixel in the directional distance field image, the pixels whose distance field values belong to the preset value range are determined, and the distance field values are determined.
  • the pixel points belonging to the preset value range are determined as the target pixel points corresponding to the target object.
  • the preset value range may be determined based on the requirement for setting the gradient color effect of the target object.
  • the preset value range can be set to a range greater than 0 and less than the preset value, so that the distance field value greater than 0 is located in the outer area around the target object.
  • the pixel points of the target object are determined as the target pixel points, so as to realize the external gradient color effect of the target object.
  • S102 Determine the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color.
  • the target gradient color may include a first target color and a second target color, specifically, gradient from the first target color to the second target color.
  • the color value of the target pixel point may be determined according to the gradient value corresponding to the target pixel point, the target gradient color, the preset first boundary value and the preset second boundary value.
  • the preset first boundary value is 0, the preset second boundary value is 1, and the gradient value belongs to a numerical range of 0 to 1.
  • the first target color is green
  • the color value of the first target color is (0,1,0)
  • the gradient value corresponding to the target pixel is v
  • the first value is v*(0,1,0).
  • the second target color is red
  • the color value of the second target color is (1,0,0)
  • the second value is (1-v)*(1,0,0).
  • FIG. 2 it is a schematic diagram of a gradient color effect image provided by an embodiment of the present disclosure.
  • the manner of determining the color values of other pixels except the target pixel in the directional distance field image of the target object is not limited in the embodiments of the present disclosure, and may be set as the default color value or the like.
  • the gradient value corresponding to the target pixel point is determined based on the position information of the target pixel point and the gradient direction vector. Then, the color value of the target pixel is determined according to the corresponding gradient value of the target pixel, the target gradient color and the target gradient position. Finally, based on the color value of the target pixel, a gradient color effect image corresponding to the target object is drawn.
  • the color value is determined according to the position information of the target pixel, so as to realize the drawing of the gradient color effect image of the target object. It can be seen that the embodiments of the present disclosure can realize the gradient color effect of the target object and meet the user's effect processing requirements.
  • the embodiments of the present disclosure further provide a method for processing a rapid gradient color effect.
  • the gradient value belongs to a numerical range from a preset third boundary value to a preset fourth boundary value;
  • the target gradient color includes a third target color and a fourth target color, the gradient value corresponding to the third target color is a preset fourth boundary value, such as 1, and the gradient value corresponding to the fourth target color is a preset value
  • the third boundary value is, for example, 0.
  • a target gradation position is received; wherein the target gradation position belongs to a numerical range from the preset third boundary value to the preset fourth boundary value. Then, determine whether the gradient value corresponding to the target pixel is in the numerical range from the preset third boundary value to the target gradient position, or determine whether the gradient value corresponding to the target pixel is in the range from the target gradient position to the target gradient position.
  • the numerical range of the preset fourth boundary value is the numerical range of the preset fourth boundary value.
  • the fourth target color is determined as the color value of the target pixel; otherwise, the third target color is determined as the color value of the target pixel.
  • the preset third boundary value is 0, the preset fourth boundary value is 1, and the gradient value belongs to a numerical range of 0 to 1.
  • the target gradient position is first received, where the target gradient position may belong to a numerical range of 0 to 1. Then, determine whether the gradient value corresponding to the target pixel is in the numerical range from 0 to the target gradient position, if so, set the color value corresponding to the target pixel to the fourth target color corresponding to the gradient value 0, otherwise, set the The color value corresponding to the target pixel is set to the third target color corresponding to the gradient value 1.
  • the target gradation position may refer to the rapid gradation of the third target color to the fourth target color at the target gradation position. Referring to the effect diagram of a rapid gradation provided by the embodiment of the present disclosure shown in FIG.
  • the target gradient position shown is white, and it quickly fades to gray at the target gradient position.
  • the processing object of the gradient color effect processing method provided by the embodiments of the present disclosure may be target characters, and specifically, a corresponding gradient color effect image is drawn for the target characters.
  • the outer area around the text may be set to a gradient color effect. Since the distance field value of the pixels in the outer area around the text is greater than 0, the pixels with the distance field value greater than 0 and less than the preset distance field value in the directional distance field image of the target text can be determined as the target of the target text pixel. By determining the gradient value corresponding to the target pixel point, the gradient color effect of the target text is realized.
  • the luminous effect of the target character can also be realized at the same time.
  • the distance field value of the target pixel point and the color transparency value are set to be inversely proportional, and then the color transparency value of the target pixel point is determined based on the distance field value of the target pixel point. Finally, the color value of the target pixel is determined in combination with the color transparency value of the target pixel. Based on the color value of each target pixel, a gradient and glowing effect image corresponding to the target text is drawn.
  • FIG. 4 it is a schematic diagram of a gradient and luminous effect image of a target character provided by an embodiment of the present disclosure, wherein the target character “Xia” in FIG. 4 has both gradient and luminous effects.
  • the embodiment of the present disclosure can determine the color value and color transparency value of the gradient effect of the target pixel based on the distance field value of the pixel in the directional distance field image of the target text, and finally can realize the gradient and luminous effect of the target text. Drawing to meet the user's processing needs for text effects.
  • the present disclosure also provides a gradation color effect processing device.
  • a gradation color effect processing device provided in an embodiment of the present disclosure, the device include:
  • the first determination module 501 is configured to determine the gradient value corresponding to the target pixel point based on the position information of the target pixel point and the gradient direction vector; wherein, the gradient direction vector is used to represent the color gradient direction;
  • a second determination module 502 configured to determine the color value of the target pixel point according to the gradient value corresponding to the target pixel point and the target gradient color;
  • the drawing module 503 is configured to draw a gradient color effect image corresponding to the target object based on the color value of the target pixel.
  • the device further includes:
  • the third determination module is configured to determine a gradient direction vector in response to an angle selection operation of the rotating slide bar; wherein the gradient direction vector has a corresponding relationship with the selected angle of the rotating slide bar.
  • the gradient value belongs to a numerical range from a preset first boundary value to a preset second boundary value;
  • the target gradient color includes a first target color and a second target color, and the first target color is The gradient value corresponding to a target color is the preset second boundary value, and the gradient value corresponding to the second target color is the preset first boundary value;
  • the second determining module is specifically used for:
  • the color value of the target pixel is determined according to the gradient value corresponding to the target pixel, the target gradient color, the preset first boundary value and the preset second boundary value.
  • the preset first boundary value is 0, and the preset second boundary value is 1;
  • the second determining module includes:
  • a first calculation submodule used to calculate the product of the gradient value corresponding to the target pixel and the color value of the first target color, as the first numerical value
  • the second calculation sub-module is used to calculate the difference between the gradient value corresponding to the target pixel point and the product obtained by multiplying the color value corresponding to the second target color as the second value;
  • the first determination submodule is configured to determine the sum of the first numerical value and the second numerical value as the color value of the target pixel point.
  • the target object includes target text
  • the device further includes:
  • the fourth determination module is configured to determine the pixel points whose distance field values belong to a preset value range in the directional distance field image of the target text as the target pixel points corresponding to the target text; wherein, the preset value The range is greater than 0 and less than the preset distance field value.
  • the device further includes:
  • a fifth determination module configured to determine the color transparency value of the target pixel point based on the distance field value of the target pixel point; wherein, the distance field value of the target pixel point is inversely proportional to the color transparency value;
  • the second determining module is specifically used for:
  • the color value of the target pixel is determined according to the gradient value corresponding to the target pixel, the color transparency value and the target gradient color.
  • the gradient value belongs to a numerical range from a preset third boundary value to a preset fourth boundary value;
  • the target gradient color includes a third target color and a fourth target color, and the first The gradient value corresponding to the three target colors is the preset fourth boundary value, and the gradient value corresponding to the fourth target color is the preset third boundary value;
  • the device also includes:
  • a receiving module configured to receive a target gradual change position; wherein, the target gradual change position belongs to a numerical range from the preset third boundary value to the preset fourth boundary value;
  • the second determining module includes:
  • the second determination sub-module is configured to determine whether the gradient value corresponding to the target pixel is in the numerical range from the preset third boundary value to the target gradient position, or determine whether the gradient value corresponding to the target pixel is in the range of the preset third boundary value to the target gradient position. the numerical range from the target gradual change position to the preset fourth boundary value;
  • the third determination submodule is configured to determine that the gradient value corresponding to the target pixel is in the numerical range from the preset third boundary value to the target gradient position, or determine that the gradient value corresponding to the target pixel is not in the range of the preset third boundary value to the target gradient position.
  • the fourth target color is determined as the color value of the target pixel; otherwise, the third target color is determined as the target pixel The color value of the point.
  • the device for processing a gradient color effect provided by the embodiment of the present disclosure, first, based on the position information of the target pixel point and the gradient direction vector, the gradient value corresponding to the target pixel point is determined. Then, the color value of the target pixel is determined according to the corresponding gradient value of the target pixel, the target gradient color and the target gradient position. Finally, based on the color value of the target pixel, a gradient color effect image corresponding to the target object is drawn.
  • the color value is determined according to the position information of the target pixel, so as to realize the drawing of the gradient color effect image of the target object. It can be seen that the embodiments of the present disclosure can realize the gradient color effect of the target object and meet the user's effect processing requirements.
  • embodiments of the present disclosure also provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device is made to implement the present invention.
  • the method for processing the gradient color effect according to the embodiment is disclosed.
  • Embodiments of the present disclosure also provide a computer program product, including computer programs/instructions, which, when executed by a processor, implement the gradient color effect processing method described in the embodiments of the present disclosure.
  • an embodiment of the present disclosure also provides a gradient color effect processing device, as shown in FIG. 6 , which may include:
  • Processor 601 , memory 602 , input device 603 and output device 604 The number of processors 601 in the gradient color effect processing device may be one or more, and one processor is taken as an example in FIG. 6 .
  • the processor 601 , the memory 602 , the input device 603 and the output device 604 may be connected by a bus or in other ways, wherein the connection by a bus is taken as an example in FIG. 6 .
  • the memory 602 can be used to store software programs and modules, and the processor 501 executes various functional applications and data processing of the gradient color effect processing device by running the software programs and modules stored in the memory 602 .
  • the memory 602 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, and the like. Additionally, memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the input device 603 may be used to receive input numerical or character information, and generate signal input related to user settings and function control of the gradient color effect processing device.
  • the processor 601 loads the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 executes the executable files stored in the memory 602 application, so as to realize various functions of the above-mentioned gradient color effect processing device.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

本公开提供了一种渐变颜色效果处理方法、装置、设备及存储介质,所述方法包括:首先,基于目标像素点的位置信息和渐变方向向量,确定目标像素点对应的渐变值。进而根据目标像素点对应的渐变值、目标渐变颜色和目标渐变位置,确定目标像素点的颜色值。最终,基于目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。本公开根据目标像素点的位置信息确定颜色值,进而实现目标对象的渐变颜色效果图像的绘制。可见,本公开能够实现目标对象的渐变颜色效果,满足用户的效果处理需求。

Description

一种渐变颜色效果处理方法、装置、设备及存储介质
本公开要求于2021年01月28日提交中国专利局、申请号为202110134319.3、发明名称为“一种渐变颜色效果处理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及数据处理领域,尤其涉及一种渐变颜色效果处理方法、装置、设备及存储介质。
背景技术
目前,对文字、图像等对象进行效果处理的需求越来越多,例如,网络游戏的场景绘制、视频中的文字显示以及综艺节目的字幕显示的应用中,对文字的效果处理要求较高。
因此,如何满足用户的效果处理需求,是目前亟需解决的技术问题。
发明内容
为了解决上述技术问题或者至少部分地解决上述技术问题,本公开提供了一种渐变颜色效果处理方法、装置、设备及存储介质,能够基于距离场图像实现对待处理对象的效果处理,满足用户的效果处理需求。
第一方面,本公开提供了一种渐变颜色效果处理方法,所述方法包括:
基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向;
根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值;
基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
一种可选的实施方式中,所述基于所述目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值之前,还包括:
响应于旋转滑杆的角度选定操作,确定渐变方向向量;其中,所述渐变方向向量与所述旋转滑杆的选定角度具有对应关系。
一种可选的实施方式中,
所述渐变值属于预设第一边界值到预设第二边界值的数值范围;所述目标渐变颜色包括第一目标颜色和第二目标颜色,所述第一目标颜色对应的渐变值为所述预设第二边界值,所述第二目标颜色对应的渐变值为所述预设第一边界值;
所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值,包括:
根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述预设第二边界值,确定所述目标像素点的颜色值。
一种可选的实施方式中,所述预设第一边界值为0,所述预设第二边界值为1;
所述根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述 预设第二边界值,确定所述目标像素点的颜色值,包括:
计算所述目标像素点对应的渐变值与所述第一目标颜色的颜色值的乘积,作为第一数值;
以及,计算1与所述目标像素点对应的渐变值之差,乘以所述第二目标颜色对应的颜色值后得到的乘积,作为第二数值;
将所述第一数值与所述第二数值之和,确定为所述目标像素点的颜色值。
一种可选的实施方式中,所述目标对象包括目标文字,所述基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值之前,还包括:
将所述目标文字的有向距离场图像中距离场值属于预设数值范围的像素点,确定为所述目标文字对应的目标像素点;其中,所述预设数值范围为大于0小于预设距离场值的范围。
一种可选的实施方式中,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值之前,还包括:
基于所述目标像素点的距离场值,确定所述目标像素点的颜色透明度值;其中,所述目标像素点的距离场值与所述颜色透明度值成反比关系;
相应的,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值,包括:
根据所述目标像素点对应的渐变值、所述颜色透明度值和目标渐变颜色,确定所述目标像素点的颜色值。
一种可选的实施方式中,所述渐变值属于预设第三边界值到预设第四边界值的数值范围;所述目标渐变颜色包括第三目标颜色和第四目标颜色,所述第三目标颜色对应的渐变值为所述预设第四边界值,所述第四目标颜色对应的渐变值为所述预设第三边界值;
所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值之前,还包括:
接收目标渐变位置;其中,所述目标渐变位置属于所述预设第三边界值到所述预设第四边界值的数值范围;
相应的,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值,包括:
确定所述目标像素点对应的渐变值是否处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值是否处于所述目标渐变位置到所述预设第四边界值的数值范围;
如果确定目标像素点对应的渐变值处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值未处于所述目标渐变位置到所述预设第四边界值的数值范围,则将所述第四目标颜色确定为所述目标像素点的颜色值;否则,将所述第三目标颜色确定为所述目标像素点的颜色值。
第二方面,本公开提供了一种渐变颜色效果处理装置,所述装置包括:
第一确定模块,用于基于目标像素点的位置信息和渐变方向向量,确定所述目标像素 点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向;
第二确定模块,用于根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值;
绘制模块,用于基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
第三方面,本公开提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现上述的方法。
第四方面,本公开提供了一种设备,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现上述的方法。
第五方面,本公开提供了一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述的方法。
本公开实施例提供的技术方案与现有技术相比至少具有如下优点:
本公开实施例提供了一种渐变颜色效果处理方法,首先,基于目标像素点的位置信息和渐变方向向量,确定目标像素点对应的渐变值。进而,根据目标像素点对应的渐变值和目标渐变颜色,确定目标像素点的颜色值。最终,基于目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。本公开实施例根据目标像素点的位置信息确定颜色值,进而实现目标对象的渐变颜色效果图像的绘制。可见,本公开实施例能够实现目标对象的渐变颜色效果,满足用户的效果处理需求。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的一种渐变颜色效果处理方法的流程图;
图2为本公开实施例提供的一种渐变颜色效果图像的示意图;
图3为本公开实施例提供的一种快速渐变的效果图;
图4为本公开实施例提供的一种目标文字的渐变且发光的效果图像的示意图;
图5为本公开实施例提供的一种渐变颜色效果处理装置的结构示意图;
图6为本公开实施例提供的一种渐变颜色效果处理设备的结构示意图。
具体实施方式
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。
距离场图像,通常是指有向距离场图像,用于记录图像中对象的内部及其周围外部的各个像素点距离对象轮廓(也可称为边界)的最短距离值,也称为距离场值。其中,处于内部区域的像素点的距离场值设为负数,而处于对象周围外部区域的像素点的距离场值设为正数。发明人发现,基于距离场图像能够更便于对对象的渐变颜色效果进行处理。
为此,本公开实施例提供了一种渐变颜色效果处理方法,首先,基于目标像素点的位置信息和渐变方向向量,确定目标像素点对应的渐变值。进而根据目标像素点对应的渐变值、目标渐变颜色和目标渐变位置,确定目标像素点的颜色值。最终,基于目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
本公开实施例根据目标像素点的位置信息确定颜色值,进而实现目标对象的渐变颜色效果图像的绘制。可见,本公开实施例能够实现目标对象的渐变颜色效果,满足用户的效果处理需求。
基于此,本公开实施例提供了一种渐变颜色效果处理方法,参考图1,为本公开实施例提供的一种渐变颜色效果处理方法的流程图,该方法包括:
S101:基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向。
本公开实施例中,目标像素点的位置信息是指目标像素点在有向距离场图像中的纹理坐标值,假设为(x,y)。渐变方向向量通常为基于颜色渐变需求设置的用于指示颜色渐变方向的单位向量,假设为(dx,dy)。例如颜色渐变方向可以为由左向右,或由上向下等。
本公开实施例中,在确定目标像素点的纹理坐标值(x,y)后,确定由目标对象的中心点纹理坐标(x0,y0)指向纹理坐标值(x,y)的方向向量(x-x0,y-y0),然后计算方向向量(x-x0,y-y0)与渐变方向向量(dx,dy)进行点积运算后的结果(x-x0,y-y0)dot(dx,dy),作为目标像素点对应的渐变值。
一种可选的实施方式中,渐变方向向量可以由用户确定,也就是说,用户可以调节目标对象对应的渐变颜色效果图像中渐变效果的渐变方向。具体的,用户可以通过旋转滑杆的角度,确定渐变方向向量。
实际应用中,当接收到用户针对旋转滑杆的角度选定操作时,确定旋转滑杆的选定角度,然后确定与该选定角度对应的渐变方向向量。例如,用户将旋转滑杆的角度调节到180°,则可以确定渐变方向向量为(1,0),表示由左向右的渐变方向。
实际应用中,在执行S101之前,首先确定目标像素点。具体的,可以将目标对象的有向距离场图像中距离场值属于预设数值范围的像素点,确定为所述目标对象对应的目标像素点。
本公开实施例中,目标对象可以为目标文字,也可以为目标图像等。具体的,在对目标对象进行渐变颜色效果处理之前,首先获取目标对象的距离场图像。
实际应用中,首先获取目标对象的有向距离场图像,然后,基于有向距离场图像中各 个像素点的距离场值,确定距离场值属于预设数值范围的像素点,并将距离场值属于预设数值范围的像素点确定为该目标对象对应的目标像素点。其中,预设数值范围可以基于目标对象的渐变颜色效果设置需求确定。
通常目标文字的渐变颜色效果显示于目标对象周围外部区域,为此,可以将预设数值范围设置为大于0且小于预设数值的范围,以便将距离场值大于0的处于目标对象周围外部区域的像素点确定为目标像素点,从而实现目标对象外部渐变颜色效果。
S102:根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值。
本公开实施例中,目标渐变颜色可以包括第一目标颜色和第二目标颜色,具体为从第一目标颜色渐变至第二目标颜色。
一种可选的实施方式中,渐变值的数值范围可以设置为预设第一边界值到预设第二边界值,相应的,本公开实施例中的目标像素点对应的渐变值属于预设第一边界值到预设第二边界值的数值范围。另外,目标渐变颜色通常包括第一目标颜色和第二目标颜色两种颜色,可以将第一目标颜色对应的渐变值设置为预设第二边界值,例如为1,而将第二目标颜色对应的渐变值设置为预设第一边界值,例如为0。
具体的,可以根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述预设第二边界值,确定所述目标像素点的颜色值。
一种可选的实施方式中,所述预设第一边界值为0,所述预设第二边界值为1,所述渐变值属于0到1的数值范围。首先,计算目标像素点对应的渐变值与第一目标颜色的颜色值的乘积,作为第一数值;以及,计算1与该目标像素点对应的渐变值的差值,乘以第二目标颜色对应的颜色值后得到的乘积,作为第二数值;最终,将第一数值和第二数值之和,确定为该目标像素点的颜色值。
假设第一目标颜色为绿色,第一目标颜色的颜色值为(0,1,0),目标像素点对应的渐变值为v,则第一数值为v*(0,1,0)。第二目标颜色为红色,第二目标颜色的颜色值为(1,0,0),则第二数值为(1-v)*(1,0,0)。将第一数值和第二数值相加后,得到的数值v*(0,1,0)+(1-v)*(1,0,0),作为该目标像素点的颜色值。
S103:基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
本公开实施例中,在确定各个目标像素点的颜色值之后,基于各个目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。如图2所示,为本公开实施例提供的一种渐变颜色效果图像的示意图。
值得注意的是,对于目标对象的有向距离场图像中除目标像素点之外的其他像素点的颜色值的确定方式,本公开实施例不做限定,可以设置为默认颜色值等。
本公开实施例提供的渐变颜色效果处理方法中,首先,基于目标像素点的位置信息和渐变方向向量,确定目标像素点对应的渐变值。进而根据目标像素点对应的渐变值、目标渐变颜色和目标渐变位置,确定目标像素点的颜色值。最终,基于目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
本公开实施例根据目标像素点的位置信息确定颜色值,进而实现目标对象的渐变颜色 效果图像的绘制。可见,本公开实施例能够实现目标对象的渐变颜色效果,满足用户的效果处理需求。
另外,在上述实施例的基础上,本公开实施例还提供了一种快速渐变颜色效果处理方法,具体的,渐变值属于预设第三边界值到预设第四边界值的数值范围;所述目标渐变颜色包括第三目标颜色和第四目标颜色,所述第三目标颜色对应的渐变值为预设第四边界值,例如为1,所述第四目标颜色对应的渐变值为预设第三边界值,例如为0。
实际应用中,对于快速渐变颜色效果处理方法中,首先,接收目标渐变位置;其中,所述目标渐变位置属于所述预设第三边界值到所述预设第四边界值的数值范围。然后,确定所述目标像素点对应的渐变值是否处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值是否处于所述目标渐变位置到所述预设第四边界值的数值范围。如果确定目标像素点对应的渐变值处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值未处于所述目标渐变位置到所述预设第四边界值的数值范围,则将所述第四目标颜色确定为所述目标像素点的颜色值;否则,将所述第三目标颜色确定为所述目标像素点的颜色值。
一种可选的实施方式中,预设第三边界值为0,预设第四边界值为1,渐变值属于0到1的数值范围。具体的,在确定目标像素点的颜色值之前,首先接收目标渐变位置,其中目标渐变位置可以属于0到1的数值范围。然后,确定目标像素点对应的渐变值是否处于0到所述目标渐变位置的数值范围,如果是,则将目标像素点对应的颜色值设置为对应渐变值0的第四目标颜色,否则,将目标像素点对应的颜色值设置为对应渐变值1的第三目标颜色。
另外,还可以确定目标像素点对应的渐变值是否处于所述目标渐变位置到1的数值范围,如果是,则将目标像素点对应的颜色值设置为对应渐变值1的第三目标颜色,否则,将目标像素点对应的颜色值设置为对应渐变值0的第四目标颜色。
其中,目标渐变位置,可以指第三目标颜色在目标渐变位置处快速渐变为第四目标颜色,参考图3所示的本公开实施例提供的一种快速渐变的效果图,其中,图3所示的目标渐变位置,为白色在目标渐变位置处快速渐变为灰色。
基于上述实施方式,本公开实施例提供的渐变颜色效果处理方法的处理对象可以是目标文字,具体的,为目标文字绘制对应的渐变颜色效果图像。
一种可选的实施方式中,可以将文字周围外部区域设置为渐变色效果。由于文字周围外部区域的像素点的距离场值大于0,因此,可以将目标文字的有向距离场图像中距离场值大于0且小于预设距离场值的像素点,确定为目标文字的目标像素点。通过对目标像素点对应的渐变值的确定,实现目标文字的渐变色效果。
另外,在实现目标文字的渐变色效果的基础上,还可以同时实现目标文字的发光效果。具体的,将目标像素点的距离场值与颜色透明度值设置为成反比关系,然后基于目标像素点的距离场值,确定该目标像素点的颜色透明度值。最终,结合目标像素点的颜色透明度值,确定该目标像素点的颜色值。基于各个目标像素点的颜色值,绘制目标文字对应的渐变且发光的效果图像。如图4所示,为本公开实施例提供的一种目标文字的渐变且发光的 效果图像的示意图,其中,图4中的目标文字“夏”同时具有渐变和发光的效果。
本公开实施例可以基于目标文字的有向距离场图像中像素点的距离场值,确定目标像素点的渐变效果的颜色值和颜色透明度值,最终能够实现目标文字的渐变且发光的效果图像的绘制,满足用户对文字效果的处理需求。
与上述方法实施例基于同一个发明构思,本公开还提供了一种渐变颜色效果处理处理装置,参考图5,为本公开实施例提供的一种渐变颜色效果处理装置的结构示意图,所述装置包括:
第一确定模块501,用于基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向;
第二确定模块502,用于根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值;
绘制模块503,用于基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
一种可选的实施方式中,所述装置还包括:
第三确定模块,用于响应于旋转滑杆的角度选定操作,确定渐变方向向量;其中,所述渐变方向向量与所述旋转滑杆的选定角度具有对应关系。
一种可选的实施方式中,所述渐变值属于预设第一边界值到预设第二边界值的数值范围;所述目标渐变颜色包括第一目标颜色和第二目标颜色,所述第一目标颜色对应的渐变值为所述预设第二边界值,所述第二目标颜色对应的渐变值为所述预设第一边界值;
所述第二确定模块,具体用于:
根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述预设第二边界值,确定所述目标像素点的颜色值。
一种可选的实施方式中,所述预设第一边界值为0,所述预设第二边界值为1;
所述第二确定模块,包括:
第一计算子模块,用于计算所述目标像素点对应的渐变值与所述第一目标颜色的颜色值的乘积,作为第一数值;
第二计算子模块,用于计算1与所述目标像素点对应的渐变值的差值,乘以所述第二目标颜色对应的颜色值后得到的乘积,作为第二数值;
第一确定子模块,用于将所述第一数值与所述第二数值之和,确定为所述目标像素点的颜色值。
一种可选的实施方式中,所述目标对象包括目标文字,所述装置还包括:
第四确定模块,用于将所述目标文字的有向距离场图像中距离场值属于预设数值范围的像素点,确定为所述目标文字对应的目标像素点;其中,所述预设数值范围为大于0小于预设距离场值的范围。
一种可选的实施方式中,所述装置还包括:
第五确定模块,用于基于所述目标像素点的距离场值,确定所述目标像素点的颜色透明度值;其中,所述目标像素点的距离场值与所述颜色透明度值成反比关系;
相应的,所述第二确定模块,具体用于:
根据所述目标像素点对应的渐变值、所述颜色透明度值和目标渐变颜色,确定所述目标像素点的颜色值。
一种可选的实施方式中,所述渐变值属于预设第三边界值到预设第四边界值的数值范围;所述目标渐变颜色包括第三目标颜色和第四目标颜色,所述第三目标颜色对应的渐变值为所述预设第四边界值,所述第四目标颜色对应的渐变值为所述预设第三边界值;
所述装置还包括:
接收模块,用于接收目标渐变位置;其中,所述目标渐变位置属于所述预设第三边界值到所述预设第四边界值的数值范围;
相应的,所述第二确定模块,包括:
第二确定子模块,用于确定所述目标像素点对应的渐变值是否处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值是否处于所述目标渐变位置到所述预设第四边界值的数值范围;
第三确定子模块,用于在确定目标像素点对应的渐变值处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值未处于所述目标渐变位置到所述预设第四边界值的数值范围时,将所述第四目标颜色确定为所述目标像素点的颜色值;否则,将所述第三目标颜色确定为所述目标像素点的颜色值。
本公开实施例提供的渐变颜色效果处理装置,首先,基于目标像素点的位置信息和渐变方向向量,确定目标像素点对应的渐变值。进而根据目标像素点对应的渐变值、目标渐变颜色和目标渐变位置,确定目标像素点的颜色值。最终,基于目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
本公开实施例根据目标像素点的位置信息确定颜色值,进而实现目标对象的渐变颜色效果图像的绘制。可见,本公开实施例能够实现目标对象的渐变颜色效果,满足用户的效果处理需求。
除了上述方法和装置以外,本公开实施例还提供了一种计算机可读存储介质,计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现本公开实施例所述的渐变颜色效果处理方法。
本公开实施例还提供了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现本公开实施例所述的渐变颜色效果处理方法。
另外,本公开实施例还提供了一种渐变颜色效果处理设备,参见图6所示,可以包括:
处理器601、存储器602、输入装置603和输出装置604。渐变颜色效果处理设备中的处理器601的数量可以一个或多个,图6中以一个处理器为例。在本公开的一些实施例中,处理器601、存储器602、输入装置603和输出装置604可通过总线或其它方式连接,其中,图6中以通过总线连接为例。
存储器602可用于存储软件程序以及模块,处理器501通过运行存储在存储器602的软件程序以及模块,从而执行渐变颜色效果处理设备的各种功能应用以及数据处理。存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一 个功能所需的应用程序等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。输入装置603可用于接收输入的数字或字符信息,以及产生与渐变颜色效果处理设备的用户设置以及功能控制有关的信号输入。
具体在本实施例中,处理器601会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的应用程序,从而实现上述渐变颜色效果处理设备的各种功能。
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅是本公开的具体实施方式,使本领域技术人员能够理解或实现本公开。对这些实施例的多种修改对本领域的技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本公开的精神或范围的情况下,在其它实施例中实现。因此,本公开将不会被限制于本文所述的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (11)

  1. 一种渐变颜色效果处理方法,其特征在于,所述方法包括:
    基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向;
    根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值;
    基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
  2. 根据权利要求1所述的方法,其特征在于,所述基于所述目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值之前,还包括:
    响应于旋转滑杆的角度选定操作,确定所述渐变方向向量;其中,
    所述渐变方向向量与所述旋转滑杆的选定角度具有对应关系。
  3. 根据权利要求1所述的方法,其特征在于,所述渐变值属于预设第一边界值到预设第二边界值的数值范围;所述目标渐变颜色包括第一目标颜色和第二目标颜色,所述第一目标颜色对应的渐变值为所述预设第二边界值,所述第二目标颜色对应的渐变值为所述预设第一边界值;
    所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值,包括:
    根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述预设第二边界值,确定所述目标像素点的颜色值。
  4. 根据权利要求3所述的方法,其特征在于,所述预设第一边界值为0,所述预设第二边界值为1;
    所述根据所述目标像素点对应的渐变值、目标渐变颜色、所述预设第一边界值和所述预设第二边界值,确定所述目标像素点的颜色值,包括:
    计算所述目标像素点对应的渐变值与所述第一目标颜色的颜色值的乘积,作为第一数值;
    以及,计算1与所述目标像素点对应的渐变值的差值,乘以所述第二目标颜色对应的颜色值后得到的乘积,作为第二数值;
    将所述第一数值与所述第二数值之和,确定为所述目标像素点的颜色值。
  5. 根据权利要求1所述的方法,其特征在于,所述目标对象包括目标文字,所述基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值之前,还包括:
    将所述目标文字的有向距离场图像中距离场值属于预设数值范围的像素点,确定为所述目标文字对应的目标像素点;其中,所述预设数值范围为大于0小于预设距离场值的范围。
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值之前,还包括:
    基于所述目标像素点的距离场值,确定所述目标像素点的颜色透明度值;其中,所述目标像素点的距离场值与所述颜色透明度值成反比关系;
    相应的,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素 点的颜色值,包括:
    根据所述目标像素点对应的渐变值、所述颜色透明度值和目标渐变颜色,确定所述目标像素点的颜色值。
  7. 根据权利要求1所述的方法,其特征在于,所述渐变值属于预设第三边界值到预设第四边界值的数值范围;所述目标渐变颜色包括第三目标颜色和第四目标颜色,所述第三目标颜色对应的渐变值为所述预设第四边界值,所述第四目标颜色对应的渐变值为所述预设第三边界值;
    所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值之前,还包括:
    接收目标渐变位置;其中,所述目标渐变位置属于所述预设第三边界值到所述预设第四边界值的数值范围;
    相应的,所述根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值,包括:
    确定所述目标像素点对应的渐变值是否处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值是否处于所述目标渐变位置到所述预设第四边界值的数值范围;
    如果确定目标像素点对应的渐变值处于所述预设第三边界值到所述目标渐变位置的数值范围,或者,确定目标像素点对应的渐变值未处于所述目标渐变位置到所述预设第四边界值的数值范围,则将所述第四目标颜色确定为所述目标像素点的颜色值;否则,将所述第三目标颜色确定为所述目标像素点的颜色值。
  8. 一种渐变颜色效果处理装置,其特征在于,所述装置包括:
    第一确定模块,用于基于目标像素点的位置信息和渐变方向向量,确定所述目标像素点对应的渐变值;其中,所述渐变方向向量用于表示颜色渐变方向;
    第二确定模块,用于根据所述目标像素点对应的渐变值和目标渐变颜色,确定所述目标像素点的颜色值;
    绘制模块,用于基于所述目标像素点的颜色值,绘制目标对象对应的渐变颜色效果图像。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在终端设备上运行时,使得所述终端设备实现如权利要求1-7任一项所述的方法。
  10. 一种设备,其特征在于,包括:存储器,处理器,及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1-7任一项所述的方法。
  11. 一种计算机程序产品,其特征在于,所述计算机程序产品包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现如权利要求1-7任一项所述的方法。
PCT/CN2021/135952 2021-01-28 2021-12-07 一种渐变颜色效果处理方法、装置、设备及存储介质 WO2022160945A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/357,651 US20240005573A1 (en) 2021-01-28 2023-07-24 Method for generating signed distance field image, method for generating text effect image, device and medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110134319.3 2021-01-28
CN202110134319.3A CN114820837A (zh) 2021-01-28 2021-01-28 一种渐变颜色效果处理方法、装置、设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/072916 Continuation-In-Part WO2022161238A1 (zh) 2021-01-28 2022-01-20 有向距离场图像、文字效果图像生成方法、设备及介质

Publications (1)

Publication Number Publication Date
WO2022160945A1 true WO2022160945A1 (zh) 2022-08-04

Family

ID=82526775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135952 WO2022160945A1 (zh) 2021-01-28 2021-12-07 一种渐变颜色效果处理方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN114820837A (zh)
WO (1) WO2022160945A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351440A (ja) * 2001-05-29 2002-12-06 Mitsubishi Electric Corp 階調フォント描画方法および階調フォント描画装置
CN101046881A (zh) * 2006-03-31 2007-10-03 北京北大方正电子有限公司 一种线型的颜色渐变方法及***
CN105913462A (zh) * 2016-04-11 2016-08-31 浙江大学 一种基于图像库的图像渐变方法
CN110443877A (zh) * 2019-08-06 2019-11-12 网易(杭州)网络有限公司 模型渲染的方法、装置、终端设备和存储介质
CN110782534A (zh) * 2019-09-19 2020-02-11 稿定(厦门)科技有限公司 3d文字颜色渐变方法、介质、设备及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002351440A (ja) * 2001-05-29 2002-12-06 Mitsubishi Electric Corp 階調フォント描画方法および階調フォント描画装置
CN101046881A (zh) * 2006-03-31 2007-10-03 北京北大方正电子有限公司 一种线型的颜色渐变方法及***
CN105913462A (zh) * 2016-04-11 2016-08-31 浙江大学 一种基于图像库的图像渐变方法
CN110443877A (zh) * 2019-08-06 2019-11-12 网易(杭州)网络有限公司 模型渲染的方法、装置、终端设备和存储介质
CN110782534A (zh) * 2019-09-19 2020-02-11 稿定(厦门)科技有限公司 3d文字颜色渐变方法、介质、设备及装置

Also Published As

Publication number Publication date
CN114820837A (zh) 2022-07-29

Similar Documents

Publication Publication Date Title
US10388004B2 (en) Image processing method and apparatus
US11790584B2 (en) Image and text typesetting method and related apparatus thereof
US10621761B2 (en) Computer-readable recording medium, computer apparatus, and computer processing method for placing object in virtual space and displaying placed object according to display mode
WO2022037634A1 (zh) 一种图片处理方法、装置、设备及存储介质
TWI695295B (zh) 基於擴增實境的圖像處理方法、裝置及電子設備
WO2022160914A1 (zh) 一种效果处理方法、装置、设备及存储介质
WO2017032233A1 (zh) 一种图像生成方法及装置
CN104076928A (zh) 一种调整文字显示区域色调的方法
CN110853488B (zh) 一种poi标签显示方法、装置和设备
KR20190138885A (ko) 알파 블렌딩을 사용한 동적 이미지 컬러 리매핑 방법
US8908964B2 (en) Color correction for digital images
WO2022160945A1 (zh) 一种渐变颜色效果处理方法、装置、设备及存储介质
WO2022160946A1 (zh) 一种文字的阴影效果处理方法、装置、设备及存储介质
US10114447B2 (en) Image processing method and apparatus for operating in low-power mode
US20090174722A1 (en) Method for assisting in data calculation by using display card
WO2022160915A1 (zh) 一种文字的发光效果处理方法、装置、设备及存储介质
WO2022161237A1 (zh) 一种文字的轮廓效果处理方法、装置、设备及存储介质
US20120313954A1 (en) Optimized on-screen video composition for mobile device
US8922835B1 (en) Color conversion method and color conversion system
CN116055659B (zh) 原始图像的处理方法、装置、电子设备和存储介质
US8396317B1 (en) Algorithm modification method and system
WO2024000473A1 (zh) 色彩校正模型的生成方法、校正方法及装置、介质、设备
CN107135382A (zh) 一种基于yuv信号处理的图像快速缩放方法
JPH03288277A (ja) 画像処理装置
KR102055253B1 (ko) 영상 개선 장치 및 영상 개선 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21922535

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 06/11/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21922535

Country of ref document: EP

Kind code of ref document: A1