WO2023174137A1 - Procédé et appareil de traitement d'image, et dispositif informatique et support de stockage - Google Patents

Procédé et appareil de traitement d'image, et dispositif informatique et support de stockage Download PDF

Info

Publication number
WO2023174137A1
WO2023174137A1 PCT/CN2023/080379 CN2023080379W WO2023174137A1 WO 2023174137 A1 WO2023174137 A1 WO 2023174137A1 CN 2023080379 W CN2023080379 W CN 2023080379W WO 2023174137 A1 WO2023174137 A1 WO 2023174137A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
processed
target
blur
pixel
Prior art date
Application number
PCT/CN2023/080379
Other languages
English (en)
Chinese (zh)
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 WO2023174137A1 publication Critical patent/WO2023174137A1/fr

Links

Classifications

    • G06T3/04

Definitions

  • the present disclosure relates to the technical field of image processing, and specifically, to an image processing method, device, computer equipment, and storage medium.
  • Radial blur technology simulates the radial effect produced when shooting objects when the camera moves back and forth or when the camera rotates. For example, after performing radial blur processing on the original image as shown in Figure 1(a), a radial blurred image as shown in Figure 1(b) can be obtained.
  • the radially blurred image contains obvious ghosting.
  • the ghosting effect in the captured image is not obvious. Therefore, the ghost images appearing in the radial blur image will affect the simulation effect of the radial blur technology for the radial effect.
  • Embodiments of the present disclosure provide at least an image processing method, device, computer equipment, and storage medium.
  • an embodiment of the present disclosure provides an image processing method, including: acquiring an image to be processed, and determining the center position of the image to be processed and the pixels in a target area of the image to be processed; the target area is the area where the radial blur effect is to be generated; the center position is the generation center of the radial blur effect in the image to be processed; determine the radial direction vector of the pixel point relative to the center position, and based on the The radial direction vector determines the offset distance of the pixel point; the offset distance of the pixel point in different radial directions is different; the pixel point is blurred based on the offset distance to obtain the image to be processed blurred image.
  • determining the radial direction vector of the pixel point relative to the center position includes: determining the pixel coordinates of the center position in the image to be processed, and obtaining the first pixel coordinates, and determine the pixel coordinates of the pixel point in the image to be processed to obtain the second pixel coordinates; determine the radial direction vector based on the first pixel coordinates and the second pixel coordinates.
  • determining the offset distance of the pixel point based on the radial direction vector includes: determining target pixels in the pixel point with the same radial direction based on the radial direction vector. point; the radial direction is the direction of the radial direction vector; generate the same random value for the target pixel point through a preset random function; use the same random value as the offset of the target pixel point distance.
  • the radial direction vector includes a vector component in the transverse axis direction and a vector component in the longitudinal axis direction;
  • the offset distance includes: an offset component of the vector component in the transverse axis direction. and the offset component of the vector component in the longitudinal axis direction.
  • blurring the pixels based on the offset distance to obtain a blurred image of the image to be processed includes: obtaining a target blur preset for the pixels. distance; superimpose the target blur distance and the offset distance of the pixel point according to the preset superposition method to obtain the target offset distance; based on the target offset distance, blur the corresponding pixel point to obtain the target offset distance. Describe the blurred image of the image to be processed.
  • superposing the target blur distance and the offset distance of the pixel points according to a preset superposition method to obtain the target offset distance includes: according to a preset calculation method, The target blur distance and the offset distance of each pixel point are calculated to obtain the target offset distance, wherein the preset calculation method includes any of the following: multiplication and addition.
  • the method further includes: determining a target difference result in which the offset distance is within a preset difference range; and adding the target blur distance and the target blur distance in a preset superposition manner.
  • Superposing the offset distances of the pixel points to obtain the target offset distance includes: superimposing the target blur distance and the target difference result according to the preset superposition method to obtain the target offset distance.
  • determining the radial direction vector of the pixel point relative to the center position includes: determining the effect type of the radial blur effect, and based on the effect type in the Determine a target object in the image to be processed; determine the center position based on the target object, and determine the radial direction vector of the pixel point based on the center position.
  • the method further includes: when the effect type is a first type, obtaining a first blur parameter; wherein the first type is used to indicate the blur parameter of the image to be processed.
  • the effect type is a volumetric light and shadow effect; the first blur parameter includes a brightness parameter and/or a color parameter; and the blur processing of the pixel point based on the offset distance is performed to obtain a blurred image of the image to be processed, including : Perform blur processing on the pixel points based on the first blur parameter and the offset distance to obtain a blurred image of the image to be processed.
  • the method further includes: when the effect type is a second type, obtaining a second blur parameter; wherein the second type is used to indicate the blur parameter of the image to be processed.
  • the effect type is an image speed line adding effect.
  • the second blur parameter is used to indicate the adding density of the image speed line and/or the adding direction of the image speed line.
  • the image speed line is used to display the target object in the image to be processed. Movement effect; the blurring of the pixels based on the offset distance to obtain a blurred image of the image to be processed includes: blurring the pixels based on the second blur parameter and the offset distance. Perform blur processing to obtain a blurred image of the image to be processed.
  • an embodiment of the present disclosure provides an image processing device, including: an acquisition unit, used to acquire an image to be processed; a first determination unit, used to determine the center position of the image to be processed and the image to be processed. Pixel points in the target area; the target area is the area where the radial blur effect is to be generated; the center position is the generation center of the radial blur effect in the image to be processed; a second determination unit is used to determine the The radial direction vector of the pixel point relative to the center position, and the offset distance of the pixel point is determined based on the radial direction vector; the offset distances of pixel points in different radial directions are different; the blur processing unit , used to blur the pixel points based on the offset distance to obtain a blurred image of the image to be processed.
  • embodiments of the present disclosure also provide a computer device, including: a processor, a memory, and a bus.
  • the memory stores machine-readable instructions executable by the processor.
  • the processing communicates with the memory through a bus, the machine
  • the readable instructions are executed by the processor, the steps in the above-mentioned first aspect, or any possible implementation manner of the first aspect, are performed.
  • embodiments of the present disclosure also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program executes the above-mentioned first aspect, or any of the first aspects. steps in a possible implementation.
  • embodiments of the present disclosure also provide a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer implements the above-mentioned first aspect, or any possible implementation manner of the first aspect. steps in.
  • the pixels in the target area in the image to be processed can be determined. Then, determine the center position of the image to be processed and the radial direction vector of the pixel point relative to the center position, and generate a corresponding offset distance for the pixel point based on the radial direction vector. Since the technical solution of the present disclosure is to generate different offset distances for pixels corresponding to different radial direction vectors, it can be achieved that pixels corresponding to the same abscissa have different offset distances in the horizontal axis direction, and the pixels corresponding to the same vertical coordinate can have different offset distances. The pixel points of the coordinates have different offset distances in the vertical axis direction. This effectively eliminates ghost images in blurred images to improve the blur effect of radial blur.
  • Figure 1(a) shows a schematic diagram of an original image to be processed
  • Figure 1(b) shows a schematic diagram of the effect of radial blur processing on the original image shown in Figure 1(a) through existing radial blur technology
  • Figure 2 shows another schematic diagram of the effect of existing radial blur technology
  • Figure 3 shows a flow chart of an image processing method provided by an embodiment of the present disclosure
  • Figure 4 shows a schematic diagram of the technical principle of an existing radial blur technology
  • Figure 5 shows a flowchart of a specific method for determining the radial direction + directional vector of each pixel in the image to be processed based on the center position in the image processing method provided by the embodiment of the present disclosure
  • Figure 6 shows a schematic diagram of the technical principles of an image processing method provided by an embodiment of the present disclosure
  • Figure 7 shows a sampling effect diagram after cyclic sampling processing of the radial blur image processed by the image processing method provided by the embodiment of the present disclosure through different sampling times;
  • Figure 8 shows a schematic diagram of an image processing device provided by an embodiment of the present disclosure
  • FIG. 9 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
  • a and/or B can mean: A alone exists, A and B exist simultaneously, and B alone exists. situation.
  • at least one herein refers to any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, and C, which can mean including from A, Any one or more elements selected from the set composed of B and C.
  • radial blur technology simulates the radial effect produced when shooting objects when the camera moves back and forth or when the camera rotates. For example, after performing radial blur processing on the original image as shown in Figure 1(a), a radial blurred image as shown in Figure 1(b) can be obtained.
  • the radially blurred image contains obvious ghosting.
  • the ghosting effect in the captured image is not obvious. Therefore, the ghost images appearing in the radial blur image will affect the simulation effect of the radial blur technology for the radial effect.
  • the radial blur processing process can be repeated multiple times on the image. By repeating the radial blur processing multiple times, the ghosting can be diluted. However, as shown in Figure 2, there are still obvious ghosts in the radial blur image, and repeating the radial blur process multiple times will consume a lot of computing resources.
  • the blur offset process is usually performed on each pixel in the image using the same offset component.
  • the offset distance of pixel points corresponding to the same abscissa in the horizontal axis direction will remain consistent, and the offset distance of pixel points corresponding to the same ordinate coordinate in the vertical axis direction will remain consistent, so that the radial A very regular ghosting phenomenon is formed in the blurred image.
  • ghosting can be reduced through downsampling and upsampling, combined with multiple radial blurs.
  • the number of pixels in the image that need to be radially blurred can be reduced to achieve the effect of diluting ghosting.
  • this method still consumes a lot of computing resources, and the ghosting problem is still obvious.
  • embodiments of the present disclosure provide an image processing method, device, computer equipment, and storage medium.
  • the pixel points in the target area in the image to be processed can be determined, and then the radial direction vector corresponding to the center position of the pixel point is determined, and based on the radial direction vector Generate corresponding offset distances for pixels.
  • the technical solution of the present disclosure is to generate different offset distances for pixels corresponding to different radial direction vectors, it can be achieved that pixels corresponding to the same abscissa have different offset distances in the horizontal axis direction, and the pixels corresponding to the same vertical coordinate can have different offset distances.
  • the pixel points of the coordinates have different offset distances in the vertical axis direction. This effectively eliminates ghost images in blurred images to improve the blur effect of radial blur.
  • an image processing method disclosed in the embodiment of the present disclosure is The method will be introduced in detail.
  • the execution subject of the image processing method provided by the embodiment of the present disclosure is generally a computer device with certain computing capabilities.
  • FIG. 3 a flow chart of an image processing method provided by an embodiment of the present disclosure is shown.
  • the method includes steps S301 to S305, wherein:
  • S301 Obtain the image to be processed, and determine the center position of the image to be processed and the pixels in the target area in the image to be processed; the target area is the area where the radial blur effect is to be generated; the center position is The center of generation of the radial blur effect in the image to be processed.
  • the generation center of the radial blur effect in the image to be processed is first determined, that is, the center position; then, the pixel points in the target area in the image to be processed are determined.
  • the generation center (ie, the center position) of the radial blur effect in the image to be processed can be understood as a pixel in the image to be processed.
  • the center position may be a pixel manually marked by the user in advance in the image to be processed.
  • the center position may be determined in response to an annotation operation for the image to be processed and based on an annotation position corresponding to the annotation operation.
  • it can also be pixels automatically selected in the image to be processed according to preset selection rules. For example, the above-mentioned center position is determined based on the effect type of the radial blur effect corresponding to the image to be processed.
  • a matching target object can be determined in the image to be processed based on the effect type, and then the above-mentioned center position can be determined based on the position of the target object.
  • the center position of the matching target object is determined as the center position. If the number of matching target objects is detected to be multiple, the target object may be specified among the multiple matching target objects, and the center position of the specified target object may be determined as the above-mentioned center position.
  • the image center position of the image to be processed can also be determined as the center position.
  • the target area may be the entire image area in the image to be processed, or may be a partial image area in the image to be processed.
  • the target area can be determined in the image to be processed based on the following parameters: effect type, Parameters such as area information (for example, area size and area position), the position (or center position) of the target object in the image to be processed, etc. preset by the user.
  • effect type Parameters such as area information (for example, area size and area position), the position (or center position) of the target object in the image to be processed, etc. preset by the user.
  • the target object in the image to be processed is the light source.
  • the target area is determined in the image to be processed based on the position of the light source and the area size preset by the user.
  • S303 Determine the radial direction vector of the pixel point relative to the center position, and determine the offset distance of the pixel point based on the radial direction vector; wherein, the offset distance of the pixel point in different radial directions different.
  • S305 Perform blur processing on each pixel point based on the offset distance to obtain a blurred image of the image to be processed.
  • the radial direction vector includes: a direction and a module of the vector.
  • the direction in the radial direction vector is the direction in which the central position points to the corresponding pixel point (that is, the radial direction)
  • the modulus in the radial direction vector is the distance between the central position and the corresponding pixel point.
  • a rectangular coordinate system can be constructed using the center position as the coordinate origin, in which the horizontal axis of the rectangular coordinate system is marked as the U axis, and the vertical axis of the rectangular coordinate system is marked as the V axis.
  • a pixel point P0 (U0, V0), P1 (U1, V1), P2 (U2, V2) can be randomly selected.
  • the positions between P0, P1 and P2 can be as shown in Figure 4 Show.
  • an offset d is set for each pixel.
  • the offset distance of each pixel in the U-axis direction and the V-axis direction can be described as:
  • d*float2(U0V0-0.5) can be described by the formula as d*(U 0 -0.5,V 0 -0.5);
  • d* float2(U1V1-0.5) can be described by the formula as d*(U 1 -0.5,V 1 -0.5);
  • d*float2(U2V2-0.5) can be described by the formula as d*(U 2 -0.5,V 2 -0.5 ).
  • different offset distances are determined for pixel points corresponding to different radial directions. For example, for the pixel points P0, P1 and P2, since the radial directions corresponding to the pixel points P0, P1 and P2 are different, different offset distances can be determined for the pixel points P0, P1 and P2 respectively. Based on the offset, When the pixel points P0, P1 and P2 are offset by distance, even if the abscissas of the pixel points P0, P1 and P2 are the same, the offset distances of the pixel points P0, P1 and P2 in the U direction will not be the same.
  • the pixel points in the target area in the image to be processed can be determined, and then the radial direction vector of the pixel point relative to the center position is determined, and based on the radial direction vector Generate corresponding offset distance for each pixel. Since the technical solution of the present disclosure is to generate different offset distances for pixels corresponding to different radial direction vectors, it can be achieved that pixels corresponding to the same abscissa have different offset distances in the horizontal axis direction, and the pixels corresponding to the same vertical coordinate can have different offset distances. The pixel points of the coordinates have different offset distances in the vertical axis direction, thereby effectively eliminating ghosts in the blurred image and improving the blur effect of radial blur.
  • step S303 determining the radial direction vector of the pixel point relative to the center position specifically includes the following steps:
  • Step S501 Determine the pixel coordinates of the center position in the image to be processed to obtain the first pixel coordinates, and determine the pixel coordinates of the pixel point in the image to be processed to obtain the second pixel coordinates;
  • Step S502 Determine the radial direction vector based on the first pixel coordinate and the second pixel coordinate.
  • the central position after the central position is determined, it can be determined that the central position is to be Process the pixel coordinates in the image to obtain the first pixel coordinates.
  • the first pixel coordinates can be recorded as (U1, V1).
  • Pixel coordinates, for example, the second pixel coordinates can be recorded as (U2, V2).
  • the first pixel coordinates and the second pixel coordinates can be calculated to determine the radial direction vector.
  • the vector AB can be determined as the above-mentioned radial direction vector.
  • the above-mentioned radial direction vector (that is, vector AB) can be expressed as: float2(U2-U1, V2-V1).
  • the amount of data processing can be simplified, and the computing resources of the computer device can be saved. Improve image processing efficiency.
  • step S303: determining the offset distance of the pixel point based on the radial direction vector specifically includes the following steps:
  • Step S11 Unitize the radial direction vector
  • Step S12 Determine the offset distance of each pixel point according to the radial direction vector of the unitization process.
  • the radial direction vector can be normalized based on a normalization function, where the normalization function can be normalize.
  • the unitization process of the radial direction vector can be described as the following process:
  • step S303: determining the offset distance of the pixel point based on the radial direction vector specifically includes the following steps:
  • Step S21 Determine target pixel points with the same radial direction among the pixel points based on the radial direction vector; the radial direction is the direction of the radial direction vector;
  • Step S22 Generate the same random value for the target pixel through a preset random function
  • Step S23 Use the same random value as the offset distance of the target pixel point.
  • the processing process can be described as:
  • An offset value is randomly generated for each pixel in the image, where the offset values corresponding to different pixels are different.
  • the offset processing can be performed pixel by pixel, that is, the offset processing of each pixel is achieved by superimposing the offset value of each pixel.
  • this processing method can better avoid ghosting because the offset values are different pixel by pixel, but it also leads to the occurrence of a lot of noise because of the offset pixel by pixel. Therefore, it is necessary to cooperate with the TAA denoising algorithm to denoise the radial blurred image.
  • the radial blur processing of images by combining the dithering algorithm and the TAA noise reduction algorithm consumes a large amount of computing resources and is not conducive to the stable operation of computer equipment.
  • the corresponding same radial direction vector can be determined among multiple pixel points based on the determined radial direction vector. For example, multiple groups of pixels can be determined, and each group of pixels corresponds to target pixels in the same radial direction.
  • the same random value can be generated for each group of pixels through the preset random function random.
  • generating a random value can be implemented based on the following formula:
  • dirNormal represents the radial direction vector (or the radial direction vector of the above-mentioned unitization process).
  • float2ditherDir represents a random value generated based on the radial direction vector.
  • the random value can be determined as the offset distance of the target pixel point.
  • At least one numerical region can be determined first, and then the same random numerical value can be generated for each group of pixels within the numerical interval through a preset random function.
  • the above-mentioned at least one numerical area can be determined based on the effect type, or the user can set at least one numerical area in advance. This disclosure does not specifically limit the setting method of the numerical area.
  • the above-mentioned radial direction vector includes a vector component in the horizontal axis direction and a vector component in the longitudinal axis direction.
  • the radial direction vector (the above vector AB) float2(U2-U1, V2-V1), in this radial direction vector, contains the vector component "U2-U1" in the horizontal axis direction, and the vector containing the vertical axis direction Component "V2-V1".
  • generating the same offset distance for the target pixel point through a preset random function includes: an offset component of the vector component in the horizontal axis direction and an offset component of the vector component in the vertical axis direction.
  • the random value can be determined as an offset component of the vector component in the horizontal axis direction and an offset component of the vector component in the vertical axis direction respectively.
  • offset processing can be performed on each pixel point based on the offset distance. After the processing, the to-be-used pixel point is obtained. Process blurry images of images.
  • step S305 blurring the pixel points based on the offset distance to obtain a blurred image of the image to be processed, specifically includes the following steps:
  • Step S3051 Obtain the target blur distance set in advance for the pixel
  • Step S3052 Superimpose the target blur distance and the offset distance of the pixel point according to a preset superposition method to obtain the target offset distance;
  • Step S3053 Based on the target offset distance, blur the corresponding pixel points to obtain to the blurred image of the image to be processed.
  • the same target blur distance can be set in advance for each pixel in the target area.
  • the target blur distance here includes the blur distance component of the vector component in the horizontal axis direction and the vector in the vertical axis direction.
  • the fuzzy distance component of the component may be the offset distance d*float2(U1-U0, V1-V0) in the above embodiment.
  • the target blur distance and the offset distance can be superimposed according to the preset superposition method to obtain the target offset distance, and the corresponding pixel points can be offset according to the target offset distance.
  • a blurred image of the image to be processed is obtained. For example, a blurred image as shown in Figure 6 can be obtained.
  • the above step superimpose the target blur distance and the offset distance of the pixel point according to a preset superposition method to obtain the target offset distance, which specifically includes the following steps:
  • the target blur distance and the offset distance of each pixel point are calculated to obtain the target offset distance, wherein the preset calculation method includes any of the following: multiplication, addition.
  • the target blur distance and the offset distance of each pixel can be multiplied or added to obtain the target offset distance.
  • the blur distance of the above target is: d*float2(U1-U0, V1-V0), and the offset distance of each pixel above is float2ditherDir.
  • the target blur distance and the offset distance of each pixel can be calculated through the following formula:
  • (U1, V1) is the pixel coordinate of each pixel point
  • (U0, V0) is the pixel coordinate of the center position.
  • the target blur distance and each of the Before the offset distances of pixels are superimposed the offset distance of each pixel can also be difference processed through the difference function.
  • the specific difference processing process can be described as follows:
  • lerp is the above-mentioned preset difference function.
  • the conventional expression of lerp is: lerp (from, to, value).
  • the preset difference function lerp can be understood as being within the preset difference range (from, to). Perform difference processing on the value value, where the value value is "ditherDir" and the preset difference range (from, to) is (1, 1.5).
  • the target blur distance and the offset distance of the pixel are superimposed according to the preset superposition method.
  • the target blur distance can be superimposed according to the preset superposition method.
  • the target blur distance and the target difference result are superimposed to obtain the target offset distance.
  • the target fuzzy distance and target difference results can be multiplied, and the multiplication result is determined as the target offset distance.
  • the specific calculation formula can be described as:
  • each pixel point can be offset based on the target offset distance, and after the processing, a blurred image of the image to be processed is obtained.
  • the same offset distance is determined for pixel points corresponding to the same radial direction, and different offset distances are determined for pixel points corresponding to different radial directions. Not only can it effectively alleviate the ghosting problem of existing radial blur technology, it can also ensure the continuity of pixels in the same direction, and can also reduce noise reduction steps.
  • the offset distance in each radial direction can be set randomly. Therefore, when an appropriate offset distance is set, a good image quality can be generated with a very small number of radial blur samplings.
  • the radial blur effect greatly improves the image processing performance and enhances the applicability of radial blur technology. For example, as shown in Figure 7, from left to right are the effects of radially cyclic sampling 10 times, 5 times and 3 times on the radial blur image, completely avoiding the sense of repetition.
  • step S303 determines the radial direction vector of the pixel point relative to the center position, specifically including the following steps:
  • S31 Determine the effect type of the radial blur effect, and based on the effect type, perform Determine the target object in the processed image;
  • S32 Determine the center position based on the target object, and determine the radial direction vector of the pixel point based on the center position.
  • the effect type of the radial blur effect of the image to be processed may be a type preset by the user.
  • a user can enter an effect type through a computer device.
  • the effect type of the radial blur effect can include any of the following: volumetric light and shadow effects, image speed line addition effects.
  • Radial blur effects for different effect types can correspond to different target objects in the image to be processed.
  • the corresponding target object in the image to be processed can be a light source, such as the sun, a lamp, etc.
  • the corresponding target object in the image to be processed can be any object that needs to express a movement effect.
  • the image speed line can also be called a line.
  • the image speed line is used to express the movement effect of the target object in the image to be processed, for example, movement trajectory and/or movement direction and other information.
  • the target object can be determined based on the effect type, and the center position can be determined based on the target object.
  • the center point of the target object can be determined as the center position.
  • the radial direction vector of the pixel point can be determined based on the center position.
  • the method can also obtain a first blur parameter; wherein the first type is used to indicate the effect type of the image to be processed. It is a volumetric light and shadow effect; the first blur parameter includes a brightness parameter and/or a color parameter.
  • performing blur processing on the pixels based on the offset distance in step S305 to obtain a blurred image of the image to be processed includes: based on the first blur parameter and the offset distance The pixel points are blurred to obtain a blurred image of the image to be processed.
  • the above-mentioned first type is used to indicate that the effect type of the image to be processed is a volumetric light and shadow effect.
  • the volumetric light and shadow effect can be reflected by combining the light and dark threshold (ie, brightness parameter) and color adjustment (ie, color parameter), as well as the image processing method provided by the embodiment of the present disclosure.
  • the light source may be determined in the image to be processed. If multiple light sources (for example, multiple light bulbs) are determined, at this time, the location in the foreground area can be determined among the multiple light sources.
  • the light source of the domain is the target object; or, the user can specify one or more light sources among multiple light sources as the above target object according to actual needs.
  • the center point of the light source can be determined as the center position. Then, the radial direction vector of each pixel in the target area relative to the center position can be determined based on the center position. Then the corresponding offset distance is determined based on the radial direction vector.
  • corresponding offset distances can be randomly generated in the numerical area for target pixels corresponding to the same radial direction.
  • the pixel points can be blurred based on the first blur parameter and the offset distance to obtain a blurred image of the image to be processed.
  • the pixel points can be blurred in the manner described in the above steps S3051 to S3053, thereby obtaining an initial blurred image.
  • brightness adjustment and/or color adjustment can also be performed on the initial blurred image based on the first blur parameter, thereby obtaining a blurred image of the image to be processed.
  • the method can also obtain a second blur parameter; wherein the second type is used to indicate the effect type of the image to be processed.
  • the second blur parameter is used to indicate the adding density and/or the adding direction of the image speed line, which is used to display the movement effect of the target object in the image to be processed.
  • performing blur processing on the pixels based on the offset distance in the above step S305 to obtain a blurred image of the image to be processed includes: based on the second blur parameter and the offset distance The pixel points are blurred to obtain a blurred image of the image to be processed.
  • the above-mentioned second type is used to indicate that the effect type of the image to be processed is the image speed line adding effect, which can also be called: cartoon style screen line (speed line) simulation effect.
  • effects such as line arrangement (speed lines) in comic style can be simulated through open line density (directional random density) and the image processing method provided by the embodiments of the present disclosure.
  • the target object that needs to display the movement effect can be determined in the image to be processed. If multiple target objects are determined, the target object located in the foreground area can be determined among the multiple target objects; or, the user can specify one or more target objects among the multiple target objects according to actual needs.
  • the center point of the target object can be determined as the center position.
  • the target area can be determined in the image to be processed based on the second blur parameter, and the pixel points to be shifted can be determined in the target area.
  • the pixels to be shifted can be all the pixels in the target area, or some of the pixels.
  • a radial direction vector of the pixel point to be offset relative to the center position may be determined based on the central position, and then a corresponding offset distance may be determined based on the radial direction vector.
  • corresponding offset distances can be generated in the numerical area for pixel points to be offset corresponding to the same radial direction. After that, the pixels to be offset can be offset based on the offset distance to obtain a blurred image of the image to be processed.
  • the pixel points can be offset in the manner described in the above steps S3051 to S3053, thereby obtaining an initial blurred image.
  • the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible The internal logic is determined.
  • the embodiments of the present disclosure also provide an image processing device corresponding to the image processing method. Since the principle of solving the problem of the device in the embodiment of the present disclosure is similar to the above-mentioned image processing method in the embodiment of the present disclosure, the implementation of the device Please refer to the implementation of the method, and the repeated parts will not be repeated.
  • the device includes: an acquisition unit 10, a first determination unit 20, a second determination unit 30, and an offset processing 40; wherein,
  • Acquisition unit 10 used to acquire images to be processed
  • the first determination unit 20 is used to determine the center position of the image to be processed and the pixel points in the target area of the image to be processed; the target area is the area where the radial blur effect is to be generated; the center position is the Describes the generation center of the radial blur effect in the image to be processed;
  • the second determination unit 30 is used to determine the radial direction vector of the pixel point relative to the center position, and determine the offset distance of the pixel point based on the radial direction vector; pixel points in different radial directions The offset distance is different;
  • the blur processing unit 40 is configured to perform blur processing on the pixel points based on the offset distance to obtain a blurred image of the image to be processed.
  • the pixel points in the target area in the image to be processed can be determined, and then the radial direction vector of the pixel point relative to the center position is determined, and based on A corresponding offset distance is generated for each pixel based on the radial direction vector. Since the technical solution of the present disclosure is to generate different offset distances for pixels corresponding to different radial direction vectors, it can be achieved that pixels corresponding to the same abscissa have different offset distances in the horizontal axis direction, and the pixels corresponding to the same vertical coordinate can have different offset distances. The pixel points of the coordinates have different offset distances in the vertical axis direction, thereby effectively eliminating ghosts in the blurred image and improving the blur effect of radial blur.
  • the second determination unit is further configured to: determine the pixel coordinates of the center position in the image to be processed, obtain the first pixel coordinates, and determine the position of the pixel point in the image to be processed.
  • the pixel coordinates in the image are used to obtain the second pixel coordinates; based on the first pixel coordinates and the second pixel coordinates, the radial direction vector is determined.
  • the second determination unit is further configured to: determine target pixel points in the pixel points with the same radial direction based on the radial direction vector; the radial direction is the radial direction The direction of the vector; generate the same random value for the target pixel point through a preset random function; use the same random value as the offset distance of the target pixel point.
  • the radial direction vector includes a vector component in the transverse axis direction and a vector component in the longitudinal axis direction;
  • the offset distance includes: an offset component of the vector component in the transverse axis direction and The offset component of the vector component in the longitudinal axis direction.
  • the blur processing unit is further configured to: obtain a target blur distance preset for the pixel; and combine the target blur distance and the offset distance of the pixel according to a preset superposition method. Superposition is performed to obtain the target offset distance; based on the target offset distance, the corresponding pixel points are blurred to obtain a blurred image of the image to be processed.
  • the blur processing unit is further configured to: calculate the target blur distance and the offset distance of each pixel point according to a preset calculation method to obtain the target offset distance,
  • the preset calculation method includes any of the following: multiplication and addition.
  • the device is further configured to: determine a target difference result in which the offset distance is within a preset difference range; and the offset unit is further configured to: add all the offset values according to the preset superposition method. The target fuzzy distance and the target difference result are superimposed to obtain the target offset distance.
  • the first determination unit is further configured to: determine the effect type of the radial blur effect, and determine the target object in the image to be processed based on the effect type; based on the target object Determine the center position, and determine the radial direction of the pixel based on the center position to vector.
  • the device is further configured to: obtain a first blur parameter when the effect type is a first type; wherein the first type is used to indicate the effect of the image to be processed
  • the type is volumetric light and shadow effect;
  • the first blur parameter includes a brightness parameter and/or a color parameter;
  • a blur processing unit further configured to: blur the pixel based on the first blur parameter and the offset distance , obtain the blurred image of the image to be processed.
  • the device is further configured to: obtain a second blur parameter when the effect type is a second type; wherein the second type is used to indicate the effect of the image to be processed.
  • the type is image speed line adding effect.
  • the second blur parameter is used to indicate the adding density and/or the adding direction of the image speed line.
  • the image speed line is used to display the movement of the target object in the image to be processed.
  • Effect a blur processing unit, further configured to: blur the pixel points based on the second blur parameter and the offset distance to obtain a blurred image of the image to be processed.
  • an embodiment of the present disclosure also provides a computer device 900.
  • Figure 9 is a schematic structural diagram of the computer device 900 provided by an embodiment of the present disclosure, it includes:
  • the processor 91 and the memory 92 communicate through the bus 93, so that The processor 91 executes the following instructions:
  • the image to be processed and determine the center position of the image to be processed and the pixels in the target area of the image to be processed; the target area is the area where the radial blur effect is to be generated; the center position is the area to be processed.
  • Processing the generation center of the radial blur effect in the image determining the radial direction vector of the pixel point relative to the center position, and determining the offset distance of the pixel point based on the radial direction vector; different radial directions
  • the offset distances of the pixel points are different; the pixel points are blurred based on the offset distance to obtain a blurred image of the image to be processed.
  • the instructions of the processor 91 also include:
  • the radial direction vector is determined based on the first pixel coordinate and the second pixel coordinate.
  • the instructions of the processor 91 also include:
  • Target pixel points with the same radial direction among the pixel points are determined based on the radial direction vector;
  • the radial direction is the direction of the radial direction vector;
  • the same random value is used as the offset distance of the target pixel point.
  • the instructions of the processor 91 also include:
  • the radial direction vector includes a vector component in the transverse axis direction and a vector component in the longitudinal axis direction; the offset distance includes: an offset component of the vector component in the transverse axis direction and a vector component in the longitudinal axis direction. offset component.
  • the instructions of the processor 91 also include:
  • the corresponding pixel points are blurred to obtain a blurred image of the image to be processed.
  • the instructions of the processor 91 also include:
  • the target blur distance and the offset distance of each pixel point are calculated to obtain the target offset distance, wherein the preset calculation method includes any of the following: multiplication, addition.
  • the instructions of the processor 91 also include:
  • the target blur distance and the target difference result are superimposed according to the preset superposition method to obtain the target offset distance.
  • the instructions of the processor 91 also include:
  • the center position is determined based on the target object, and the radial direction vector of the pixel point is determined based on the center position.
  • the instructions of the processor 91 also include:
  • a first blur parameter is obtained; wherein the first type is used to indicate that the effect type of the image to be processed is a volumetric light and shadow effect; the first blur parameter includes brightness parameters and/or color parameters; perform blur processing on the pixel points based on the first blur parameter and the offset distance to obtain a blurred image of the image to be processed.
  • the instructions of the processor 91 also include:
  • the effect type is the second type
  • obtain a second blur parameter wherein the second type is used to indicate that the effect type of the image to be processed is an image speed line adding effect, and the second blur parameter Used to indicate the added density of the image speed line and/or the added direction of the image speed line, which is used to display the movement effect of the target object in the image to be processed; based on the second blur parameter and the offset The distance is used to blur the pixel points to obtain a blurred image of the image to be processed.
  • Embodiments of the present disclosure also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program. When the computer program is run by a processor, the steps of the image processing method described in the above method embodiment are executed.
  • the storage medium may be a volatile or non-volatile computer-readable storage medium.
  • Embodiments of the present disclosure also provide a computer program product.
  • the computer program product carries program code.
  • the instructions included in the program code can be used to execute the steps of the image processing method described in the above method embodiment. For details, please refer to the above method. The embodiments will not be described again here.
  • the above-mentioned computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium.
  • the computer program product is embodied as a software product, such as a Software Development Kit (SDK), etc. wait.
  • SDK Software Development Kit
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor.
  • the technical solution of the embodiments of the present disclosure is essentially or contributes to the existing technology or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Image Processing (AREA)

Abstract

L'invention concerne un procédé et un appareil de traitement d'image, ainsi qu'un dispositif informatique et un support de stockage. Le procédé consiste : à acquérir une image à traiter, et à déterminer une position centrale de ladite image et un point de pixel dans une zone cible de ladite image, la zone cible étant une zone où un effet de flou radial doit être généré, et la position centrale étant un centre de génération de l'effet de flou radial dans ladite image (S301) ; à déterminer un vecteur de direction radiale du point de pixel par rapport à la position centrale, et à déterminer une distance de décalage du point de pixel sur la base du vecteur de direction radiale, des distances de décalage des points de pixel dans différentes directions radiales étant différentes (S303) ; et à effectuer un traitement de flou sur le point de pixel sur la base de la distance de décalage, de façon à obtenir une image floue de ladite image (S305).
PCT/CN2023/080379 2022-03-17 2023-03-09 Procédé et appareil de traitement d'image, et dispositif informatique et support de stockage WO2023174137A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210264780.5 2022-03-17
CN202210264780.5A CN114626978A (zh) 2022-03-17 2022-03-17 一种图像处理方法、装置、计算机设备以及存储介质

Publications (1)

Publication Number Publication Date
WO2023174137A1 true WO2023174137A1 (fr) 2023-09-21

Family

ID=81902404

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/080379 WO2023174137A1 (fr) 2022-03-17 2023-03-09 Procédé et appareil de traitement d'image, et dispositif informatique et support de stockage

Country Status (2)

Country Link
CN (1) CN114626978A (fr)
WO (1) WO2023174137A1 (fr)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114626978A (zh) * 2022-03-17 2022-06-14 北京字跳网络技术有限公司 一种图像处理方法、装置、计算机设备以及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130279799A1 (en) * 2010-12-03 2013-10-24 Sharp Kabushiki Kaisha Image processing device, image processing method, and image processing program
CN108305228A (zh) * 2018-01-26 2018-07-20 网易(杭州)网络有限公司 图像处理方法、装置、存储介质及处理器
CN108564541A (zh) * 2018-03-28 2018-09-21 麒麟合盛网络技术股份有限公司 一种图像处理方法及装置
CN112541867A (zh) * 2020-12-04 2021-03-23 Oppo(重庆)智能科技有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
CN113256785A (zh) * 2021-05-31 2021-08-13 北京字跳网络技术有限公司 图像处理方法、装置、设备及介质
CN114626978A (zh) * 2022-03-17 2022-06-14 北京字跳网络技术有限公司 一种图像处理方法、装置、计算机设备以及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130279799A1 (en) * 2010-12-03 2013-10-24 Sharp Kabushiki Kaisha Image processing device, image processing method, and image processing program
CN108305228A (zh) * 2018-01-26 2018-07-20 网易(杭州)网络有限公司 图像处理方法、装置、存储介质及处理器
CN108564541A (zh) * 2018-03-28 2018-09-21 麒麟合盛网络技术股份有限公司 一种图像处理方法及装置
CN112541867A (zh) * 2020-12-04 2021-03-23 Oppo(重庆)智能科技有限公司 图像处理方法、装置、电子设备及计算机可读存储介质
CN113256785A (zh) * 2021-05-31 2021-08-13 北京字跳网络技术有限公司 图像处理方法、装置、设备及介质
CN114626978A (zh) * 2022-03-17 2022-06-14 北京字跳网络技术有限公司 一种图像处理方法、装置、计算机设备以及存储介质

Also Published As

Publication number Publication date
CN114626978A (zh) 2022-06-14

Similar Documents

Publication Publication Date Title
EP2291999B1 (fr) Déconvolution d'image au moyen d'antécédents chromatiques
US8824821B2 (en) Method and apparatus for performing user inspired visual effects rendering on an image
CN105409196B (zh) 用于视频稳定的自适应路径平滑
US20090122083A1 (en) Edge evaluation techniques for graphics hardware
EP2164040A1 (fr) Système et procédé pour une grande qualité d'image et l'interpolation vidéo
US9953400B2 (en) Adaptive path smoothing for video stabilization
WO2021115136A1 (fr) Procédé et appareil anti-tremblement pour une image vidéo, dispositif électronique et support de stockage
US9734551B1 (en) Providing depth-of-field renderings
JP7101269B2 (ja) ポーズ補正
WO2018210308A1 (fr) Procédé et appareil de floutage d'image, support de stockage et dispositif électronique
WO2023174137A1 (fr) Procédé et appareil de traitement d'image, et dispositif informatique et support de stockage
WO2021147374A1 (fr) Procédé et appareil de traitement d'image, et procédé et appareil d'entraînement de modèle de traitement d'image
WO2019222911A1 (fr) Méthode de calcul de flux optique et dispositif informatique
CN112652046A (zh) 游戏画面的生成方法、装置、设备及存储介质
CN115330986B (zh) 一种分块渲染模式图形处理方法及系统
CN113657518B (zh) 训练方法、目标图像检测方法、装置、电子设备以及介质
WO2022048414A1 (fr) Procédé, appareil et dispositif de génération d'image, et support d'enregistrement
CN116457828A (zh) 针对光流估计的监督学习和遮挡掩蔽
JP2023501692A (ja) ライトボリュームレンダリング
CN107563960A (zh) 一种自拍图片的处理方法、存储介质及移动终端
Seychell et al. An approach for objective quality assessment of image inpainting results
KR20230154355A (ko) 비지역적 평균 기반의 노이즈 제거 장치 및 방법
Hashimoto et al. An FPGA-Based Fully Pipelined Bilateral Grid for Real-Time Image Denoising
US20220292344A1 (en) Processing data in pixel-to-pixel neural networks
TWI815092B (zh) 視頻處理電路及用於執行sr操作的方法

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: 23769643

Country of ref document: EP

Kind code of ref document: A1