CN112511737A - Image processing method and device, electronic equipment and readable storage medium - Google Patents

Image processing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112511737A
CN112511737A CN202011183599.9A CN202011183599A CN112511737A CN 112511737 A CN112511737 A CN 112511737A CN 202011183599 A CN202011183599 A CN 202011183599A CN 112511737 A CN112511737 A CN 112511737A
Authority
CN
China
Prior art keywords
image
processed
light
current
electronic equipment
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
CN202011183599.9A
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 CN202011183599.9A priority Critical patent/CN112511737A/en
Publication of CN112511737A publication Critical patent/CN112511737A/en
Pending legal-status Critical Current

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • 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/61Control of cameras or camera modules based on recognised objects
    • 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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters

Abstract

The application discloses an image processing method and device, electronic equipment and a readable storage medium, and belongs to the field of electronic equipment. According to the method, a first input is received, current time information and current position information of electronic equipment are obtained in response to the first input, then the relative position between a current natural light source and the electronic equipment is determined according to the current position information and the current time information, and finally target light effects are added to an image to be processed according to the relative position, wherein the target light effects comprise light effects simulating light rays emitted by the current natural light source to irradiate a shooting real scene corresponding to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed, and the image which is obtained by shooting under normal illumination can be obtained through adding the light effect under the condition that the shooting environment is not clear, so that the image processed through the light effect is more real, and the image processing effect is improved to a certain extent.

Description

Image processing method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the field of electronic equipment, and particularly relates to an image processing method and device, electronic equipment and a readable storage medium.
Background
With the popularization and wide application of photographing technologies, people have higher and higher requirements on photographing effects, but in the actual photographing process, due to the limitation of objective conditions, such as weather, the imaging effect of photos obtained by users is poor.
In the prior art, different imaging templates or filters are preset, and when a user needs to process the imaging effect of a photo, the user can select the required template or filter from the existing templates or filters to process the image. However, the image processing effect may be poor in the conventional method of processing an image using a template or a filter.
Disclosure of Invention
An object of the embodiments of the present application is to provide an image processing method, an image processing apparatus, an electronic device, and a readable storage medium, which can solve the problem that an image processing effect is poor due to the fact that an existing template or filter is used for processing an image.
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:
receiving a first input;
responding to the first input, and acquiring current time information and current position information of the electronic equipment;
determining the relative position between the current natural light source and the electronic equipment according to the current position information and the current time information;
adding target light effects on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
a receiving module for receiving a first input;
the first acquisition module is used for responding to the first input and acquiring current time information and current position information of the electronic equipment;
the first determining module is used for determining the relative position between the current natural light source and the electronic equipment according to the current position information and the current time information;
the adding module is used for adding target light effects on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
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 method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the 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 method according to the first aspect.
In summary, the image processing method provided in the embodiments of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, and adds a target light effect to an image to be processed according to the relative position, where the target light effect includes a light effect that light emitted by the current natural light source is simulated to irradiate a captured real scene corresponding to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed, and the image which is obtained by shooting under normal illumination can be obtained through adding the light effect under the condition that the shooting environment is not clear, so that the image processed through the light effect is more real, and the image processing effect is improved to a certain extent.
Drawings
FIG. 1 is a flowchart illustrating steps of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of another image processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an image to be processed according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another image to be processed according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another image to be processed according to an embodiment of the present invention;
fig. 6 is a block diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 7 shows an electronic device according to an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware structure of an electronic device for implementing 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 method 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.
Fig. 1 is a flowchart illustrating steps of an image processing method according to an embodiment of the present invention, where as shown in fig. 1, the method may include:
step 101, receiving a first input.
In this embodiment of the present invention, the first input may be a selection operation of a user for executing simulated light effect processing on an image to be processed displayed on an electronic device, where the selection operation may be a click operation on the image to be processed, or a voice input operation, for example, a voice instruction "perform simulated light effect processing on the image" may be input, or a gesture operation for executing the simulated light effect processing may be input, which is not limited in this embodiment of the present invention. The user can execute a first input when the simulated light effect processing is needed on the image to be processed, and accordingly the electronic device can receive the first input. For example, the first input may be a click operation of a light effect simulation button on the image to be processed, the light effect simulation button may be preset according to an actual situation, and when the user needs to perform light effect simulation processing on the image to be processed, the user clicks the light effect simulation button.
It should be noted that the image to be processed may be a picture that a user needs to perform simulated light effect processing, specifically, a preview image acquired by a camera when the user opens the camera of the electronic device to shoot, or a picture stored in the electronic device, a picture downloaded from a network, an image captured from a video, and the like, which is not limited in this invention.
And 102, responding to the first input, and acquiring current time information and current position information of the electronic equipment.
In this embodiment of the present invention, the current time information may be time recorded on the electronic device when the user performs the first input, and the obtaining of the current time information may be determining time currently displayed on the electronic device when the electronic device receives the first input, and taking the time as the current time information, for example, when the time when the user performs the first input is 18 o 'clock 01 min 10 sec, the current time information is 18 o' clock 01 min 10 sec. The current time information may also be time manually input by the user, and the obtaining of the current time information may be time input by the electronic device by the user, and the input time is taken as the current time information, for example, the time input by the user is 12 o 'clock 00 min 00 s, and the current time information is 12 o' clock 00 min 00 s.
The current location information of the electronic device may be a current geographic location of the electronic device, and the obtaining of the current location information of the electronic device may be that the electronic device determines, through a Global Positioning System (GPS), a longitude and latitude coordinate of the electronic device on a map, and uses the longitude and latitude coordinate as the current location information of the electronic device, for example, when the user currently holds the electronic device in a certain X square, and determines, through the GPS, that the longitude and latitude coordinate of the certain X square is 39 ° 54'27 "in north, and 116 ° 23'17" in east, it may be determined that the current location information of the electronic device is 39 ° 54'27 "in north, and 116 ° 23'17" in east.
It should be noted that after the first input is received, it may be considered that the user needs to perform the simulated light effect processing on the image to be processed, and therefore, the electronic device needs to acquire current time information and current position information of the electronic device to determine a parameter when performing the simulated light processing on the image to be processed.
And 103, determining the relative position between the current natural light source and the electronic equipment according to the current position information and the current time information.
In the embodiment of the present invention, the current natural light source may be a light emitter such as the sun or the moon under the current time information. For example, the relative position between the current natural light source and the electronic device may be determined according to the position of the sun in the current time information and the current position information of the electronic device, for example, the current time information is 12 pm 00 min 00 s, the position of the sun directly above the electronic device may be obtained, and the current position information of the user is a certain X square, so that in the case that the user holds the electronic device at 12 pm 00 min 00 s and is located in a certain X square, the relative position of the sun and the electronic device may be the position of the sun on the electronic device that is south away from the right side. Further, under different time information, the relative position of the user located at different position information and the current natural light source may be different.
It should be noted that, by determining the current time information and the current position information of the electronic device, the current natural light source in the actual scene can be simulated, that is, the position of the sun relative to the electronic device can be determined, so that when the light effect simulation processing is performed on the image, the accuracy of the image processing is improved, and further, the reality of the processed image can be improved.
104, adding target light effects on the image to be processed according to the relative position;
the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
In the embodiment of the invention, the irradiation angle and the irradiation intensity of the current natural light source can be simulated through the electronic equipment according to the relative position, and the light and shadow effect presented by the irradiation angle and the irradiation intensity in the shooting real scene corresponding to the image to be processed is used as the target light effect. The real scene shooting refers to a scene corresponding to the picture content presented by the image to be processed in the real world, namely the real scene shooting can represent the specific scene shot by the image to be processed.
Adding the target light effect on the image to be processed, which may be determining an image area to be processed on the shooting real scene corresponding to the image to be processed according to the simulated irradiation angle and irradiation intensity of the current natural light source, and adjusting the brightness value of pixels in the image area, so that the light and shadow effect under the irradiation angle and irradiation intensity of the current natural light source can be shown according to the adjusted image area. The image area to be processed may be an area selected in the image according to the illumination angle and illumination intensity of the current natural light source.
In summary, the image processing method provided in the embodiments of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, and adds a target light effect to an image to be processed according to the relative position, where the target light effect includes a light effect that light emitted by the current natural light source is simulated to irradiate a captured real scene corresponding to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed, and the image which is obtained by shooting under normal illumination can be obtained through adding the light effect under the condition that the shooting environment is not clear, so that the image processed through the light effect is more real, and the image processing effect is improved to a certain extent.
Fig. 2 is a flowchart of steps of another image processing method according to an embodiment of the present invention, and as shown in fig. 2, the method may include:
step 201, receiving a first input.
Specifically, the step 101 may be referred to in an implementation manner of this step, which is not limited in this embodiment of the present invention.
For example, fig. 3 is a schematic diagram of an image to be processed according to an embodiment of the present invention, and as shown in fig. 3, the image to be processed is displayed on a display screen 21 of the electronic device, and a click operation of a simulated light effect button 22 by a user is received to perform a process of performing a simulated light effect on the image to be processed.
Step 202, responding to the first input, and acquiring current time information and current position information of the electronic device.
Specifically, the step 102 may be referred to in the implementation manner of this step, which is not limited in this embodiment of the present invention.
For example, fig. 4 is a schematic diagram of another image to be processed according to an embodiment of the present invention, and as shown in fig. 4, the image to be processed is displayed on the display screen 21 of the electronic device held by the user, the current time information is 11 o ' clock 00 min 00 sec, and the current position information of the electronic device is N22 ° 38'17.54 ", E114 ° 05' 52.36".
Step 203, determining the relative position between the current natural light source and the electronic device according to the current position information and the current time information.
Specifically, the step 103 may be referred to in an implementation manner of this step, and this is not limited in this embodiment of the present invention.
Step 204, determining relative orientation information of the current natural light source relative to the shooting surface of the electronic equipment according to the relative position and the orientation of the shooting surface of the electronic equipment; the shooting surface is the surface where a target camera is located, and the target camera is a camera used for shooting the image to be processed in the electronic equipment.
In the embodiment of the present invention, a plane where a camera used in acquiring an image to be processed is located may be taken as an orientation of a shooting plane of an electronic device, for example, if the image to be processed is acquired by a user by self-shooting with a front camera, a direction where the front camera is located may be taken as an orientation of the shooting plane of the electronic device, and if the image to be processed is acquired by the user by self-shooting with a rear camera, a direction where the rear camera is located may be taken as an orientation of the shooting plane of the electronic device. Further, if the camera used in acquiring the image to be processed cannot be determined, a default direction may be taken as the orientation of the shooting surface of the electronic device, and the default direction may be the direction in which the rear camera is located, which is not limited to this invention.
In the embodiment of the present invention, because the irradiation light of the current natural light source needs to be simulated in the shooting real scene corresponding to the image to be processed, the relative orientation information of the current natural light source relative to the shooting surface of the electronic device may be determined according to the relative position of the current natural light source relative to the electronic device and the orientation of the shooting surface of the electronic device, that is, the relative orientation information of the shooting real scene corresponding to the image to be processed and the current natural light source may be determined. By determining the relative orientation information of the current natural light source relative to the shooting surface of the electronic equipment, the accuracy of determining the illumination incidence angle can be improved, and the light effect processing of the image can be more vivid.
For example, if the simulated current natural light source is located in the south of the electronic device, when the shooting surface of the electronic device faces in the north, it may be determined that the orientation information of the current natural light source and the shooting surface of the electronic device is relative, that is, the relative orientation information is in the north-south direction. If the simulated current natural light source is located in the true east of the electronic device, when the shooting surface of the electronic device faces the true north, it can be determined that the orientation information of the current natural light source and the shooting surface of the electronic device forms a 90 ° angle, that is, the relative orientation information is 90 ° north and east. If the simulated current natural light source is located in the south of the electronic device, when the orientation of the shooting surface of the electronic device is in the south of the right, it may be determined that the orientation information of the current natural light source and the shooting surface of the electronic device is the same, that is, the relative orientation information is in the south of the right.
And step 205, determining the incident angle of the light of the current natural light source on the shooting surface according to the relative orientation information.
In the embodiment of the present invention, when the orientation of the shooting surface of the electronic device is opposite to the orientation of the current natural light source, the incident direction of the light of the current natural light source in the shooting real scene corresponding to the image to be processed may be from far to near of the shooting real scene. In the case that the orientation of the shooting surface of the electronic device is the same as the orientation of the current natural light source, the incident direction of the light of the current natural light source in the shooting real scene corresponding to the image to be processed may be from near to far of the shooting real scene. When the orientation of the shooting surface of the electronic device and the orientation of the current natural light source form any included angle, the incident direction of the light of the current natural light source in the shooting real scene corresponding to the image to be processed may be irradiated from the side surface of the shooting real scene at any included angle.
Specifically, a horizontal plane perpendicular to a display screen of the electronic device is an XOY plane, a right south direction is taken as an X axis, a right east direction is taken as a Y axis, and a direction perpendicular to the XOY plane is taken as a Z axis by a gyroscope disposed in the electronic device. The position of the simulated natural light source in the image to be processed can be accurately determined by establishing the three-dimensional coordinate system, so that the accuracy of determining the incident angle of the light can be improved, and the accuracy of light effect processing is improved.
Further, the light incident angle of the current natural light source in the real scene corresponding to the image to be processed may be determined according to a position of the current natural light source in the three-dimensional coordinate system, and specifically, an included angle from the current natural light source to an origin of the coordinate system may be used as the light incident angle, for example, an included angle from the current natural light source to the XOY plane in the three-dimensional coordinate system is 30 °, an included angle from the XOZ plane is 45 °, and the light incident angle is 30 ° from the XOY plane and 45 ° from the XOZ plane.
And step 206, adding a light effect formed by irradiating the light rays emitted by the current natural light source to the shooting real scene corresponding to the image to be processed from the light ray incidence angle to the image to be processed.
In the embodiment of the invention, when the target light effect is added, the target light effect can be added according to the display parameters of the target light effect. The display parameter may be a display position and a target luminance value of each pixel in the region. When the light effect is added specifically, the display position can be determined according to the incident angle of the light, then the light effect layer is added on the image to be processed according to the display position, further, the brightness value of each pixel in the image area added with the light effect layer can be set to be the corresponding target brightness value according to the target brightness value of the pixel, and then the target light effect is added. The light effect layer may be preset, and the specific style of the layer may be determined according to the actual situation, which is not limited in the present invention. Further, the corresponding relationship between the incident angle of the light and the display position and the corresponding relationship between the illumination intensity and the target brightness value may be preset. The specific size of the target brightness value can be matched with the corresponding illumination intensity, and the higher the illumination intensity is, the higher the brightness value is. Specifically, when the target lighting effect is added, the display position and the target brightness value corresponding to the current light incident angle can be searched based on the corresponding relationship, so that the target lighting effect can be added subsequently. The light effect layers are added according to the incident angles of the light rays, so that the light effects which accord with the current time information can be accurately added, and meanwhile, the image processing efficiency can be improved.
It should be noted that, the light irradiation intensity of the current natural light source in the preset environment at the current time may also be determined according to the current time information, and accordingly, a light effect is added to the image to be processed, or a light effect formed by irradiating light emitted by the current natural light source to the real scene corresponding to the image to be processed from the light incident angle is added to the image to be processed according to the light irradiation intensity. The light irradiation intensity may be determined according to the current time information, the preset environment may be preset, and may be a clear environment in which the light source shielding rate is less than 30%, specifically, the light irradiation intensity is the largest at 13 pm, that is, the luminance value is the highest, and the light irradiation intensity is the smallest at 6 sunrise and 8 sunset, that is, the luminance value is the lowest. Therefore, the light effect is added according to the light irradiation intensity, so that the processed image can directly reflect the current time information, the reality of the light effect processing of the image is further improved, meanwhile, the processed image can be ensured to have proper brightness distribution, and the image effect is further improved.
Further, the embodiment of the invention can also periodically acquire the angle information of the electronic equipment; when the change of the angle information of the electronic equipment is detected, the incident angle of the light ray is determined again; and adjusting the display parameters of the target light effect according to the re-determined incident angle of the light ray. Specifically, the angle information of the electronic device is periodically obtained, and the orientation of the electronic device is detected in real time by using a gyroscope, an acceleration sensor and other devices configured on the electronic device, and when the angle information changes, that is, the orientation of the electronic device changes, the light incident angle can be determined again according to the relative position of the current natural light source, so as to adjust the target light efficiency. Further, adjusting the target light effect may be determining a new display position based on the re-determined light incidence angle, and adjusting a position of the light effect layer in the image to be processed based on the new display position. It should be noted that adjusting the target light effect may further include re-determining the illumination intensity based on the re-determined light incident angle, and setting the brightness value of each pixel in the image area to which the light effect layer is added to be a new brightness value corresponding to the new illumination intensity according to the new illumination intensity. Therefore, the target light effect is adjusted by adjusting the light incidence angle in real time, and the light effect added on the image to be processed can be matched with the orientation of the display screen of the current electronic equipment, so that the interactivity of the image processing of a user is improved, and the user can adjust the light effect processing of the image according to the requirement at any time.
For example, the image to be processed is a preview image shot by a camera, angle information of the electronic device is periodically acquired, when a user holds the electronic device to perform operations such as rotation or movement, the change of the angle information of the electronic device can be detected, a corresponding shooting real scene in the preview image can be changed accordingly, the light incidence angle can be determined again according to the changed angle information, and display parameters of the target light effect are adjusted.
For example, fig. 5 is a schematic diagram of another to-be-processed image provided in an embodiment of the present invention, as shown in fig. 5, the to-be-processed image and a simulated light effect button 22 are displayed on a display screen 21 of the electronic device, whether angle information of the electronic device changes is detected by using a gyroscope on the electronic device, when the angle information of the electronic device changes, a display parameter of a target light effect is adjusted, and an effect presented by the target light effect added in the to-be-processed image is adjusted.
It should be noted that, in the case that the image to be processed is an image in the video to be processed, the operation of acquiring the current time information and the current position information of the electronic device may be to acquire the current time information corresponding to the acquisition time and the current position information of the electronic device according to the acquisition time of the image to be processed. Therefore, the target light effect can be added to each to-be-processed image in the shot to-be-processed video, and the video effect of the finally-shot to-be-processed video is improved.
In summary, the image processing method provided in the embodiments of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, determines relative orientation information of the current natural light source relative to a shooting surface of the electronic device according to the relative position and a direction of the shooting surface of the electronic device, determines a light incident angle of the current natural light source on the shooting surface according to the relative orientation information, and adds a light effect formed by irradiating light emitted by the current natural light source onto a shooting real scene corresponding to an image to be processed from the light incident angle to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed according to the light incident angle and the relative orientation information of the shooting surface of the electronic equipment, so that the image which is obtained by shooting under the condition similar to normal illumination can be obtained by adding the light effect under the condition that the shooting environment is not clear, the image processed through the light effect is more real, and the image processing effect is further improved to a certain extent.
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 for executing the method of image processing in the image processing apparatus. The image processing apparatus provided in the embodiment of the present application is described with a method for executing image processing by an image processing apparatus as an example.
Fig. 6 is a block diagram of an image processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the image processing apparatus 30 may include:
a receiving module 301, configured to receive a first input;
a first obtaining module 302, configured to obtain current time information and current location information of the electronic device in response to the first input;
a first determining module 303, configured to determine a relative position between the current natural light source and the electronic device according to the current position information and the current time information;
an adding module 304, configured to add a target light effect on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
In summary, the image processing apparatus provided in the embodiment of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, and adds a target light effect to an image to be processed according to the relative position, where the target light effect includes a light effect simulating that light emitted by the current natural light source irradiates a captured real scene corresponding to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed, and the image which is obtained by shooting under normal illumination can be obtained through adding the light effect under the condition that the shooting environment is not clear, so that the image processed through the light effect is more real, and the image processing effect is improved to a certain extent.
Optionally, the adding module 304 is further configured to:
determining the relative orientation information of the current natural light source relative to the shooting surface of the electronic equipment according to the relative position and the orientation of the shooting surface of the electronic equipment; the shooting surface is the surface where a target camera is located, and the target camera is a camera used for shooting the image to be processed in the electronic equipment;
determining the light incidence angle of the current natural light source on the shooting surface according to the relative orientation information;
and adding a light effect formed by irradiating the light rays emitted by the current natural light source to the shooting real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed.
Optionally, the apparatus 30 further includes:
the second determining module is used for determining the light irradiation intensity of the current natural light source in a preset environment at the current time according to the current time information;
the adding module 304 is further configured to:
and adding light effects formed by irradiating the light rays emitted by the current natural light source to the shot real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed according to the light ray irradiation intensity.
Optionally, the apparatus 30 further includes:
the second acquisition module is used for periodically acquiring the angle information of the electronic equipment;
the third determining module is used for re-determining the incident angle of the light ray when detecting that the angle information of the electronic equipment changes;
and the adjusting module is used for adjusting the display parameters of the target light effect according to the re-determined incident angle of the light ray.
Optionally, the image to be processed is an image in a video to be processed;
the first obtaining module 302 is further configured to:
and acquiring current time information corresponding to the acquisition time and current position information of the electronic equipment according to the acquisition time of the image to be processed.
In summary, the image processing apparatus provided in the embodiment of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, determines relative orientation information of the current natural light source relative to a shooting surface of the electronic device according to the relative position and a direction of the shooting surface of the electronic device, determines a light incident angle of the current natural light source on the shooting surface according to the relative orientation information, and adds a light effect formed by irradiating light emitted by the current natural light source onto a shooting real scene corresponding to an image to be processed from the light incident angle to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed according to the light incident angle and the relative orientation information of the shooting surface of the electronic equipment, so that the image which is obtained by shooting under the condition similar to normal illumination can be obtained by adding the light effect under the condition that the shooting environment is not clear, the image processed through the light effect is more real, and the image processing effect is further improved to a certain extent.
The image processing apparatus in the embodiment of the present application may be an apparatus, 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 or 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 in the method embodiments of fig. 1 to fig. 5, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 7, an electronic device 700 is further provided in this embodiment of the present application, and includes a processor 701, a memory 702, and a program or an instruction stored in the memory 702 and executable on the processor 701, where the program or the instruction is executed by the processor 701 to implement each process of the above-mentioned embodiment of the image processing method, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
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. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810.
Those skilled in the art will appreciate that the electronic device 800 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 810 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system. The electronic device structure shown in fig. 8 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.
Wherein, the processor 810 is configured to control the user input unit 807 to receive a first input;
a processor 810, configured to, in response to the first input, obtain current time information and current location information of the electronic device;
a processor 810, configured to determine a relative position between a current natural light source and the electronic device according to the current position information and the current time information;
a processor 810 for adding a target light effect on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
In summary, the image processing method provided in the embodiments of the present invention receives a first input, obtains current time information and current position information of an electronic device in response to the first input, determines a relative position between a current natural light source and the electronic device according to the current position information and the current time information, and adds a target light effect to an image to be processed according to the relative position, where the target light effect includes a light effect that light emitted by the current natural light source is simulated to irradiate a captured real scene corresponding to the image to be processed. The current natural light source is simulated through the electronic equipment, the target light effect is added to the image to be processed, and the image which is obtained by shooting under normal illumination can be obtained through adding the light effect under the condition that the shooting environment is not clear, so that the image processed through the light effect is more real, and the image processing effect is improved to a certain extent.
It should be understood that in the embodiment of the present application, the input Unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042, and the Graphics Processing Unit 8041 processes image data of a still picture or a video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 807 includes a touch panel 8071 and other input devices 8072. A touch panel 8071, also referred to as a touch screen. The touch panel 8071 may include two portions of a touch detection device and a touch controller. Other input devices 8072 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 809 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 810 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 processor 810.
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 so on.
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 (12)

1. An image processing method, characterized in that the method comprises:
receiving a first input;
responding to the first input, and acquiring current time information and current position information of the electronic equipment;
determining the relative position between the current natural light source and the electronic equipment according to the current position information and the current time information;
adding target light effects on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
2. The method according to claim 1, wherein adding a target light effect on the image to be processed according to the relative position comprises:
determining the relative orientation information of the current natural light source relative to the shooting surface of the electronic equipment according to the relative position and the orientation of the shooting surface of the electronic equipment; the shooting surface is the surface where a target camera is located, and the target camera is a camera used for shooting the image to be processed in the electronic equipment;
determining the light incidence angle of the current natural light source on the shooting surface according to the relative orientation information;
and adding a light effect formed by irradiating the light rays emitted by the current natural light source to the shooting real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed.
3. The method of claim 2, further comprising:
determining the light irradiation intensity of the current natural light source in a preset environment at the current time according to the current time information;
adding a light effect formed by irradiating the light emitted by the current natural light source to the to-be-processed image from the incident angle of the light to the shooting real scene corresponding to the to-be-processed image, wherein the light effect comprises:
and adding light effects formed by irradiating the light rays emitted by the current natural light source to the shot real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed according to the light ray irradiation intensity.
4. The method of claim 1, further comprising:
periodically acquiring angle information of the electronic equipment;
when the change of the angle information of the electronic equipment is detected, the incident angle of the light ray is determined again;
and adjusting the display parameters of the target light effect according to the re-determined incident angle of the light ray.
5. The method according to claim 1, wherein the image to be processed is an image in a video to be processed;
the acquiring current time information and current position information of the electronic device includes:
and acquiring current time information corresponding to the acquisition time and current position information of the electronic equipment according to the acquisition time of the image to be processed.
6. An image processing apparatus, characterized in that the apparatus comprises:
a receiving module for receiving a first input;
the first acquisition module is used for responding to the first input and acquiring current time information and current position information of the electronic equipment;
the first determining module is used for determining the relative position between the current natural light source and the electronic equipment according to the current position information and the current time information;
the adding module is used for adding target light effects on the image to be processed according to the relative position; the target light effect comprises light effect simulating light rays emitted by the current natural light source to irradiate the shooting real scene corresponding to the image to be processed.
7. The apparatus of claim 6, wherein the adding module is further configured to:
determining the relative orientation information of the current natural light source relative to the shooting surface of the electronic equipment according to the relative position and the orientation of the shooting surface of the electronic equipment; the shooting surface is the surface where a target camera is located, and the target camera is a camera used for shooting the image to be processed in the electronic equipment;
determining the light incidence angle of the current natural light source on the shooting surface according to the relative orientation information;
and adding a light effect formed by irradiating the light rays emitted by the current natural light source to the shooting real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed.
8. The apparatus of claim 7, further comprising:
the second determining module is used for determining the light irradiation intensity of the current natural light source in a preset environment at the current time according to the current time information;
the adding module is further configured to:
and adding light effects formed by irradiating the light rays emitted by the current natural light source to the shot real scene corresponding to the image to be processed from the incident angle of the light rays on the image to be processed according to the light ray irradiation intensity.
9. The apparatus of claim 6, further comprising:
the second acquisition module is used for periodically acquiring the angle information of the electronic equipment;
the third determining module is used for re-determining the incident angle of the light ray when detecting that the angle information of the electronic equipment changes;
and the adjusting module is used for adjusting the display parameters of the target light effect according to the re-determined incident angle of the light ray.
10. The apparatus according to claim 6, wherein the image to be processed is an image in a video to be processed;
the first obtaining module is further configured to:
and acquiring current time information corresponding to the acquisition time and current position information of the electronic equipment according to the acquisition time of the image to be processed.
11. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the image processing method according to any one of claims 1 to 5.
12. 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 any one of claims 1 to 5.
CN202011183599.9A 2020-10-29 2020-10-29 Image processing method and device, electronic equipment and readable storage medium Pending CN112511737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011183599.9A CN112511737A (en) 2020-10-29 2020-10-29 Image processing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011183599.9A CN112511737A (en) 2020-10-29 2020-10-29 Image processing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN112511737A true CN112511737A (en) 2021-03-16

Family

ID=74954507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011183599.9A Pending CN112511737A (en) 2020-10-29 2020-10-29 Image processing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112511737A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096231A (en) * 2021-03-18 2021-07-09 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN113223139A (en) * 2021-05-26 2021-08-06 深圳市商汤科技有限公司 Augmented reality shadow estimation method and device and computer storage medium
CN113489901A (en) * 2021-06-30 2021-10-08 维沃移动通信(杭州)有限公司 Shooting method and device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160232707A1 (en) * 2014-01-22 2016-08-11 Tencent Technology (Shenzhen) Company Limited Image processing method and apparatus, and computer device
CN108055402A (en) * 2017-12-21 2018-05-18 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN108600631A (en) * 2018-05-16 2018-09-28 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN110740263A (en) * 2019-10-31 2020-01-31 维沃移动通信有限公司 image processing method and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160232707A1 (en) * 2014-01-22 2016-08-11 Tencent Technology (Shenzhen) Company Limited Image processing method and apparatus, and computer device
CN108055402A (en) * 2017-12-21 2018-05-18 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN108600631A (en) * 2018-05-16 2018-09-28 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
CN110740263A (en) * 2019-10-31 2020-01-31 维沃移动通信有限公司 image processing method and terminal equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096231A (en) * 2021-03-18 2021-07-09 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN113096231B (en) * 2021-03-18 2023-10-31 北京达佳互联信息技术有限公司 Image processing method and device, electronic equipment and storage medium
CN113223139A (en) * 2021-05-26 2021-08-06 深圳市商汤科技有限公司 Augmented reality shadow estimation method and device and computer storage medium
CN113489901A (en) * 2021-06-30 2021-10-08 维沃移动通信(杭州)有限公司 Shooting method and device thereof
CN113489901B (en) * 2021-06-30 2023-04-28 维沃移动通信(杭州)有限公司 Shooting method and device thereof

Similar Documents

Publication Publication Date Title
CN112511737A (en) Image processing method and device, electronic equipment and readable storage medium
KR20170040244A (en) Apparatus and method for supplying content aware photo filters
US20240078703A1 (en) Personalized scene image processing method, apparatus and storage medium
CN112492201B (en) Photographing method and device and electronic equipment
CN112532881B (en) Image processing method and device and electronic equipment
US20210168279A1 (en) Document image correction method and apparatus
CN112749613A (en) Video data processing method and device, computer equipment and storage medium
CN110839174A (en) Image processing method and device, computer equipment and storage medium
CN112738403A (en) Photographing method, photographing apparatus, electronic device, and medium
CN113110731B (en) Method and device for generating media content
CN103327246A (en) Multimedia shooting processing method, device and intelligent terminal
US8983227B2 (en) Perspective correction using a reflection
CN113055606B (en) Shooting method and device and electronic equipment
CN112702531B (en) Shooting method and device and electronic equipment
CN113194256B (en) Shooting method, shooting device, electronic equipment and storage medium
CN113794831B (en) Video shooting method, device, electronic equipment and medium
CN112532904B (en) Video processing method and device and electronic equipment
CN114972466A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN111654623B (en) Photographing method and device and electronic equipment
CN109981973A (en) Prevent the method, apparatus and storage medium of dangerous self-timer
CN114650370A (en) Image shooting method and device, electronic equipment and readable storage medium
CN113489901B (en) Shooting method and device thereof
CN112887619A (en) Shooting method and device and electronic equipment
CN114600162A (en) Scene lock mode for capturing camera images
CN112887621B (en) Control method and electronic 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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210316