CN113507560B - Image processing method and device, computer equipment and storage medium - Google Patents

Image processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113507560B
CN113507560B CN202110576682.0A CN202110576682A CN113507560B CN 113507560 B CN113507560 B CN 113507560B CN 202110576682 A CN202110576682 A CN 202110576682A CN 113507560 B CN113507560 B CN 113507560B
Authority
CN
China
Prior art keywords
target
weather data
filter
conversion function
time information
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
CN202110576682.0A
Other languages
Chinese (zh)
Other versions
CN113507560A (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.)
Xian Wingtech Information Technology Co Ltd
Original Assignee
Xian Wingtech Information Technology 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 Xian Wingtech Information Technology Co Ltd filed Critical Xian Wingtech Information Technology Co Ltd
Priority to CN202110576682.0A priority Critical patent/CN113507560B/en
Publication of CN113507560A publication Critical patent/CN113507560A/en
Application granted granted Critical
Publication of CN113507560B publication Critical patent/CN113507560B/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/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
    • 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/66Remote control of cameras or camera parts, e.g. by remote control devices
    • H04N23/661Transmitting camera control signals through networks, e.g. control via the Internet
    • H04N23/662Transmitting camera control signals through networks, e.g. control via the Internet by using master/slave camera arrangements for affecting the control of camera image capture, e.g. placing the camera in a desirable condition to capture a desired image
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Studio Devices (AREA)

Abstract

The application relates to the technical field of shooting, and provides an image processing method and device, computer equipment and a computer readable storage medium. The method comprises the following steps: receiving a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode; according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information are obtained, wherein the real-time information comprises: shooting position information and/or current time information of the terminal; acquiring target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters; performing filter processing on the shot preview image based on the target optical parameters; and saving the preview image after the filter processing. By adopting the method, effect simulation under different weather conditions can be realized, the overall effect of shooting the photos is improved, and the user experience is improved.

Description

Image processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of shooting technologies, and in particular, to a method and an apparatus for image processing, a computer device, and a computer-readable storage medium.
Background
Along with the popularization of the intelligent terminal, users are more and more accustomed to using the intelligent terminal to take pictures, therefore, the shooting function of the intelligent terminal becomes an important index for measuring the intelligent terminal, the filter is used as an important factor for influencing the aesthetic feeling of pictures shot by the intelligent terminal, and the requirements of the users are higher and higher.
In the prior art, a weather simulation filter is provided in the filter function, and when a user uses the weather simulation filter to take a picture, the shooting effect in different weather, such as foggy days, rainy days, sunny days, cloudy days, etc., can be simulated. However, in the prior art, when the photographing effect under different weather is simulated, adjustment of the color tone and the brightness of the photographed picture is mainly performed, so that the photographing effect under different weather is simulated.
However, the weather simulation filter method in the prior art is poor in the overall effect of the shot picture.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an image processing method, apparatus, computer device and computer readable storage medium for solving the above technical problems
The embodiment of the application provides an image processing method, which comprises the following steps:
receiving a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode;
according to real-time information of a shooting terminal, historical weather data corresponding to the real-time information is obtained, wherein the real-time information comprises: the position information and/or the current time information of the shooting terminal;
acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters;
performing filter processing on the shot preview image based on the target optical parameters;
and saving the preview image after the filter processing.
In one embodiment, acquiring historical weather data corresponding to real-time information according to the real-time information of a shooting terminal comprises:
sending a request for acquiring historical weather data to a server, wherein the request for acquiring the historical weather data comprises the real-time information;
receiving a response for acquiring historical weather data sent by a server, wherein the response for acquiring the historical weather data comprises the following steps: historical weather data corresponding to the real-time information.
In one embodiment, the method further comprises:
sending a conversion function updating request to a server;
receiving a conversion function update response, wherein the conversion function update response comprises: updated conversion functions or not updated identifications.
In one embodiment, the target filter mode includes any one of:
a first filter mode, wherein the first filter mode comprises: weather patterns with main brightness changes;
a second filter mode, wherein the second filter mode comprises: weather patterns dominated by visibility changes;
a third filter mode, wherein the third filter mode comprises: weather patterns with scatterers.
In one embodiment, obtaining the target optical parameter corresponding to the target filter mode according to the historical weather data and the conversion function includes:
acquiring target weather data corresponding to the target filter mode according to historical weather data;
acquiring a target conversion function corresponding to the target filter mode according to the target filter mode;
and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
In one embodiment, the conversion function is a conversion function curve, wherein the conversion function curve is obtained by the server through fitting according to historical weather data.
In one embodiment, sending a conversion function update request to a server includes:
determining the acquisition time of the conversion function;
and if the distance between the acquisition time and the current time is greater than a preset threshold value, determining to send a conversion function updating request to the server.
The embodiment of the application provides an image processing device, which comprises:
the receiving instruction module is used for receiving a filter selecting instruction, and the filter selecting instruction is used for indicating a selected target filter mode;
the historical weather data acquisition module is used for acquiring historical weather data corresponding to real-time information according to the real-time information of the shooting terminal, wherein the real-time information comprises: the position information and/or the current time information of the shooting terminal;
the target optical parameter acquisition module is used for acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters;
the filter processing module is used for carrying out filter processing on the shot preview image based on the target optical parameters;
and the image saving module is used for saving the preview image after the filter processing is carried out.
The embodiment of the present application provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the method for processing an image provided in any embodiment of the present application when executing the computer program.
The embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of a method for image processing provided in any embodiment of the present application.
According to the image processing method, the image processing device, the computer equipment and the computer readable storage medium, when the terminal receives and responds to the filter selection instruction to select the target filter mode for shooting, corresponding historical weather data are obtained according to real-time information such as time information and position information of the shooting terminal, the historical weather data are converted through the conversion function, target optical parameters are obtained, filter processing is conducted on the shot preview image according to the target optical parameters, filter images of the target filter mode are obtained, the filter images are stored, effect simulation under different weathers is achieved, the overall effect of shooting pictures is improved, and user experience is improved.
Drawings
FIG. 1 is a diagram of an application scenario of a method of image processing in one embodiment;
FIG. 2 is a flow diagram of a method of image processing in one embodiment;
FIG. 3 is a flow chart of a method of image processing in another embodiment;
FIG. 4 is a flow diagram of a method of image processing in accordance with yet another embodiment;
FIG. 5 is a flow chart of a method of image processing in yet another embodiment;
FIG. 6 is a flow chart of a method of image processing in yet another embodiment;
FIG. 7 is a schematic diagram of an apparatus for image processing in one embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The image processing method provided by the application can be applied to the application environment shown in fig. 1. FIG. 1 is a diagram of an application scenario of a method of image processing in one embodiment; the application environment includes a terminal 101. The terminal 101 receives a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode; according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information are obtained, wherein the real-time information comprises: shooting position information and/or current time information of the terminal; acquiring target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters; performing filter processing on the shot preview image based on the target optical parameters; and saving the preview image after the filter processing. Among them, the terminal 101 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
In one embodiment, as shown in fig. 2, fig. 2 is a flowchart of a method for processing an image in one embodiment, and this embodiment is mainly illustrated by applying the method to the terminal 101 in fig. 1. In this embodiment, the method includes the steps of:
s201: a filter selection instruction is received, the filter selection instruction being for indicating a selected target filter mode.
The filter is used for realizing various special effects of the image, and a user can process the preview image into images with different artistic styles such as films, black and white, nature and the like by using the filter. It should be noted that, in the present embodiment, the filter is specifically a weather simulation filter for simulating different weather effects, but is not limited thereto, and the disclosure is not particularly limited. The filter selection instruction is a command input by the user, and is used to instruct the terminal 101 to select a target filter mode on the filter selection interface, for example, if the user needs to take a picture of a "sunny day" style, the terminal 101 responds to the filter selection instruction input by the user to select a "sunny day" filter option on the filter selection interface.
Specifically, the terminal 101, such as a mobile phone, receives a filter selection instruction input by a user, and responds to the filter selection instruction to select a target filter mode of a filter style that the user needs to photograph on a filter selection interface.
S202: and acquiring historical weather data corresponding to the real-time information according to the real-time information of the shooting terminal.
Wherein, the real-time information includes: the position information and/or the current time information where the terminal 101 is located are photographed. The historical weather data mainly refers to meteorological data and is used for reflecting data information of weather conditions, and the historical weather data can be, for example, data information such as light intensity and visibility, but is not limited thereto, and the disclosure is not particularly limited.
Specifically, the terminal 101, such as a mobile phone, acquires real-time information of the user when taking a picture at this time, such as position information of the user when taking a picture and time information of the user when taking a picture, and the terminal 101, such as a mobile phone, acquires historical weather data, such as light intensity, corresponding to the real-time information according to the acquired current position information and the acquired time information of the user when taking a picture, but is not limited thereto, and the disclosure is not particularly limited.
For example, the user may take a XXXX square at ten am, take a photograph in a cloudy day, at this time, the user selects a weather simulation filter on a "sunny day" to take a photograph, the terminal 101, for example, a mobile phone, acquires current time information of the terminal 101 as current time information taken by the user, for example, ten am, and acquires geographic location information of the terminal 101, for example, a XXXX square, which is acquired by the terminal 101 through a positioning module of the terminal 101, for example, a GPS detection, and the terminal 101 acquires historical weather data of the XXXX square at ten am on a sunny day, that is, acquires visibility, light intensity, and the like of the XXXX square at ten am on a sunny day according to the acquired current location information, for example, the XXXX square and the current time information, for example, ten am, on the sunny day.
S203: and acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and the conversion function.
Wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters. The optical parameter is a parameter obtained by converting weather data through a conversion function, and the optical parameter is data information that can be understood by a camera, for example, the weather data such as light intensity can obtain corresponding gray scale information after being converted through the conversion function, it should be noted that the brighter the light intensity is, the brighter the picture is, the higher the gray scale value is, wherein the gray scale value ranges from 0 to 255, when the gray scale value is 255, the white is represented, and when the gray scale value is 0, the black is represented, but not limited thereto, the present disclosure does not particularly limit, and the target optical parameter is an optical parameter corresponding to a target filter mode selected by a user.
Specifically, the terminal 101, such as a mobile phone, converts the historical weather data through the conversion function according to the obtained historical weather data, such as the light intensity and the conversion function, so as to obtain the target optical parameter corresponding to the target filter mode.
For example, when the user takes a picture on a XXXX square at ten am in a cloudy weather condition, the selected target filter mode is "clear day", and the terminal 101, such as a mobile phone, obtains historical weather data, such as light intensity data, of the XXXX square at ten am in a clear weather condition according to time information, such as ten am and the location information XXXX square, where the light intensity data may be, for example, 100 lux, and converts the light intensity data through a conversion function to obtain a target optical parameter, such as a grayscale, such as 50, but is not limited to this public.
S204: and performing filter processing on the shot preview image based on the target optical parameters.
For example, when a user uses the terminal 101 such as a mobile phone to shoot, the user receives a filter selection instruction input by the user, and enters the filter shooting mode in response to the instruction, an image of an object to be shot can be formed on the filter shooting interface, and the object to be shot can be a piece of grassland, for example, but not limited thereto, the disclosure is not particularly limited, and an image displayed on the filter shooting interface is a preview image.
Specifically, the terminal 101, such as a mobile phone, performs filter processing on the preview image displayed on the filter shooting interface according to the target optical parameter, such as light intensity, to obtain a filter image in the target filter mode selected by the user.
Illustratively, the terminal 101, such as a mobile phone, responds to a filter selection instruction input by a user, the selected target filter mode is a weather simulation filter in a "sunny day", and the terminal 101, such as a mobile phone, performs filter processing on a preview image, such as a XXXX square, and acquires a filter image of the XXXX square in the sunny day.
S205: and saving the preview image after the filter processing.
Specifically, the terminal 101, such as a mobile phone, saves the preview image after being subjected to the filter processing.
For example, after receiving and responding to a shooting instruction input by a user, the terminal 101, such as a mobile phone, performs filter processing on a preview image, shoots a filter image corresponding to a target filter mode, and stores the shot filter image in a designated album, but the disclosure is not limited thereto.
Like this, when this embodiment receives and responds to filter selection instruction selection target filter mode through the terminal and shoots, according to the real-time information of shooting the terminal like time information and positional information, acquire corresponding historical weather data, pass through the transfer function with historical weather data and convert, acquire target optical parameter, thereby carry out the filter processing to the preview image of shooing according to target optical parameter and acquire the filter image of target filter mode, and save the filter image, thereby realize the effect simulation under the different weather, the overall effect of shooting the photo has been improved, promote user experience.
Fig. 3 is a flowchart of a method of image processing in another embodiment, and fig. 3 is a description of a possible implementation manner of S202 based on the embodiment shown in fig. 2, as shown in fig. 3:
s2021: and sending a request for acquiring historical weather data to a server, wherein the request for acquiring the historical weather data comprises real-time information.
Specifically, the terminal 101, such as a mobile phone, sends a request for obtaining historical weather data, such as light intensity and visibility, to a server, where the request includes real-time information, such as time information and/or location information, of the terminal 101, such as the mobile phone, when the terminal performs filter shooting, and the server is implemented by using an independent server or a server cluster formed by a plurality of servers.
For example, when the user shoots on the XXXX square in a cloudy weather condition at ten am, the terminal 101, such as a mobile phone, sends a request for obtaining historical weather data to the server, where the request includes time information, such as ten am, and location information, such as real-time information of the XXXX square, of the terminal 101, such as the mobile phone, but is not limited thereto, and the disclosure is not limited in particular.
S2022: receiving a response for acquiring the historical weather data sent by the server, wherein the response for acquiring the historical weather data comprises the following steps: historical weather data corresponding to the real-time information.
Specifically, the terminal 101, such as a mobile phone, receives a response to acquire historical weather data sent by the server, where the response to the historical weather data includes real-time information, such as historical weather data corresponding to location information and time information.
Illustratively, the terminal 101, for example, a mobile phone, receives historical weather data sent by the server, where the historical weather data is real-time information including time information such as ten am, location information such as historical weather data corresponding to a XXXX wide place such as light intensity, visibility, and the like, but is not limited thereto, and the disclosure is not limited in particular.
In this way, after the terminal 101 sends the request for acquiring the historical weather data corresponding to the real-time information to the server, the terminal 101 receives the historical weather data corresponding to the real-time information sent by the server like the terminal 101, so that the historical weather data corresponding to the position where the terminal 101 is located when the terminal 101 performs filter shooting and the current time can be accurately acquired, and the target optical parameters are further acquired according to the historical weather data, so that filter processing on the preview image is realized, and the overall effect of shooting a photo is improved.
FIG. 4 is a flow chart of a method of image processing in another embodiment; fig. 4 is based on the embodiment shown in fig. 3, and further includes, before S203:
s2030: sending a conversion function updating request to a server; receiving a conversion function update response, wherein the conversion function update response comprises: updated conversion functions or not updated identifications.
Specifically, after the terminal 101, such as a mobile phone, sends a request for updating the conversion function to the server, the terminal 101, such as a mobile phone, receives a conversion function update response sent by the server, where the conversion function update response includes the conversion function that has been updated or an identifier that the conversion function has not been updated.
Illustratively, when a user shoots on a XXXX square at ten am on a cloudy weather, the terminal 101, such as a mobile phone, sends a request for updating a conversion function to a server and then receives a conversion function update response sent by the server, where the conversion function update response includes the conversion function after updating if the conversion function of the server is updated at the time, and the conversion function update response includes an identification that the conversion function is not updated if the conversion function of the server is not updated at the time. When the conversion function is updated, the terminal 101, such as a mobile phone, updates the local conversion function according to the conversion function updated in the conversion function update response, and when the conversion function is not updated, the terminal 101, such as a mobile phone, sends a prompt message to the user according to the non-updated identifier in the conversion function update response, so as to prompt the user that the target filter mode is not updated when the user performs the filter shooting this time.
In this way, in this embodiment, after the terminal 101 sends the request for updating the conversion function to the server, and receives an update response including the updated conversion function or the identification that the conversion function is not updated, which is sent from the server to the terminal 101, if the conversion function is updated, the terminal 101 can update the conversion function in real time when performing filter shooting, obtain the target optical parameters corresponding to the target filter mode more accurately, and perform filter processing on the preview image according to the target optical parameters, thereby improving the overall effect of shooting a picture, and if the conversion function on the server is not updated, send the identification that the conversion function is not updated to the user, and the terminal 101 can prompt the user that the target filter mode is not updated at this time, so as to improve the user experience.
On the basis of the above embodiments, in some embodiments of the present disclosure, the target filter mode includes any one of the following modes: a first filter mode, wherein the first filter mode comprises: a weather pattern that is dominated by a change in darkness, which may be, for example, a cloudy day or a sunny day. A second filter mode, wherein the second filter mode comprises: a weather pattern that is dominated by visibility changes, which may be, for example, a fog or haze day. A third filter mode, wherein the third filter mode comprises: there is a weather pattern of the scattering objects, which may be, for example, rainy or snowy, but is not limited thereto, and the present disclosure is not particularly limited.
Fig. 5 is a flowchart of a method of image processing in yet another embodiment, and fig. 5 is a description of a possible implementation manner of S203 based on the embodiment shown in fig. 4, as shown in fig. 5:
s2031: acquiring target weather data corresponding to a target filter mode according to historical weather data; acquiring a target conversion function corresponding to the target filter mode according to the target filter mode; and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
Specifically, when the terminal 101, such as a mobile phone, performs shooting, receives and responds to a filter selection instruction, selects a target filter mode, acquires target weather data corresponding to the target filter mode according to history selection data, and acquires a target conversion function corresponding to the target filter mode according to the target filter mode, so as to convert the target weather data by using the target conversion function, and acquire a target optical parameter corresponding to the target filter mode.
Illustratively, when a user shoots on a XXXX square by using a terminal 101 such as a mobile phone in a cloudy weather condition ten am, the selected target filter mode is "clear day", the terminal 101 such as the mobile phone obtains target weather data such as light intensity corresponding to the target filter mode as "clear day" according to history selection data, and obtains a target conversion function corresponding to the target filter mode according to the target filter mode as "clear day", so that the target weather data such as light intensity is converted by using the target conversion function, and a target optical parameter such as gray scale corresponding to the target filter mode is obtained.
In this way, in this embodiment, the target weather data and the target conversion function corresponding to the target filter mode are obtained according to the historical weather data, the target optical parameters corresponding to the target filter mode are obtained according to the target weather data and the target conversion function, and the filter processing is performed on the preview image according to the target optical parameters obtained in real time, so that the effect simulation of the weather state is realized, and the overall effect of taking a photo is improved.
Based on the above embodiments, in some embodiments of the present disclosure, the transfer function is a transfer function curve.
The conversion function curve is obtained by the server through fitting according to historical weather data, illustratively, according to the historical weather data, for example, a set of light intensity data including 100 lux, 200 lux and the like, and corresponding weather optical parameters, for example, a set of gray scale data including 50, 100 and the like, the conversion function curve is obtained through fitting according to different gray scale values corresponding to different light intensity values.
In this way, in the embodiment, a large amount of historical weather data is used for fitting to establish a conversion function curve, so as to obtain a more accurate conversion function, and further, when the filter shooting is performed, the terminal 101 obtains corresponding historical weather data according to real-time information, obtains target optical parameters based on the conversion function, and performs preview processing on a preview image, thereby improving the overall effect of shooting a picture.
Fig. 6 is a flowchart of a method of image processing in another embodiment, and fig. 6 is based on the embodiment shown in fig. 5, and further, when executing S2030, the method further includes:
s601: the acquisition time of the transfer function is determined.
S602: and if the acquired time is larger than the current time by a preset threshold value, determining to send a conversion function updating request to the server.
The obtaining time refers to a time interval between the last time the updated conversion function is obtained and the current time when the user performs the shooting. The preset threshold refers to a value for determining whether a request for updating the conversion function needs to be sent to the server according to the time interval, and the preset threshold may be, for example, 3 days, but is not limited thereto, and the disclosure is not particularly limited.
Specifically, before the terminal 101, such as a mobile phone, sends a request for updating the conversion function to the server, it is determined that the terminal 101, such as the mobile phone, last obtains a time interval between the conversion function and the current time of the filter shooting of this time, and determines whether the time interval is greater than a preset threshold, and if the obtained time interval is greater than the preset threshold, such as 3 days, from the shooting of this time for 5 days, it is determined that the terminal 101, such as the mobile phone, sends the request for updating the conversion function to the server.
In this way, in the embodiment, when the terminal 101 sends the request for updating the conversion function to the server, the time from the time when the conversion function was obtained last time to the current time is compared with the preset threshold value once, so as to determine whether to send the request for updating the conversion function to the server, thereby avoiding unnecessary communication between the terminal 101 and the server, improving the processing efficiency, and reducing the waste of the resources of the terminal 101.
It should be understood that although the various steps in the flowcharts of fig. 2-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided an apparatus for image processing, including: the system comprises an instruction receiving module 110, a historical weather data acquiring module 120, a target optical parameter acquiring module 130, a filter processing module 140 and an image saving module 150, wherein the instruction receiving module 110 is used for receiving a filter selecting instruction, and the filter selecting instruction is used for indicating a selected target filter mode; the historical weather data obtaining module 120 is configured to obtain historical weather data corresponding to real-time information according to the real-time information of the shooting terminal, where the real-time information includes: shooting position information and/or current time information of the terminal; the target optical parameter obtaining module 130 is configured to obtain a target optical parameter corresponding to a target filter mode according to historical weather data and a conversion function, where the conversion function is used to represent a conversion relationship between the weather data and the optical parameter; the filter processing module 140 is configured to perform filter processing on the captured preview image based on the target optical parameter; the image saving module 150 is configured to save the preview image after the filter processing.
In an embodiment of the present invention, the historical weather data obtaining module 120 is specifically configured to send a request for obtaining historical weather data to a server, where the request for obtaining historical weather data includes the real-time information; receiving a response for acquiring the historical weather data sent by the server, wherein the response for acquiring the historical weather data comprises the following steps: historical weather data corresponding to the real-time information.
In an implementation manner of the embodiment of the present invention, the target optical parameter obtaining module 130 is further configured to send a request for updating a conversion function to the server; receiving a conversion function update response, wherein the conversion function update response comprises: updated conversion functions or not updated identifications.
In an embodiment of the present invention, the target filter mode includes any one of the following modes: a first filter mode, wherein the first filter mode comprises: weather patterns with main brightness changes; a second filter mode, wherein the second filter mode comprises: weather patterns dominated by visibility changes; a third filter mode, wherein the third filter mode comprises: weather patterns with scatterers.
In an embodiment of the present invention, the target optical parameter obtaining module 130 is specifically configured to obtain target weather data corresponding to a target filter mode according to historical weather data; acquiring a target conversion function corresponding to the target filter mode according to the target filter mode; and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
In an embodiment of the present invention, the conversion function is a conversion function curve, where the conversion function curve is obtained by the server through fitting according to the historical weather data.
In an embodiment of the present invention, the target optical parameter obtaining module 130 is further configured to determine obtaining time of the conversion function; and if the acquired time is larger than the current time by a preset threshold value, determining to send a conversion function updating request to the server.
In the above embodiment, the instruction receiving module 110 is configured to receive a filter selection instruction, where the filter selection instruction is used to indicate a selected target filter mode; the historical weather data obtaining module 120 is configured to obtain historical weather data corresponding to real-time information according to the real-time information of the shooting terminal, where the real-time information includes: shooting position information and/or current time information of the terminal; the target optical parameter obtaining module 130 is configured to obtain a target optical parameter corresponding to a target filter mode according to historical weather data and a conversion function, where the conversion function is used to represent a conversion relationship between the weather data and the optical parameter; the filter processing module 140 is configured to perform filter processing on the captured preview image based on the target optical parameter; the image saving module 150 is configured to save the preview image after the filter processing. When the mode is adopted, the terminal receives and responds to the filter selection instruction to select the target filter mode for shooting, corresponding historical weather data are obtained according to real-time information such as time information and position information of the shooting terminal, the historical weather data are converted through a conversion function, and target optical parameters are obtained, so that filter processing is performed on a shot preview image according to the target optical parameters to obtain a filter image of the target filter mode, the filter image is stored, effect simulation under different weathers is achieved, the overall effect of shooting pictures is improved, and user experience is improved.
For specific limitations of the image processing apparatus, reference may be made to the above limitations of the image processing method, which are not described herein again. The respective modules in the above-described image processing apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized by WiFi, operator network, near Field Communication (NFC) or other technologies. The computer program is executed by a processor to implement a method of image processing. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the apparatus for image processing provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 8. The memory of the computer device may store various program modules constituting the image processing apparatus, such as the receiving instruction module 110, the historical weather data acquisition module 120, the target optical parameter acquisition module 130, the filter processing module 140, and the image saving module 150 shown in fig. 7, and the computer program constituted by the various program modules causes the processor to execute the steps in the method of image processing according to the embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 8 may execute S201 by the reception instruction module 110, S202 by the historical weather data acquisition module 120, S203 by the target optical parameter acquisition module 130, S204 by the filter processing module 140, and S205 by the image saving module 150 in the apparatus for image processing shown in fig. 7.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode; according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information are obtained, wherein the real-time information comprises: shooting position information and/or current time information of the terminal; acquiring target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters; performing filter processing on the shot preview image based on the target optical parameters; and saving the preview image after the filter processing.
In one embodiment, the processor, when executing the computer program, further performs the steps of: according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information is obtained, and the method comprises the following steps: sending a request for acquiring historical weather data to a server, wherein the request for acquiring the historical weather data comprises real-time information; receiving a response for acquiring the historical weather data sent by the server, wherein the response for acquiring the historical weather data comprises the following steps: historical weather data corresponding to the real-time information.
In one embodiment, the processor when executing the computer program further performs the steps of: sending a conversion function updating request to a server; receiving a conversion function update response, wherein the conversion function update response comprises: updated transfer functions or not updated identifications.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the target filter mode includes any one of the following modes: a first filter mode, wherein the first filter mode comprises: weather patterns with main brightness changes; a second filter mode, wherein the second filter mode comprises: weather patterns dominated by visibility changes; a third filter mode, wherein the third filter mode comprises: weather patterns with scatterers.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the target optical parameters comprise: acquiring target weather data corresponding to a target filter mode according to historical weather data; acquiring a target conversion function corresponding to the target filter mode according to the target filter mode; and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the conversion function is a conversion function curve, wherein the conversion function curve is obtained by the server through fitting according to the historical weather data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: sending a request for updating the conversion function to a server, comprising: determining the acquisition time of the conversion function; and if the acquired time is larger than the current time by a preset threshold value, determining to send a conversion function updating request to the server.
In the above embodiment, when the terminal receives and responds to the filter selection instruction to select the target filter mode for shooting, the corresponding historical weather data is acquired according to the real-time information of the shooting terminal, such as time information and position information, the historical weather data is converted through the conversion function, and the target optical parameters are acquired, so that the filter image of the target filter mode is acquired by performing filter processing on the shot preview image according to the target optical parameters, and the filter image is stored, thereby realizing effect simulation under different weathers, improving the overall effect of shooting pictures, and improving user experience.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode; according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information are obtained, wherein the real-time information comprises: shooting position information and/or current time information of the terminal; acquiring target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters; performing filter processing on the shot preview image based on the target optical parameters; and saving the preview image after the filter processing.
In one embodiment, the computer program when executed by the processor implements the steps of: according to the real-time information of the shooting terminal, historical weather data corresponding to the real-time information is obtained, and the method comprises the following steps: sending a request for acquiring historical weather data to a server, wherein the request for acquiring the historical weather data comprises real-time information; receiving a response for acquiring the historical weather data sent by the server, wherein the response for acquiring the historical weather data comprises the following steps: historical weather data corresponding to the real-time information.
In one embodiment, the computer program when executed by the processor implements the steps of: sending a conversion function updating request to a server; receiving a conversion function update response, wherein the conversion function update response comprises: updated conversion functions or not updated identifications.
In one embodiment, the computer program when executed by the processor implements the steps of: the target filter mode includes any one of the following modes: a first filter mode, wherein the first filter mode comprises: weather patterns with main brightness changes; a second filter mode, wherein the second filter mode comprises: weather patterns dominated by visibility changes; a third filter mode, wherein the third filter mode comprises: weather patterns with scatterers.
In one embodiment, the computer program when executed by the processor implements the steps of: obtaining target optical parameters corresponding to a target filter mode according to historical weather data and a conversion function, wherein the target optical parameters comprise: acquiring target weather data corresponding to a target filter mode according to historical weather data; acquiring a target conversion function corresponding to the target filter mode according to the target filter mode; and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
In one embodiment, the computer program when executed by the processor implements the steps of: the conversion function is a conversion function curve, wherein the conversion function curve is obtained by the server through fitting according to the historical weather data.
In one embodiment, the computer program when executed by the processor implements the steps of: sending a request for updating the conversion function to a server, comprising: determining the acquisition time of the conversion function; and if the acquired time is larger than the current time by a preset threshold value, determining to send a conversion function updating request to the server.
In the above embodiment, when the terminal receives and responds to the filter selection instruction to select the target filter mode for shooting, the corresponding historical weather data is acquired according to the real-time information of the shooting terminal, such as time information and position information, the historical weather data is converted through the conversion function, and the target optical parameters are acquired, so that the filter image of the target filter mode is acquired by performing filter processing on the shot preview image according to the target optical parameters, and the filter image is stored, thereby realizing effect simulation under different weathers, improving the overall effect of shooting pictures, and improving user experience.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM is available in many forms, such as Static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), and the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (9)

1. A method of image processing, comprising:
receiving a filter selection instruction, wherein the filter selection instruction is used for indicating a selected target filter mode;
according to the real-time information of a shooting terminal, historical weather data corresponding to the real-time information is obtained, wherein the real-time information comprises: the position information and/or the current time information of the shooting terminal;
acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters;
performing filter processing on the shot preview image based on the target optical parameters;
saving the preview image after filter processing;
acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and the conversion function, wherein the target optical parameters comprise:
acquiring target weather data corresponding to the target filter mode according to historical weather data;
acquiring a target conversion function corresponding to the target filter mode according to the target filter mode;
and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
2. The method of claim 1, wherein acquiring historical weather data corresponding to real-time information according to the real-time information of a shooting terminal comprises:
sending a request for acquiring historical weather data to a server, wherein the request for acquiring the historical weather data comprises the real-time information;
receiving a response for acquiring historical weather data sent by a server, wherein the response for acquiring the historical weather data comprises: historical weather data corresponding to the real-time information.
3. The method of claim 1, further comprising:
sending a conversion function updating request to a server;
receiving a conversion function update response, wherein the conversion function update response comprises: updated conversion functions or not updated identifications.
4. The method according to any one of claims 1-3, wherein the target filter mode comprises any one of:
a first filter mode, wherein the first filter mode comprises: weather patterns with main brightness changes;
a second filter mode, wherein the second filter mode comprises: weather patterns dominated by visibility changes;
a third filter mode, wherein the third filter mode comprises: weather patterns with scatterers.
5. The method of any one of claims 1-3, wherein the transfer function is a transfer function curve, wherein the transfer function curve is fit by the server based on historical weather data.
6. The method of claim 3, wherein sending a request for conversion function update to a server comprises:
determining the acquisition time of the conversion function;
and if the distance between the acquisition time and the current time is greater than a preset threshold value, determining to send a conversion function updating request to the server.
7. An apparatus for image processing, comprising:
the receiving instruction module is used for receiving a filter selecting instruction, and the filter selecting instruction is used for indicating a selected target filter mode;
the historical weather data acquisition module is used for acquiring historical weather data corresponding to real-time information according to the real-time information of the shooting terminal, wherein the real-time information comprises: the position information and/or the current time information of the shooting terminal;
the target optical parameter acquisition module is used for acquiring target optical parameters corresponding to the target filter mode according to the historical weather data and a conversion function, wherein the conversion function is used for representing the conversion relation between the weather data and the optical parameters;
the filter processing module is used for carrying out filter processing on the shot preview image based on the target optical parameters;
the image saving module is used for saving the preview image after the filter processing is carried out;
the target optical parameter acquisition module is specifically used for acquiring target weather data corresponding to the target filter mode according to historical weather data;
acquiring a target conversion function corresponding to the target filter mode according to the target filter mode;
and acquiring target optical parameters corresponding to the target filter mode according to the target weather data and the target conversion function.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of image processing according to any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of image processing according to any one of claims 1 to 6.
CN202110576682.0A 2021-05-26 2021-05-26 Image processing method and device, computer equipment and storage medium Active CN113507560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110576682.0A CN113507560B (en) 2021-05-26 2021-05-26 Image processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110576682.0A CN113507560B (en) 2021-05-26 2021-05-26 Image processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113507560A CN113507560A (en) 2021-10-15
CN113507560B true CN113507560B (en) 2023-03-14

Family

ID=78008620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110576682.0A Active CN113507560B (en) 2021-05-26 2021-05-26 Image processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113507560B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663694A (en) * 2012-03-30 2012-09-12 大连理工大学 Digital fog effect filter method based on dark primary color channel prior principle
CN103533241A (en) * 2013-10-14 2014-01-22 厦门美图网科技有限公司 Photographing method of intelligent filter lens
CN104486558A (en) * 2014-12-31 2015-04-01 厦门美图之家科技有限公司 Video processing method and device for simulating shooting scene
CN106161990A (en) * 2015-04-28 2016-11-23 腾讯科技(北京)有限公司 A kind of image processing method and device
CN107995429A (en) * 2017-12-22 2018-05-04 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN110730299A (en) * 2019-09-29 2020-01-24 深圳酷派技术有限公司 Method and device for imaging of camera under screen, storage medium and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004318693A (en) * 2003-04-18 2004-11-11 Konica Minolta Photo Imaging Inc Image processing method, image processor, and image processing program
US9329036B2 (en) * 2014-02-21 2016-05-03 Qualcomm Incorporated Mobile device positioning based on independently obtained barometric pressure measurements
WO2015162647A1 (en) * 2014-04-25 2015-10-29 Sony Corporation Processing digital photographs in response to external applications
CN109840879B (en) * 2017-11-28 2022-12-09 腾讯科技(深圳)有限公司 Image rendering method and device, computer storage medium and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663694A (en) * 2012-03-30 2012-09-12 大连理工大学 Digital fog effect filter method based on dark primary color channel prior principle
CN103533241A (en) * 2013-10-14 2014-01-22 厦门美图网科技有限公司 Photographing method of intelligent filter lens
CN104486558A (en) * 2014-12-31 2015-04-01 厦门美图之家科技有限公司 Video processing method and device for simulating shooting scene
CN106161990A (en) * 2015-04-28 2016-11-23 腾讯科技(北京)有限公司 A kind of image processing method and device
CN107995429A (en) * 2017-12-22 2018-05-04 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN110730299A (en) * 2019-09-29 2020-01-24 深圳酷派技术有限公司 Method and device for imaging of camera under screen, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN113507560A (en) 2021-10-15

Similar Documents

Publication Publication Date Title
CN109951627B (en) Image processing method, image processing device, storage medium and electronic equipment
CN113192470B (en) Screen adjusting method and device, storage medium and electronic equipment
CN109040523B (en) Artifact eliminating method and device, storage medium and terminal
CN108494996B (en) Image processing method, device, storage medium and mobile terminal
CN114640783B (en) Photographing method and related equipment
CN110570370B (en) Image information processing method and device, storage medium and electronic equipment
CN112712470A (en) Image enhancement method and device
CN110163816B (en) Image information processing method and device, storage medium and electronic equipment
CN113110731B (en) Method and device for generating media content
CN103327246B (en) A kind of multimedia shooting processing method, device and intelligent terminal
CN114422682A (en) Photographing method, electronic device, and readable storage medium
CN112511737A (en) Image processing method and device, electronic equipment and readable storage medium
CN114897745A (en) Method for expanding dynamic range of image and electronic equipment
CN110222567B (en) Image processing method and device
CN107622473B (en) Image rendering method, device, terminal and computer readable storage medium
CN113507560B (en) Image processing method and device, computer equipment and storage medium
CN110473156B (en) Image information processing method and device, storage medium and electronic equipment
CN109089042B (en) Image processing mode identification method and device, storage medium and mobile terminal
CN111222041A (en) Shooting resource data acquisition method and device, electronic equipment and storage medium
CN114339028A (en) Photographing method, electronic device and computer-readable storage medium
CN111026893A (en) Intelligent terminal, image processing method and computer-readable storage medium
CN113489901B (en) Shooting method and device thereof
CN113793252B (en) Image processing method, device, chip and module equipment thereof
WO2023142938A1 (en) Map query method and electronic device
CN111429377B (en) Image processing method, terminal and storage medium

Legal Events

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