CN111835937A - Image processing method and device and electronic equipment - Google Patents

Image processing method and device and electronic equipment Download PDF

Info

Publication number
CN111835937A
CN111835937A CN202010615616.5A CN202010615616A CN111835937A CN 111835937 A CN111835937 A CN 111835937A CN 202010615616 A CN202010615616 A CN 202010615616A CN 111835937 A CN111835937 A CN 111835937A
Authority
CN
China
Prior art keywords
pixel
brightness
pixel point
saturation
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
Application number
CN202010615616.5A
Other languages
Chinese (zh)
Inventor
周楚瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010615616.5A priority Critical patent/CN111835937A/en
Publication of CN111835937A publication Critical patent/CN111835937A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/20Circuitry for controlling amplitude response
    • H04N5/205Circuitry for controlling amplitude response for correcting amplitude versus frequency characteristic
    • H04N5/208Circuitry for controlling amplitude response for correcting amplitude versus frequency characteristic for compensating for attenuation of high frequency components, e.g. crispening, aperture distortion correction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces

Abstract

The application discloses an image processing method, an image processing device and electronic equipment, and belongs to the technical field of communication. The method comprises the following steps: acquiring pixel brightness of pixel points of an image to be processed; determining a target pixel point meeting a preset condition in the pixel points according to the pixel brightness; and adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image. The method and the device can achieve the purpose of improving the image definition, and can avoid the problems of too high sharpness and too large noise in the image while improving the image definition.

Description

Image processing method and device and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to an image processing method and device and electronic equipment.
Background
With the continuous development of science and technology, mobile electronic equipment gradually becomes an indispensable tool in people's life and work.
In life, users often take pictures with electronic devices (such as mobile phones) and easily take images with too high brightness under strong light or night scene flash, but in current solutions, in order to improve the brightness of images, a method of increasing sharpness or noise is usually adopted for the whole image, and these two methods may cause the sharpness of the image to be too high, the noise to be too large, and the image cannot be adjusted locally.
Disclosure of Invention
An object of the embodiments of the present application is to provide an image processing method, an image processing apparatus, and an electronic device, which can solve the problems that in the prior art, an image processing method for improving image brightness causes too high image sharpness and too large noise, and cannot be adjusted locally.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides an image processing method, including:
acquiring pixel brightness of pixel points of an image to be processed;
determining a target pixel point meeting a preset condition in the pixel points according to the pixel brightness;
and adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
the pixel brightness acquisition module is used for acquiring the pixel brightness of a pixel point of the image to be processed;
the target pixel point determining module is used for determining a target pixel point meeting preset conditions in the pixel points according to the pixel brightness;
and the target image acquisition module is used for adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the image processing method according to the first aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the image processing method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the image processing method according to the first aspect.
In the embodiment of the application, the pixel brightness of the pixel points of the image to be processed is obtained, the target pixel points meeting the preset conditions in the pixel points are determined according to the pixel brightness, and the brightness and the saturation of the target pixel points are adjusted to obtain the adjusted target image. The embodiment of the application can achieve the purpose of improving the image definition by adjusting the brightness and the saturation of the over-bright pixel points in the image, can avoid the problems of over-high sharpness and over-large noise of the image while improving the image definition, and can improve the pixels needing to be adjusted without influencing normal pixels.
Drawings
Fig. 1 is a flowchart illustrating steps of an image processing method according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating steps of another image processing method according to an embodiment of the present disclosure;
FIG. 2a is a diagram illustrating a target pixel identification condition according to an embodiment of the present disclosure;
FIG. 2b is a diagram illustrating another target pixel identification condition according to an embodiment of the present disclosure;
FIG. 2c is a diagram illustrating another target pixel identification condition according to an embodiment of the present disclosure;
FIG. 2d is a schematic diagram of a processed bright pixel according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The image processing scheme provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, a flowchart illustrating steps of an image processing method provided in an embodiment of the present application is shown, and as shown in fig. 1, the image processing method may specifically include the following steps:
step 101: and acquiring the pixel brightness of the pixel point of the image to be processed.
The embodiment of the application can be applied to scenes for adjusting the brightness and the saturation of the pixel points in the image.
The image to be processed refers to an image which needs brightness and saturation adjustment. In this embodiment, the image to be processed may be a human face image or an image of another object, and specifically, the image to be processed may be determined according to actual situations, which is not limited in this embodiment.
In some examples, the image currently taken by the user may be used as the image to be processed, for example, in the case that the user is in strong outdoor light or has a flash in a night scene, the taken picture may be used as the image to be processed after the picture is taken.
In some examples, the image to be processed may also be an image obtained from the internet, for example, an image including a human face is searched by a user on the internet as the image to be processed, and the like.
In a specific implementation, the image to be processed may also be obtained in other manners, and specifically, the method may be determined according to a business requirement, which is not limited in this embodiment.
The pixel brightness refers to the brightness of a pixel point in the image to be processed. The brightness value of the pixel is between 0 and 255, the brightness of the pixel close to 255 is high, and the brightness close to 0 is low.
After the to-be-processed image is obtained, the pixel brightness of the pixel point in the to-be-processed image may be obtained, and then step 102 is executed.
Step 102: and determining a target pixel point meeting a preset condition in the pixel points according to the pixel brightness.
The preset condition is a condition preset by a service staff for determining whether the pixel points need to be processed.
The target pixel point refers to a pixel point which needs to be adjusted in brightness and saturation.
In this embodiment, the preset condition may be a brightness threshold condition, and specifically, two brightness thresholds, that is, a first brightness threshold and a second brightness threshold, may be preset, where the first brightness threshold is smaller than the second brightness threshold, and when the pixel brightness of a pixel point is greater than the second brightness threshold, it indicates that the pixel brightness is too high, and the pixel point is taken as a target pixel point. When the pixel brightness of the pixel point is smaller than the first brightness threshold value, the pixel brightness is too low, and the pixel point is taken as a target pixel point.
The preset condition may also be a brightness difference threshold condition of adjacent pixels, specifically, a brightness difference threshold may be preset, and when the difference between two adjacent pixels is greater than the brightness difference threshold, it indicates that the difference between the pixel brightness of the two pixels is large, and then a pixel with a high pixel brightness in the two adjacent pixels is used as a target pixel.
Of course, without limitation, in a specific implementation, the preset condition may also be other conditions, and specifically, may be determined according to a service requirement, which is not limited in this embodiment.
After the pixel brightness of the pixel point in the image to be processed is obtained, a target pixel point meeting a preset condition in the pixel points can be determined according to the pixel brightness, and then step 103 is executed.
Step 103: and adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
The target image is an image obtained after the pixel brightness and the saturation of a target pixel point in the image to be processed are adjusted.
After the target pixel point is determined, the brightness and the saturation of the target pixel point can be adjusted, and the target image can be obtained after the target pixel point in the image to be processed is adjusted. The adjustment process may specifically be: for a pixel point with too high pixel brightness, the pixel brightness of the pixel point can be reduced, for a pixel point with too low pixel brightness, the pixel brightness of the pixel point can be adjusted to the pixel brightness with the lowest brightness, and the like.
The brightness and the saturation of the over-bright pixel points in the image are adjusted, so that the purpose of improving the image definition can be achieved, the brightness adjustment of local pixel points can be realized, and all the pixel points in the image do not need to be adjusted.
According to the image processing method provided by the embodiment of the application, the pixel brightness of the pixel points of the image to be processed is obtained, the target pixel points meeting the preset conditions in the pixel points are determined according to the pixel brightness, and the brightness and the saturation of the target pixel points are adjusted to obtain the adjusted target image. The embodiment of the application can achieve the purpose of improving the image definition by adjusting the brightness and the saturation of the over-bright pixel points in the image, and can avoid the problems of over-high sharpness and over-large noise of the image while improving the image definition.
Referring to fig. 2, a flowchart illustrating steps of another image processing method provided in an embodiment of the present application is shown, and as shown in fig. 2, the image processing method may specifically include the following steps:
step 201: and acquiring the pixel brightness of the pixel point of the image to be processed.
The embodiment of the application can be applied to scenes for adjusting the brightness and the saturation of the pixel points in the image.
The image to be processed refers to an image which needs brightness and saturation adjustment. In this embodiment, the image to be processed may be a human face image or an image of another object, and specifically, the image to be processed may be determined according to actual situations, which is not limited in this embodiment.
In some examples, the image currently taken by the user may be used as the image to be processed, for example, in the case that the user is in strong outdoor light or has a flash in a night scene, the taken picture may be used as the image to be processed after the picture is taken.
In some examples, the image to be processed may also be an image obtained from the internet, for example, an image including a human face is searched by a user on the internet as the image to be processed, and the like.
In a specific implementation, the image to be processed may also be obtained in other manners, and specifically, the method may be determined according to a business requirement, which is not limited in this embodiment.
The pixel brightness refers to the brightness of a pixel point in the image to be processed. The brightness value of the pixel is between 0 and 255, the brightness of the pixel close to 255 is high, and the brightness close to 0 is low.
After the to-be-processed image is obtained, the pixel brightness of the pixel point of the to-be-processed image may be obtained, and then step 202 and step 207 are performed.
Step 202: and acquiring a first pixel point of which the pixel brightness is smaller than a first brightness threshold value in the pixel points, and taking the first pixel point as the target pixel point.
The first brightness threshold is a preset threshold for judging whether the pixel brightness of the pixel point is too low.
The first pixel point is a pixel point whose pixel brightness is smaller than a first brightness threshold value, for example, the first brightness threshold value is 100, the pixel point includes a pixel point 1, a pixel point 2, and a pixel point 3, the pixel brightness corresponding to the pixel point 1 is 80, the pixel brightness corresponding to the pixel point 2 is 125, and the pixel brightness corresponding to the pixel point 3 is 75, and then the pixel point 1 and the pixel point 3 are taken as target pixel points. Again, as illustrated in the schematic diagram of the target pixel identification condition shown in fig. 2b, the first brightness threshold may be set at 130. If the square frame surrounded by the dotted line in fig. 2b is a pixel whose pixel brightness is 125.67, the pixel is taken as the first pixel.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
And taking the first pixel point as a target pixel point to perform a subsequent brightness adjustment process when the first pixel point with the pixel brightness smaller than the first brightness threshold value in the pixel points is obtained.
After the first pixel point with the pixel brightness smaller than the first brightness threshold value among the pixel points is obtained, step 203 is executed.
Step 203: and acquiring the minimum value of the pixel brightness in the pixel brightness corresponding to the first pixel point.
The minimum pixel brightness value refers to the minimum value in the pixel brightness corresponding to the first pixel point, for example, the first pixel point includes a pixel point 1, a pixel point 2, a pixel point 3, and a pixel point 4, where the pixel brightness of the pixel point 1 is 28, the pixel brightness of the pixel point 2 is 50, the pixel brightness of the pixel point 3 is 10, and the pixel brightness of the pixel point 4 is 100, and then the minimum pixel brightness value is the pixel brightness corresponding to the pixel point 3, that is, the minimum pixel brightness value is 10.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
After the first pixel point in the image to be processed is obtained, the minimum pixel brightness value in the pixel brightness corresponding to the first pixel point can be obtained according to the pixel brightness corresponding to the first pixel point, and then step 204 is executed.
Step 204: and adjusting the pixel brightness corresponding to the first pixel point to the minimum pixel brightness value.
After obtaining the minimum pixel brightness value in the pixel brightness corresponding to the first pixel point, the pixel brightness of the first pixel point may be adjusted according to the minimum pixel brightness value, specifically, the pixel brightness of the first pixel point may be all adjusted to the minimum pixel brightness value, for example, when the minimum pixel brightness value in the pixel brightness corresponding to the first pixel point is 25, the pixel brightness of the first pixel point is all adjusted to 25.
Step 205: and acquiring a first saturation average value corresponding to the first pixel saturation of the first pixel point.
Saturation refers to the degree of vividness of a color, also referred to as the purity of the color.
The first pixel saturation is a pixel saturation value of the first pixel.
The first saturation average is an average of pixel saturations of the first pixel, for example, the first pixel includes pixel 1, pixel 2 and pixel 3, the pixel saturation of pixel 1 is 20%, the pixel saturation of pixel 2 is 30%, and the pixel saturation of pixel 3 is 10%, so that the first saturation average is (10% + 20% + 30%)/3 is 20%.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
After the first pixel point is obtained, the first saturation average value may be calculated according to the pixel saturation of the first pixel point, and then step 206 is executed.
Step 206: and adjusting the pixel saturation of the first pixel point to the first saturation average value.
After the first saturation average value corresponding to the first pixel saturation of the first pixel point is obtained, the saturation of the first pixel point can be adjusted according to the first saturation average value, that is, the pixel saturation of the first pixel point is adjusted to the first saturation average value.
Step 207: and acquiring a second pixel point of which the pixel brightness is greater than a second brightness threshold value, wherein the second brightness threshold value is greater than the first brightness threshold value.
The second brightness threshold is a preset threshold for determining whether the pixel brightness of the pixel point is too high, and in this embodiment, the second brightness threshold is greater than the first brightness threshold mentioned in the above step.
The second pixel point is a pixel point whose pixel brightness in the image to be processed is greater than the second brightness threshold, for example, the pixel point in the image to be processed includes pixel point 1, pixel point 2, and pixel point 3, the second brightness threshold is 170, the pixel brightness of pixel point 1 is 165, the pixel brightness of pixel point 2 is 186, and the pixel brightness of pixel point 3 is 190, and then pixel point 2 and pixel point 3 are taken as the second pixel point. As shown in fig. 2a, the second luminance threshold may be set to 174, where a square frame 1 surrounded by a dotted line in fig. 2a is a pixel point, and the pixel luminance of the pixel point is 174.33, and the pixel point is taken as the second pixel point.
Step 208: and acquiring initial pixel points of which the pixel brightness is smaller than the second brightness threshold and larger than the first brightness threshold.
The initial pixel point is a pixel point of which the pixel brightness is greater than the first brightness threshold and less than the second brightness threshold among the pixel points of the image to be processed, for example, the first brightness threshold is 130, and the second brightness threshold is 170, and the pixel point of which the pixel brightness is between 130 and 170 among the pixel points of the image to be processed is taken as the initial pixel point.
After the preset first brightness threshold and the preset second brightness threshold are obtained, the initial pixel points can be screened from the pixel points according to the first brightness threshold, the second brightness threshold and the pixel brightness of the pixel points in the image to be processed, that is, the pixel points of which the pixel brightness in the image to be processed is between the first brightness threshold and the second brightness threshold are selected as the initial pixel points.
Step 209: and acquiring a third pixel point which is adjacent to the first pixel point in the initial pixel points and has a pixel brightness difference value larger than a difference threshold value with the adjacent first pixel point.
The difference threshold is a preset threshold used for judging whether the pixel brightness difference among the adjacent pixel points is too large.
The third pixel point is a pixel point which is adjacent to the first pixel point in the initial pixel points and the pixel brightness difference value of the adjacent first pixel point is larger than the difference threshold value. As shown in fig. 2c, the difference threshold may be set to 40, two square frames surrounded by the dotted line in the figure are two pixel points, the pixel brightness of the two adjacent pixel points is 174 and 125, respectively, and the pixel brightness difference of the two pixel points is 49, then the pixel point with the pixel brightness of 174 is taken as the third pixel point.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
Step 210: and taking the second pixel point and the third pixel point as the target pixel points.
After the second pixel point and the third pixel point are obtained, the second pixel point and the third pixel point can be used together as pixel points of the image to be processed, which need to be subjected to brightness and saturation adjustment, namely the target pixel point.
Step 211: and acquiring the brightness average value of the pixel brightness corresponding to the second pixel point and the third pixel point.
The luminance average value is an average value of the luminance of the second pixel point and the luminance of the third pixel point, that is, the luminance of the second pixel point is summed with the luminance of the third pixel point, and the sum is divided by the number of the second pixel point and the number of the third pixel point to obtain the luminance average value, for example, the second pixel point includes a pixel point 1 and a pixel point 2, the third pixel point includes a pixel point 3 and a pixel point 4, the luminance of the pixel point 1 is 180, the luminance of the pixel point 2 is 200, the luminance of the pixel point 3 is 150, the luminance of the pixel point 4 is 150, and the luminance average value is (180+200+150+150)/4, which is 170.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
After the second pixel point and the third pixel point are obtained, a brightness average value can be obtained through calculation according to the pixel brightness of the second pixel point and the pixel brightness of the third pixel point.
Step 212: and adjusting the pixel brightness of the second pixel point and the third pixel point to the average brightness value.
After the brightness average value is obtained, the pixel brightness of the second pixel point and the pixel brightness of the third pixel point can be adjusted according to the brightness average value, and specifically, the pixel brightness of the second pixel point and the pixel brightness of the third pixel point can be adjusted to the brightness average value. As shown in fig. 2d, when the pixel point 4 surrounded by the dotted line needs to be adjusted, the luminance average La of the pixel luminance of the second initial pixel point may be calculated, and the pixel luminance of the pixel point 4 is adjusted to the luminance average La.
Step 213: and acquiring a second saturation average value of the pixel point saturations corresponding to the second pixel point and the third pixel point.
The second saturation average value is an average value of the pixel saturation of the second pixel and the pixel saturation of the third pixel.
After the second pixel point and the third pixel point are obtained, a second saturation average value can be calculated according to the pixel point saturation of the second pixel point and the pixel point saturation of the third pixel point, for example, the second pixel point includes pixel point 1 and pixel point 2, and the third pixel point includes pixel point 3, where the pixel point saturation of pixel point 1 is 50%, the pixel point saturation of pixel point 2 is 80%, the pixel point saturation of pixel point 3 is 90%, the pixel point saturation of pixel point 4 is 70%, and then the second saturation average value is (50% + 80% + 90% + 70%)/4 is 72.5%.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
After obtaining the second saturation average of the second pixel point and the pixel point saturation corresponding to the third pixel point, step 214 is executed.
Step 214: and adjusting the pixel saturation of the second pixel point and the third pixel point to the second saturation average value to obtain the target image.
The target image is an image obtained after the pixel brightness and the saturation of a target pixel point in the image to be processed are adjusted.
After the second saturation average value is obtained, the pixel saturations of the second pixel point and the third pixel point may be adjusted to the second saturation average value, as shown in fig. 2d, after the brightness of the pixel point a is adjusted, the saturation of the pixel point a is changed, at this time, the saturation of the pixel point a may be adjusted, specifically, the second saturation average value Sa may be obtained by calculation, and the saturation of the pixel point a is adjusted to the second saturation average value Sa.
And after the pixel brightness and the pixel saturation of the target pixel point in the image to be processed are adjusted, the adjusted target image can be obtained.
The image processing method provided by the embodiment of the application has the beneficial effects of the image processing method, and can process partial pixels in the image without affecting the brightness of normal pixels, so that partial adjustment of the pixels in the image is realized.
It should be noted that, in the image processing method provided in the embodiment of the present application, the execution subject may be an image processing apparatus, or a control module in the image processing apparatus for executing the image processing method. The image processing apparatus provided in the embodiment of the present application is described with an example in which an image processing apparatus executes an image processing method.
Referring to fig. 3, a schematic structural diagram of an image processing apparatus provided in an embodiment of the present application is shown, and as shown in fig. 3, the image processing apparatus may specifically include the following modules:
a pixel brightness obtaining module 310, configured to obtain pixel brightness of a pixel point of an image to be processed;
a target pixel point determining module 320, configured to determine, according to the pixel brightness, a target pixel point that meets a preset condition among the pixel points;
and the target image obtaining module 330 is configured to adjust the brightness and the saturation of the target pixel point to obtain an adjusted target image.
The image processing device provided by the embodiment of the application determines a target pixel point meeting a preset condition in the pixel points according to the pixel brightness by acquiring the pixel brightness of the pixel points of the image to be processed, and adjusts the brightness and the saturation of the target pixel point to obtain an adjusted target image. The embodiment of the application can achieve the purpose of improving the image definition by adjusting the brightness and the saturation of the over-bright pixel points in the image, and can avoid the problems of over-high sharpness and over-large noise of the image while improving the image definition.
Referring to fig. 4, a schematic structural diagram of another image processing apparatus provided in the embodiment of the present application is shown, and as shown in fig. 4, the image processing apparatus may specifically include the following modules:
a pixel brightness obtaining module 410, configured to obtain pixel brightness of a pixel point of an image to be processed;
a target pixel point determining module 420, configured to determine, according to the pixel brightness, a target pixel point that meets a preset condition among the pixel points;
and a target image obtaining module 430, configured to adjust the brightness and the saturation of the target pixel point, so as to obtain an adjusted target image.
Optionally, the target pixel point determining module 420 includes:
the first pixel point obtaining unit 421 is configured to obtain a first pixel point of the pixel points, where the pixel brightness is smaller than a first brightness threshold, and use the first pixel point as the target pixel point.
Optionally, the target image acquiring module 430 includes:
a brightness minimum value obtaining unit 431, configured to obtain a pixel brightness minimum value in pixel brightness corresponding to the first pixel point;
a first pixel adjusting unit 432, configured to adjust the pixel brightness corresponding to the first pixel point to the minimum pixel brightness value;
a first average value obtaining unit 433, configured to obtain a first saturation average value corresponding to a first pixel saturation of the first pixel point;
the first saturation adjusting unit 434 is configured to adjust the pixel saturation of the first pixel to the first saturation average.
Optionally, the target pixel point determining module 420 includes:
a second pixel point obtaining unit 422, configured to obtain a second pixel point of the pixel points, where pixel brightness is greater than a second brightness threshold, where the second brightness threshold is greater than the first brightness threshold;
an initial pixel point obtaining unit 423, configured to obtain an initial pixel point of the pixel point, where the pixel brightness is smaller than the second brightness threshold and larger than the first brightness threshold;
a third pixel point obtaining unit 424, configured to obtain a third pixel point, which is adjacent to the first pixel point in the initial pixel points and has a pixel brightness difference value greater than a difference threshold value with the adjacent first pixel point;
and a target pixel point obtaining unit 425 configured to use the second pixel point and the third pixel point as the target pixel point.
Optionally, the target image acquiring module 430 includes:
a second average value obtaining unit 435, configured to obtain a brightness average value of pixel brightness corresponding to the second pixel point and the third pixel point;
a second pixel adjusting unit 436, configured to adjust the pixel brightness of the second pixel point and the pixel brightness of the third pixel point to the brightness average value;
a third average value obtaining unit 437, configured to obtain a second saturation average value of the saturation of the pixel points corresponding to the second pixel point and the third pixel point;
the second saturation adjusting unit 438 is configured to adjust the pixel saturation of the second pixel point and the pixel saturation of the third pixel point to the second saturation average value.
The image processing device provided by the embodiment of the application has the advantages that the image processing device can process partial pixels in an image without influencing the brightness of normal pixels, and partial adjustment of the pixels in the image is realized.
The image processing in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The image processing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The image processing apparatus provided in the embodiment of the present application can implement each process implemented by the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the above-mentioned embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and the like.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The radio frequency unit 601 is configured to obtain pixel brightness of a pixel point of an image to be processed; determining a target pixel point meeting a preset condition in the pixel points according to the pixel brightness; and adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
According to the method and the device, the pixel brightness of the pixel points of the image to be processed is obtained, the target pixel points meeting the preset conditions in the pixel points are determined according to the pixel brightness, and the brightness and the saturation of the target pixel points are adjusted to obtain the adjusted target image. The embodiment of the application can achieve the purpose of improving the image definition by adjusting the brightness and the saturation of the over-bright pixel points in the image, and can avoid the problems of over-high sharpness and over-large noise of the image while improving the image definition.
Optionally, the radio frequency unit 601 is further configured to obtain a first pixel point of the pixel points, where the pixel brightness is smaller than a first brightness threshold, and use the first pixel point as the target pixel point.
Optionally, the adjusting the brightness and the saturation of the target pixel point includes:
acquiring a pixel brightness minimum value in pixel brightness corresponding to the first pixel point;
adjusting the pixel brightness corresponding to the first pixel point to the minimum pixel brightness value;
acquiring a first saturation average value corresponding to the first pixel saturation of the first pixel point;
and adjusting the pixel saturation of the first pixel point to the first saturation average value.
Optionally, the determining, according to the pixel brightness, a target pixel point that meets a preset condition among the pixel points includes:
obtaining a second pixel point of which the pixel brightness is greater than a second brightness threshold value, wherein the second brightness threshold value is greater than the first brightness threshold value;
acquiring initial pixel points of which the pixel brightness is smaller than the second brightness threshold and larger than the first brightness threshold;
acquiring a third pixel point which is adjacent to the first pixel point in the initial pixel points and has a pixel brightness difference value larger than a difference threshold value with the adjacent first pixel point;
and taking the second pixel point and the third pixel point as the target pixel points.
Optionally, the adjusting the brightness and the saturation of the target pixel point includes:
acquiring the brightness average value of the pixel brightness corresponding to the second pixel point and the third pixel point;
adjusting the pixel brightness of the second pixel point and the third pixel point to the brightness average value;
acquiring a second saturation average value of pixel point saturations corresponding to the second pixel point and the third pixel point;
and adjusting the pixel saturation of the second pixel point and the third pixel point to the second saturation average value.
The method and the device can process partial pixels in the image without influencing the brightness of normal pixels, and realize partial adjustment of the pixels in the image.
It is to be understood that, in the embodiment of the present application, the input unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the graphics processing unit 6041 processes image data of a still picture or a video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. A touch panel 6071, also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the embodiment of the image processing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the embodiment of the image processing method, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An image processing method, comprising:
acquiring pixel brightness of pixel points of an image to be processed;
determining a target pixel point meeting a preset condition in the pixel points according to the pixel brightness;
and adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
2. The method according to claim 1, wherein the determining, according to the pixel brightness, a target pixel point among the pixel points that meets a preset condition includes:
and acquiring a first pixel point of which the pixel brightness is smaller than a first brightness threshold value in the pixel points, and taking the first pixel point as the target pixel point.
3. The method of claim 2, wherein the adjusting the brightness and the saturation of the target pixel point comprises:
acquiring a pixel brightness minimum value in pixel brightness corresponding to the first pixel point;
adjusting the pixel brightness corresponding to the first pixel point to the minimum pixel brightness value;
acquiring a first saturation average value corresponding to the first pixel saturation of the first pixel point;
and adjusting the pixel saturation of the first pixel point to the first saturation average value.
4. The method according to claim 1, wherein the determining, according to the pixel brightness, a target pixel point among the pixel points that meets a preset condition includes:
obtaining a second pixel point of which the pixel brightness is greater than a second brightness threshold value, wherein the second brightness threshold value is greater than the first brightness threshold value;
acquiring initial pixel points of which the pixel brightness is smaller than the second brightness threshold and larger than the first brightness threshold;
acquiring a third pixel point which is adjacent to the first pixel point in the initial pixel points and has a pixel brightness difference value larger than a difference threshold value with the adjacent first pixel point;
and taking the second pixel point and the third pixel point as the target pixel points.
5. The method of claim 4, wherein the adjusting the brightness and the saturation of the target pixel point comprises:
acquiring the brightness average value of the pixel brightness corresponding to the second pixel point and the third pixel point;
adjusting the pixel brightness of the second pixel point and the third pixel point to the brightness average value;
acquiring a second saturation average value of pixel point saturations corresponding to the second pixel point and the third pixel point;
and adjusting the pixel saturation of the second pixel point and the third pixel point to the second saturation average value.
6. An image processing apparatus characterized by comprising:
the pixel brightness acquisition module is used for acquiring the pixel brightness of a pixel point of the image to be processed;
the target pixel point determining module is used for determining a target pixel point meeting preset conditions in the pixel points according to the pixel brightness;
and the target image acquisition module is used for adjusting the brightness and the saturation of the target pixel point to obtain an adjusted target image.
7. The apparatus of claim 6, wherein the target pixel point determining module comprises:
and the first pixel point acquisition unit is used for acquiring a first pixel point of which the pixel brightness is smaller than a first brightness threshold value from the pixel points and taking the first pixel point as the target pixel point.
8. The apparatus of claim 7, wherein the target image acquisition module comprises:
a brightness minimum value obtaining unit, configured to obtain a pixel brightness minimum value in pixel brightness corresponding to the first pixel point;
the first pixel adjusting unit is used for adjusting the pixel brightness corresponding to the first pixel point to the minimum pixel brightness value;
the first average value obtaining unit is used for obtaining a first saturation average value corresponding to the first pixel saturation of the first pixel point;
and the first saturation adjusting unit is used for adjusting the pixel saturation of the first pixel point to the first saturation average value.
9. The apparatus of claim 6, wherein the target pixel point determining module comprises:
the second pixel point obtaining unit is used for obtaining a second pixel point of which the pixel brightness is greater than a second brightness threshold value, and the second brightness threshold value is greater than the first brightness threshold value;
an initial pixel point obtaining unit, configured to obtain an initial pixel point of which pixel brightness is smaller than the second brightness threshold and larger than the first brightness threshold;
the third pixel point obtaining unit is used for obtaining a third pixel point which is adjacent to the first pixel point in the initial pixel points and has a pixel brightness difference value larger than a difference threshold value with the adjacent first pixel point;
and the target pixel point acquisition unit is used for taking the second pixel point and the third pixel point as the target pixel points.
10. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, which program or instructions, when executed by the processor, implement the steps of the image processing method according to any one of claims 1 to 5.
CN202010615616.5A 2020-06-30 2020-06-30 Image processing method and device and electronic equipment Pending CN111835937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010615616.5A CN111835937A (en) 2020-06-30 2020-06-30 Image processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010615616.5A CN111835937A (en) 2020-06-30 2020-06-30 Image processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN111835937A true CN111835937A (en) 2020-10-27

Family

ID=72900927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010615616.5A Pending CN111835937A (en) 2020-06-30 2020-06-30 Image processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111835937A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508820A (en) * 2020-12-18 2021-03-16 维沃移动通信有限公司 Image processing method and device and electronic equipment
CN112581394A (en) * 2020-12-16 2021-03-30 维沃移动通信有限公司 Image processing method, apparatus, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
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
CN107895352A (en) * 2017-10-30 2018-04-10 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN110719407A (en) * 2019-10-18 2020-01-21 北京字节跳动网络技术有限公司 Picture beautifying method, device, equipment and storage medium
CN110891146A (en) * 2018-09-10 2020-03-17 浙江宇视科技有限公司 Strong light inhibition method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107895352A (en) * 2017-10-30 2018-04-10 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN107705247A (en) * 2017-10-31 2018-02-16 努比亚技术有限公司 A kind of method of adjustment of image saturation, terminal and storage medium
CN110891146A (en) * 2018-09-10 2020-03-17 浙江宇视科技有限公司 Strong light inhibition method and device
CN110719407A (en) * 2019-10-18 2020-01-21 北京字节跳动网络技术有限公司 Picture beautifying method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581394A (en) * 2020-12-16 2021-03-30 维沃移动通信有限公司 Image processing method, apparatus, device and medium
CN112508820A (en) * 2020-12-18 2021-03-16 维沃移动通信有限公司 Image processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
US10467734B2 (en) Group management method, terminal, and storage medium
CN111816139B (en) Screen refresh rate switching method and electronic equipment
CN113126862B (en) Screen capture method and device, electronic equipment and readable storage medium
CN112333385B (en) Electronic anti-shake control method and device
CN112947824A (en) Display parameter adjusting method and device, electronic equipment and medium
CN111835937A (en) Image processing method and device and electronic equipment
CN112289278A (en) Screen brightness adjusting method, screen brightness adjusting device and electronic equipment
CN113037997A (en) Image processing method and device and electronic equipment
CN112437237B (en) Shooting method and device
CN112508820A (en) Image processing method and device and electronic equipment
CN113393391B (en) Image enhancement method, image enhancement device, electronic apparatus, and storage medium
CN113473008B (en) Shooting method and device
CN112529766B (en) Image processing method and device and electronic equipment
CN111654640B (en) Exposure adjusting method and device and electronic equipment
CN112446848A (en) Image processing method and device and electronic equipment
CN113962840A (en) Image processing method, image processing device, electronic equipment and storage medium
CN112199149A (en) Interface rendering method and device and electronic equipment
CN112511890A (en) Video image processing method and device and electronic equipment
CN113988294A (en) Method for training prediction network, image processing method and device
CN113438400A (en) Image acquisition method, image acquisition device and electronic equipment
CN112367470B (en) Image processing method and device and electronic equipment
CN114143448B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN113489901B (en) Shooting method and device thereof
CN113114930B (en) Information display method, device, equipment and medium
CN117745613A (en) Image processing method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201027