CN111464745B - Image processing method and electronic equipment - Google Patents

Image processing method and electronic equipment Download PDF

Info

Publication number
CN111464745B
CN111464745B CN202010291826.3A CN202010291826A CN111464745B CN 111464745 B CN111464745 B CN 111464745B CN 202010291826 A CN202010291826 A CN 202010291826A CN 111464745 B CN111464745 B CN 111464745B
Authority
CN
China
Prior art keywords
value
parameter
pixel point
image
determining
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.)
Active
Application number
CN202010291826.3A
Other languages
Chinese (zh)
Other versions
CN111464745A (en
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 CN202010291826.3A priority Critical patent/CN111464745B/en
Publication of CN111464745A publication Critical patent/CN111464745A/en
Application granted granted Critical
Publication of CN111464745B publication Critical patent/CN111464745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • 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/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Abstract

The invention provides an image processing method and electronic equipment. The method comprises the following steps: under the condition that an image preview interface is displayed, acquiring information of pixel points of a target image in the image preview interface; determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition; acquiring a second parameter of the first pixel point; determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition; and adjusting the value of the second parameter of the second pixel point. The invention can optimize or eliminate the problem of light reflection of the shot image.

Description

Image processing method and electronic equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method and an electronic device.
Background
At present, with the continuous and powerful electronic devices, the photographing function of the electronic devices is more and more popular with users.
When the electronic device shoots a certain object, the situation that the shot object reflects light in an image displayed by the electronic device often exists under the influence of environment (such as light) or the material of the object, so that the shot picture reflects light and the image effect is poor.
Disclosure of Invention
The embodiment of the invention provides an image processing method and electronic equipment, and aims to solve the problem of poor image effect caused by the fact that an image of a shot object reflects light in a shooting scheme in the related art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an image processing method, which is applied to an electronic device, and the method includes:
under the condition that an image preview interface is displayed, acquiring information of pixel points of a target image in the image preview interface;
determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition;
acquiring a second parameter of the first pixel point;
determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition;
and adjusting the value of the second parameter of the second pixel point.
In a second aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
the first acquisition module is used for acquiring information of pixel points of a target image in an image preview interface under the condition that the image preview interface is displayed;
the first determining module is used for determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition;
the second acquisition module is used for acquiring a second parameter of the first pixel point;
the second determining module is used for determining a second pixel point in the first pixel point according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition;
and the adjusting module is used for adjusting the value of the second parameter of the second pixel point.
In a third aspect, an embodiment of the present invention further provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program realizing the steps of the image processing method when executed by the processor.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the image processing method.
In the embodiment of the invention, the first pixel point of the target image with the first parameter meeting the first preset condition can be determined by utilizing the pixel point information of the target image in the image preview interface, and acquiring a second parameter of the first pixel point, then determining a second pixel point in the first pixel point according to the second parameter, wherein, the second parameter of the second pixel point does not satisfy the second preset condition, the reflecting point (namely the second pixel point) in the target image can be accurately identified, and finally, the value of the second parameter of the second pixel point is adjusted, the problem of light reflection of the second pixel point can be effectively solved, the dynamic adjustment of the second parameter of the second pixel point reflecting light in the image preview interface is realized, the problem of poor photographing effect caused by light reflection of a photographed target image can be optimized or eliminated, and the photographing effect of the photographed image is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
FIG. 1 is a flow diagram of an image processing method of one embodiment of the present invention;
FIG. 2 is a block diagram of an electronic device of one embodiment of the invention;
fig. 3 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Referring to fig. 1, a flowchart of an image processing method according to an embodiment of the present invention is shown, and is applied to an electronic device, where the method specifically includes the following steps:
step 101, under the condition that an image preview interface is displayed, acquiring information of pixel points of a target image in the image preview interface;
the information of the pixel points in this step may include at least one of the following: position information (i.e., two-dimensional coordinate information on a screen), depth parameters, spectral parameters, and brightness and color parameters;
the order of acquiring the position information, the depth parameter, the spectral parameter and the brightness parameter is not limited.
In addition, since the subject is included when the photographing is performed, the image of the subject may be a target image of the subject, and the target image may be all images in the preview image or a partial image in the preview image.
And the image in the image preview interface is a preview image of the electronic equipment when the electronic equipment takes a picture.
Optionally, the electronic device may be configured with a TOF (Time of Flight) infrared camera, and the depth parameter of each pixel point of the target image may be acquired by the TOF infrared camera.
In addition, the position information of the target image is two-dimensional coordinate information of each pixel point of the target image;
therefore, each pixel point of the target image corresponds to a depth parameter acquired by the TOF infrared camera.
When the position information is obtained, a preview image can be collected through a common shooting camera of the electronic equipment, and then two-dimensional coordinate information of each pixel point related to the target image is extracted from the preview image; or the two-dimensional coordinate information of each pixel point of the target image can be acquired through the TOF infrared camera.
Optionally, when the brightness parameter of the target image is obtained, the brightness parameter of each pixel point corresponding to each two-dimensional coordinate information may be extracted from the preview image acquired by the common shooting camera.
Optionally, the electronic device may further be configured with a spectrum recognition sensor, and when shooting is performed, the spectrum recognition sensor may acquire a spectrum parameter (for example, a spectrum component) corresponding to each pixel point (corresponding to each two-dimensional coordinate information) in the target image by scanning a surface of the target image to be shot.
Therefore, the depth parameter, the spectral parameter, and the luminance parameter obtained in this step are all related to the position information of the target image (i.e., the two-dimensional coordinate information of each pixel point of the target image), for example, the two-dimensional coordinate information of each pixel point of the target image corresponds to a depth value, a spectral value, and a luminance value.
Optionally, by using the two-dimensional coordinate information and the depth parameter of each pixel point, a three-dimensional modeling may be performed on the target image, and a three-dimensional model of the target image in the preview image is generated.
Step 102, determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition;
the first pixel points are partial pixel points in the target image.
Wherein the first preset condition is a parameter condition related to the first parameter.
The first parameter may include at least one of a depth parameter and a spectral parameter.
In this step, a first pixel point of which the depth parameter and/or the spectral parameter satisfy a first preset condition can be identified from the pixel points of the target image, and two-dimensional coordinate information of the first pixel point in the target image is determined. The number of the first pixel points is more than two.
Optionally, in an embodiment, in step 102, a first parameter average value may be determined according to information of a pixel point of the target image; determining pixel points, among the pixel points of the target image, of which the difference value between the value of the first parameter and the average value of the first parameter is smaller than a first threshold value as first pixel points; wherein the first parameter comprises at least one of a depth parameter and a spectral parameter.
Specifically, when the first parameter includes a depth parameter, a first depth value may be determined according to the depth parameter of a pixel point of the target image (where the first depth value is an average value of depth values of all pixel points of the target image); then, among the pixel points of the target image, the pixel point of which the difference between the value of the depth parameter and the first depth value (for example, the absolute value of the difference) is smaller than a first preset threshold is determined as a first pixel point. That is to say, the first pixel points are some pixel points with substantially the same depth value among the plurality of pixel points of the target image.
When the first parameter includes a spectral parameter, determining a first spectral value according to the spectral parameter of the pixel point of the target image (where the first spectral value is an average value of values of the spectral parameters of all the pixel points of the target image); then, among the pixel points of the target image, the pixel point of which the difference between the value of the spectral parameter and the first spectral value (for example, the absolute value of the difference) is smaller than a second preset threshold is determined as the first pixel point.
That is, in this step, some pixel points with substantially the same depth value and/or substantially the same spectral value (i.e., the material of the object corresponding to the image) are found from the target image, and these pixel points are collectively referred to as first pixel points. Since the depth values and/or spectral values of these first pixels are close, their brightness displayed on the screen should be substantially uniform.
In this embodiment, the position information may be used to locate the position of each first pixel point (i.e., two-dimensional coordinate information) in the preview image.
In the embodiment of the present invention, the inventor considers that the light reflection degrees of the pixel points with similar (including the same) material (i.e., spectral parameter) and/or similar (including the same) depth parameter are substantially consistent, and therefore, in the embodiment of the present invention, the depth parameter and/or the spectral parameter are used to find the first pixel point with similar depth value and/or similar spectral value in the target image; and then determining second pixel points of which the second parameters do not meet second preset conditions in the first pixel points based on the second parameters of the first pixel points, wherein the second pixel points can be understood as reflecting points in the target image, and adjusting the values of the second parameters of the second pixel points, so that the identification accuracy and the identification efficiency of the reflecting pixel points can be improved, and the system delay for adjusting the second parameters in a reflecting area in the target image in the image preview interface is reduced.
103, acquiring a second parameter of the first pixel point;
wherein the second parameter may comprise at least one of a brightness parameter and a color parameter.
Preferably, the second parameter is a luminance parameter.
In an example, the step 102 may find the first pixel point, and determine the two-dimensional coordinate of the first pixel point in the target image by using the position information, and since the luminance parameter and the color parameter of each pixel point in the target image are associated with the two-dimensional coordinate of the pixel point, the luminance parameter and the color parameter of each first pixel point may be extracted from the luminance parameter and the color parameter acquired in the step 101 by using the two-dimensional coordinate.
104, determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition;
wherein the second preset condition is a parameter condition related to a second parameter.
In this step, some pixels whose second parameters do not satisfy the second preset condition may be screened from the plurality of first pixels (here, the screened first pixels are named as second pixels).
And 105, adjusting the value of the second parameter of the second pixel point.
In an example, the second parameter may be a brightness parameter, and then the value of the brightness parameter of the second pixel point may be adjusted here.
In the embodiment of the invention, the first pixel point of the target image with the first parameter meeting the first preset condition in the target image can be determined by utilizing the pixel point information of the target image in the image preview interface, and obtaining a second parameter of the first pixel point, then determining a second pixel point in the first pixel point according to the second parameter, wherein, the second parameter of the second pixel point does not satisfy the second preset condition, the reflecting point (namely the second pixel point) in the target image can be accurately identified, and finally, the value of the second parameter of the second pixel point is adjusted, the problem of light reflection of the second pixel point can be effectively solved, the dynamic adjustment of the second parameter of the light-reflected second pixel point in the image preview interface is realized, the problem of poor photographing effect caused by light reflection of a photographed target image can be optimized or eliminated, and the photographing effect of the photographed image is improved.
Optionally, in an embodiment, when step 104 is executed, a value range of a second parameter of the first pixel point may be determined according to a value of the second parameter; and determining a second pixel point of which the initial value of the second parameter is not in the value range in the first pixel point.
For example, the second parameter is a luminance parameter, and here, the value range of the luminance parameter may be determined based on the value of the luminance parameter of each first pixel.
For example, the value range of the luminance parameter may be determined according to an average value of values of the luminance parameters of the plurality of first pixel points.
In an example, after the luminance values of each of the plurality of first pixel points are accumulated, the accumulated luminance values are divided by the total number of the pixel points of the first pixel point, so that an average value of the accumulated luminance values can be obtained, and the average value (for example, 5) can be used as a middle value to be expanded to the left and the right, so as to generate a range as a value range of the luminance parameter (for example, the luminance value range is 1 to 10). The specific manner of expansion is not limited. Alternatively, the average value may be used as a boundary value, and the range of the luminance parameter may be expanded to the left or right (for example, the range of the luminance value is 1 to 5, or the range of the luminance value is 5 to 10).
In this embodiment, it is further required to determine, from the plurality of first pixel points, a pixel point whose value of the luminance parameter is not within the above-mentioned value range, where this determined pixel point is the named second pixel point.
It can be understood that the value range of the brightness parameter is equivalent to the range of the average brightness value of the first pixel points in the target image, and then the brightness value of the second pixel points in the first pixel points which are not within the range (or the brightness value of the second pixel points in the first pixel points which exceeds the maximum value of the range, for example, the value range of the brightness is 1-5, the brightness value of a certain first pixel point is 10, and 10 > 5, and therefore, the first pixel point is the second pixel point here), then the reflection point in the target image can be determined.
In this embodiment, the initial value of the second parameter is the value of the second parameter of the first pixel in the information of the pixel acquired in step 101, that is, the value of the second parameter before the adjustment operation of the embodiment of the present invention is performed.
In this embodiment, when step 105 is executed, the value of the second parameter of the second pixel point is adjusted from the initial value to a target value; the initial value is the value of the second pixel point before the second parameter adjustment, and the target value is the value of the second pixel point after the second parameter adjustment.
In one example, the target value may be any one of values within the above-described range of values of the second parameter (range of average luminance values).
And each second pixel point identified here can be regarded as a pixel point with reflection in the target image, namely a reflection point.
In the embodiment of the invention, the value range of the second parameter can be determined according to the second parameter of the first pixel point in the target image, which has the same depth value and/or the same brightness value, so that the determined value range of the second parameter can comprehensively refer to the value of the second parameter of each first pixel point, the reasonability and the accuracy of the determined value range of the second parameter are improved, and the second pixel point with light reflection can be found in the first pixel point more easily based on the value range.
Optionally, taking the second parameter as the brightness parameter for example, when determining the target value to which the brightness parameter of each second pixel is adjusted, determining the respective brightness adjustment amount of each second pixel according to the value of the brightness parameter of the second pixel and the value range of the brightness parameter, and then adjusting the value of the brightness parameter of each second pixel from the initial value to the target value according to the respective brightness adjustment amount of each second pixel;
in step 101, the brightness value and the position information (i.e., the two-dimensional coordinate information) of each pixel point of the target image may be obtained, so that in this embodiment, the brightness value of each second pixel point may be extracted from the brightness parameter of step 101 by using the two-dimensional coordinate information of each second pixel point according to each second pixel point identified in the target image. Then, the respective brightness adjustment amount of each second pixel point can be determined based on the magnitude relation between the value range of the brightness parameter and the value of the brightness parameter of each second pixel point.
In an embodiment, a ratio of a value of the brightness parameter of each second pixel to a value range of the brightness parameter may be calculated to generate a ratio range of each second pixel; then, determining the respective brightness adjusting range of each second pixel point according to the ratio range of each second pixel point and a third preset threshold value; and finally, determining the respective brightness adjustment quantity of each second pixel point according to the respective brightness adjustment range of each second pixel point.
Specifically, the ratio of the value of the brightness parameter of each reflection point (i.e., the second pixel point) to the value range of the brightness parameter can be calculated, so that a corresponding ratio range is generated for each reflection point, and the ratio range can be understood as the reflection intensity coefficient of the reflection point (for example, the brightness value of one reflection point Q is 5, and the value range of the brightness parameter is 5-10, then the reflection intensity coefficient of the reflection point Q is 0.5-1);
in addition, in the embodiment of the present invention, a third preset threshold is determined according to experience summarized in a practical process of the technical solution of the present invention, where the third preset threshold is a fixed unit value BRZ (e.g., BRZ ═ 2nt (nit)), and a brightness adjustment range of a reflection point can be obtained by performing an operation (e.g., a multiplication operation or an addition operation) on a reflection intensity coefficient of the reflection point and the unit value (e.g., the reflection intensity coefficient of the reflection point Q in the above example is multiplied by the unit value, so that the brightness adjustment range is 1 to 2);
finally, the brightness adjustment amount of a reflection point can be determined based on the brightness adjustment range of the reflection point, and the brightness adjustment amount can be determined by taking the middle value, or the average value, or the boundary value of the brightness adjustment range as the brightness adjustment amount of the reflection point. For example, the brightness adjustment amount of the light reflection point Q exemplified above is 1.5, which is the middle value of the brightness adjustment range.
In the embodiment of the present invention, a coefficient for expressing the reflection intensity of each second pixel, that is, a ratio range, may be generated based on the ratio of the value of the luminance parameter of each second pixel having reflection to the value range of the luminance parameter; then, determining the brightness adjusting range of each second pixel point by using the ratio range and a third preset threshold determined by using priori knowledge; finally, the respective brightness adjustment amount is determined based on the brightness adjustment range of each second pixel point, so that the brightness adjustment amount adopted when brightness adjustment is performed on each second pixel point with light reflection refers to not only the brightness value of each second pixel point, but also the value range of the brightness parameter determined based on the first pixel point with the spectral parameter and the depth parameter which are close to each other, therefore, each determined brightness adjustment amount is accurate, and the problem of light reflection can be solved.
It should be noted that, while step 101 is executed when the electronic device has a certain shooting angle with respect to the target image, steps 102 to 104 are executed when the shooting angle is not changed. In other words, if the shooting angle of the electronic device for the target image is changed during the execution of the above steps 101 to 104, the electronic device needs to return to step 101 again to start the execution, that is, to obtain the parameter information (related to the position information, the depth parameter, the spectral parameter, and the brightness parameter) of each pixel point of the target image after the shooting angle is changed again.
Then, after the above steps 101 to 104, if the shooting angle does not change for the target image, step 105 may be executed to adjust the brightness of the reflective point, so as to solve the problem of reflection of the target image in the target image.
In this embodiment, when step 105 is executed, the value of the luminance parameter of each second pixel point in the target image may be reduced to the target value according to the respective luminance adjustment amount of each second pixel point in the target image under the condition that the angle for shooting the target image is not changed.
It should be noted that this step 105 is applied to a case where the object corresponding to the captured target image cannot emit light by itself, and also to a case where the object corresponding to the target image can emit light by itself, but the luminance of the object corresponding to the target image is changed by turning off the object or the object corresponding to the target image cannot emit light by itself due to various reasons, and the luminance of the display region (corresponding to the light emitting region, that is, the region including the light emitting point) is set to be equal to or lower than the luminance of the object corresponding to the target image.
Therefore, the brightness of each pixel point with reflection in the target image is reduced by the brightness adjustment amount of the pixel point, so that the reflection area in the adjusted target image has no reflection effect.
Alternatively, after step 105, if a shooting request is received, the image of the image preview interface may be shot in response to the shooting request, so that there is no reflection of light in the target image in the generated shot image.
Optionally, after step 104, the method according to the embodiment of the present invention may further include:
and 106, under the condition that the shooting angle of the target image is not changed, controlling the equipment to which the target image belongs to reduce the value of the brightness parameter of the target area corresponding to the second pixel point in the target image according to the respective brightness adjustment quantity of each second pixel point.
Wherein, step 105 and step 106 can be alternatively executed.
The step 106 is applicable to a case where the captured target image includes a light emitting element, that is, the device to which the target image belongs is a device capable of self-adjusting the brightness thereof, for example, an electronic device such as a mobile phone, a tablet computer, and a smart television, and the reflective area of the electronic device is generally a screen of the device.
For convenience of explanation, the device in which the light emitting element is located is hereinafter described as an example of a smart phone.
The object to which the method of the embodiment of the invention is applied is an electronic device, such as a mobile phone.
The handset and the smart tv can communicate, for example, by establishing a connection via bluetooth, to send control information to the smart tv, so that the smart television can adjust the brightness value of each third pixel point corresponding to each second pixel point in the screen of the smart television to decrease according to the respective brightness adjustment amount of each second pixel point based on the control information (optionally, the control information may include the brightness adjustment amount of each second pixel point, and the position information, such as two-dimensional coordinate information, of each third pixel point in the screen corresponding to each second pixel point in the smart television), so that the brightness of the corresponding reflective area of the screen of the smart television to be photographed is decreased, therefore, the brightness of each second pixel point in the target image is changed into the reduced brightness, and the problem of light reflection of the screen of the intelligent television in the target image is solved.
It should be noted that, because the second pixel points are reflective pixel points in a television image presented by the smart television in the target image of the mobile phone, and the pixel points are in the smart television and correspond to actual screen pixel points (i.e., third pixel points) in a screen of the smart television, the second pixel points and the third pixel points are in one-to-one correspondence and are a relationship between an image and an actual object.
In the embodiment of the invention, the position information of the target image is utilized to identify the first pixel points of which the depth parameters and/or the spectral parameters meet the first preset condition from the target image, the value range of the brightness parameters is determined based on the brightness parameters of the first pixel points, then the second pixel points of which the value of the brightness parameters is not in the value range are identified according to the position information, and the reflecting points in the target image can be accurately identified; in addition, the respective brightness adjustment quantity of each second pixel point is determined according to the value of the brightness parameter of the second pixel point and the value range of the brightness parameter, so that the determined brightness adjustment quantity of each light reflecting point can more accurately overcome the problem of light reflection of the second pixel point; finally, under the condition that the shooting angle of the target image is not changed, the value of the brightness parameter of each second pixel point in the target image is reduced according to the brightness adjustment quantity of each second pixel point, or the brightness parameter of each third pixel point corresponding to each second pixel point in the target image is reduced by controlling the equipment to which the light-emitting element in the target image belongs according to the brightness adjustment quantity of each second pixel point, the problem of light reflection of the target image can be solved by reducing the brightness of the light reflection point in the target image through the electronic equipment, the dynamic adjustment of the brightness of the light reflection area in the shooting preview interface is realized, or the brightness of the third pixel point corresponding to the light reflection point in the target image is dynamically reduced by controlling the equipment to which the light-emitting element in the target image belongs, the problem of target image reflection is solved, the problem of poor photographing effect caused by reflection of light of a photographed object can be optimized or eliminated, and the photographing effect is improved.
In an application scenario, in the embodiment of the present invention, the TOF infrared camera and the spectral analysis sensor are used to return the depth parameter and the spectral parameter of the object position of the photographed object, the position information of the target image of the preview interface returned by the photographing camera and the brightness parameter of the related position, and according to the depth parameter of each position, the spectral parameter of each position and the image data returned by the photographing region, the light reflecting region is accurately reflected, and then the brightness of the light reflecting region is adjusted, so that the problem of light reflection of the photographed image is solved, and the photographing experience of the user is improved.
Optionally, in an embodiment, before the adjusting the value of the second parameter of the second pixel from the initial value to the target value, the method according to the embodiment of the present invention may further include:
sending a first request under the condition that the target image comprises a light-emitting element, wherein the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value;
the target area is an area corresponding to the second pixel point in the light-emitting element, the first value corresponds to being displayed on the screen of the electronic device at the initial value, and the second value corresponds to being displayed on the screen of the electronic device at the target value.
Or, when the value of the second parameter of the second pixel point is adjusted from the initial value to the target value, the method may be implemented by the following steps:
sending a first request under the condition that the target image comprises a light-emitting element, wherein the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value;
the target area is an area corresponding to the second pixel point in the light-emitting element, the first value corresponds to being displayed on the screen of the electronic device at the initial value, and the second value corresponds to being displayed on the screen of the electronic device at the target value.
Optionally, in an embodiment, when the step 106 is executed, the following steps may be implemented by S201 to S205:
s201, when a light emitting surface of the target image is opposite to the front surface of a camera of the electronic equipment, acquiring a first resolution of the target image in the light emitting surface;
if the light emitting surface of the light emitting element of the target image is opposite to the front surface of the camera, for example, the light emitting surface may be a display screen (i.e., a screen) of the smart television.
The front-side relative refers to a plane of the light-emitting surface, which is substantially parallel to a plane of a camera of the electronic device (e.g., a mobile phone) (or a plane of a screen of the mobile phone).
The mobile phone can be in Bluetooth communication with the smart television to acquire the first resolution of the target image on the light emitting surface from the smart television side.
It should be noted that the target image may be the entire screen of the smart television or a partial screen of the smart television, and therefore, the first resolution of the target image in the screen of the smart television is acquired instead of the screen resolution of the smart television.
For convenience of description, the following description will take the target image as an example of a complete screen for playing the television content of the smart television, for example, the first resolution is 1000 × 1000.
S202, acquiring a second resolution of the target image in the image preview interface;
the mobile phone side may also obtain an image resolution of the screen of the smart television in the image preview interface, and obviously, the second resolution is smaller than the first resolution. For example, the second resolution is 100 x 100.
The execution sequence of S201 and S202 is not limited.
S203, calculating the ratio of the first resolution to the second resolution to generate an expansion ratio;
in the above example, the ratio is 10, i.e. the expansion ratio is 10: 1.
S204, determining target position information of a target region corresponding to the second pixel point in the light emitting element based on the expansion ratio;
each second pixel point may correspond to each third pixel point in the television screen (i.e., the light-emitting element), each third pixel point forms the target area described herein, and the target position information of the target area is each two-dimensional coordinate information of each third pixel point in the television screen.
The following description will be given by taking the example of determining the position information of a third pixel corresponding to a second pixel in the light-emitting element:
for example, a certain pixel point with coordinates (50,50) in the target image with the second resolution of 100 × 100 is a second pixel point, i.e., a reflection point; when the corresponding coordinate information of the light reflecting point in the television screen is determined, the coordinate of the light reflecting point can be expanded in equal proportion according to the expansion proportion (such as 10:1), and a third pixel point with the coordinate of (500 ) is obtained;
it should be understood that since the tv screen faces the camera, the tv screen is a complete image in the shooting preview interface (the tv screen is a rectangle of 4: 3, and then a rectangle of 4: 3 in the shooting preview interface), and the coordinates (50,50) are the coordinates of the pixel point in the target image in the tv image.
Similarly, the coordinate information of each third pixel point corresponding to each second pixel point in the light-emitting element, that is, the target position information of the target area, can be obtained.
S205, sending a first request carrying the location information, where the first request is used to adjust a value of a lighting parameter of a target area of the lighting element from a first value to a second value based on the target location information.
In this step, the respective brightness adjustment amount of each second pixel point may be determined as the respective brightness adjustment amount of each third pixel point corresponding to each second pixel point, and the brightness adjustment amount of each third pixel point may be carried in the first request, and in addition, the first request also carries the target two-dimensional coordinate information of each third pixel point.
Then, the device to which the light-emitting element belongs, for example, the smart television, may control the value of the light-emitting parameter of each third pixel having each target two-dimensional coordinate information in the television screen to be reduced (adjusted from the first value to the second value) according to the respective brightness adjustment amount of each third pixel.
The mobile phone can communicate with the Bluetooth to send the target two-dimensional coordinate information of each third pixel point and the brightness adjustment quantity associated with the target two-dimensional coordinate information to the smart television, so that the smart television can reduce the brightness value of each third pixel point with the coordinate of each target two-dimensional coordinate information in the television screen according to the brightness adjustment quantity corresponding to the target two-dimensional coordinate information.
After S205, the pixel points originally having reflection in the image of the screen of the smart television in the target image do not reflect light any more, and then the collected target image does not have the second pixel point having reflection any more.
In the embodiment of the invention, when the light emitting surface of the target image is opposite to the front surface of the camera of the electronic device, a first resolution of the target image in the light emitting surface and a second resolution of the target image in the image preview interface can be acquired; then, based on the enlargement ratio, position information of a target region corresponding to the second pixel point in the light emitting element is determined; and finally, sending a first request carrying the position information, wherein the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value based on the position information, so that the light-emitting parameter can be changed from a light-reflecting source, and the elimination effect of the light-reflecting point is improved.
Alternatively, after step 106 (or at S205), if a shooting request is received, the image in the image preview interface may be shot in response to the shooting request, so that there is no glistening in the part of the generated shot image related to the target image.
Optionally, in another embodiment, when the step of sending the first request is executed, where the first request is used to adjust a value of a light-emitting parameter of the target region of the light-emitting element from a first value to a second value, the step may also be implemented by S201 to S205.
Optionally, in another embodiment, when step 106 is executed, or when the step of sending a first request is executed, where the first request is used to adjust a value of a light-emitting parameter of a target region of the light-emitting element from a first value to a second value, S301 to S306 may further be implemented:
s301, when the light emitting surface of the light emitting element is not opposite to the front side of the image acquisition direction of the camera of the electronic equipment, generating a first three-dimensional model of the target image according to the information of the pixel points of the target image;
if the light emitting surface of the light emitting element of the target image is not opposite to the front surface of the camera, where the front surface is opposite to the plane where the light emitting surface is located, and is substantially parallel to the plane where the camera of the electronic device (e.g., a mobile phone) is located (or the plane where a screen of the mobile phone is located), then the mobile phone is inclined to shoot the display screen of the smart television without the front surface being opposite.
Since the light emitting surface is not in front-side opposition to the camera, the screen of the smart television in the target image is not a standard front-side illumination, but a screen image of the smart television with a certain angle exists.
S302, converting the first three-dimensional model into a second three-dimensional model, wherein the second three-dimensional model is the three-dimensional model of the light-emitting element when the light-emitting surface of the light-emitting element is opposite to the front surface of the image acquisition direction of the camera of the electronic equipment;
in the step, the three-dimensional model of the intelligent television with the non-standard angle can be converted into the three-dimensional model of the intelligent television with the standard angle (namely, the second three-dimensional model)
S303, acquiring a mapping relation when the first three-dimensional model is converted into the second three-dimensional model;
for example, the mapping relationship may be a transformation relationship of affine transformation.
S304, according to the mapping relationship, converting the respective first location information of the second pixel points in the first three-dimensional model, and generating the destination location information of the destination region corresponding to each of the second pixel points (i.e. the respective second location information of each of the third pixel points); namely, finding out the corresponding relation between the position of each second pixel point in the television image of the shooting preview interface and the target area in the television screen.
S305, sending a first request carrying the target location information, where the first request is used to adjust a value of a lighting parameter of a target area of the lighting element from a first value to a second value based on the target location information.
In the step, the respective brightness adjustment amount of each second pixel point may be determined as the respective brightness adjustment amount of each third pixel point corresponding to each second pixel point, and the brightness adjustment amount of each third pixel point may be carried in the first request, and in addition, the first request also carries target two-dimensional coordinate information (i.e., second position information) of each third pixel point.
Then, the device to which the light-emitting element belongs, for example, the smart television, may control, according to the respective brightness adjustment amount of each third pixel point, the value of the light-emitting parameter of each third pixel point having each target two-dimensional coordinate information in the television screen to be reduced (adjusted from the first value to the second value).
The principle of this step is similar to that of S205 described above, and is not described here again.
Alternatively, after step 106 (or at S305), if a shooting request is received, the image in the image preview interface may be shot in response to the shooting request, so that there is no glistening in the part of the generated shot image related to the target image.
In the embodiment of the present invention, when the light emitting surface of the target image is not opposite to the front surface of the camera of the electronic device, the first three-dimensional model of the target image may be converted into a second three-dimensional model according to a mapping relationship when the first three-dimensional model of the target image is converted into the second three-dimensional model (the second three-dimensional model is the three-dimensional model of the target image when the light emitting surface of the target image is opposite to the front surface of the camera of the electronic device), so as to convert the respective first location information of each second pixel point in the first three-dimensional model, generate the respective second location information of each third pixel point corresponding to each second pixel point, and finally, send a first request carrying the location information, where the first request is used to adjust the value of the light emitting parameter of the target area of the light emitting element from a first value to a second value based on the location information, the brightness can be changed from the reflection source, and the effect of eliminating reflection points is improved.
Alternatively, in an embodiment, in a case that the device to which the light-emitting element of the target image belongs does not adjust the light-emitting parameter of the target image, the method of the embodiment of the present invention may perform step 105, and then shoot the target image after step 105 to generate a first image; then, after step 106 is executed, the target image is photographed to generate a second image; and finally, selecting a non-reflective image from the first image and the second image as an image to be stored.
In this way, in the embodiment of the present invention, when the device to which the light emitting element of the target image belongs can adjust the light emitting parameter of the light emitting element, and when the device to which the light emitting element of the target image belongs does not perform brightness adjustment according to the control information (i.e. the first request) of the electronic device in the embodiment of the present invention, the electronic device may decrease the brightness of the second pixel point of the reflection in the target image, and then perform shooting to generate the first image; then, in a case where the device to which the light emitting element of the target image belongs performs brightness adjustment according to the control information of the electronic device according to the embodiment of the present invention, the method according to the embodiment of the present invention may capture an image in the image preview interface to generate a second image; then, a photo with good reflection correction effect is selected from the first image and the second image to be used as an image needing to be stored, and the shooting effect of the object with reflection is improved.
Referring to FIG. 2, a block diagram of an electronic device of one embodiment of the invention is shown. The electronic equipment of the embodiment of the invention can realize the details of the image processing method in the embodiment and achieve the same effect.
The electronic device shown in fig. 2 includes:
the first obtaining module 21 is configured to obtain information of a pixel point of a target image in an image preview interface when the image preview interface is displayed;
the first determining module 22 is configured to determine a first pixel according to the information of the pixel, where a first parameter of the first pixel meets a first preset condition;
a second obtaining module 23, configured to obtain a second parameter of the first pixel;
a second determining module 24, configured to determine a second pixel point in the first pixel points according to the second parameter, where the second parameter of the second pixel point does not satisfy a second preset condition;
and the adjusting module 25 is configured to adjust a value of the second parameter of the second pixel.
Optionally, the first determining module 22 includes:
the first determining submodule is used for determining a first parameter average value according to the information of the pixel points of the target image;
the second determining submodule is used for determining pixel points, among the pixel points of the target image, of which the difference value between the value of the first parameter and the average value of the first parameter is smaller than a first threshold as first pixel points;
wherein the first parameter comprises at least one of a depth parameter and a spectral parameter.
Optionally, the second determining module 24 includes:
the third determining submodule is used for determining the value range of the second parameter according to the value of the second parameter of the first pixel point;
the fourth determining submodule is used for determining a second pixel point of which the initial value of the second parameter is not in the value range in the first pixel point;
the adjusting module 25 includes:
the adjusting submodule is used for adjusting the value of the second parameter of the second pixel point from the initial value to a target value;
the initial value is a value of the second pixel point before the second parameter adjustment, and the target value is a value of the second pixel point after the second parameter adjustment.
Optionally, the electronic device further comprises:
a sending module, configured to send a first request when the target image includes a light-emitting element, where the first request is used to adjust a value of a light-emitting parameter of a target region of the light-emitting element from a first value to a second value;
the target area is an area corresponding to the second pixel point in the light-emitting element, the first value corresponds to being displayed on the screen of the electronic device at the initial value, and the second value corresponds to being displayed on the screen of the electronic device at the target value.
Optionally, the sending module includes:
the first acquisition submodule is used for acquiring first resolution of a light-emitting surface when the light-emitting surface of the light-emitting element is opposite to the front surface of the image acquisition direction of a camera of the electronic equipment;
the second acquisition submodule is used for acquiring a second resolution of the target image in the image preview interface;
the calculation submodule is used for calculating the ratio of the first resolution to the second resolution to generate an expansion ratio;
a fifth determining submodule configured to determine, based on the expansion ratio, position information of a target region corresponding to the second pixel point in the light emitting element;
and the first sending submodule is used for sending a first request carrying the position information, wherein the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value based on the position information.
Optionally, the sending module includes:
the generation submodule is used for generating a first three-dimensional model of the target image according to the information of the pixel points of the target image when the light emitting surface of the light emitting element is not opposite to the front side of the image acquisition direction of the camera of the electronic equipment;
the conversion submodule is used for converting the first three-dimensional model into a second three-dimensional model, wherein the second three-dimensional model is the three-dimensional model of the light-emitting element when the light-emitting surface of the light-emitting element is opposite to the front surface of the image acquisition direction of the camera of the electronic equipment;
the third obtaining submodule is used for obtaining a mapping relation when the first three-dimensional model is converted into the second three-dimensional model;
the conversion submodule is used for converting the first position information of the second pixel point in the first three-dimensional model according to the mapping relation and generating second position information of a target area corresponding to the second pixel point;
and the second sending submodule is used for sending a first request carrying the second position information, and the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value based on the second position information.
The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the above method embodiments, and is not described herein again to avoid repetition.
The electronic equipment utilizes the pixel point information of the target image in the image preview interface through the modules, can determine a first pixel point of a target image, the first parameter of which meets a first preset condition, acquire a second parameter of the first pixel point, then determine a second pixel point of the first pixel point according to the second parameter, wherein, the second parameter of the second pixel point does not satisfy the second preset condition, the reflecting point (namely the second pixel point) in the target image can be accurately identified, and finally, the value of the second parameter of the second pixel point is adjusted, the problem of light reflection of the second pixel point can be effectively solved, the dynamic adjustment of the second parameter of the light-reflected second pixel point in the image preview interface is realized, the problem of poor photographing effect caused by light reflection of a photographed target image can be optimized or eliminated, and the photographing effect of the photographed image is improved.
Fig. 3 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 3 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The sensor 405 is configured to acquire information of a pixel point of a target image in an image preview interface when the image preview interface is displayed;
the processor 410 is configured to determine a first pixel point according to the information of the pixel point, where a first parameter of the first pixel point satisfies a first preset condition; acquiring a second parameter of the first pixel point; determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition; and adjusting the value of the second parameter of the second pixel point.
In the embodiment of the invention, the first pixel point of the target image with the first parameter meeting the first preset condition in the target image can be determined by utilizing the pixel point information of the target image in the image preview interface, and obtaining a second parameter of the first pixel point, then determining a second pixel point in the first pixel point according to the second parameter, wherein, the second parameter of the second pixel point does not satisfy the second preset condition, the reflecting point (namely the second pixel point) in the target image can be accurately identified, and finally, the value of the second parameter of the second pixel point is adjusted, the problem of light reflection of the second pixel point can be effectively solved, the dynamic adjustment of the second parameter of the light-reflected second pixel point in the image preview interface is realized, the problem of poor photographing effect caused by light reflection of a photographed target image can be optimized or eliminated, and the photographing effect of the photographed image is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a process of sending and receiving information or a call, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 402, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4061 and/or the backlight when the electronic apparatus 400 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 3, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 408 is an interface for connecting an external device to the electronic apparatus 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic apparatus 400 or may be used to transmit data between the electronic apparatus 400 and an external device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the electronic device. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The electronic device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the electronic device 400 includes some functional modules that are not shown, and are not described in detail here.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements 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 described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program 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 computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
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.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention 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 invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (9)

1. An image processing method applied to an electronic device, the method comprising:
under the condition that an image preview interface is displayed, acquiring information of pixel points of a target image in the image preview interface;
determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition, and the first pixel point is a pixel point with the same depth value and/or a pixel point with the same spectral value in the target image;
acquiring a second parameter of the first pixel point;
determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition;
adjusting the value of a second parameter of the second pixel point;
the adjusting the value of the second parameter of the second pixel point includes:
adjusting the value of the second parameter of the second pixel point from an initial value to a target value;
the initial value is the value of the second pixel point before the second parameter adjustment, and the target value is the value of the second pixel point after the second parameter adjustment;
before the adjusting the value of the second parameter of the second pixel point from the initial value to the target value, the method further includes:
sending a first request under the condition that the target image comprises a light-emitting element, wherein the first request is used for adjusting the value of a light-emitting parameter of a target area of the light-emitting element from a first value to a second value;
the sending a first request, where the first request is used to adjust a value of a lighting parameter of a target area of the lighting element from a first value to a second value, includes:
when the light emitting surface of the light emitting element is opposite to the front surface of the image acquisition direction of a camera of the electronic equipment, acquiring a first resolution of the light emitting surface;
acquiring a second resolution of the target image in the image preview interface;
calculating the ratio of the first resolution to the second resolution to generate an expansion ratio;
determining position information of a target region corresponding to the second pixel point in the light emitting element based on the enlargement ratio;
and sending a first request carrying the position information, wherein the first request is used for adjusting the value of the light-emitting parameter of the target area of the light-emitting element from a first value to a second value based on the position information.
2. The method of claim 1,
determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition, and the determining comprises:
determining a first parameter average value according to the information of the pixel points of the target image;
determining pixel points, of the pixel points of the target image, of which the difference value between the value of the first parameter and the average value of the first parameter is smaller than a first threshold value as first pixel points;
wherein the first parameter comprises at least one of a depth parameter and a spectral parameter.
3. The method according to claim 1, wherein the determining a second pixel point of the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not satisfy a second predetermined condition includes:
determining the value range of a second parameter according to the value of the second parameter of the first pixel point;
and determining a second pixel point of which the initial value of the second parameter is not in the value range in the first pixel point.
4. The method of claim 1,
the target area is an area corresponding to the second pixel point in the light-emitting element, the first value corresponds to the second pixel point being displayed on the screen of the electronic device at the initial value, and the second value corresponds to the second pixel point being displayed on the screen of the electronic device at the target value.
5. An electronic device, characterized in that the electronic device comprises:
the first acquisition module is used for acquiring information of pixel points of a target image in an image preview interface under the condition that the image preview interface is displayed;
the first determining module is used for determining a first pixel point according to the information of the pixel point, wherein a first parameter of the first pixel point meets a first preset condition, and the first pixel point is a pixel point with the same depth value and/or a pixel point with the same spectral value in the target image;
the second acquisition module is used for acquiring a second parameter of the first pixel point;
the second determining module is used for determining a second pixel point in the first pixel points according to the second parameter, wherein the second parameter of the second pixel point does not meet a second preset condition;
the adjusting module is used for adjusting the value of the second parameter of the second pixel point;
the adjustment module comprises:
the adjusting submodule is used for adjusting the value of the second parameter of the second pixel point from an initial value to a target value;
the initial value is the value of the second pixel point before the second parameter adjustment, and the target value is the value of the second pixel point after the second parameter adjustment;
a sending module, configured to send a first request when the target image includes a light-emitting element, where the first request is used to adjust a value of a light-emitting parameter of a target region of the light-emitting element from a first value to a second value;
the sending module comprises:
the first acquisition submodule is used for acquiring first resolution of a light-emitting surface when the light-emitting surface of the light-emitting element is opposite to the front surface of the image acquisition direction of a camera of the electronic equipment;
the second acquisition submodule is used for acquiring a second resolution of the target image in the image preview interface;
the calculation submodule is used for calculating the ratio of the first resolution to the second resolution to generate an expansion ratio;
a fifth determining submodule configured to determine, based on the expansion ratio, position information of a target region corresponding to the second pixel point in the light emitting element;
the first sending submodule is configured to send a first request carrying the location information, where the first request is used to adjust a value of a lighting parameter of a target area of the lighting element from a first value to a second value based on the location information.
6. The electronic device of claim 5,
the first determining module includes:
the first determining submodule is used for determining a first parameter average value according to the information of the pixel points of the target image;
the second determining submodule is used for determining pixel points, among the pixel points of the target image, of which the difference value between the value of the first parameter and the average value of the first parameter is smaller than a first threshold value as first pixel points;
wherein the first parameter comprises at least one of a depth parameter and a spectral parameter.
7. The electronic device of claim 5, wherein the second determining module comprises:
the third determining submodule is used for determining the value range of the second parameter according to the value of the second parameter of the first pixel point;
and the fourth determining submodule is used for determining a second pixel point of which the initial value of the second parameter is not in the value range in the first pixel point.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the image processing method according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, carries out the steps in the image processing method according to any one of claims 1 to 4.
CN202010291826.3A 2020-04-14 2020-04-14 Image processing method and electronic equipment Active CN111464745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010291826.3A CN111464745B (en) 2020-04-14 2020-04-14 Image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010291826.3A CN111464745B (en) 2020-04-14 2020-04-14 Image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111464745A CN111464745A (en) 2020-07-28
CN111464745B true CN111464745B (en) 2022-08-19

Family

ID=71681242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010291826.3A Active CN111464745B (en) 2020-04-14 2020-04-14 Image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111464745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112908878B (en) * 2021-01-20 2023-02-07 江西新菲新材料有限公司 Processing method and processing device for electronic product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006421A (en) * 2009-09-01 2011-04-06 华晶科技股份有限公司 Processing method for image with face
CN108564540A (en) * 2018-03-05 2018-09-21 广东欧珀移动通信有限公司 Remove image processing method, device and the terminal device that eyeglass is reflective in image
CN110741410A (en) * 2018-04-25 2020-01-31 北京嘀嘀无限科技发展有限公司 System and method for determining retroreflective regions in an image
CN110855889A (en) * 2019-11-21 2020-02-28 重庆金山医疗技术研究院有限公司 Image processing method, image processing apparatus, image processing device, and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4396387B2 (en) * 2004-05-13 2010-01-13 オムロン株式会社 Image correction device
JP6550723B2 (en) * 2014-10-31 2019-07-31 オムロン株式会社 Image processing apparatus, character recognition apparatus, image processing method, and program
CN110969984A (en) * 2019-12-02 2020-04-07 英华达(上海)科技有限公司 Dynamic brightness adjusting method, system, equipment and storage medium of display equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006421A (en) * 2009-09-01 2011-04-06 华晶科技股份有限公司 Processing method for image with face
CN108564540A (en) * 2018-03-05 2018-09-21 广东欧珀移动通信有限公司 Remove image processing method, device and the terminal device that eyeglass is reflective in image
CN110741410A (en) * 2018-04-25 2020-01-31 北京嘀嘀无限科技发展有限公司 System and method for determining retroreflective regions in an image
CN110855889A (en) * 2019-11-21 2020-02-28 重庆金山医疗技术研究院有限公司 Image processing method, image processing apparatus, image processing device, and storage medium

Also Published As

Publication number Publication date
CN111464745A (en) 2020-07-28

Similar Documents

Publication Publication Date Title
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
CN109688322B (en) Method and device for generating high dynamic range image and mobile terminal
CN108307109B (en) High dynamic range image preview method and terminal equipment
CN107730460B (en) Image processing method and mobile terminal
CN108040209B (en) Shooting method and mobile terminal
CN107248137B (en) Method for realizing image processing and mobile terminal
CN107846583B (en) Image shadow compensation method and mobile terminal
CN108924414B (en) Shooting method and terminal equipment
CN107749046B (en) Image processing method and mobile terminal
CN110602389B (en) Display method and electronic equipment
CN109241832B (en) Face living body detection method and terminal equipment
CN109819166B (en) Image processing method and electronic equipment
CN111031234B (en) Image processing method and electronic equipment
CN109246351B (en) Composition method and terminal equipment
CN110602390B (en) Image processing method and electronic equipment
CN110363729B (en) Image processing method, terminal equipment and computer readable storage medium
CN109859718B (en) Screen brightness adjusting method and terminal equipment
CN109104573B (en) Method for determining focusing point and terminal equipment
CN108259756B (en) Image shooting method and mobile terminal
WO2021136181A1 (en) Image processing method and electronic device
CN107798662B (en) Image processing method and mobile terminal
CN111464745B (en) Image processing method and electronic equipment
CN109348212B (en) Image noise determination method and terminal equipment
CN109561258B (en) Light supplementing method and terminal equipment
CN110086916B (en) Photographing method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant