CN112700385A - Image processing method, image processing device, electronic equipment and storage medium - Google Patents
Image processing method, image processing device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112700385A CN112700385A CN202011630524.0A CN202011630524A CN112700385A CN 112700385 A CN112700385 A CN 112700385A CN 202011630524 A CN202011630524 A CN 202011630524A CN 112700385 A CN112700385 A CN 112700385A
- Authority
- CN
- China
- Prior art keywords
- image
- adjusted
- processed
- target
- pixel point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 53
- 238000003672 processing method Methods 0.000 title claims abstract description 37
- 230000000694 effects Effects 0.000 claims abstract description 161
- 238000004590 computer program Methods 0.000 claims description 17
- 238000000034 method Methods 0.000 claims description 16
- 238000004422 calculation algorithm Methods 0.000 claims description 9
- 230000032669 eclosion Effects 0.000 claims description 7
- 210000003746 feather Anatomy 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 22
- 238000013461 design Methods 0.000 description 20
- 230000006870 function Effects 0.000 description 14
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 6
- 230000002708 enhancing effect Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012887 quadratic function Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0485—Scrolling or panning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Image Processing (AREA)
Abstract
The disclosure provides an image processing method, an image processing apparatus, an electronic device and a storage medium. According to the image processing method, the brightness value of each pixel point in the layer to be processed is obtained, then, target effect adjustment is carried out on the target pixel point according to the input parameter to generate an adjusted image, wherein the target effect item is used for representing the detail presenting degree of the image, and finally, the result image is determined according to the adjusted image and the image to be processed, so that the local detail enhancement or detail blurring processing effect of the image to be processed is achieved.
Description
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of the intelligent terminal technology, the function of acquiring images by the intelligent terminal is more and more powerful, and accordingly, various application programs for correspondingly processing the images acquired by the intelligent terminal are more and more.
Although these application programs can beautify and add special effects to the acquired image information, the processing of the image by the existing application programs is often single in form, and generally only can be performed on the image in an overall adjustment manner, and the processing requirements of the user on the image detail presentation degree cannot be met.
Disclosure of Invention
The present disclosure provides an image processing method, an image processing apparatus, an electronic device, and a storage medium, which are used to solve the technical problem that the current image processing form is relatively single and cannot meet the processing requirement of a user on the image detail presentation degree.
In a first aspect, the present disclosure provides an image processing method, including:
obtaining a brightness value of each pixel point in a layer to be processed, wherein the layer to be processed comprises a feather layer corresponding to a region to be adjusted in an image to be processed;
determining pixel points of which the brightness values in the layer to be processed and the brightness values of the anchor points meet a preset threshold relationship as target pixel points;
performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, wherein the target effect items are used for representing the detail presentation degree of the images;
and determining a result image according to the adjusted image and the image to be processed.
In a second aspect, the present disclosure provides an image processing apparatus comprising:
the image processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the brightness value of each pixel point in a layer to be processed, and the layer to be processed comprises an eclosion layer corresponding to a region to be adjusted in an image to be processed;
the determining module is used for determining pixel points, in the layer to be processed, of which the brightness values meet a preset threshold relation with the brightness value of the anchor point, as target pixel points;
the adjusting module is used for performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, and the target effect items are used for representing the detail presenting degree of the images;
the determining module is further configured to determine a result image according to the adjusted image and the image to be processed.
In a third aspect, the present disclosure also provides an electronic device, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any one of the possible image processing methods of the first aspect via execution of the executable instructions.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the possible image processing methods in the first aspect.
The invention provides an image processing method, an image processing device, electronic equipment and a storage medium, wherein the brightness value of each pixel point in a layer to be processed is obtained, then, target effect adjustment is carried out on the target pixel points according to input parameters of a target effect item to generate an adjusted image, the target effect item is used for representing the detail presenting degree of the image, and finally, a result image is determined according to the adjusted image and the image to be processed, so that the processing effect of local detail enhancement or detail blurring of the image to be processed is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram illustrating an application scenario of an image processing method according to an example embodiment of the present disclosure;
FIG. 2 is a flow diagram illustrating an image processing method according to an example embodiment of the present disclosure;
FIG. 3 is a schematic flow diagram illustrating an image processing method according to another example embodiment of the present disclosure;
FIG. 4 is a schematic illustration of a gray scale map shown in an embodiment of the present disclosure;
FIG. 5 is a schematic illustration of a brightness map shown in an embodiment of the present disclosure;
FIG. 6 is a schematic illustration of detail presentation degree obfuscation shown in an embodiment of the present disclosure;
FIG. 7 is a schematic illustration of detail presentation enhancement shown in an embodiment of the present disclosure;
FIG. 8 is a schematic interface diagram illustrating the range adjustment of a region to be adjusted in the embodiment of the present disclosure;
FIG. 9 is a diagram illustrating the results of enhancing the local detail presentation level shown in an embodiment of the present disclosure;
FIG. 10 is a schematic diagram of a configuration of an image processing apparatus shown in accordance with an example embodiment of the present disclosure;
fig. 11 is a schematic structural diagram of an electronic device shown in the present disclosure according to an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
At present, the functions of the intelligent terminal for collecting images are increasingly powerful, and accordingly, various application programs for correspondingly processing the images collected by the intelligent terminal are increasingly used. For example, these applications may beautify, add special effects to the captured image information. However, the processing form of the image by the existing application programs is often single, and the processing requirement of the user on the image detail presentation degree cannot be met. Specifically, the existing image processing application programs generally process the image globally or process specific regions of the image (such as eyes, lips, and cheeks) for user convenience, and the user cannot adjust and polish the local range of the image more finely according to the higher requirement of the user on the detail presentation degree.
In the embodiment provided by the disclosure, the brightness value of each pixel point in the layer to be processed is obtained, then, the target effect is adjusted on the target pixel point according to the input parameter of the target effect item to generate an adjusted image, wherein the target effect item is used for representing the detail presentation degree of the image, and then, the result image is determined according to the adjusted image and the image to be processed, so that the processing effect of local detail enhancement or detail blurring of the image to be processed is realized. Therefore, the effect range of the target effect item in the image can be controlled, so that a user can adjust and polish the picture with finer granularity aiming at any local position of the image, and the higher use requirement of the user is met.
Fig. 1 is a diagram illustrating an application scenario of an image processing method according to an example embodiment of the present disclosure. As shown in fig. 1, the image processing method provided in this embodiment may be applied to a terminal device 100, where the terminal device 100 may be a personal computer, a notebook computer, a tablet computer, a smart phone, a wearable electronic device, a smart home device, and the like. When the user performs local adjustment on the image to be processed, the user may add a control point to the area to be adjusted of the image to be processed under the prompt of the control point adding icon S01, where an anchor point is determined by the control point, and a layer to be processed corresponding to the area to be adjusted is determined with the anchor point as a central point. And then, performing target effect adjustment on pixel points, of which the brightness values in the layer to be processed and the brightness values of the anchor points meet a preset threshold relation, according to input parameters of a target effect item to generate an adjusted image, wherein the target effect item is used for representing the detail presenting degree of the image, and then determining a result image according to the adjusted image and the image to be processed to achieve the effect of performing local detail enhancement or detail blurring on the image to be processed. The image processing method is described in detail below with several specific implementations.
Fig. 2 is a flowchart illustrating an image processing method according to an example embodiment of the present disclosure. As shown in fig. 2, the image processing method provided by this embodiment includes:
In this step, the brightness value of each pixel point in the to-be-processed layer may be obtained, where the to-be-processed layer is a feathered layer corresponding to the to-be-adjusted region in the to-be-processed image. It should be noted that the feathering layer has a feathering effect, in which the transparency of the feathering layer gradually decreases from the center to the edge, so that the inner and outer connected portions of the feathering layer are blurred, and a gradual change effect is achieved, thereby achieving a natural connection effect. Therefore, the image layer to be processed can be naturally connected with other unprocessed areas in the image to be processed when being adjusted.
And 102, determining pixel points of which the brightness values in the layer to be processed and the brightness values of the anchor points meet a preset threshold relation as target pixel points.
Specifically, the anchor point is the central point of the area to be adjusted when the brightness value of the selected target pixel point and the brightness value of the anchor point meet a preset threshold relationship. It can be understood that, since the layer to be processed is the feathering layer corresponding to the region to be adjusted, that is, the range corresponding to the layer to be processed is the same as the range corresponding to the region to be adjusted, the anchor point is the central point of the region to be adjusted and the central point of the layer to be processed. It should be noted that, in order to make the local processing effect more natural, a pixel having a corresponding brightness value relationship with the center point of the region to be adjusted may be selected as a target pixel for processing.
And 103, performing target effect adjustment on the target pixel points according to the input parameters of the target effect items to generate adjusted images.
Specifically, target effect adjustment is performed on the target pixel points according to the input parameters of the target effect items to generate an adjusted image, wherein the target effect items are used for representing the detail presentation degree of the image.
And step 104, determining a result image according to the adjusted image and the image to be processed.
After the adjusted image is generated, a result image can be generated according to the adjusted image and the image to be processed, so that the processing effect of local detail enhancement or detail blurring is presented in the result image.
In this embodiment, a brightness value of each pixel point in a layer to be processed is obtained, then, target effect adjustment is performed on a target pixel point according to an input parameter of a target effect item to generate an adjusted image, where the target effect item is used to represent a detail presentation degree of the image, and then, a result image is determined according to the adjusted image and the image to be processed, so that a processing effect of local detail enhancement or detail blurring is performed on the image to be processed.
Fig. 3 is a flowchart illustrating an image processing method according to another example embodiment of the present disclosure. As shown in fig. 3, the image processing method provided by this embodiment includes:
When a user needs to perform local processing on an image to be processed, a control point may be added to the image to be processed, for example, the control point may be clicked and selected on a touch screen, so as to generate a trigger instruction acting on the image to be processed. And then, determining an anchor point according to the trigger instruction, wherein the anchor point can be an action point clicked on the touch screen. Of course, the touch screen mode is only one of the trigger modes, and may further include a cursor selection mode, a coordinate input mode, and the like, and in this embodiment, the input mode of the trigger instruction is not specifically limited.
After determining the anchor point, the user may enter parameters by sliding a sliding contact on the slider rod. After the terminal equipment acquires the sliding instruction acting on the second slide bar object, the second slide bar value is determined according to the sliding instruction, and the range input parameter is determined according to the second slide bar value, wherein the range input parameter is used for determining the range area of the area to be adjusted, namely, the range of the area to be adjusted can be adjusted by sliding the second slide bar object.
And 203, acquiring the brightness value of each pixel point in the layer to be processed.
In this step, the brightness value of each pixel point in the layer to be processed may be obtained. Optionally, the pixel values of the respective pixel points in the layer to be processed may be obtained first, and then the pixel values are converted into brightness values according to formula 1:
equation 1: anchorelm as anchorecolor.rgb vec3(0.333,0.5, 0.167);
wherein, anchorLum is the brightness value of the current pixel point, and anchorecolor. Wherein, 0.333,0.5,0.167 are the weight values that red (R), green (G), blue (B) three channels account for respectively. The RGB channels of the color image are multiplied by the corresponding weight values respectively, and the color image can be converted into a corresponding gray-scale image.
In addition, the layer to be processed includes a feathering layer corresponding to the region to be adjusted in the image to be processed. It should be noted that the feathering layer has a feathering effect, in which the transparency of the feathering layer gradually decreases from the center to the edge, so that the inner and outer connected portions of the feathering layer are blurred, and a gradual change effect is achieved, thereby achieving a natural connection effect. Therefore, when the image layer to be processed is adjusted, the effect of natural connection with other unprocessed areas in the image to be processed can be achieved.
And 204, determining pixel points with the square of the difference value between the brightness value and the brightness value of the anchor point smaller than a preset threshold value as target pixel points.
Optionally, the brightness value of the target pixel and the brightness value of the anchor point satisfy a preset threshold relationship, and the square of the difference between the brightness value of the target pixel and the brightness value of the anchor point may be smaller than a preset threshold.
And if the square of the difference value between the brightness value of the target pixel point and the brightness value of the anchor point is smaller than a preset threshold, pixel adjustment is carried out on the pixel point meeting the condition, so that the effect of detail enhancement or the effect of detail blurring is achieved.
In this step, two texture maps are calculated from the image to be processed: one is a grayscale map (labeled as StereoS) and one is a brightness map (labeled as StereoH).
Fig. 4 is a schematic diagram of a grayscale diagram shown in the embodiment of the present disclosure. As shown in fig. 4, the original color image to be processed can be converted into a corresponding gray-scale image.
For the generation of the brightness map, in a possible implementation manner, the image to be processed may be first divided into a plurality of partial images, and then each partial image may be converted into a corresponding brightness map. Wherein the size for the partial image may be (srcWidth/W) × Height. Wherein, srcWidth is the original width of the image to be processed, Height is the target Height of the local image, and W is the equal division in the width direction of the image to be processed.
FIG. 5 is a schematic illustration of a brightness map shown in an embodiment of the present disclosure. As shown in fig. 5, the original color image to be processed may be divided into a plurality of partial images (for example, 14 partial images), and then corresponding brightness maps may be generated for the partial images.
It should be noted that, by dividing the image to be processed into a plurality of local images and then converting the local images into corresponding brightness maps, the processing speed can be increased when the brightness maps are subsequently used (for example, the column indication values of the target pixel points in the preset brightness lookup table are determined by the brightness maps and a preset linear interpolation algorithm). Specifically, the local image where the target pixel point is located may be determined by the coordinate value of each target pixel point, and then, when performing the processing, only the lightness graph corresponding to the local image needs to be used.
And step 206, determining an influence factor of each target pixel point influencing details of the image to be processed according to the gray scale map, so as to determine an influenced output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor.
After the gray-scale map is determined, influence factors of each target pixel point influencing details of the image to be processed can be determined according to the gray-scale map. The determination of the influence factor StereoRes influencing the details of the image to be processed by each target pixel point can be performed by the following formula 2:
equation 2: stercores ═ srcLum-stereos
Wherein, StereoRes is an influence factor, srcLum is a brightness value of the target pixel point, and StereoS.a is a gray value of the target pixel point.
After determining the influence factor, determining the influenced output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor, and determining through the following formula 3:
equation 3: dstColor + sharpenStrength StereoRes
Wherein, dstColor is the output color value after the influence, scrColor is the initial output color value, and sharpenStrength is the sharpening intensity.
And step 207, determining the column indication value of each target pixel point in the preset brightness lookup table according to the brightness map and a preset linear interpolation algorithm.
In addition, the column indication value of each target pixel point in the preset lightness lookup table may be determined according to the lightness map and a preset linear interpolation algorithm (for example, a single linear interpolation algorithm or a bilinear interpolation algorithm).
And 208, determining the adjusted output color value of each corresponding target pixel according to the input parameters, the affected output color value of the target pixel, the brightness value of the target pixel and the list brightness value of the target pixel.
The adjusted output color value of each corresponding target pixel point can be determined according to the input parameters, the initial output color value of the target pixel point, the brightness value of the target pixel point and the list brightness value of the target pixel point. Specifically, the determination of the adjusted output color value may be performed according to formula 4:
equation 4: finalColor ═ (dstColor-srcLum). scale + srcLum-resVal
Wherein, finalColor is the output colour value after adjusting, and dstColor is the output colour value after the influence, and srcLum is the luminosity value of target pixel point, and resVal is the list luminosity value, and scale then can be confirmed according to input parameter and following formula:
when the input parameter is greater than 0, equation 5: scale ═ a (intensity ═ intensity);
when the input parameter is less than 0, equation 6: scale ═ b (intensity ═ intensity);
wherein a >0, for example, can be 0.76; b <0, which can take the value-0.4, for example; intensity is an input parameter. Here, by performing the calculation using intensity, the parabolic characteristic of the quadratic function can be used to make the scale value more smoothly changed when the input parameter is changed, and further to make the change of the adjusted output color value more smoothly.
Therefore, when the input parameter is greater than 0, scale is a positive value, and forward adjustment is performed on the adjusted output color value of the target pixel point according to formula 4, so that the effect of amplifying the image details is realized, and the details are highlighted; and when the input parameter is less than 0, scale is a negative value, and negative adjustment is performed on the adjusted output color value of the target pixel point according to formula 4, so that the effect of blurring the details of the image is realized.
For the input parameter intensity, in one possible implementation, the first slide rod value may be used as the input parameter by obtaining a first slide command acting on the first slide rod object, and then determining the first slide rod value according to the first slide command.
Correspondingly, if the first slide rod value is larger than 0, target effect adjustment is carried out on the target pixel point, so that the detail presentation degree of the layer to be processed is enhanced; and if the first slide rod value is less than 0, performing target effect adjustment on the target pixel point so as to enable the detail presentation degree of the layer to be processed to be fuzzy.
Further, the first slider value may also be used to determine an input parameter for the target effect item, e.g., the greater the first slider value, the greater the input parameter for the target effect item, and correspondingly, the greater the achieved target effect.
And 209, performing target effect adjustment on each corresponding target pixel point according to the adjusted output color value of the target pixel point.
Specifically, target effect adjustment is performed on the target pixel points according to input parameters of a target effect item to generate an adjusted image, wherein the target effect item is used for representing the detail presentation degree of the image, the brightness value of the target pixel points and the brightness value of the anchor point meet a preset threshold value relationship, and the anchor point is the central point of the area to be adjusted. It should be noted that, in order to make the local processing effect more natural, a pixel having a corresponding brightness value relationship with the center point of the region to be adjusted may be selected as a target pixel for processing.
And step 210, determining a result image according to the adjusted image and the image to be processed.
After the adjusted image is generated, a result image can be generated according to the adjusted image and the image to be processed, so that the processing effect of local detail enhancement or detail blurring is presented in the result image.
Specifically, the mixing intensity of each pixel point can be determined according to the transparency of each pixel point in the feathering layer, and then the adjusted output color value in the adjusted image and the initial output color value in the image to be processed are mixed according to the mixing intensity of each pixel point to obtain a result image. The specific mixing pattern can be processed by the following equation 7:
equation 7: ResultColor ═ mix (srccor, finalColor, mask.a)
Wherein ResultColor is an output color value of the result image; the srcColor is an initial output color value, and the finalColor is an adjusted output color value; and a, the mask is a scope corresponding to the feather layer, and the scope comprises the mixing intensity of each pixel point in the scope.
In order to better understand the processing effect of local detail enhancement or detail blurring in the above embodiments, the following examples are given:
fig. 6 is a schematic diagram illustrating blurring of the degree of detail presentation shown in the embodiment of the present disclosure, and fig. 7 is a schematic diagram illustrating enhancement of the degree of detail presentation shown in the embodiment of the present disclosure. It should be noted that fig. 6 and fig. 7 are schematic diagrams illustrating effects of blurring and enhancing the global detail presentation degree of the image to be processed, respectively.
Fig. 8 is an interface schematic diagram illustrating adjustment of a range of a region to be adjusted in the embodiment of the present disclosure. As shown in fig. 8, a range input parameter may be input by sliding the slide bar S04 to determine a range S03 of the layer to be processed. Specifically, the slide command acting on the second slide rod object may be acquired, the second slide rod value may be determined based on the second slide command, and the range input parameter may be determined based on the second slide rod value.
In order to distinguish the first slide rod object from the second slide rod object, the description will be made with reference to functions realized by the first slide rod object and the second slide rod object. The first slider object is used to adjust the intensity of the target effect item of the effect item, for example, by sliding the first slider object, the target effect of the local position in the image can be adjusted, for example, the larger the first slider value input by sliding the first slider object, the larger the input parameter of the target effect item, and correspondingly, the stronger the target effect achieved. The second slide rod object is used for adjusting the range to be adjusted of the effect item, for example, by sliding the second slide rod object, the range area of the range to be adjusted can be enlarged or reduced.
Fig. 9 is a diagram illustrating the result of enhancing the local detail presentation degree shown in the embodiment of the present disclosure. As shown in fig. 9, the first slider value may be determined by sliding the slider bar S04 in the target effect item for which the detail presentation degree adjustment is made. With continued reference to FIG. 9, at this time, as shown in FIG. 9, if the first slide bar value is greater than 0, the detail rendering degree of the layer to be processed is enhanced. Thereafter, after the adjusted image is generated, a result image is generated from the adjusted image and the image to be processed, so that the processing effect of local detail enhancement is presented in the result image, as shown in the area of S05 in fig. 9. It can be seen that the effect of enhancing the degree of detail presentation at the corresponding position of fig. 7 is shown locally in the region of S05 of fig. 9.
On the basis of the above embodiments, the embodiments provided by the present disclosure may not only implement the adjustment of the detail presentation degree in a single local scope, but also perform the adjustment of the detail presentation degree in multiple local scopes, for example, a plurality of control points may be added to the image to be processed, and different detail presentation degree adjustments may be performed for each control point.
It should be noted that, when the detail presentation degrees of the plurality of local ranges are adjusted, the target effect adjustment may be performed on the target pixel according to the first input parameter of the target effect item, and then the target effect adjustment may be performed on the adjusted target pixel according to the second input parameter of the target effect item. That is, the first input parameter is used to adjust the target effect item in the first layer to be adjusted, the second input parameter is used to adjust the target effect item in the second layer to be adjusted, and the first area to be adjusted and the second area to be adjusted may be anchor points corresponding to different values. It can be seen that the target pixel point belongs to a first layer to be adjusted and the target pixel point belongs to a second layer to be adjusted, that is, the target pixel point is a common pixel point of the first layer to be adjusted and the second layer to be adjusted, at this time, the effect of each target pixel point is based on the superposition of the previously realized effect, that is, the output of the previous effect is the next input.
In this embodiment, an anchor point is selected on an image to be processed by inputting a trigger instruction, and a range area of a region to be adjusted is determined by sliding a second slide rod object, so that the range of the region to be adjusted is determined by using the anchor point and the range area together, then an input parameter of a target effect item is determined by sliding a first slide rod object, so that a target effect parameter of a target pixel point within the range of the region to be adjusted is adjusted according to the input parameter of the target effect item and a preset mapping table, and an effect of amplifying or blurring any local position image details in the image to be processed can be achieved by simple user operation.
Fig. 10 is a schematic structural diagram of an image processing apparatus shown in the present disclosure according to an example embodiment. As shown in fig. 10, the present embodiment provides an image processing apparatus 300 including:
an obtaining module 301, configured to obtain a brightness value of each pixel point in a layer to be processed, where the layer to be processed includes a feathering layer corresponding to a region to be adjusted in an image to be processed;
a determining module 303, configured to determine, as a target pixel, a pixel point in the layer to be processed where the brightness value and the brightness value of the anchor point satisfy a preset threshold relationship, where the anchor point is a central point of the layer to be processed;
an adjusting module 302, configured to perform target effect adjustment on the target pixel point according to an input parameter of a target effect item to generate an adjusted image;
the determining module 303 is further configured to determine a result image according to the adjusted image and the image to be processed.
In one possible design, the preset threshold relationship includes that a square of the difference in the luminance values is smaller than a preset threshold.
In a possible design, the obtaining module 301 is further configured to obtain a first sliding command acting on the first slide rod object;
the determining module 303 is further configured to determine a first slide bar value according to the first slide instruction, where the first slide bar value is used to determine an input parameter of the target effect item.
In a possible design, if the first slide bar value is greater than 0, performing target effect adjustment on the target pixel point to enhance the detail presentation degree of the layer to be processed;
and if the first slide rod value is less than 0, performing target effect adjustment on the target pixel point so as to enable the detail presentation degree of the layer to be processed to be fuzzy.
In a possible design, the determining module 303 is further configured to determine an input parameter of the target effect item according to the first slider bar value.
In one possible design, the adjusting module 302 is specifically configured to:
performing target effect adjustment on the target pixel point according to the first input parameter of the target effect item;
and continuing to adjust the target effect of the adjusted target pixel point according to the second input parameter of the target effect item.
In a possible design, the first input parameter is used to adjust the target effect item in a first layer to be adjusted, the second input parameter is used to adjust the target effect item in a second layer to be adjusted, the first region to be adjusted and the second region to be adjusted correspond to different anchor points, and the target pixel point is a common pixel point of the first layer to be adjusted and the second layer to be adjusted.
In one possible design, the adjusting module 302 is specifically configured to:
determining a gray level image and a brightness image corresponding to an image to be processed;
determining influence factors of each target pixel point influencing the details of the image to be processed according to the gray level image;
determining an affected output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor;
determining the column indication value of each target pixel point in a preset brightness lookup table according to the brightness graph and a preset linear interpolation algorithm;
determining adjusted output color values of corresponding target pixel points according to the input parameters, the affected output color values of the target pixel points, the brightness values of the target pixel points and the list brightness values of the target pixel points;
and adjusting the target effect of each corresponding target pixel point according to the adjusted output color value of the target pixel point.
In one possible design, the determining module 303 is specifically configured to:
determining the mixing intensity of each pixel point according to the transparency of each pixel point in the eclosion layer;
and mixing the adjusted output color value of each pixel point in the adjusted image and the initial output color value of each pixel point in the image to be processed according to the mixing intensity of each pixel point to obtain the result image.
In a possible design, the obtaining module 301 is further configured to obtain a trigger instruction acting on the image to be processed;
the determining module 303 is further configured to determine the anchor point according to the trigger instruction;
the determining module 303 is further configured to determine the area to be adjusted according to the anchor point and the range input parameter.
In one possible design, the image processing apparatus 300 according to this embodiment further includes:
an instruction obtaining module 304, configured to obtain a sliding instruction acting on a second sliding rod object, and determine a second sliding rod value according to the second sliding instruction;
a parameter determining module 305, configured to determine the range input parameter according to the second slide bar value, where the range input parameter is used to determine an area of the region to be adjusted.
It should be noted that the image processing apparatus provided in the embodiment shown in fig. 10 can be used to execute the method provided in any of the above embodiments, and the specific implementation manner and the technical effect are similar, and are not described again here.
Fig. 11 is a schematic structural diagram of an electronic device shown in the present disclosure according to an example embodiment. As shown in fig. 11, a schematic diagram of an electronic device 400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal having an image acquisition function, such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), a wearable electronic device, and the like, and a stationary terminal having an image acquisition device externally connected thereto, such as a digital TV, a desktop computer, a smart home device, and the like. The electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphic processor, etc.) 401 that may perform the above-described functions defined in the methods of the embodiments of the present disclosure according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 11 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by a processor, implement the functions defined in the methods of the embodiments of the present disclosure. For example: obtaining a brightness value of each pixel point in a layer to be processed, wherein the layer to be processed comprises a feather layer corresponding to a region to be adjusted in an image to be processed; determining pixel points of which the brightness values in the layer to be processed and the brightness values of the anchor points meet a preset threshold relationship as target pixel points; performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, wherein the target effect items are used for representing the detail presentation degree of the images; and determining a result image according to the adjusted image and the image to be processed.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided an image processing method including:
obtaining a brightness value of each pixel point in a layer to be processed, wherein the layer to be processed comprises a feather layer corresponding to a region to be adjusted in an image to be processed;
determining pixel points of the brightness value in the layer to be processed and the brightness value of the anchor point meeting a preset threshold relation as target pixel points, wherein the anchor point is a central point of the layer to be processed;
performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, wherein the target effect items are used for representing the detail presentation degree of the images;
and determining a result image according to the adjusted image and the image to be processed.
According to one or more embodiments of the present disclosure, the preset threshold relationship includes that a square of the difference in the luminance values is smaller than a preset threshold.
According to one or more embodiments of the present disclosure, before the performing the target effect adjustment on the layer to be processed according to the input parameter of the target effect item, the method further includes:
and acquiring a first sliding instruction acted on a first sliding rod object, and determining a first sliding rod value according to the first sliding instruction, wherein the first sliding rod value is used for determining the input parameters of the target effect item.
According to one or more embodiments of the present disclosure, if the first slide bar value is greater than 0, performing target effect adjustment on the target pixel point to enhance the detail presentation degree of the layer to be processed;
and if the first slide rod value is less than 0, performing target effect adjustment on the target pixel point so as to enable the detail presentation degree of the layer to be processed to be fuzzy.
According to one or more embodiments of the present disclosure, after the determining a first slider value according to the first slide instruction, further comprising:
and determining the input parameters of the target effect item according to the first slide bar value.
According to one or more embodiments of the present disclosure, the adjusting the target effect of the target pixel point according to the input parameter of the target effect item includes:
performing target effect adjustment on the target pixel point according to the first input parameter of the target effect item;
and continuing to adjust the target effect of the adjusted target pixel point according to the second input parameter of the target effect item.
According to one or more embodiments of the present disclosure, the first input parameter is used to adjust the target effect item in a first layer to be adjusted, the second input parameter is used to adjust the target effect item in a second layer to be adjusted, the first region to be adjusted and the second region to be adjusted correspond to different anchor points, and the target pixel point is a common pixel point of the first layer to be adjusted and the second layer to be adjusted.
According to one or more embodiments of the present disclosure, the adjusting the target effect of the target pixel point according to the input parameter of the target effect item includes:
determining a gray level image and a brightness image corresponding to an image to be processed;
determining influence factors of each target pixel point influencing the details of the image to be processed according to the gray level image;
determining an affected output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor;
determining the column indication value of each target pixel point in a preset brightness lookup table according to the brightness graph and a preset linear interpolation algorithm;
determining adjusted output color values of corresponding target pixel points according to the input parameters, the affected output color values of the target pixel points, the brightness values of the target pixel points and the list brightness values of the target pixel points;
and adjusting the target effect of each corresponding target pixel point according to the adjusted output color value of the target pixel point.
According to one or more embodiments of the present disclosure, the determining a result image according to the adjusted image and the image to be processed includes:
determining the mixing intensity of each pixel point according to the transparency of each pixel point in the eclosion layer;
and mixing the adjusted output color value in the adjusted image and the initial output color value in the image to be processed according to the mixing intensity of each pixel point to obtain the result image.
According to one or more embodiments of the present disclosure, before the performing the target effect adjustment on the target pixel point according to the input parameter of the target effect item, the method further includes:
acquiring a trigger instruction acting on the image to be processed;
determining the anchor point according to the trigger instruction;
and determining the area to be adjusted according to the anchor point and the range input parameters.
According to one or more embodiments of the present disclosure, before the determining the region to be adjusted according to the anchor point and the range input parameter, the method further includes:
acquiring a sliding instruction acting on a second sliding rod object, and determining a second sliding rod value according to the second sliding instruction;
and determining the range input parameter according to the second slide rod value, wherein the range input parameter is used for determining the area of the region to be adjusted.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided an image processing apparatus including:
the image processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the brightness value of each pixel point in a layer to be processed, and the layer to be processed comprises an eclosion layer corresponding to a region to be adjusted in an image to be processed;
the determining module is used for determining pixel points, in the layer to be processed, of which the brightness values meet a preset threshold relation with the brightness values of the anchors, as target pixel points, and the anchors are the central points of the layer to be processed;
the adjusting module is used for carrying out target effect adjustment on the target pixel points according to the input parameters of the target effect items so as to generate adjusted images;
the determining module is further configured to determine a result image according to the adjusted image and the image to be processed.
In one possible design, the preset threshold relationship includes that a square of the difference in the luminance values is smaller than a preset threshold.
In a possible design, the obtaining module is further configured to obtain a first sliding command acting on the first slide rod object;
the determining module is further configured to determine a first slider bar value according to the first sliding instruction, where the first slider bar value is used to determine an input parameter of the target effect item.
In a possible design, if the first slide bar value is greater than 0, performing target effect adjustment on the target pixel point to enhance the detail presentation degree of the layer to be processed;
and if the first slide rod value is less than 0, performing target effect adjustment on the target pixel point so as to enable the detail presentation degree of the layer to be processed to be fuzzy.
In one possible design, the determining module is further configured to determine an input parameter of the target effect item according to the first slider bar value.
In one possible design, the adjusting module is specifically configured to:
performing target effect adjustment on the target pixel point according to the first input parameter of the target effect item;
and continuing to adjust the target effect of the adjusted target pixel point according to the second input parameter of the target effect item.
In a possible design, the first input parameter is used to adjust the target effect item in a first layer to be adjusted, the second input parameter is used to adjust the target effect item in a second layer to be adjusted, the first region to be adjusted and the second region to be adjusted correspond to different anchor points, and the target pixel point is a common pixel point of the first layer to be adjusted and the second layer to be adjusted.
In one possible design, the adjusting module is specifically configured to:
determining a gray level image and a brightness image corresponding to an image to be processed;
determining influence factors of each target pixel point influencing the details of the image to be processed according to the gray level image;
determining an affected output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor;
determining the column indication value of each target pixel point in a preset brightness lookup table according to the brightness graph and a preset linear interpolation algorithm;
determining adjusted output color values of corresponding target pixel points according to the input parameters, the affected output color values of the target pixel points, the brightness values of the target pixel points and the list brightness values of the target pixel points;
and adjusting the target effect of each corresponding target pixel point according to the adjusted output color value of the target pixel point.
In one possible design, the determining module is specifically configured to:
determining the mixing intensity of each pixel point according to the transparency of each pixel point in the eclosion layer;
and mixing the adjusted output color value in the adjusted image and the initial output color value in the image to be processed according to the mixing intensity of each pixel point to obtain the result image.
In a possible design, the obtaining module is further configured to obtain a trigger instruction acting on the image to be processed;
the determining module is further configured to determine the anchor point according to the trigger instruction;
the determining module is further configured to determine the area to be adjusted according to the anchor point and the range input parameter.
In a possible design, the image processing apparatus provided in this embodiment further includes:
the instruction acquisition module is used for acquiring a sliding instruction acting on a second sliding rod object and determining a second sliding rod value according to the second sliding instruction;
and the parameter determining module is used for determining the range input parameter according to the second slide rod value, and the range input parameter is used for determining the area of the region to be adjusted.
In a third aspect, the present disclosure also provides an electronic device, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform any one of the possible image processing methods of the first aspect via execution of the executable instructions.
In a fourth aspect, this disclosed embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the possible image processing methods in the first aspect.
In a fifth aspect, the disclosed embodiments also provide a computer program product, on which a computer program is stored, and the computer program, when executed by a processor, implements any one of the possible image processing methods in the first aspect.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (15)
1. An image processing method, comprising:
obtaining a brightness value of each pixel point in a layer to be processed, wherein the layer to be processed comprises a feather layer corresponding to a region to be adjusted in an image to be processed;
determining pixel points of which the brightness values in the layer to be processed and the brightness values of the anchor points meet a preset threshold relationship as target pixel points;
performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, wherein the target effect items are used for representing the detail presentation degree of the images;
and determining a result image according to the adjusted image and the image to be processed.
2. The image processing method according to claim 1, wherein the preset threshold relationship includes that a square of the difference of the luminance values is smaller than a preset threshold.
3. The image processing method according to claim 2, wherein the anchor point is a central point of the region to be adjusted.
4. The image processing method according to claim 1, before performing the target effect adjustment on the layer to be processed according to the input parameter of the target effect item, further comprising:
and acquiring a first sliding instruction acted on a first sliding rod object, and determining a first sliding rod value according to the first sliding instruction, wherein the first sliding rod value is used for determining the input parameters of the target effect item.
5. The image processing method according to claim 4, wherein if the first slide bar value is greater than 0, performing target effect adjustment on the target pixel point to enhance the detail presentation degree of the layer to be processed;
and if the first slide rod value is less than 0, performing target effect adjustment on the target pixel point so as to enable the detail presentation degree of the layer to be processed to be fuzzy.
6. The image processing method according to any one of claims 1 to 5, wherein the performing target effect adjustment on the target pixel point according to the input parameter of the target effect item comprises:
performing target effect adjustment on the target pixel point according to a first input parameter of a first target effect item;
and continuing to perform target effect adjustment on the adjusted target pixel point according to a second input parameter of a second target effect item, wherein the first target effect item and the second target effect item are different effect items.
7. The method of claim 6, wherein the first target effect item acts on a first region to be adjusted, the second target effect item acts on a second region to be adjusted, the target pixel is a common pixel of the first region to be adjusted and the second region to be adjusted, and the first region to be adjusted and the second region to be adjusted correspond to different anchor points.
8. The image processing method according to any one of claims 1 to 5, wherein the performing target effect adjustment on the target pixel point according to the input parameter of the target effect item comprises:
determining a gray level image and a brightness image corresponding to an image to be processed;
determining influence factors of each target pixel point influencing the details of the image to be processed according to the gray level image;
determining an affected output color value according to the initial output color value of the target pixel point, the sharpening strength of the target pixel point and the influence factor;
determining the column indication value of each target pixel point in a preset brightness lookup table according to the brightness graph and a preset linear interpolation algorithm;
determining adjusted output color values of corresponding target pixel points according to the input parameters, the affected output color values of the target pixel points, the brightness values of the target pixel points and the list brightness values of the target pixel points;
and adjusting the target effect of each corresponding target pixel point according to the adjusted output color value of the target pixel point.
9. The image processing method according to any one of claims 1 to 5, wherein the determining a resulting image from the adjusted image and the image to be processed comprises:
determining the mixing intensity of each pixel point according to the transparency of each pixel point in the eclosion layer;
and mixing the adjusted output color value of each pixel point in the adjusted image and the initial output color value of each pixel point in the image to be processed according to the mixing intensity of each pixel point to obtain the result image.
10. The image processing method according to any one of claims 1 to 5, wherein before performing the target effect adjustment on the target pixel point according to the input parameter of the target effect item, the method further comprises:
acquiring a trigger instruction acting on the image to be processed;
determining the anchor point according to the trigger instruction;
and determining the area to be adjusted according to the anchor point and the range input parameters.
11. The image processing method according to claim 10, wherein before the determining the region to be adjusted according to the anchor point and the range input parameter, further comprising:
acquiring a sliding instruction acting on a second sliding rod object, and determining a second sliding rod value according to the second sliding instruction;
and determining the range input parameter according to the second slide rod value, wherein the range input parameter is used for determining the area of the region to be adjusted.
12. An image processing apparatus characterized by comprising:
the image processing device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the brightness value of each pixel point in a layer to be processed, and the layer to be processed comprises an eclosion layer corresponding to a region to be adjusted in an image to be processed;
the determining module is used for determining pixel points, in the layer to be processed, of which the brightness values meet a preset threshold relation with the brightness value of the anchor point, as target pixel points;
the adjusting module is used for performing target effect adjustment on the target pixel points according to input parameters of target effect items to generate adjusted images, and the target effect items are used for representing the detail presenting degree of the images;
the determining module is further configured to determine a result image according to the adjusted image and the image to be processed.
13. An electronic device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the image processing method of any of claims 1 to 11.
14. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the image processing method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that the computer program realizes the image processing method of any one of claims 1 to 11 when executed by a processor.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011630524.0A CN112700385A (en) | 2020-12-31 | 2020-12-31 | Image processing method, image processing device, electronic equipment and storage medium |
PCT/CN2021/132594 WO2022142876A1 (en) | 2020-12-31 | 2021-11-23 | Image processing method and apparatus, electronic device and storage medium |
US18/344,759 US20230360286A1 (en) | 2020-12-31 | 2023-06-29 | Image processing method and apparatus, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011630524.0A CN112700385A (en) | 2020-12-31 | 2020-12-31 | Image processing method, image processing device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112700385A true CN112700385A (en) | 2021-04-23 |
Family
ID=75513525
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011630524.0A Pending CN112700385A (en) | 2020-12-31 | 2020-12-31 | Image processing method, image processing device, electronic equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112700385A (en) |
WO (1) | WO2022142876A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022142876A1 (en) * | 2020-12-31 | 2022-07-07 | 北京字跳网络技术有限公司 | Image processing method and apparatus, electronic device and storage medium |
WO2024046105A1 (en) * | 2022-08-30 | 2024-03-07 | 腾讯科技(深圳)有限公司 | Anti-aliasing method and apparatus for image, and device, medium and program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107705247A (en) * | 2017-10-31 | 2018-02-16 | 努比亚技术有限公司 | A kind of method of adjustment of image saturation, terminal and storage medium |
CN108280813A (en) * | 2018-01-30 | 2018-07-13 | 努比亚技术有限公司 | A kind of image processing method, terminal and computer readable storage medium |
CN111583103A (en) * | 2020-05-14 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Face image processing method and device, electronic equipment and computer storage medium |
CN111784568A (en) * | 2020-07-06 | 2020-10-16 | 北京字节跳动网络技术有限公司 | Face image processing method and device, electronic equipment and computer readable medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9449252B1 (en) * | 2015-08-27 | 2016-09-20 | Sony Corporation | System and method for color and brightness adjustment of an object in target image |
US10467803B1 (en) * | 2018-09-11 | 2019-11-05 | Apple Inc. | Techniques for providing virtual lighting adjustments utilizing regression analysis and functional lightmaps |
CN111080595A (en) * | 2019-12-09 | 2020-04-28 | 北京字节跳动网络技术有限公司 | Image processing method, image processing device, electronic equipment and computer readable medium |
CN112700385A (en) * | 2020-12-31 | 2021-04-23 | 北京字跳网络技术有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
-
2020
- 2020-12-31 CN CN202011630524.0A patent/CN112700385A/en active Pending
-
2021
- 2021-11-23 WO PCT/CN2021/132594 patent/WO2022142876A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107705247A (en) * | 2017-10-31 | 2018-02-16 | 努比亚技术有限公司 | A kind of method of adjustment of image saturation, terminal and storage medium |
CN108280813A (en) * | 2018-01-30 | 2018-07-13 | 努比亚技术有限公司 | A kind of image processing method, terminal and computer readable storage medium |
CN111583103A (en) * | 2020-05-14 | 2020-08-25 | 北京字节跳动网络技术有限公司 | Face image processing method and device, electronic equipment and computer storage medium |
CN111784568A (en) * | 2020-07-06 | 2020-10-16 | 北京字节跳动网络技术有限公司 | Face image processing method and device, electronic equipment and computer readable medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022142876A1 (en) * | 2020-12-31 | 2022-07-07 | 北京字跳网络技术有限公司 | Image processing method and apparatus, electronic device and storage medium |
WO2024046105A1 (en) * | 2022-08-30 | 2024-03-07 | 腾讯科技(深圳)有限公司 | Anti-aliasing method and apparatus for image, and device, medium and program product |
Also Published As
Publication number | Publication date |
---|---|
WO2022142876A1 (en) | 2022-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112767238A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN109584180A (en) | Face image processing process, device, electronic equipment and computer storage medium | |
TWI514314B (en) | Texture address mode discarding filter taps | |
CN111243049B (en) | Face image processing method and device, readable medium and electronic equipment | |
CN110070515B (en) | Image synthesis method, apparatus and computer-readable storage medium | |
CN111260601A (en) | Image fusion method and device, readable medium and electronic equipment | |
CN112700385A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN111583103A (en) | Face image processing method and device, electronic equipment and computer storage medium | |
CN112348910A (en) | Method, device, equipment and computer readable medium for acquiring image | |
CN110070495B (en) | Image processing method and device and electronic equipment | |
WO2024016923A1 (en) | Method and apparatus for generating special effect graph, and device and storage medium | |
US20230360286A1 (en) | Image processing method and apparatus, electronic device and storage medium | |
JP5279830B2 (en) | Video signal processing device and video display device | |
US11388348B2 (en) | Systems and methods for dynamic range compression in multi-frame processing | |
CN110097520B (en) | Image processing method and device | |
CN114066722A (en) | Method and device for acquiring image and electronic equipment | |
CN113256785B (en) | Image processing method, apparatus, device and medium | |
US20230284768A1 (en) | Beauty makeup special effect generation method, device, and storage medium | |
CN113393391B (en) | Image enhancement method, image enhancement device, electronic apparatus, and storage medium | |
CN115775215A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN110874816B (en) | Image processing method, device, mobile terminal and storage medium | |
CN110807114B (en) | Method, device, terminal and storage medium for picture display | |
CN114693859A (en) | Highlight rendering method, highlight rendering device, highlight rendering medium and electronic equipment | |
CN114170341A (en) | Image processing method, device, equipment and medium | |
CN115358959A (en) | Generation method, device and equipment of special effect graph and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |