CN112492198A - Shooting method, shooting device, electronic equipment and readable storage medium - Google Patents

Shooting method, shooting device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN112492198A
CN112492198A CN202011323980.0A CN202011323980A CN112492198A CN 112492198 A CN112492198 A CN 112492198A CN 202011323980 A CN202011323980 A CN 202011323980A CN 112492198 A CN112492198 A CN 112492198A
Authority
CN
China
Prior art keywords
target
shooting
image
preview image
color
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.)
Granted
Application number
CN202011323980.0A
Other languages
Chinese (zh)
Other versions
CN112492198B (en
Inventor
张蒙亮
耿筝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202011323980.0A priority Critical patent/CN112492198B/en
Publication of CN112492198A publication Critical patent/CN112492198A/en
Application granted granted Critical
Publication of CN112492198B publication Critical patent/CN112492198B/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/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
    • 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/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • 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
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals

Abstract

The application discloses a shooting method and a shooting device, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a preview image; if the preview image comprises a target area meeting a target preset condition, and when the ambient brightness of the preview image is smaller than a first brightness threshold value, acquiring a target image based on a target shooting parameter; the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold. The method and the device can accurately identify the specific luminous object in the shooting environment, and automatically set the shooting parameters, so that the shooting steps are simplified.

Description

Shooting method, shooting device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of image processing, and particularly relates to a shooting method, a shooting device, electronic equipment and a readable storage medium.
Background
At present, along with the continuous improvement of the performance of the electronic equipment, users pay more and more attention to the shooting function of the electronic equipment, and especially pay more attention to the shooting of some light-emitting objects. Among them, the light-emitting object may be an object that itself can emit light (e.g., a light-emitting insect, a light-emitting device, etc.), or an object that emits a beam of light by reflecting light of another light source (i.e., an object that itself does not emit light, but exhibits a light-emitting effect, such as a moon, by reflecting or refracting light of another object that itself can emit light).
When a certain light-emitting object is photographed, since various types of light-emitting objects (such as fireflies and electric lamps) may exist in a photographing environment, the light-emitting object (such as fireflies) which the user needs to photograph often cannot be accurately identified from the photographing environment when the electronic device photographs; in addition, when the light-emitting object is shot, due to the fact that the shooting environment is dark, in order to obtain an image of the light-emitting object with high imaging quality, a user often needs to set shooting parameters in a self-defined mode, and the shooting step is complex.
Therefore, the technical solutions for photographing a specific light-emitting object in the related art generally have the problems that it is difficult to accurately identify the specific light-emitting object in the photographing environment, and the photographing step is complicated.
Disclosure of Invention
The embodiment of the application aims to provide a shooting method, a shooting device, an electronic device and a readable storage medium, which can solve the problems that in the related art, a specific luminous object is difficult to accurately identify in a shooting environment and shooting steps are complicated.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a shooting method, where the method includes:
acquiring a preview image;
if the preview image comprises a target area meeting a target preset condition, and when the ambient brightness of the preview image is smaller than a first brightness threshold value, acquiring a target image based on a target shooting parameter;
the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
In a second aspect, an embodiment of the present application provides a shooting device, including:
the first acquisition module is used for acquiring a preview image;
the second acquisition module is used for acquiring a target image based on a target shooting parameter if the preview image comprises a target area meeting a target preset condition and the ambient brightness of the preview image is smaller than a first brightness threshold;
the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, when the ambient brightness of the preview image is less than a first brightness threshold (which indicates that the ambient brightness of the shooting scene is darker), and the preview image includes a target area satisfying a target preset condition, where the target preset condition includes a preset color condition, where the preset color condition includes that a ratio of a first color value to a second color value is less than a first color threshold, and a ratio of a third color value to the second color value is less than a second color threshold, it indicates that a luminous target object exists in the preview image, and the recognition accuracy of the target object in the shooting scene can be improved; and acquiring a target image including the target object based on the target photographing parameters matched with the target object, thereby automatically setting the photographing parameters, simplifying the photographing step, and completing the photographing of the target object.
Drawings
FIG. 1 is a flow chart of a photographing method according to an embodiment of the present application;
FIG. 2 is one of the schematic diagrams of a capture preview interface of one embodiment of the subject application;
FIG. 3 is a second schematic diagram of a preview interface for shooting according to an embodiment of the present application;
FIG. 4 is a third schematic diagram of a capture preview interface in accordance with an embodiment of the present application;
FIG. 5 is a fourth illustration of a capture preview interface of an embodiment of the present application;
FIG. 6 is a block diagram of a camera according to an embodiment of the present application;
FIG. 7 is a diagram of a hardware configuration of an electronic device according to an embodiment of the present application;
fig. 8 is a hardware configuration diagram of an electronic device according to another embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The shooting method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
Referring to fig. 1, a flowchart of a shooting method according to an embodiment of the present application is shown, where the method may specifically include the following steps:
step 101, acquiring a preview image;
wherein, because the camera can collect multiple frames (for example, 20 frames) of preview images per second, only one frame of preview image at a time can be displayed in the shooting preview interface for the user to view.
And the preview image in this step may be any one of a plurality of frames of preview images, and in one example, the preview image may be one frame of preview image displayed in the shooting preview interface.
In addition, for convenience of explaining technical solutions of the embodiments of the present application, the following terms are explained and defined herein:
capturing a generated normal frame in a normal capturing mode (a mode indicating that a target object does not exist in a capturing scene): the system automatically sets first light sensitivity and first exposure time matched with the ambient brightness according to the ambient brightness of a shooting scene, and exposes the shooting scene according to the first light sensitivity and the first exposure time to generate a normal frame;
wherein, the light inlet quantity of the diaphragm is photosensitivity exposure time length;
shooting the generated under-exposed frame in the under-exposure mode: exposing a shooting scene by reducing the sensitivity adopted in a normal shooting mode and prolonging the exposure time adopted in the normal shooting mode, so as to generate an underexposed frame, wherein the underexposed frame has lower sensitivity than a normal frame, but has longer exposure time; further, the aperture light-entering amount of the underexposed frame is smaller than that of the normal frame.
Shooting the generated overexposed frame in an overexposure mode: exposing a shooting scene by improving the sensitivity adopted in a normal shooting mode and shortening the exposure time adopted in the normal shooting mode, so as to generate an overexposure frame, wherein the overexposure frame has higher sensitivity than a normal frame, but has shorter exposure time; in addition, the aperture light-entering amount of the overexposed frame is larger than that of the normal frame.
Then in this step 101, the preview image may be a normal frame or an underexposed frame.
In addition, it is intended herein to photograph a luminous target object, which may be an object that itself may emit light (e.g., a luminous insect, a light emitting device, etc.), or an object that emits a light ray by reflecting light of other light sources (i.e., an object that itself does not emit light, but exhibits a luminous effect, such as a moon, by reflecting or refracting light of other objects that themselves may emit light).
Consider that fireflies are one of the more popular shooting contents at present. Especially, the picture of flying a group of luminous fireflies and the picture of a single luminous firefly with background level can increase the interest of taking pictures. Therefore, for the convenience of the reader to understand, the method of the embodiments of the present application is described and illustrated by taking the target object as a firefly, i.e., a luminescent insect as an example, and when the target object is another type of luminescent object, the execution principle of the method is similar, and therefore, the description is omitted.
102, if the preview image comprises a target area meeting a target preset condition and when the ambient brightness of the preview image is smaller than a first brightness threshold value, acquiring a target image based on a target shooting parameter;
the target object has a good light effect in a scene with a dark environment, so that whether the ambient brightness of the preview image is smaller than a first brightness threshold value or not can be determined by detecting the ambient brightness of the preview image, that is, whether the preview image is a dark scene, and if the preview image is a scene with a dark brightness, the target object possibly emitting light exists in the scene.
For example, the preview image may have a parameter of ambient brightness, and a value of the parameter is obtained to be compared with the first brightness threshold value to determine whether the brightness of the current environment of the preview image is a dark light environment.
Optionally, since the method of the embodiment of the present application aims at performing high-quality shooting on a certain target object that emits light, the target object may have a better light emission effect only in a dark light environment, and therefore, in order to improve the shooting efficiency, the method of the embodiment of the present application may further determine whether a target area meeting a target preset condition exists in the preview image only when the ambient brightness of the preview image is smaller than the first brightness threshold.
In one example, since fireflies only emit light at dark places at night, it is necessary to detect the ambient brightness in the preview image to determine whether the current scene is suitable for shooting fireflies. If the ambient brightness of the current scene is high, the current environment is considered not to have the glowworm light, then the mode of shooting the glowworm is quitted, and the normal shooting mode is switched to. If the brightness of the environment of the current scene is low (for example, less than the first brightness threshold, for example, a brightness threshold expressing a daytime scene, and a brightness threshold expressing a night scene (that is, less than the first brightness threshold)), the current environment is considered to be suitable for shooting the glowworm firefly, and thus, whether the target area is included in the preview image is determined.
In order to further confirm whether the object emitting light in the scene is the target object to be captured in the embodiment, the preview image may be determined whether a target area satisfying a target preset condition exists in the preview image, and the target area may be represented as an image area where the target object exists in the preview image.
However, since there may be a plurality of objects emitting light in the shooting scene, the objects related to different light emissions in the preview image are not limited to the target object that the user wants to shoot, and therefore, it is necessary to determine whether there is a target area according to the light emission characteristics of the target object.
The screening conditions here relate to color parameters.
The target preset condition may include a preset color condition, where the preset color condition includes that a ratio of a first color value to a second color value is smaller than a first color threshold, and a ratio of a third color value to the second color value is smaller than a second color threshold.
Wherein the preset color condition is a color condition set based on spectral information of the target object, and the three color values may be values of three color channels (R, G, B), and the specific value to which color channel the X-th color value is, also depends on the spectral information of the target object.
Taking the target object as an example of the firefly, because the firefly often gives out light at night, it is a challenging task to shoot the firefly at night, and other light sources in the environment can influence the camera to shoot the glowworm that gives out light, for example some punctiform light sources far away can be confused with the glowworm that gives out light to influence the camera and focus and expose.
The inventor considers that since the light emitted by firefly is yellowish green, the numerical ratio of the green color channel should be high in the three color channels of R (red), G (green), and B (blue), and therefore, a first color threshold of R/G and a second color threshold of B/G, which are different, are set in advance for the light emission color of firefly.
Then if there is a target area in the preview image where R/G is less than the first color threshold and B/G is less than the second color threshold, it is indicated that there is a glowworm in the preview image that is glowworm, so that target shooting parameters for shooting a clear glowworm can be automatically generated and a target image including a glowworm object that is glowworm is acquired based on the target shooting parameters.
In the embodiment of the application, when the ambient brightness of the preview image is less than a first brightness threshold (which indicates that the ambient brightness of the shooting scene is darker), and the preview image includes a target area satisfying a target preset condition, where the target preset condition includes a preset color condition, where the preset color condition includes that a ratio of a first color value to a second color value is less than a first color threshold, and a ratio of a third color value to the second color value is less than a second color threshold, it indicates that a luminous target object exists in the preview image, and the recognition accuracy of the target object in the shooting scene can be improved; and acquiring a target image including the target object based on the target photographing parameters matched with the target object, thereby automatically setting the photographing parameters, simplifying the photographing step, and completing the photographing of the target object.
Optionally, when determining whether the preview image includes a target region satisfying a target preset condition, it may first determine whether a candidate region having a luminance value greater than a second luminance threshold exists in the preview image; and if the candidate area exists, judging whether a target area meeting the target preset condition exists in the candidate area.
Wherein the candidate area may be one or more, which represent a highlight area in the preview image.
Alternatively, since the second luminance threshold is used to determine a highlight area in the preview image and the first luminance threshold is used to determine whether the shooting environment is a dark environment, the second luminance threshold is larger than the first luminance threshold.
In the embodiment of the application, whether a highlighted candidate area exists in a preview image is judged, and then whether a target area meeting a target preset condition exists in the candidate areas is judged under the condition that the candidate areas exist.
Alternatively, the preview image in step 101 may be the under-exposed frame described above, that is, the subject to be photographed (including the light-emitting target subject but also including the background subject other than the target subject) may be subjected to exposure photographing in an under-exposed manner, the generated under-exposed frame is taken as a preview image of the subject to be photographed, and then step 102 is performed on the preview image.
In one example, when the target object is a firefly, since firefly light emission is a point-like light source and the light source luminance is low, in order to detect a region where firefly light emission is present, it is necessary to distinguish it from other point-like light sources, and therefore, a candidate region with high luminance may be counted from an underexposed frame captured by the main camera, and it may be determined whether or not a target region is present from the candidate region.
In the embodiment of the present application, because the underexposed frame captured in the underexposed manner can make the environment except for the luminous target object in the image darker and make the luminous target object not blurred but more obvious in brightness, compared with identifying the candidate region and the target region in the normal frame, the method in the embodiment of the present application can utilize the underexposed frame to identify the position of the highlight candidate region more accurately in the preview image, thereby facilitating to screen out the target region belonging to the luminous target object from the highlight candidate region.
Alternatively, when the candidate region is identified in the preview image, the target pixel with the brightness value larger than the second brightness threshold value can be identified in each pixel in the preview image; then, target pixels adjacent in position in the preview image are identified as candidate regions.
That is to say, when a highlighted candidate region is identified, the brightness value of each pixel in the preview image may be counted, some target pixel points with higher brightness are found, and then, a region formed by target pixel points adjacent to each other in position is identified as a candidate region.
Alternatively, different candidate regions may not have the same target pixel point, in other words, different candidate regions do not have the coincidence of pixels.
In the embodiment of the application, under the condition that the ambient brightness of the preview image is smaller than the first brightness threshold, the highlighted candidate area is identified in the preview image, so that the candidate area can be identified more accurately in a scene with darker ambient brightness; further, in identifying a highlighted candidate region, a target pixel having a luminance value greater than a second luminance threshold may be identified in each pixel of the preview image; then, target pixels adjacent to each other in the preview image are identified as candidate regions, so that the outline of each highlighted candidate region can be identified more accurately from the pixel granularity level, the identification accuracy of the highlighted regions is higher, and the target regions where luminous target objects are located can be screened more accurately from the highlighted regions.
Optionally, taking the target object as a firefly as an example, if there is a step of identifying candidate regions in the preview image before identifying the target region, determining whether the preview image includes a target region meeting a preset target condition by determining a color parameter for each candidate region, specifically, calculating whether R/G of the candidate region is smaller than the first color threshold, and whether B/G is smaller than the second color threshold; and if the R/G of the candidate region is smaller than the first color threshold and the B/G is smaller than the second color threshold, the color parameter of the candidate region meets the spectral information of the firefly, and the highlighted candidate region is yellow-green and belongs to the image region where the glowworm is luminous.
Optionally, after step 101, the method according to the embodiment of the present application may further include:
step 103, if the preview image does not include a target area meeting a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold, acquiring a first image based on a first shooting parameter.
Wherein, step 102 and step 103 are executed in parallel and alternatively.
If the ambient brightness of the preview image is greater than or equal to the first brightness threshold, it indicates that the ambient brightness of the current shooting scene is brighter and is not suitable for shooting a luminous target object, such as a firefly;
in addition, if the preview image does not include the target area satisfying the target preset condition, which indicates that there is no target object in the preview image, the shooting scene may be shot by using the normal shooting mode, such as the above example, which does not include the luminous target object, specifically, the first image is acquired based on the first shooting parameter.
The first shooting parameter includes a first sensitivity and a first exposure time, where the first sensitivity and the first exposure time are shooting parameters used when generating the normal frame in the normal shooting mode.
The target shooting parameters comprise target sensitivity and target exposure time, the target sensitivity is smaller than the first sensitivity, and the target exposure time is larger than the first exposure time.
As can be seen from the above definition and description of the underexposure frame generated by shooting in the underexposure mode, in the embodiment of the present application, when shooting a luminous target object, the target sensitivity of the shooting parameters used is lower than the first sensitivity of the normal shooting mode (the mode in which the preview image does not include the luminous target object and the ambient brightness is dark at the time of shooting), and the target exposure period is higher than the first exposure period of the normal shooting mode.
In this embodiment, if the preview image does not include a target area satisfying a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold, it indicates that there is no luminous target object in the preview image, and therefore, a first image may be acquired based on a first shooting parameter, where the target shooting parameter includes a target sensitivity and a target exposure duration, where the target sensitivity is less than the first sensitivity, and the target exposure duration is greater than the first exposure duration. Because the target sensitivity when the target object is shot is smaller than the first sensitivity when the target object is not shot, and the target exposure time when the target object is shot is smaller than the first exposure time when the target object is not shot, the target object which emits light in the target image generated by shooting the target object is not blurred, and the brightness of the image area except the target object is darkened, so that the brightness of the target object in the target image is more obvious, the imaging quality of the target object is improved, and the automatic configuration of the shooting parameters of the target object is completed.
Optionally, on the basis of any one of the above embodiments, the target preset condition may further include a preset area ratio condition, where the preset area ratio condition includes that an area ratio between a target area and the preview image is smaller than a preset area ratio threshold.
Among them, since there may be a plurality of luminous objects in the shooting scene, different luminous objects may be involved in the preview image, and the preview image is not limited to the target object that the user wants to shoot, and therefore, it is necessary to identify the target area belonging to the target object from the preview image (or a plurality of candidate areas in the preview image) according to the size and the luminous characteristics of the target object.
The filtering condition here relates to the color parameter of the target region and the area ratio between the target region and the whole preview image.
Continuing to take the target object as a firefly as an example, since the firefly is a point light source when it emits light, and the area of the firefly occupies a relatively small area in the whole preview image, in order to distinguish the glowworm which emits light from other point light sources in the preview image (for example, from a candidate area of high brightness), an area ratio between the area and the preview image may be calculated for each area satisfying a preset color condition, and if the area ratio is smaller than a preset area ratio threshold, the area is considered as the target area.
In one embodiment, if there is a step of first identifying candidate regions when identifying the target region, a determination may be made for each candidate region as to whether the area ratio condition is satisfied, thereby finding a target region satisfying both the preset color condition and the preset area ratio condition from among the candidate regions.
And under the condition that the same candidate region simultaneously meets the preset color condition and the preset area ratio condition, the candidate region is proved to be in accordance with the characteristics of the luminous firefly, and the candidate region is the target region where the luminous firefly is located, so that the aim of screening out the target region belonging to the luminous firefly from the plurality of candidate regions is fulfilled.
Since there may be one or more glowworms that emit light in the shooting scene, the number of the target area may be one or more.
In the embodiment of the application, in order to further improve the recognition accuracy of the luminous target object, whether a target area meeting a preset color condition exists in the preview image can be judged by combining the color value of the image area in the preview image, and whether the target area is the area of the target object can be determined by further combining the size of the target object when the target area is determined, that is, whether the area ratio of the target area to the preview image is smaller than a preset area ratio threshold value, and if so, the target shooting parameters are automatically set to obtain the target image including the target object.
Alternatively, when the target image is acquired based on the target photographing parameters, the focusing angle may be each target region so that each target object is clear in the target image.
Alternatively, in one embodiment, when the target image is acquired based on the target shooting parameters, the target image may be acquired based on the target shooting parameters with the target region having the largest area ratio as the focusing focus.
For example, when a user desires to photograph a single firefly, the target region with the largest area ratio may be used as a focus of focusing, and then the target image may be generated by photographing using the target photographing parameters, so that the largest firefly in the target image is the clearest, and the other fireflies with smaller size (or fireflies farther away from the camera) are not particularly clear.
In the embodiment of the application, when the target image is acquired based on the target shooting parameters, the target image can be acquired based on the target shooting parameters by taking the target area with the largest area ratio as a focusing focus, so that a certain luminous target object which is interested by a user can be focused and shot, a key shooting object in the shot and generated target image is more prominent, and the imaging quality is better.
Alternatively, on the basis of any of the above embodiments, when the target image is acquired based on the target shooting parameters, the intermediate image may be acquired based on the target shooting parameters; and then blurring the target area in the intermediate image to obtain a target image.
The target shooting parameters can be used for shooting, an intermediate image is generated, then blurring processing is carried out on each target area in the intermediate image, so that the area where each firefly is located in the generated target image presents a light spot effect, and the shooting effect on the firefly is improved.
When performing the blurring process, blurring may be implemented in a double shot manner, or blurring the image may be performed by an algorithm, which is not limited in the present application.
In the embodiment of the application, shooting can be performed based on the target shooting parameters to generate an intermediate image, and then blurring processing is performed on the target area in the intermediate image, so that the area where each luminous target object is located in the generated target image can present a light spot effect, and the shooting effect on the target object is improved.
Alternatively, the method of the foregoing embodiment of the present application may be applied to a shooting device, and the method of the embodiment of the present application may further obtain attitude data of the shooting device (for example, the attitude data is obtained by a gyroscope in the shooting device), and if it is determined that the shooting device is in a stable state according to the attitude data (for example, if the movement speed of the shooting device is less than a preset speed, it is determined that the shooting device is in the stable state), enter a shooting mode of a target object, and execute the foregoing step 101.
In the embodiment of the application, the target object can be shot under the condition that the shooting device is in the stable mode, and the shooting definition of the target object can be improved.
Alternatively, in one embodiment, when the target image is acquired based on the target shooting parameters, the target image may be generated by automatically shooting based on the target shooting parameters.
Alternatively, in one embodiment, when the target image is acquired based on the target shooting parameters, the target image may be acquired based on the target shooting parameters in response to the shooting request when the shooting request is received.
The shooting request may be triggered by the user clicking a button representing to take a picture in a preview interface of the camera application, or may be triggered by voice control of the user.
Optionally, the shooting request may carry preset information, where the preset information is information used to indicate the number of the target objects requested to be shot;
the preset information can be first information or second information;
the first information is information used for representing shooting of a plurality of target objects;
the second information is information for showing that one target object is shot.
Taking the glowworm whose target object is light-emitting as an example, since the glowworm is photographed at night, it is necessary in the related art for the user to custom set appropriate photographing parameters (for example, exposure parameters), which is not friendly enough for non-professional photographers.
In the embodiment of the present application, after the target area where the target object is located in the preview image is already determined in step 102, object feature recognition may be performed on the target area to determine target feature information of each target object in the preview image, since the target object may be in a motion state, for example, firefly is in a flying state, the position of the determined target area in the preview image is not necessarily the latest position of firefly, and therefore, the updated latest position of each target area may be tracked and located in the latest preview interface by using the target feature information of each target object in each target area, so that focusing of firefly may be performed based on the latest position; in addition, different shooting parameters of the shooting can be generated by combining the single or multiple glowworms which are requested to be shot in the shooting request and the target characteristic information of each target object, so that the current shooting scene is shot, and the target image comprising the glowworms is generated.
In the embodiment of the application, when a shooting request is received, a target image can be acquired based on the target shooting parameters in response to the shooting request, specifically, when the shooting request is responded, a camera is controlled to shoot by the target shooting parameters based on target characteristic information of the target object in the target area, the target image is generated, the target shooting parameters suitable for shooting the luminous target object can be determined according to the characteristics of the target object, so that the camera is controlled to shoot by the target shooting parameters, the step that a user customizes the shooting parameters for the luminous object is avoided, the shooting step when the luminous target object is shot is simplified, and the imaging quality of the image shot by the target object is ensured.
Alternatively, when the target image is acquired based on the target shooting parameters in response to the shooting request, the target image may be acquired by controlling the camera to shoot at the target shooting parameters.
Alternatively, the cameras may include a first camera (e.g., a main camera) and a second camera (e.g., a sub-camera) having the same shooting direction, for example, both of which are rear cameras of the shooting device.
Alternatively, when the target image is acquired based on the target shooting parameters, an intermediate image may be acquired based on the target shooting parameters; and then blurring the target area in the intermediate image to obtain a target image.
For example, in response to the shooting request, based on target feature information of the target object in the target region, the first camera may be controlled to perform exposure shooting with the target region as a focus, with the target sensitivity and the target exposure time length, and generate an intermediate image.
When the target object is a static light-emitting object, the position of the target area determined in step 102 may be a position that needs to be focused;
when the target object is a dynamic light-emitting object, that is, the target object is in a motion state, for example, firefly is in a flying state, and therefore, the position of the target region determined in the preview image in step 102 is not necessarily the latest position of firefly, and therefore, the updated position of each target region can be tracked and positioned in the latest preview image by using the target characteristic information of each target object in each target region, so that the firefly can be focused on the updated position of the target region, and the main camera is controlled to perform exposure shooting with the updated position of each target object as the focus to acquire an intermediate image;
the target shooting parameters may include a focus, a target sensitivity, and a target exposure time.
Wherein, the focusing focus, i.e. the focusing position, can be determined based on the position of each target object in the updated preview image;
as described in the foregoing embodiment, the image capturing is performed in an underexposure manner, so that the environment of the generated image except for the target object emitting light can be made darker, and the target object emitting light is not blurred but the brightness is made more obvious, and therefore, the method of the embodiment of the present application can be based on the first light entering amount of the aperture in the normal capturing mode, the first sensitivity, and the first exposure duration, where the first light entering amount is the first sensitivity; then, the amount of light entering is reduced by one or several levels from the first amount of light entering, thereby determining the target sensitivity and the target exposure time period;
wherein the target sensitivity is less than the first sensitivity, and the target exposure duration is greater than the first exposure duration;
that is, based on this light emission characteristic of the target object, a lower sensitivity (first sensitivity compared to the normal photographing mode) and a longer exposure time period (first exposure time period compared to the normal photographing mode) for underexposure photographing are generated, and thus the latest preview image is photographed, and an intermediate image matching the latest preview image is generated.
Optionally, when blurring the target region in the intermediate image is performed to obtain a target image, the second camera may be controlled to blur the target region in the intermediate image under the condition that the number of the target regions in the preview image is multiple, so as to obtain the target image;
optionally, the blurring process may further include: the shooting request includes first information, wherein the first information is information indicating that a plurality of target objects are shot.
That is, when there are a plurality of objects emitting light in the preview image and the user desires to photograph the plurality of objects, the sub-camera may be controlled to perform blurring on a target area where the object is located in the intermediate image generated by exposing the main camera, for example, to generate the target image, wherein blurring parameters used for different target areas may be the same or different.
Optionally, when determining the position of the target area in the intermediate image, the secondary camera may also use the target feature information of the target object in the target area to locate the target area in the intermediate image.
Through shooting by the method of the embodiment, the target object can be enabled to present a facula effect in the target image.
In one example, taking the target object as a firefly as an example, the method of the embodiment of the present application can be implemented by the following manner:
firstly, a user clicks a camera application of the electronic device to enter a mode for shooting fireflies, and then, in the mode, the user can be prompted to enter a sub-mode for shooting firefly light spots or a sub-mode for shooting a single firefly.
Then, the method may detect whether the electronic device is in the stable mode, and prompt the user to "please keep the camera stable" in the preview interface as shown in fig. 3. Wherein, shoot the facula effect that the firefly flight formed and need remain stable, if electronic equipment is not when steady state, can withdraw from the mode of shooting the firefly, if the cell-phone is in steady state, can detect the ambient brightness in the preview image.
Because the firefly is only luminous in the darker place of night light, consequently need detect the luminance of current environment and judge whether current scene is fit for shooting the firefly facula effect. If the brightness of the current scene is high, the current environment is considered not to have the glowworm luminescence, then the mode of shooting the glowworm is quitted, and the normal shooting mode is executed. If the brightness of the current scene is low, the current environment is considered to be suitable for shooting fireflies to emit light, highlight candidate regions are identified in the preview image, and target regions belonging to the fireflies are screened from the candidate regions on the basis of the color conditions and the area ratio conditions.
If the candidate area does not have a target area which simultaneously meets the two conditions, the mode of shooting the firefly is exited;
furthermore, upon exiting the mode for capturing fireflies, the prompt text "firefly light spot" in the preview interface as shown in FIG. 2 will cease to be displayed, i.e., invisible.
After the target area in the preview image is determined, that is, the plurality of fireflies which emit light on the preview interface are illustrated, in order to capture a clear firefly light spot effect, the preview exposure scheme needs to be adjusted. Because the firefly is luminous at night, and the surrounding environment does not have the light source of comparison bright, so the exposure scheme who shoots the firefly facula setting is: controlling a main camera to carry out exposure shooting on a preview image in an underexposure mode (relatively to a normal shooting mode, lower light sensitivity and longer exposure time), wherein a focus is a plurality of target areas, and obtaining an intermediate image; then, in order to highlight the flare effect of the firefly, it is necessary to blur a target region to which the firefly belongs, that is, a spot light in the intermediate image by using the sub-camera to form a target image. Then the shooting of the glowworms with the facula effect is formed through the matching of the main camera and the auxiliary camera. Thus, the obtained image has the light spot effect no matter the firefly is in a static state or a moving state. When the firefly is in a motion state, the light track formed by the flying firefly glowworm which emits light in the target image is blurred, and the effect of light spots can also be formed.
When the main camera is controlled to expose, the user needs to click the "shoot" button 31 shown in fig. 3 to trigger a shooting request, and the shooting request is triggered in the sub-mode of shooting the firefly light spot, so that the situation that the user needs to shoot a plurality of fireflies is described; in addition, when the number of target areas is large, the exposure scheme is adopted for shooting.
Optionally, as shown in fig. 4, in the process of controlling the main camera and the sub camera to perform shooting in response to the shooting request, the preview interface still displays a prompt text "please keep the cameras stable"; in addition, during the shooting process, the outline of the "shoot" button 31 of the preview interface may be displayed as a dynamic waiting circle to prompt the user that the shooting is currently performed, and if the shooting is completed, the target image is displayed in the preview interface of fig. 4 to keep the electronic device stable.
In this example, to the luminous characteristics of firefly and the luminous characteristics of whole environment on the contrary dark of firefly when firefly is luminous, this application embodiment can realize detecting the luminous firefly in the preview and set up the exposure scheme automatically, utilize the exposure and the exposure time of cell-phone camera through control camera, can obtain the better firefly image of formation of image quality, obtain a photo that has luminous firefly facula effect, the burden that the shooter set up the parameter of shooing by oneself has been alleviateed, let the user can shoot better photo that has luminous firefly facula effect, the interest of shooing has been increased.
In the embodiment of the application, when a plurality of target objects exist in the preview interface and a user needs to shoot the plurality of target objects, a target image containing the target objects with a facula effect can be shot, and a main camera is specifically controlled to generate an intermediate image by adopting target shooting parameters; and then, blurring the target area in the intermediate image by using the auxiliary camera to generate a target image, so that the target area where each target object is located in the target image has a light spot effect.
Optionally, when the target image is acquired based on the target shooting parameters, an intermediate image may also be acquired based on the target shooting parameters; acquiring a second image based on the second shooting parameter; and finally, synthesizing the target area in the intermediate image and the image area except the target area in the second image to obtain a target image.
For a specific description of obtaining the intermediate image based on the target shooting parameter, reference may be made to the above embodiments, and details are not repeated here.
Wherein, the execution order of acquiring the intermediate image and acquiring the second image is not limited.
When a second image is acquired based on a second shooting parameter, the second camera can be controlled to perform exposure shooting at a second sensitivity and a second exposure time length to generate a second image, wherein the second shooting parameter comprises the second sensitivity and the second exposure time length;
wherein the second sensitivity is greater than the first sensitivity, and the second exposure time is less than the first exposure time.
Optionally, when the number of the target areas in the preview image is multiple and the shooting request includes second information, or when the number of the target areas in the preview image is one, the above-mentioned "obtaining an intermediate image based on the target shooting parameter" is performed; acquiring a second image based on the second shooting parameter; and finally, synthesizing the target area in the intermediate image and the image area except the target area in the second image to obtain a target image.
Wherein the second information is information representing photographing of a single target object;
for example, when there are a plurality of target objects emitting light in the preview image, but the user only desires to photograph one target object, for example, the user selects a sub-mode for photographing a single firefly in a mode for photographing fireflies; or the number of the target areas in the preview interface is only one, namely the preview interface is only provided with one firefly, and then the sub-mode for shooting the single firefly is triggered.
Under the sub-mode of shooting a single firefly, the target area where the target object is located in the shooting scene can be tracked and positioned on the basis of the target characteristic information extracted from the target object in the target area; and, the second shooting parameter of the sub camera may also include a focus, a second sensitivity, and a second exposure time period. Because a single firefly is photographed, a user generally adjusts the focal length to make the area ratio of the single firefly to be photographed in the preview interface larger, and therefore, if a plurality of fireflies in the preview interface, the position of the focus is the position of one target region with the largest area ratio between the target regions and the area of the preview image; however, if there is only one target area in the preview image, i.e. a single firefly, only the target area needs to be focused.
Since the second sensitivity is greater than the first sensitivity in the normal shooting mode, and the second exposure time period is less than the first exposure time period in the normal shooting mode, an image presented by a target object in the second image in focusing shooting is dark, and an image area of the second image except the focused target object is bright.
In this embodiment, the execution sequence between the generation of the intermediate image by the main camera in the exposure shooting and the generation of the second image by the sub camera in the exposure shooting is not limited, and the intermediate image and the second image may be executed simultaneously or sequentially.
Finally, the target area, for example, which is focused in the intermediate image, can be deducted from the intermediate image, and the image area (i.e., background image) of the second image except the focused target area can be deducted; and combining the two groups of image areas which are deducted to generate a target image, so that the target image not only has highlighted luminous fireflies, but also has obvious background level, and a photo of the luminous fireflies with the background level is generated.
In one example, the method of the embodiment of the present application is further described by taking the target object as firefly:
firstly, a user clicks a camera application of the electronic device to enter a mode for shooting fireflies, and then, in the mode, the user can be prompted to enter a sub-mode for shooting firefly light spots or a sub-mode for shooting single fireflies, in the scene of the embodiment, the user selects the sub-mode for shooting the single fireflies, a preview image collected by a main camera can be displayed on a preview interface of the electronic device shown in fig. 5, and a prompt text of 'single fireflies' is displayed on the preview interface.
Then, the method may detect whether the electronic device is in the stable mode, and prompt the user to "please keep the camera stable" in the preview interface as shown in fig. 3. Wherein, because it is lower to shoot ambient brightness, shoots single firefly and need longer exposure time, consequently need remain stable when shooing, if electronic equipment is not when steady state, can withdraw from the mode of shooing the firefly, if the cell-phone is in steady state, can detect the ambient brightness in the preview image.
Because the firefly only is luminous in the darker place of night light, consequently need detect the luminance of current environment and judge whether current scene is fit for the effect of shooting single firefly. If the brightness of the current scene is high, the current environment is considered not to have the glowworm luminescence, then the mode of shooting the glowworm is quitted, and the normal shooting mode is executed. If the brightness of the current scene is low, the current environment is considered to be suitable for shooting fireflies to emit light, highlight candidate regions are identified in the preview image, and target regions belonging to the fireflies are screened from the candidate regions on the basis of the color conditions and the area ratio conditions.
If the candidate area does not have a target area which simultaneously meets the two conditions, the mode of shooting the firefly is exited;
furthermore, after exiting the mode for shooting fireflies, the prompt text "fireflies alone" in the preview interface as shown in FIG. 5 will stop being displayed, i.e., not visible.
After the target areas in the preview image are determined, if the number of the target areas is one, or the number of the target areas is multiple, the target area with the largest area ratio is used as the target area for focusing shooting of the main camera and the auxiliary camera, and in order to shoot a clear single firefly effect with a background level, the exposure scheme of the preview needs to be adjusted. So the exposure scheme for shooting a single firefly setting is: because the firefly emits light at night and the surrounding environment has no bright light source, the main camera is controlled to carry out exposure shooting on the preview image in an underexposure mode (relative to a normal shooting mode, lower sensitivity and longer exposure time), wherein the focus is a determined target area, and an intermediate image is obtained; in addition, in order to obtain a clear background image while clearly shooting the glowworm, the secondary camera is required to perform exposure shooting on the preview image in an overexposure mode (higher sensitivity and shorter exposure time compared with a normal shooting mode), wherein the focus is a determined target area, and a second image is obtained, so that the background area of the second image except for the focused single glowworm area is clear; finally, the target area, for example, focused, in the intermediate image is deducted from the intermediate image, and the image area (namely, background image) except the focused target area in the second image is deducted; and combining the two groups of image areas which are deducted to generate a target image, so that the target image not only has highlighted luminous fireflies, but also has obvious background level, and a photo of the luminous fireflies with the background level is generated.
When the corresponding image areas are deducted from the intermediate image and the second image, the positions of the target areas in the intermediate image and the second image need to be determined, and then the focused target areas can be positioned in the intermediate image and the second image based on the target characteristic information of the target object in the target areas determined in the previous step, so that the corresponding image areas are accurately deducted.
Thus, no matter the firefly is in a static state or a moving state, the firefly in the obtained image has an obvious background gradation effect.
When controlling the two cameras to expose, the user needs to click the "shoot" button 31 shown in fig. 3 to trigger the shooting request, and the shooting request is triggered in the sub-mode for shooting a single firefly, so that the user needs to shoot a single firefly and can shoot by adopting the exposure scheme.
Optionally, as shown in fig. 4, in the process of controlling the main camera and the sub camera to perform shooting in response to the shooting request, the preview interface still displays a prompt text "please keep the cameras stable"; in addition, during the shooting process, the outline of the "shoot" button 31 of the preview interface may be displayed as a dynamic waiting circle to prompt the user that the shooting is currently performed, and if the shooting is completed, the target image is displayed in the preview interface of fig. 4 to keep the electronic device stable.
In this example, it is possible to achieve taking a picture of a single glowworm having a background level. According to the lighting characteristics of the firefly, in the example, the camera can distinguish a single glowing firefly, for a shot main target, namely the glowing firefly, the intermediate image with a clear main target is obtained by using low sensitivity and long exposure time, meanwhile, the second image with a clear background is obtained by using higher sensitivity and shorter exposure time, and finally, the two images are superposed together to generate a picture of the single glowing firefly with a background level.
In the embodiment of the application, when a plurality of target objects exist in a preview interface and a user needs to shoot a single target object, or when the number of the target areas in the preview image is one, a target image containing the target object with a background hierarchy can be shot, and a main camera is specifically controlled to generate a clear intermediate image of the target object according to target shooting parameters (compared with a normal shooting mode, lower sensitivity and longer exposure time); in addition, the sub-camera can be controlled to carry out exposure shooting with second shooting parameters (higher sensitivity and shorter exposure time compared with a normal shooting mode), and a second image with clear background areas except the target object is generated; and finally, synthesizing the target area in the intermediate image and the image area except the target area in the second image to generate a target image, so that not only the outline and the brightness of a single target object in the target image are clear, but also a background image where the target object is located is clear.
In the shooting method provided by the embodiment of the present application, the execution subject may be a shooting device, or a control module in the shooting device for executing the shooting method. The embodiment of the present application takes an example in which a shooting device executes a shooting method, and the shooting device provided in the embodiment of the present application is described.
Referring to fig. 6, a block diagram of a camera according to an embodiment of the present application is shown. The photographing apparatus includes:
a first obtaining module 401, configured to obtain a preview image;
a second obtaining module 402, configured to, if the preview image includes a target area that meets a target preset condition, and when the ambient brightness of the preview image is smaller than a first brightness threshold, obtain a target image based on a target shooting parameter;
the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
Optionally, the apparatus further comprises:
a third obtaining module, configured to obtain a first image based on a first shooting parameter if the preview image does not include a target area meeting a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold;
the target shooting parameters comprise a target sensitivity and a target exposure time, the first shooting parameters comprise a first sensitivity and a first exposure time, the target sensitivity is smaller than the first sensitivity, and the target exposure time is larger than the first exposure time.
Optionally, the preset target condition further includes a preset area ratio condition, where the preset area ratio condition includes that an area ratio between the target region and the preview image is smaller than a preset area ratio threshold.
Optionally, the second obtaining module 402 includes:
and the first acquisition submodule is used for acquiring a target image by taking the target area with the largest area ratio as a focusing focus and based on the target shooting parameters.
Optionally, the second obtaining module 402 includes:
the second acquisition submodule is used for acquiring an intermediate image based on the target shooting parameters;
and the blurring processing submodule is used for blurring the target area in the intermediate image to obtain a target image.
In the embodiment of the application, when the ambient brightness of the preview image is less than a first brightness threshold (which indicates that the ambient brightness of the shooting scene is darker), and the preview image includes a target area satisfying a target preset condition, where the target preset condition includes a preset color condition, where the preset color condition includes that a ratio of a first color value to a second color value is less than a first color threshold, and a ratio of a third color value to the second color value is less than a second color threshold, it indicates that a luminous target object exists in the preview image, and the recognition accuracy of the target object in the shooting scene can be improved; and acquiring a target image including the target object based on the target photographing parameters matched with the target object, thereby automatically setting the photographing parameters, simplifying the photographing step, and completing the photographing of the target object.
The shooting device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The photographing apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system (Android), an iOS operating system, or other possible operating systems, which is not specifically limited in the embodiments of the present application.
The shooting device provided by the embodiment of the application can realize each process realized by the method embodiment, and is not repeated here for avoiding repetition.
Optionally, as shown in fig. 7, an electronic device 2000 is further provided in the embodiment of the present application, and includes a processor 2002, a memory 2001, and a program or an instruction stored in the memory 2001 and executable on the processor 2002, where the program or the instruction implements the processes of the above-described shooting method embodiment when executed by the processor 2002, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
Fig. 8 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1000 includes, but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010.
Those skilled in the art will appreciate that the electronic device 1000 may further comprise a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 8 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 1010 is configured to obtain a preview image; if the preview image comprises a target area meeting a target preset condition, and when the ambient brightness of the preview image is smaller than a first brightness threshold value, acquiring a target image based on a target shooting parameter; the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
In the embodiment of the application, when the ambient brightness of the preview image is less than a first brightness threshold (which indicates that the ambient brightness of the shooting scene is darker), and the preview image includes a target area satisfying a target preset condition, where the target preset condition includes a preset color condition, where the preset color condition includes that a ratio of a first color value to a second color value is less than a first color threshold, and a ratio of a third color value to the second color value is less than a second color threshold, it indicates that a luminous target object exists in the preview image, and the recognition accuracy of the target object in the shooting scene can be improved; and acquiring a target image including the target object based on the target photographing parameters matched with the target object, thereby automatically setting the photographing parameters, simplifying the photographing step, and completing the photographing of the target object.
Optionally, the processor 1010 is further configured to, if the preview image does not include a target area meeting a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold, obtain a first image based on a first shooting parameter; the target shooting parameters comprise a target sensitivity and a target exposure time, the first shooting parameters comprise a first sensitivity and a first exposure time, the target sensitivity is smaller than the first sensitivity, and the target exposure time is larger than the first exposure time.
In this embodiment, if the preview image does not include a target area satisfying a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold, it indicates that there is no luminous target object in the preview image, and therefore, the first image may be acquired based on a first shooting parameter, where the target shooting parameter includes a target sensitivity and a target exposure duration, the first shooting parameter includes a first sensitivity and a first exposure duration, where the target sensitivity is less than the first sensitivity, and the target exposure duration is greater than the first exposure duration. Because the target sensitivity when the target object is shot is smaller than the first sensitivity when the target object is not shot, and the target exposure time when the target object is shot is smaller than the first exposure time when the target object is not shot, the target object which emits light in the target image generated by shooting the target object is not blurred, and the brightness of the image area except the target object is darkened, so that the brightness of the target object in the target image is more obvious, the imaging quality of the target object is improved, and the automatic configuration of the shooting parameters of the target object is completed.
Optionally, the preset target condition further includes a preset area ratio condition, where the preset area ratio condition includes that an area ratio between the target region and the preview image is smaller than a preset area ratio threshold.
In the embodiment of the application, in order to further improve the recognition accuracy of the luminous target object, whether a target area meeting a preset color condition exists in the preview image can be judged by combining the color value of the image area in the preview image, and whether the area ratio of the target area to the preview image is smaller than a preset area ratio threshold value or not can be further combined with the size of the target object when the target area is determined, so as to determine whether the target area is the area of the target object, and if so, the target shooting parameters are automatically set to obtain the target image including the target object.
Optionally, the processor 1010 is further configured to acquire a target image based on the target shooting parameter with the target area with the largest area ratio as a focus.
In the embodiment of the application, when the target image is acquired based on the target shooting parameters, the target image can be acquired based on the target shooting parameters by taking the target area with the largest area ratio as a focusing focus, so that a certain luminous target object which is interested by a user can be focused and shot, a focused shooting object in the shot and generated target image is more prominent, and the imaging quality is better.
Optionally, the processor 1010 is further configured to obtain an intermediate image based on the target shooting parameter; and blurring the target area in the intermediate image to obtain a target image.
In the embodiment of the application, shooting can be performed based on the target shooting parameters to generate an intermediate image, and then blurring processing is performed on the target area in the intermediate image, so that the area where each luminous target object is located in the generated target image can present a light spot effect, and the shooting effect on the target object is improved.
It should be understood that in the embodiment of the present application, the input Unit 1004 may include a Graphics Processing Unit (GPU) 10041 and a microphone 10042, and the Graphics Processing Unit 10041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 may include two parts, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. Processor 1010 may integrate an application processor that handles primarily operating systems, user interfaces, applications, etc. and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1010.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above shooting method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above shooting method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A photographing method, characterized in that the method comprises:
acquiring a preview image;
if the preview image comprises a target area meeting a target preset condition, and when the ambient brightness of the preview image is smaller than a first brightness threshold value, acquiring a target image based on a target shooting parameter;
the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
2. The method of claim 1, further comprising:
if the preview image does not include a target area meeting a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold, acquiring a first image based on a first shooting parameter;
the target shooting parameters comprise a target sensitivity and a target exposure time, the first shooting parameters comprise a first sensitivity and a first exposure time, the target sensitivity is smaller than the first sensitivity, and the target exposure time is larger than the first exposure time.
3. The method of claim 1, wherein the target preset condition further comprises a preset area ratio condition, and wherein the preset area ratio condition comprises that an area ratio between a target area and the preview image is less than a preset area ratio threshold.
4. The method of claim 3, wherein the acquiring the target image based on the target shooting parameters comprises:
and taking the target area with the largest area ratio as a focusing focus, and acquiring a target image based on the target shooting parameters.
5. The method of claim 1, wherein the acquiring the target image based on the target shooting parameters comprises:
acquiring an intermediate image based on the target shooting parameters;
and blurring the target area in the intermediate image to obtain a target image.
6. A camera, characterized in that the camera comprises:
the first acquisition module is used for acquiring a preview image;
the second acquisition module is used for acquiring a target image based on a target shooting parameter if the preview image comprises a target area meeting a target preset condition and the ambient brightness of the preview image is smaller than a first brightness threshold;
the target preset condition comprises a preset color condition, the preset color condition comprises that the ratio of a first color value to a second color value is smaller than a first color threshold, and the ratio of a third color value to the second color value is smaller than a second color threshold.
7. The apparatus of claim 6, further comprising:
a third obtaining module, configured to obtain a first image based on a first shooting parameter if the preview image does not include a target area meeting a target preset condition, or the ambient brightness of the preview image is greater than or equal to the first brightness threshold;
the target shooting parameters comprise a target sensitivity and a target exposure time, the first shooting parameters comprise a first sensitivity and a first exposure time, the target sensitivity is smaller than the first sensitivity, and the target exposure time is larger than the first exposure time.
8. The apparatus of claim 6, wherein the target preset condition further comprises a preset area ratio condition, and wherein the preset area ratio condition comprises that an area ratio between a target area and the preview image is less than a preset area ratio threshold.
9. The apparatus of claim 8, wherein the second obtaining module comprises:
and the first acquisition submodule is used for acquiring a target image by taking the target area with the largest area ratio as a focusing focus and based on the target shooting parameters.
10. The apparatus of claim 6, wherein the second obtaining module comprises:
the second acquisition submodule is used for acquiring an intermediate image based on the target shooting parameters;
and the blurring processing submodule is used for blurring the target area in the intermediate image to obtain a target image.
CN202011323980.0A 2020-11-23 2020-11-23 Shooting method, shooting device, electronic equipment and readable storage medium Active CN112492198B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011323980.0A CN112492198B (en) 2020-11-23 2020-11-23 Shooting method, shooting device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011323980.0A CN112492198B (en) 2020-11-23 2020-11-23 Shooting method, shooting device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112492198A true CN112492198A (en) 2021-03-12
CN112492198B CN112492198B (en) 2022-05-31

Family

ID=74933928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011323980.0A Active CN112492198B (en) 2020-11-23 2020-11-23 Shooting method, shooting device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112492198B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114930A (en) * 2021-03-26 2021-07-13 维沃移动通信(杭州)有限公司 Information display method, device, equipment and medium
CN117560576B (en) * 2023-11-13 2024-05-07 四川新视创伟超高清科技有限公司 Exposure method and exposure system for focal plane area

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936685A (en) * 2005-09-21 2007-03-28 索尼株式会社 Photographic device, method of processing information, and program
CN101334924A (en) * 2007-06-29 2008-12-31 丁国锋 Fire hazard probe system and its fire hazard detection method
JP2013031065A (en) * 2011-07-29 2013-02-07 Sharp Corp Imaging apparatus
CN104113692A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Image shooting method and device
CN104704805A (en) * 2012-10-03 2015-06-10 索尼公司 Information processing apparatus, information processing method, and program
CN105225235A (en) * 2015-09-18 2016-01-06 北京航空航天大学 A kind of video flame detecting method based on multispectral characteristic
CN106156769A (en) * 2016-07-14 2016-11-23 上海摩象网络科技有限公司 The multi-targets recognition technology of feature based frequency optical system
CN109951633A (en) * 2019-02-18 2019-06-28 华为技术有限公司 A kind of method and electronic equipment shooting the moon
CN111586280A (en) * 2019-02-18 2020-08-25 北京小米移动软件有限公司 Shooting method, shooting device, terminal and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1936685A (en) * 2005-09-21 2007-03-28 索尼株式会社 Photographic device, method of processing information, and program
CN101334924A (en) * 2007-06-29 2008-12-31 丁国锋 Fire hazard probe system and its fire hazard detection method
JP2013031065A (en) * 2011-07-29 2013-02-07 Sharp Corp Imaging apparatus
CN104704805A (en) * 2012-10-03 2015-06-10 索尼公司 Information processing apparatus, information processing method, and program
CN104113692A (en) * 2014-07-22 2014-10-22 深圳市中兴移动通信有限公司 Image shooting method and device
CN105225235A (en) * 2015-09-18 2016-01-06 北京航空航天大学 A kind of video flame detecting method based on multispectral characteristic
CN106156769A (en) * 2016-07-14 2016-11-23 上海摩象网络科技有限公司 The multi-targets recognition technology of feature based frequency optical system
CN109951633A (en) * 2019-02-18 2019-06-28 华为技术有限公司 A kind of method and electronic equipment shooting the moon
CN111586280A (en) * 2019-02-18 2020-08-25 北京小米移动软件有限公司 Shooting method, shooting device, terminal and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113114930A (en) * 2021-03-26 2021-07-13 维沃移动通信(杭州)有限公司 Information display method, device, equipment and medium
CN117560576B (en) * 2023-11-13 2024-05-07 四川新视创伟超高清科技有限公司 Exposure method and exposure system for focal plane area

Also Published As

Publication number Publication date
CN112492198B (en) 2022-05-31

Similar Documents

Publication Publication Date Title
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN109862282B (en) Method and device for processing person image
CN111586282B (en) Shooting method, shooting device, terminal and readable storage medium
US20220076006A1 (en) Method and device for image processing, electronic device and storage medium
JP2012529831A (en) Camera system and method for photography using flash
CN108040204B (en) Image shooting method and device based on multiple cameras and storage medium
US11768423B2 (en) Image acquisition apparatus, electronic device, image acquisition method and storage medium
CN108122195B (en) Picture processing method and device
CN110572584A (en) Image processing method, image processing device, storage medium and electronic equipment
CN113747067B (en) Photographing method, photographing device, electronic equipment and storage medium
CN112492198B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN113194256B (en) Shooting method, shooting device, electronic equipment and storage medium
CN111586280B (en) Shooting method, shooting device, terminal and readable storage medium
CN112437237A (en) Shooting method and device
CN116055891A (en) Image processing method and device
CN112653841B (en) Shooting method and device and electronic equipment
CN112669231B (en) Image processing method, training method, device and medium of image processing model
CN114070998B (en) Moon shooting method and device, electronic equipment and medium
CN111277754B (en) Mobile terminal shooting method and device
CN113989387A (en) Camera shooting parameter adjusting method and device and electronic equipment
CN112312024A (en) Photographing processing method and device and storage medium
JP2020188363A (en) Imaging device, light emission control device, imaging method, light emission control method, and program
WO2023236215A1 (en) Image processing method and apparatus, and storage medium
CN117392030A (en) Image generation method, device, storage medium and chip
CN113923367B (en) Shooting method and shooting device

Legal Events

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