CN111866383A - Image processing method, terminal and storage medium - Google Patents

Image processing method, terminal and storage medium Download PDF

Info

Publication number
CN111866383A
CN111866383A CN202010669258.6A CN202010669258A CN111866383A CN 111866383 A CN111866383 A CN 111866383A CN 202010669258 A CN202010669258 A CN 202010669258A CN 111866383 A CN111866383 A CN 111866383A
Authority
CN
China
Prior art keywords
image
scene
light source
brightness
target
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
CN202010669258.6A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010669258.6A priority Critical patent/CN111866383A/en
Publication of CN111866383A publication Critical patent/CN111866383A/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/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • 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
    • 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/64Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take 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

Abstract

The embodiment of the application discloses an image processing method, a terminal and a storage medium, wherein preview image acquisition is carried out on a target shooting scene to obtain a first preview image of the target shooting scene; carrying out environment analysis on a target shooting scene by using the first preview image to obtain scene environment information; determining a target image processing mode by using scene environment information; and when the image of the target shooting scene is shot, carrying out image processing on the shot image according to a target image processing mode to obtain a target image.

Description

Image processing method, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of image processing, in particular to an image processing method, a terminal and a storage medium.
Background
The comprehensive screen terminal with the extremely screen occupation ratio can provide various functions meeting daily requirements of people, has a good visual effect and is widely recognized by people.
For a full-screen terminal, the display screen includes a main display area and an auxiliary display area, as shown in fig. 1, the pixel density of the main display area is higher than that of the auxiliary display area, and the pixel sizes of the main display area and the auxiliary display area are the same. As shown in fig. 2, the camera of the terminal is disposed below the sub display area, and the camera obtains external light through the sub display area, thereby performing imaging.
At present, for diffraction phenomena caused by screen shooting, a basic method is to process a picture in real time based on a depth learning algorithm of the picture, for example, a multi-frame image fusion algorithm is adopted, a plurality of images with different exposure durations are quickly shot in a short time, images with different information loss degrees are obtained, and images with complete information are obtained through image complementary splicing.
However, for a scene with normal light, especially a scene without light, a complex de-diffraction algorithm is not needed to process a shot image, actually most of used scenes are scenes with normal light, and a terminal always adopts a complex image processing mode to process the shot image, so that the flexibility is poor, and the power consumption is high.
Disclosure of Invention
The embodiment of the application provides an image processing method, a terminal and a storage medium, which improve the flexibility of terminal image processing and reduce the power consumption of the terminal.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides an image processing method, which comprises the following steps:
acquiring a preview image of a target shooting scene to obtain a first preview image of the target shooting scene;
Carrying out environment analysis on the target shooting scene by using the first preview image to obtain scene environment information;
determining a target image processing mode by using the scene environment information;
and under the condition that the image of the target shooting scene is shot, carrying out image processing on the shot image according to the target image processing mode to obtain a target image.
In the above method, the obtaining of the scene environment information by performing the environment analysis on the target shooting scene by using the first preview image includes:
acquiring a first image area at a first preset position in the first preview image;
acquiring a second preview image adjacent to the first preview image, and acquiring a second image area at the first preset position in the second preview image;
comparing the image difference between the first image area and the second image area to obtain an image difference result;
and determining the environment change information according to the image difference result.
In the above method, the scene environment information includes a light source identification result, and the performing environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information includes:
Acquiring a third image area at a second preset position in the first preview image;
acquiring the brightness value of the third image area to obtain a brightness value to be compared;
comparing the brightness value to be compared with a preset brightness threshold value to obtain a brightness comparison result;
and identifying whether the target shooting scene has a light source or not according to the brightness comparison result to obtain a light source identification result.
In the above method, after the identifying whether the light source exists in the target shooting scene according to the brightness comparison result and obtaining the light source identification result, the method further includes:
acquiring an image area of each preset position in at least two preset positions in the first preview image to obtain at least two image areas under the condition that the light source identification result indicates that the target shooting scene has a light source;
acquiring a brightness value of each image area in the at least two image areas to obtain at least two brightness values;
comparing the difference between the at least two brightness values to obtain a brightness difference result;
and determining the size of the light source in the target shooting scene according to the brightness difference result, and determining the determined size of the light source as the scene environment information.
In the above method, after obtaining at least two image regions in the first preview image at each of the at least two preset positions, the method further includes:
selecting a maximum brightness value from the at least two brightness values;
determining an image area corresponding to the maximum brightness value from the at least two image areas as a brightest image area;
acquiring a second preview image adjacent to the first preview image, and acquiring a matching image area corresponding to the brightest image area from the second preview image;
comparing the brightness difference between the brightest image area and the matching image area to obtain an area difference result;
and determining light source change information in the target shooting scene according to the region difference result, and determining the light source change information as the scene environment information.
In the above method, the scene environment information includes light source type information, and the performing environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information includes:
dividing the first preview image into a plurality of image areas, and acquiring a brightness value of each image area in the plurality of image areas to obtain a plurality of brightness values;
Acquiring the brightness average value of the first preview image;
and determining whether a point light source and/or a surface light source exists in the target shooting scene by using the plurality of brightness values and the brightness average value to obtain the light source type information.
In the above method, the determining a target image processing mode using the scene environment information includes:
selecting an image processing mode matched with the scene environment information from a plurality of preset image processing modes;
and determining the selected image processing mode as the target image processing mode.
The embodiment of the application provides a terminal, the terminal includes:
the acquisition module is used for acquiring a preview image of a target shooting scene to obtain a first preview image;
the analysis module is used for carrying out environment analysis on the target shooting scene by utilizing the first preview image to obtain scene environment information;
the determining module is used for determining a target image processing mode by utilizing the scene environment information;
and the processing module is used for carrying out image processing on the shot image according to the target image processing mode under the condition that the image of the target shooting scene is shot so as to obtain a target image.
In the above terminal, the scene environment information includes environment change information,
the analysis module is specifically configured to acquire a first image area at a first preset position in the first preview image; acquiring a second preview image adjacent to the first preview image, and acquiring a second image area at the first preset position in the second preview image; comparing the image difference between the first image area and the second image area to obtain an image difference result; and determining the environment change information according to the image difference result.
In the above terminal, the scene environment information includes a light source recognition result,
the analysis module is specifically configured to acquire a third image area at a second preset position in the first preview image; acquiring the brightness value of the third image area to obtain a brightness value to be compared; comparing the brightness value to be compared with a preset brightness threshold value to obtain a brightness comparison result; and identifying whether the target shooting scene has a light source or not according to the brightness comparison result to obtain a light source identification result.
In the terminal, the analysis module is further configured to, when the light source identification result indicates that a light source exists in the target shooting scene, obtain an image area of each of at least two preset positions in the first preview image to obtain at least two image areas; acquiring a brightness value of each image area in the at least two image areas to obtain at least two brightness values; comparing the difference between the at least two brightness values to obtain a brightness difference result; and determining the size of the light source in the target shooting scene according to the brightness difference result, and determining the determined size of the light source as the scene environment information.
In the above terminal, the analysis module is further configured to select a maximum brightness value from the at least two brightness values; determining an image area corresponding to the maximum brightness value from the at least two image areas as a brightest image area; acquiring a second preview image adjacent to the first preview image, and acquiring a matching image area corresponding to the brightest image area from the second preview image; comparing the brightness difference between the brightest image area and the matching image area to obtain an area difference result; and determining light source change information in the target shooting scene according to the region difference result, and determining the light source change information as the scene environment information.
In the above terminal, the scene environment information includes light source type information,
the analysis module is specifically configured to divide the first preview image into a plurality of image regions, and acquire a brightness value of each of the plurality of image regions to obtain a plurality of brightness values; acquiring the brightness average value of the first preview image; and determining whether a point light source and/or a surface light source exists in the target shooting scene by using the plurality of brightness values and the brightness average value to obtain the light source type information.
In the terminal, the determining module is specifically configured to select an image processing mode matched with the scene environment information from a plurality of preset image processing modes; and determining the selected image processing mode as the target image processing mode.
The embodiment of the application provides a terminal, the terminal includes: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing the image processing program stored in the memory so as to realize the image processing method.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the above-described image processing method.
The embodiment of the application provides an image processing method, a terminal and a storage medium, wherein the method comprises the following steps: acquiring a preview image of a target shooting scene to obtain a first preview image of the target shooting scene; carrying out environment analysis on a target shooting scene by using the first preview image to obtain scene environment information; determining a target image processing mode by using scene environment information; and when the image of the target shooting scene is shot, carrying out image processing on the shot image according to a target image processing mode to obtain a target image. According to the ending scheme provided by the embodiment of the application, the suitable image processing mode is selected to process the shot image according to the scene environment information of the shooting scene, so that the flexibility of terminal image processing is improved, and the power consumption of the terminal is reduced.
Drawings
FIG. 1 is a schematic illustration of a region of a display screen provided in the prior art;
fig. 2 is a schematic arrangement diagram of cameras provided in the prior art;
fig. 3 is a schematic flowchart of an image processing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of an image area in an exemplary first preview image according to an embodiment of the present application;
fig. 5(a) is a first schematic diagram of an exemplary first preview image provided in an embodiment of the present application;
fig. 5(b) is a schematic diagram of an exemplary first preview image provided in an embodiment of the present application;
fig. 5(c) is a third schematic diagram of an exemplary first preview image provided in an embodiment of the present application;
fig. 6 is a first schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application.
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 embodiment of the application provides an image processing method which is realized through a terminal. The terminal may be an electronic device such as a mobile phone and a tablet computer, and the embodiment of the present application is not limited. Fig. 3 is a schematic flowchart of an image processing method according to an embodiment of the present application. As shown in fig. 3, the method mainly comprises the following steps:
S101, acquiring a preview image of a target shooting scene to obtain a first preview image of the target shooting scene.
In the embodiment of the application, the image processing device can acquire the preview image of the target shooting scene, so as to obtain the first preview image of the target shooting scene.
It should be noted that, in the embodiment of the present application, the target shooting scene is a scene that the user needs to take an image, and may be selected according to actual needs. Specific target shooting scene the embodiments of the present application are not limited.
In an embodiment of the present application, a terminal may be configured with a camera, and when a user starts a shooting function, the terminal enters a preview mode, and continuously captures a preview image of a target shooting scene at a certain speed, for example, at a speed of 60 frames/second, where the first preview image is any one of the captured preview images. The specific target shooting scene and the first preview image are not limited in the embodiments of the present application.
And S102, carrying out environment analysis on the target shooting scene by using the first preview image to obtain scene environment information.
In the embodiment of the application, after the terminal acquires the first preview image of the target shooting scene, the terminal can perform environment analysis on the target shooting scene by using the first preview image to obtain scene environment information.
Specifically, in an embodiment of the present application, the scene environment information includes environment change information, and the terminal performs environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information, including: acquiring a first image area at a first preset position in a first preview image; acquiring a second preview image adjacent to the first preview image, and acquiring a second image area at a first preset position in the second preview image; comparing the image difference between the first image area and the second image area to obtain an image difference result; and determining environment change information according to the image difference result.
It should be noted that, in the embodiment of the present application, the first preset position is a preset specific image position, for example, the terminal may intercept an image area of the first preview image and the second preview image at the central position, and compare the image contents between the two image areas, so as to obtain the image difference result. The specific first preset position is not limited in the embodiments of the present application.
Specifically, in an embodiment of the present application, the scene environment information includes a light source identification result, and the terminal performs environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information, including: acquiring a third image area at a second preset position in the first preview image; acquiring a brightness value of the third image area to obtain a brightness value to be compared; comparing the brightness value to be compared with a preset brightness threshold value to obtain a brightness comparison result; and identifying whether the target shooting scene has a light source or not according to the brightness comparison result to obtain a light source identification result.
It should be noted that, in the embodiment of the present application, the second preset position is a preset specific image position, and the terminal may further compare the brightness value of the image area in the first preview image at the second preset position with a preset brightness threshold value to obtain a brightness comparison result. The specific second preset position is not limited in the embodiments of the present application.
It should be noted that, in the embodiment of the present application, a preset luminance threshold is stored in the terminal, and a specific preset luminance threshold may be determined according to an actual image processing requirement, which is not limited in the embodiment of the present application.
Specifically, in the embodiment of the present application, the terminal identifies whether a light source exists in the target shooting scene according to the brightness comparison result, and after obtaining the light source identification result, the following steps may be further performed: acquiring an image area of each preset position in at least two preset positions in a first preview image under the condition that a light source exists in a target shooting scene according to a light source identification result to obtain at least two image areas; acquiring a brightness value of each image area in at least two image areas to obtain at least two brightness values; comparing the difference between at least two brightness values to obtain a brightness difference result; and determining the size of the light source in the target shooting scene according to the brightness difference result, and determining the determined size of the light source as scene environment information.
It should be noted that, in the embodiment of the present application, the at least two preset positions are at least two preset specific image positions, which may be selected according to actual requirements, and the embodiment of the present application is not limited.
Fig. 4 is a schematic diagram of an image area in an exemplary first preview image according to an embodiment of the present application. As shown in fig. 4, in the embodiment of the present application, the terminal may obtain image areas at four edge positions and a center position from the first preview image, obtain respective luminance values, thereby obtaining five luminance values, and then compare differences between the five luminance values, thereby obtaining a luminance difference result. If the brightness difference result is that the brightness value of the image area at the center position is larger, and the brightness values of the image areas at the four edge positions are smaller, the light source with smaller size exists in the target shooting scene, and if the five brightness values are all larger, the light source with larger size exists in the target shooting scene.
Specifically, in an embodiment of the present application, after the terminal acquires the at least two image areas in the first preview image at each of the at least two preset positions, the terminal may further perform the following steps: selecting a maximum brightness value from the at least two brightness values; determining an image area corresponding to the maximum brightness value in the at least two image areas as a brightest image area; acquiring a second preview image adjacent to the first preview image, and acquiring a matching image area corresponding to the brightest image area from the second preview image; comparing the brightness difference between the brightest image area and the matched image area to obtain an area difference result; and determining light source change information in the target shooting scene according to the region difference result, and determining the light source change information as scene change information.
It can be understood that, in the embodiment of the present application, the terminal compares the brightness of the image area with the maximum brightness value in the first preview image with the brightness of the image area corresponding to the adjacent second preview image, and can determine whether the brightness and the position of the light source change, that is, the light source change information.
Specifically, in an embodiment of the present application, the scene environment information includes light source type information, and the terminal performs environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information, including: dividing the first preview image into a plurality of image areas, and acquiring a brightness value of each image area in the plurality of image areas to obtain a plurality of brightness values; acquiring a brightness average value of the first preview image; and determining whether a point light source and/or a surface light source exists in the target shooting scene by using the plurality of brightness values and the brightness average value to obtain light source type information.
It should be noted that, in the embodiment of the present application, a preset number threshold and a preset difference threshold are stored in the terminal, and a specific preset number threshold and a specific preset difference threshold may be determined according to an actual requirement, which is not limited in the embodiment of the present application.
For example, in an embodiment of the present application, the terminal may divide the first preview image in a 3 × 4 manner, so as to obtain 12 image regions, then calculate a brightness value of each of the 12 image regions and a brightness average value of the first preview image, and finally determine that a point light source exists in the target shooting scene if the brightness value of no more than 2 of the 12 image regions is greater than the brightness average value, and determine that a surface light source exists in the target shooting scene if the brightness value of an adjacent region exceeds 2 regions and is greater than the brightness average value, and a brightness difference between the image regions is less than a preset difference threshold value.
In the embodiments of the present application, the determination of the light source type by using a plurality of luminance values and luminance average values is only an exemplary manner, and of course, other manners may be adopted, and the embodiments of the present application are not limited.
It should be understood that, in the embodiment of the present application, the several environment analysis manners provided above are only optional environment analysis manners, and actually, other analysis manners may also be set according to actual requirements, and the embodiment of the present application is not limited.
And S103, determining a target image processing mode by using the scene environment information.
In the embodiment of the application, after the terminal obtains the scene environment information, the terminal can determine the target image processing mode by using the scene environment information.
Specifically, in an embodiment of the present application, the determining, by the terminal, a target image processing manner using scene environment information includes: selecting an image processing mode matched with the scene environment information from a plurality of preset image processing modes; and determining the selected image processing mode as a target image processing mode.
It should be noted that, in the embodiment of the present application, image processing manners corresponding to different scene environment information, that is, a plurality of preset image processing manners, are stored in the terminal, and therefore, after the terminal obtains the scene environment information, an image processing manner matched with the scene environment information may be selected as a target image processing manner.
It should be noted that, in the embodiment of the present application, the scene environment information may represent an environment condition such as brightness of the target shooting scene, and therefore, the terminal may select, according to the scene environment information, an image processing mode suitable for processing a shot image after shooting the target shooting scene.
For example, in the embodiment of the application, when the scene environment information includes information that a light source exists in a target shooting scene, a simple image processing algorithm may be selected as the target image processing mode, and when the scene environment information includes that the target shooting scene does not have light, a complex image processing algorithm may be selected as the target image processing mode.
It can be understood that, in the embodiment of the present application, image processing manners with different complexity levels, for example, three image processing manners of simple, medium, and complex, may be stored in the terminal, so that after the scene environment information is obtained, a matching image processing manner is selected. For example, under the condition that the shooting environment of the target shooting scene represented by the scene environment information is poor, a complex image processing mode is selected to ensure the final image effect, and under the condition that the shooting environment of the target shooting scene represented by the scene environment information is good, a simple image processing mode is selected to save power consumption and reduce the image processing time.
Illustratively, a camera of the terminal is disposed below the display screen, when the first preview image is shown in fig. 5(a), the scene environment information analyzed by the terminal is a light source, the light source is located at the center, and it is determined that the target image processing mode is a complex diffraction elimination algorithm, when the first preview image is shown in fig. 5(b), the scene environment information analyzed by the terminal is a light source, the light source is located at the edge, it is determined that the target image processing mode is a medium diffraction elimination algorithm, when the first preview image is shown in fig. 5(c), the scene environment information analyzed by the terminal is a light source-free, and it is determined that the target image processing mode is a simple diffraction elimination algorithm.
And S104, when the image of the target shooting scene is shot, carrying out image processing on the shot image according to a target image processing mode to obtain a target image.
In the embodiment of the application, after the terminal determines the target image processing mode, in a case that an image of a target shooting scene is shot, the terminal performs image processing on the shot image according to the target image processing mode to obtain a target image.
It can be understood that under the condition that a camera of the terminal is arranged below a display screen, the current method for eliminating photographing diffraction under the screen is to acquire a plurality of images, the algorithm is usually fixed and invariable and needs to be exposed for a plurality of times, and for scenes with common light, especially scenes without light, a complex de-diffraction algorithm is not needed; in the embodiment of the application, an image processing mode is selected according to the shooting scene, the terminal can judge whether lamplight exists in the shooting scene according to the brightness contrast of the preview image, and if the lamplight exists, the terminal is switched to a simple image processing mode to process the image when the shooting is started; if the light is judged to exist, the image processing is carried out by switching to a complex image processing mode, so that the image effect is ensured and the power consumption of the image processing is reduced under a common scene.
In the embodiment of the present application, the camera of the terminal may be disposed below the display screen or disposed on the display screen, and the difference is only that the image processing mode of the terminal is different, and the embodiment of the present application is not limited.
The embodiment of the application provides an image processing method, which comprises the following steps: acquiring a preview image of a target shooting scene to obtain a first preview image of the target shooting scene; carrying out environment analysis on a target shooting scene by using the first preview image to obtain scene environment information; determining a target image processing mode by using scene environment information; and when the image of the target shooting scene is shot, carrying out image processing on the shot image according to a target image processing mode to obtain a target image. According to the image processing method provided by the embodiment of the application, the suitable image processing method is selected to process the shot image according to the scene environment information of the shooting scene, so that the flexibility of terminal image processing is improved, and the power consumption of the terminal is reduced.
The embodiment of the application provides a terminal. Fig. 6 is a first schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 6, the terminal includes:
An obtaining module 601, configured to obtain a preview image of a target shooting scene to obtain a first preview image;
the analysis module 602 is configured to perform environment analysis on the target shooting scene by using the first preview image to obtain scene environment information;
a determining module 603, configured to determine a target image processing manner using the scene environment information;
and a processing module 604, configured to, when the image of the target shooting scene is shot, perform image processing on the shot image according to the target image processing manner to obtain a target image.
In an embodiment of the present application, the scene environment information includes environment change information,
the analysis module 602 is specifically configured to obtain a first image area in a first preset position in the first preview image; acquiring a second preview image adjacent to the first preview image, and acquiring a second image area at the first preset position in the second preview image; comparing the image difference between the first image area and the second image area to obtain an image difference result; and determining the environment change information according to the image difference result.
In an embodiment of the present application, the scene environment information includes a light source identification result,
the analysis module 602 is specifically configured to obtain a third image area in a second preset position in the first preview image; acquiring the brightness value of the third image area to obtain a brightness value to be compared; comparing the brightness value to be compared with a preset brightness threshold value to obtain a brightness comparison result; and identifying whether the target shooting scene has a light source or not according to the brightness comparison result to obtain a light source identification result.
In an embodiment of the application, the analysis module 602 is further configured to, when the light source identification result indicates that a light source exists in the target shooting scene, obtain an image area of each of at least two preset positions in the first preview image to obtain at least two image areas; acquiring a brightness value of each image area in the at least two image areas to obtain at least two brightness values; comparing the difference between the at least two brightness values to obtain a brightness difference result; and determining the size of the light source in the target shooting scene according to the brightness difference result, and determining the determined size of the light source as the scene environment information.
In an embodiment of the present application, the analysis module 602 is further configured to select a maximum brightness value from the at least two brightness values; determining an image area corresponding to the maximum brightness value from the at least two image areas as a brightest image area; acquiring a second preview image adjacent to the first preview image, and acquiring a matching image area corresponding to the brightest image area from the second preview image; comparing the brightness difference between the brightest image area and the matching image area to obtain an area difference result; and determining light source change information in the target shooting scene according to the region difference result, and determining the light source change information as the scene environment information.
In an embodiment of the present application, the scene environment information includes light source type information,
the analysis module 602 is specifically configured to divide the first preview image into a plurality of image regions, and obtain a brightness value of each image region in the plurality of image regions to obtain a plurality of brightness values; acquiring the brightness average value of the first preview image; and determining whether a point light source and/or a surface light source exists in the target shooting scene by using the plurality of brightness values and the brightness average value to obtain the light source type information.
In an embodiment of the present application, the determining module 603 is specifically configured to select an image processing manner matched with the scene environment information from a plurality of preset image processing manners; and determining the selected image processing mode as the target image processing mode.
Fig. 7 is a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 7, the terminal includes: a processor 701, a memory 702, and a communication bus 703;
the communication bus 703 is used for realizing communication connection between the processor 701 and the memory 702;
the processor 701 is configured to execute the image processing program stored in the memory 702 to implement the image processing method.
The embodiment of the application provides a terminal, which is used for acquiring preview images of a target shooting scene to obtain a first preview image of the target shooting scene; carrying out environment analysis on a target shooting scene by using the first preview image to obtain scene environment information; determining a target image processing mode by using scene environment information; and when the image of the target shooting scene is shot, carrying out image processing on the shot image according to a target image processing mode to obtain a target image. According to the terminal provided by the embodiment of the application, the suitable image processing mode is selected to process the shot image according to the scene environment information of the shooting scene, so that the flexibility of terminal image processing is improved, and the power consumption of the terminal is reduced.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the above-mentioned method. The computer-readable storage medium may be a volatile Memory (volatile Memory), such as a Random-Access Memory (RAM); or a non-volatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (Hard Disk Drive, HDD) or a Solid-State Drive (SSD); or may be a respective device, such as a mobile phone, computer, tablet device, personal digital assistant, etc., that includes one or any combination of the above-mentioned memories.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of implementations of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart block or blocks and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks in the flowchart and/or block diagram block or blocks.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application are included in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An image processing method, characterized in that the method comprises:
acquiring a preview image of a target shooting scene to obtain a first preview image of the target shooting scene;
carrying out environment analysis on the target shooting scene by using the first preview image to obtain scene environment information;
Determining a target image processing mode by using the scene environment information;
and under the condition that the image of the target shooting scene is shot, carrying out image processing on the shot image according to the target image processing mode to obtain a target image.
2. The method of claim 1, wherein the scene environment information includes environment change information, and performing the environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information includes:
acquiring a first image area at a first preset position in the first preview image;
acquiring a second preview image adjacent to the first preview image, and acquiring a second image area at the first preset position in the second preview image;
comparing the image difference between the first image area and the second image area to obtain an image difference result;
and determining the environment change information according to the image difference result.
3. The method of claim 1, wherein the scene environment information includes a light source recognition result, and performing the environment analysis on the target shooting scene by using the first preview image to obtain the scene environment information includes:
Acquiring a third image area at a second preset position in the first preview image;
acquiring the brightness value of the third image area to obtain a brightness value to be compared;
comparing the brightness value to be compared with a preset brightness threshold value to obtain a brightness comparison result;
and identifying whether the target shooting scene has a light source or not according to the brightness comparison result to obtain a light source identification result.
4. The method according to claim 3, wherein the identifying whether the target shooting scene has a light source according to the brightness comparison result further comprises:
acquiring an image area of each preset position in at least two preset positions in the first preview image to obtain at least two image areas under the condition that the light source identification result indicates that the target shooting scene has a light source;
acquiring a brightness value of each image area in the at least two image areas to obtain at least two brightness values;
comparing the difference between the at least two brightness values to obtain a brightness difference result;
and determining the size of the light source in the target shooting scene according to the brightness difference result, and determining the determined size of the light source as the scene environment information.
5. The method of claim 4, wherein after obtaining at least two image regions in the first preview image at each of the at least two preset positions, the method further comprises:
selecting a maximum brightness value from the at least two brightness values;
determining an image area corresponding to the maximum brightness value from the at least two image areas as a brightest image area;
acquiring a second preview image adjacent to the first preview image, and acquiring a matching image area corresponding to the brightest image area from the second preview image;
comparing the brightness difference between the brightest image area and the matching image area to obtain an area difference result;
and determining light source change information in the target shooting scene according to the region difference result, and determining the light source change information as the scene environment information.
6. The method of claim 1, wherein the scene environment information includes light source type information, and wherein performing the environmental analysis on the target shooting scene by using the first preview image to obtain the scene environment information includes:
Dividing the first preview image into a plurality of image areas, and acquiring a brightness value of each image area in the plurality of image areas to obtain a plurality of brightness values;
acquiring the brightness average value of the first preview image;
and determining whether a point light source and/or a surface light source exists in the target shooting scene by using the plurality of brightness values and the brightness average value to obtain the light source type information.
7. The method according to claim 1, wherein the determining a target image processing mode using the scene environment information comprises:
selecting an image processing mode matched with the scene environment information from a plurality of preset image processing modes;
and determining the selected image processing mode as the target image processing mode.
8. A terminal, characterized in that the terminal comprises:
the acquisition module is used for acquiring a preview image of a target shooting scene to obtain a first preview image;
the analysis module is used for carrying out environment analysis on the target shooting scene by utilizing the first preview image to obtain scene environment information;
the determining module is used for determining a target image processing mode by utilizing the scene environment information;
And the processing module is used for carrying out image processing on the shot image according to the target image processing mode under the condition that the image of the target shooting scene is shot so as to obtain a target image.
9. A terminal, characterized in that the terminal comprises: a processor, a memory, and a communication bus;
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is configured to execute the image processing program stored in the memory to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010669258.6A 2020-07-13 2020-07-13 Image processing method, terminal and storage medium Pending CN111866383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010669258.6A CN111866383A (en) 2020-07-13 2020-07-13 Image processing method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010669258.6A CN111866383A (en) 2020-07-13 2020-07-13 Image processing method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN111866383A true CN111866383A (en) 2020-10-30

Family

ID=72983812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010669258.6A Pending CN111866383A (en) 2020-07-13 2020-07-13 Image processing method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111866383A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949830A (en) * 2021-09-30 2022-01-18 国家能源集团广西电力有限公司 Image processing method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376497A (en) * 2014-08-13 2016-03-02 现代摩比斯株式会社 Light source recognition system of vehicle
CN106101547A (en) * 2016-07-06 2016-11-09 北京奇虎科技有限公司 The processing method of a kind of view data, device and mobile terminal
CN107483823A (en) * 2017-08-31 2017-12-15 努比亚技术有限公司 A kind of image processing method and terminal
CN107592453A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN108965845A (en) * 2018-08-16 2018-12-07 Oppo广东移动通信有限公司 Image white balance calibration method, apparatus, storage medium and terminal
CN109218621A (en) * 2018-10-23 2019-01-15 Oppo广东移动通信有限公司 Image processing method, device, storage medium and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376497A (en) * 2014-08-13 2016-03-02 现代摩比斯株式会社 Light source recognition system of vehicle
CN106101547A (en) * 2016-07-06 2016-11-09 北京奇虎科技有限公司 The processing method of a kind of view data, device and mobile terminal
CN107483823A (en) * 2017-08-31 2017-12-15 努比亚技术有限公司 A kind of image processing method and terminal
CN107592453A (en) * 2017-09-08 2018-01-16 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN108965845A (en) * 2018-08-16 2018-12-07 Oppo广东移动通信有限公司 Image white balance calibration method, apparatus, storage medium and terminal
CN109218621A (en) * 2018-10-23 2019-01-15 Oppo广东移动通信有限公司 Image processing method, device, storage medium and mobile terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949830A (en) * 2021-09-30 2022-01-18 国家能源集团广西电力有限公司 Image processing method
CN113949830B (en) * 2021-09-30 2023-11-24 国家能源集团广西电力有限公司 Image processing method

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
US9813635B2 (en) Method and apparatus for auto exposure value detection for high dynamic range imaging
CN108734676B (en) Image processing method and device, electronic equipment and computer readable storage medium
EP2881913A1 (en) Image splicing method and apparatus
US9591231B2 (en) Image processing apparatus capable of properly emphasizing differences in brightness between bright spots, image processing method, and storage medium
CN106651797B (en) Method and device for determining effective area of signal lamp
CN108322651B (en) Photographing method and device, electronic equipment and computer readable storage medium
US9485436B2 (en) Image processing apparatus and image processing method
CN105243371A (en) Human face beauty degree detection method and system and shooting terminal
US8860840B2 (en) Light source estimation device, light source estimation method, light source estimation program, and imaging apparatus
CN105247567B (en) A kind of image focusing device, method, system and non-transient program storage device again
CN112261292B (en) Image acquisition method, terminal, chip and storage medium
CN107105172B (en) Focusing method and device
CN111368819B (en) Light spot detection method and device
CN112930677B (en) Method for switching between first lens and second lens and electronic device
CN108335272B (en) Method and device for shooting picture
US9020269B2 (en) Image processing device, image processing method, and recording medium
CN111311481A (en) Background blurring method and device, terminal equipment and storage medium
US20070091184A1 (en) Method and apparatus for maintaining consistent white balance in successive digital images
EP3363193B1 (en) Device and method for reducing the set of exposure times for high dynamic range video imaging
CN111866383A (en) Image processing method, terminal and storage medium
EP3206387A1 (en) Image dynamic range adjustment method, terminal, and storage media
CN112419218A (en) Image processing method and device and electronic equipment
CN109120856B (en) Camera shooting method and device
CN109040598B (en) Image processing method, image processing device, computer-readable storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201030