Focus control method, device, terminal and storage medium

By acquiring and processing scene information, it automatically identifies and optimizes focus parameters, solving the problems of cumbersome moon mode settings and jitter effects, and improving the convenience of focus control and shooting effects.

CN115442512BActive Publication Date: 2024-09-06BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110626914.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2024-09-06
Estimated Expiration
2041-06-04

AI Technical Summary

Technical Problem

In the existing technology, the setting method of moon mode is cumbersome and susceptible to jitter, resulting in poor focus control effect and affecting the shooting effect.

Method used

By obtaining the scene picture and scene information, it identifies the partial picture of the object to be photographed, processes the initial focus parameters, and optimizes the target focus parameters based on the scene information to achieve automatic focus control and avoid setting the shooting mode separately.

Benefits of technology

It improves the convenience of focus control and shooting effect, reduces the impact of jitter, and realizes personalized focus control of the subject.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442512B
    Figure CN115442512B
Patent Text Reader

Abstract

The present disclosure proposes a focus control method, device, terminal and storage medium, the focus control method comprising: acquiring a scene picture and scene information; if the scene picture includes an object to be photographed, identifying a partial picture of the object to be photographed from the scene picture; processing the partial picture to obtain an initial focus parameter corresponding to the object to be photographed; processing the initial focus parameter according to the scene information to obtain a target focus parameter; wherein the target focus parameter is used to focus on the scene picture. Through the present disclosure, when it is detected that the scene picture includes an object to be photographed, it can directly trigger the focus control using a focus parameter adapted to the object to be photographed without separately setting a corresponding shooting mode, and the initial focus parameter is optimized accordingly in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed, and effectively improving the shooting effect for the object to be photographed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to a focus control method, device, terminal and storage medium. Background Art

[0002] With the increasing development of terminal camera functions, more and more special shooting modes are usually provided to improve the user's shooting experience, such as the moon mode. When the terminal is configured in the moon mode, a better moon shooting effect can usually be obtained.

[0003] In the related art, the setting method of the moon mode is relatively complicated, which affects the user's shooting experience of the moon, and is easily affected by shaking, which affects the focus control effect of the moon, resulting in poor shooting effects. Summary of the invention

[0004] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0005] To this end, the purpose of the present disclosure is to propose a focus control method, device, terminal and storage medium. When it is detected that the scene picture includes an object to be photographed, it can directly trigger the focus control using focus parameters adapted to the object to be photographed without the need to separately set the corresponding shooting mode, and the initial focus parameters are optimized accordingly in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed.

[0006] To achieve the above-mentioned purpose, the focus control method proposed in the embodiment of the first aspect of the present disclosure includes: acquiring a scene picture and scene information; if the scene picture includes an object to be photographed, identifying a partial picture of the object to be photographed from the scene picture; processing the partial picture to obtain initial focus parameters corresponding to the object to be photographed; processing the initial focus parameters according to the scene information to obtain target focus parameters; wherein the target focus parameters are used to focus on the scene picture.

[0007] The focus control method proposed in the embodiment of the first aspect of the present disclosure obtains a scene picture and scene information. If the scene picture includes an object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and the partial picture is processed to obtain initial focus parameters corresponding to the object to be photographed. The initial focus parameters are processed according to the scene information to obtain target focus parameters, wherein the target focus parameters are used to focus on the scene picture. When it is detected that the scene picture includes the object to be photographed, focus control can be directly triggered by using focus parameters adapted to the object to be photographed without separately setting a corresponding shooting mode. The initial focus parameters are optimized accordingly in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed.

[0008] To achieve the above-mentioned purpose, the focus control device proposed in the second aspect of the embodiment of the present disclosure includes: an acquisition module, used to acquire a scene picture and scene information; an identification module, used to identify a partial picture of the object to be photographed from the scene picture when the scene picture includes the object to be photographed; a processing module, used to process the partial picture to obtain initial focus parameters corresponding to the object to be photographed; a focusing module, used to process the initial focus parameters according to the scene information to obtain target focus parameters; wherein the target focus parameters are used to focus on the scene picture.

[0009] The focus control device proposed in the embodiment of the second aspect of the present disclosure obtains a scene picture and scene information. If the scene picture includes an object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and the partial picture is processed to obtain initial focus parameters corresponding to the object to be photographed. The initial focus parameters are processed according to the scene information to obtain target focus parameters, wherein the target focus parameters are used to focus on the scene picture. When it is detected that the scene picture includes the object to be photographed, it can directly trigger the focus control using the focus parameters adapted to the object to be photographed without separately setting the corresponding shooting mode. The initial focus parameters are optimized accordingly in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed.

[0010] The third aspect of the present disclosure provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the focus control method provided in the first aspect of the present disclosure is implemented.

[0011] The fourth aspect embodiment of the present disclosure proposes a non-temporary computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the focus control method proposed in the first aspect embodiment of the present disclosure is implemented.

[0012] The fifth aspect of the present disclosure provides a computer program product. When the instructions in the computer program product are executed by a processor, the focus control method provided in the first aspect of the present disclosure is executed.

[0013] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0015] Figure 1 is a flowchart of a focus control method proposed in an embodiment of the present disclosure;

[0016] Figure 2 is a schematic diagram of a focus parameter search range in an embodiment of the present disclosure;

[0017] Figure 3 is a flowchart of a focus control method proposed in another embodiment of the present disclosure;

[0018] Figure 4 is a schematic diagram of the effect of difference information of image signal strength on focus parameters in an embodiment of the present disclosure;

[0019] Figure 5 is a structural schematic diagram of a focus control device proposed in an embodiment of the present disclosure;

[0020] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present disclosure, and are not to be construed as limitations of the present disclosure. On the contrary, the embodiments of the present disclosure include all changes, modifications, and equivalents that fall within the spirit and connotation of the appended claims.

[0022] Figure 1 It is a flowchart of a focus control method proposed in an embodiment of the present disclosure.

[0023] This embodiment is described by taking the focus control method configured as a focus control device as an example.

[0024] In this embodiment, the focus control method can be configured in a focus control device, and the focus control device can be set in a terminal, and the terminal can be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, imaging devices, voice collection devices, voice processing devices, and voice playback devices. The imaging device can also be configured with a focus module, so as to achieve focusing during the imaging process based on the coordinated operation of the focus module.

[0025] It should be noted that the execution subject of the embodiment of the present disclosure may be, for example, a central processing unit (CPU) in a terminal in terms of hardware, or may be, for example, a related background service in the terminal in terms of software, without limitation.

[0026] like Figure 1 As shown, the focus control method includes:

[0027] S101: Acquire scene images and scene information.

[0028] Among them, the picture of the current scene captured by the imaging device of the terminal based on its camera can be called the scene picture, and the environmental information related to the scene in which the terminal is located can be called scene information.

[0029] Scene information, such as ambient temperature, humidity, wind speed, brightness, etc.

[0030] When the scene picture is captured as mentioned above, it can trigger the recognition of the object to be photographed in real time to determine whether the scene picture is photographed for a preset object to be photographed, for example, the object to be photographed is the moon, and the scene information obtained as mentioned above can be used as a reference to optimize the initial focus parameters corresponding to the object to be photographed. For details, please refer to the following embodiments.

[0031] In some embodiments, obtaining scene information includes: obtaining scene temperature, obtaining module parameters corresponding to the focus module, and determining difference information corresponding to the module parameters. The scene temperature and the difference information together constitute the scene information. The focus module is used to focus on the scene image with reference to the target focus parameters.

[0032] The difference information corresponding to the module parameters may be the difference information of the module parameters relative to the reference module parameters used as a reference. The module parameters may be, for example, the model of the module, focus configuration information, etc.

[0033] That is to say, in the embodiments of the present disclosure, it supports optimizing the initial focus parameters accordingly based on the difference information between the module parameters of the focus module configured in the reference terminal and the reference module parameters, thereby making the focus control more flexible and effectively improving the adaptability between the optimized focus control parameters and the hardware features.

[0034] In the disclosed embodiment, it is also supported to optimize the focus control parameters by combining the scene temperature with the difference information corresponding to the module parameters, thereby greatly improving the accuracy and practicality of the focus control.

[0035] In the disclosed embodiment, a focus parameter search range can also be pre-set for scene temperature and difference information. The focus parameter search range may include: multiple focal length values, which can be determined based on possible scene temperature values ​​and possible difference information values, that is, focal length values ​​that can be affected by scene temperature and difference information. The focus parameter search range can be pre-determined based on a data measurement process. Possible scene temperature values ​​can take values ​​from -10 degrees to 40 degrees. Possible difference information can be a variety of difference information obtained by comparing multiple modules.

[0036] like Figure 2 As shown, Figure 2 It is a schematic diagram of the focus parameter search range in the embodiment of the present disclosure, including an optional range of focal length values ​​and an optional focal length value of the corresponding part in each range. The focus parameter search range can assist in the subsequent optimization of the initial focus parameters. For details, please refer to the subsequent embodiments.

[0037] S102: If the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture.

[0038] When the scene picture is acquired, it can trigger real-time judgment on whether the scene picture contains the object to be photographed (the object to be photographed is, for example, the moon). When it is determined that the scene picture includes the object to be photographed, it can directly trigger the identification of a partial picture of the object to be photographed from the scene picture, wherein the picture corresponding to the moon can be called a partial picture, which is a part of the scene picture, and the partial picture can be used to determine the focus parameters corresponding to the object to be photographed.

[0039] Therefore, in the embodiment of the present disclosure, when it is detected that the scene includes the moon, it can automatically trigger the focus control using focus parameters adapted to the moon without the need to separately set the corresponding shooting mode (moon mode), thereby achieving automatic focus and capturing a clear image of the moon.

[0040] In some other embodiments, if the scene picture does not include the object to be photographed, new scene pictures can be continuously captured and the existing scene pictures can be updated with the new scene pictures to continuously monitor whether the object to be focused is included, and there is no limitation on this.

[0041] S103: Process the partial picture to obtain initial focus parameters corresponding to the object to be photographed.

[0042] If the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and then the partial picture can be processed to obtain an initial focus parameter corresponding to the object to be photographed.

[0043] Among them, the initial focus parameters obtained according to the analysis of the local picture can be called the initial focus parameters. The initial focus parameters can be pre-configured based on the reference picture brightness, saturation and other parameters in the moon mode, so that the brightness, saturation and other characteristics corresponding to the local picture can be analyzed, and then the pre-configured focus parameters corresponding to the brightness, saturation and other characteristics can be read as the initial focus parameters.

[0044] In some embodiments, processing a partial picture to obtain initial focus parameters corresponding to an object to be photographed may include determining a partial image corresponding to the partial picture; determining target image features corresponding to the object to be photographed based on the partial image; determining difference information between the target image features and the reference image features; and determining initial focus parameters corresponding to the object to be photographed based on the difference information.

[0045] Among them, the image corresponding to the local picture can be called a local image, and the local image can be subjected to image analysis to obtain corresponding image features (such as brightness, image signal strength, saturation, etc.), and the image features obtained by analyzing the local image can be called target image features corresponding to the object to be photographed, and the reference image can be a local sub-image in the local picture, or it can also be some other standard moon images that can be used as a focusing reference, and the image features obtained by analyzing the local sub-image or the standard moon image can be called reference image features (such as reference brightness, image signal strength, saturation, etc.), and then, the difference information between the target image features and the reference image features can be analyzed to determine; based on the difference information, the initial focusing parameters corresponding to the object to be photographed are determined.

[0046] In the embodiment of the present disclosure, a correspondence table may be configured, and the correspondence table may include: difference information, and focus parameters corresponding to the difference information, so that the focus parameters matching the above difference information are used as initial focus parameters.

[0047] In the embodiment of the present disclosure, the difference information is taken as the difference information of the image signal strength for example.

[0048] In some embodiments, based on the difference information, determining the initial focus parameters corresponding to the object to be photographed can be accomplished by obtaining reference focus parameters corresponding to reference image features; adjusting the reference focus parameters based on the difference information, and using the adjusted focus parameters as the initial focus parameters corresponding to the object to be photographed.

[0049] Among them, the reference image feature is, for example, the reference image signal intensity (reference image signal intensity, which can be called reference image characteristics) corresponding to the local sub-image or the standard moon image, the difference information can be, for example, the difference between the target image signal intensity of the local image (target image signal intensity, which can be called target image characteristics) and the reference image signal intensity, and the reference focus parameter can be, for example, a reference focal length value corresponding to the reference image signal intensity, and then, the reference focal length value can be adjusted according to the difference between the reference signal intensities, and the adjusted reference focal length value is used as the initial focus parameter corresponding to the object to be photographed, and there is no limitation on this.

[0050] Since the difference information of image signal intensity is referred to to assist in determining the initial focus parameters corresponding to the object to be focused, and usually when the object to be focused is the moon, its corresponding image signal intensity is larger than the image signal intensity of other reference objects, thereby achieving personalized signal processing for the image signal including the object to be focused (the moon), so that the configuration of the focus parameters can be effectively adapted to the personalized image signal characteristics of the object to be focused, thereby greatly improving the accuracy of the focus parameter configuration.

[0051] In some embodiments, adjusting the reference focus parameters according to the difference information may be adjusting the reference focus parameters according to the difference information to enlarge the difference between the target image features and other image features; wherein the other image features are features of images corresponding to other pictures, and the other pictures and the local pictures together constitute the scene picture.

[0052] Among them, when the reference focus parameters are adjusted according to the difference information to expand the difference between the target image features and other image features, it is considered that when the object to be focused is the moon, its corresponding image signal intensity is larger than the image signal intensity of other reference objects, so that when the moon image is captured based on the adjusted focus parameters, the moon image is clearer and blurring of the moon area is avoided.

[0053] Of course, any other possible methods may be used to adjust the reference focus parameters, such as a model method, an engineering method, etc., and there is no limitation to this.

[0054] The focus parameters in the embodiments of the present disclosure may also be digital filter (Infinite Impulse Response Filter, IIR Filter) parameters, Bayer domain auto focus gamma parameters (Bayer Auto Focus Gama, BAFGama), and coring parameters, and the aforementioned parameters are all parameters related to Bayer domain image processing in the related art. Therefore, in the embodiments of the present disclosure, it is possible to support personalized customization of digital filter (Infinite Impulse Response Filter, IIR Filter) parameters, Bayer domain auto focus gamma parameters (Bayer Auto Focus Gama, BAF Gama), and coring parameters based on the image signal intensity of the object to be focused, and use IIR Filter parameter values, BAF Gama parameter values, and Coring parameter values ​​that can expand the difference between the target image features and other image features to assist in focus control. For details, please refer to the subsequent embodiments.

[0055] S104: Processing initial focus parameters according to scene information to obtain target focus parameters; wherein the target focus parameters are used to focus on the scene image.

[0056] After the scene information and the initial focus parameters are acquired, the initial focus parameters may be processed according to the scene information to obtain target focus parameters; wherein the target focus parameters are used to focus on the scene image.

[0057] In some embodiments, the initial focus parameters are processed according to the scene information to obtain the target focus parameters. The focus parameter search range may be determined according to the scene temperature and difference information, and the initial focus parameters are processed with reference to the focus parameter search range to obtain the target focus parameters.

[0058] See also above Figure 2 , assuming that the initial focus parameters can also include the focal length value, so that the scene temperature and difference information can be referenced from Figure 2 An optional focal length value is determined, and a focus range is determined based on the optional focal length value. Then, the focus range is also used as a focus parameter. The IIR Filter parameter value, BAF Gama parameter value, Coring parameter value, and focus range determined based on the image signal intensity difference can be used together as target focus parameters without limitation.

[0059] Of course, the focus parameters can also be configured as other parameters, such as focus parameters related to the YUV domain, and YUV is a type of color space. Y'UV, YUV, YCbCr, YPbPr and other special terms can all be called YUV, and there are overlaps. "Y" represents brightness (Luminance or Luma), that is, the grayscale value, and "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the image and is used to specify the color of the pixel. There is no restriction on this.

[0060] In this embodiment, by acquiring the scene picture and scene information, if the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and the partial picture is processed to obtain initial focus parameters corresponding to the object to be photographed, and the initial focus parameters are processed according to the scene information to obtain target focus parameters, wherein the target focus parameters are used to focus on the scene picture. When it is detected that the scene picture includes the object to be photographed, it can directly trigger the use of focus parameters adapted to the object to be photographed for focus control without separately setting the corresponding shooting mode, and the initial focus parameters are correspondingly optimized in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed.

[0061] Figure 3 It is a flowchart of a focus control method proposed in another embodiment of the present disclosure.

[0062] like Figure 3 As shown, the focus control method includes:

[0063] S301: Acquire scene images and scene information.

[0064] S302: If the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture.

[0065] S303: Process the partial picture to obtain initial focus parameters corresponding to the object to be photographed.

[0066] S304: Processing the initial focus parameter according to the scene information to obtain a target focus parameter; wherein the target focus parameter is used to focus on the scene image.

[0067] The description of S301 - S304 can be specifically referred to the above embodiment, which will not be repeated here.

[0068] S305: performing image conversion on the scene picture according to the target focus parameter to obtain a converted image.

[0069] In this embodiment, taking the focusing on the focus object (the moon) as an example based on the Bayer domain processed image (i.e., performing Bayer domain image conversion on the scene picture to obtain the Bayer domain image), the target focus parameter may be a digital filter (Infinite Impulse Response Filter, IIR Filter) parameter, a Bayer domain auto focus gamma parameter (Bayer Auto Focus Gama, BAF Gama), and a coring parameter, and the aforementioned parameters are all parameters related to the Bayer domain image processing in the related art.

[0070] The Bayer domain conversion is an image processing method, that is, processing the image into a Bayer image. Thus, the image processing method of converting the scene picture into a Bayer image can be called Bayer domain conversion, and the obtained Bayer image can be called a Bayer domain image.

[0071] Of course, in the embodiments of the present disclosure, any other possible image processing method may be used, and the scene image may be processed accordingly in combination with the target focus parameter, and there is no limitation to this.

[0072] The above-mentioned target focus parameters can be obtained by adjusting the initial focus parameters based on the difference information of the image signal intensity, such as Figure 4 As shown, Figure 4 is a schematic diagram showing the effect of the difference information of the image signal strength on the focus parameter in the embodiment of the present disclosure. Figure 4 When the initial focus parameters are adjusted as shown, it is possible to enlarge the difference between the target image features and other image features.

[0073] Bayer domain image processing is based on the Bayer domain to implement the fv statistics of auto focus AF, thereby effectively avoiding the image signal processing (Image Signal Processing, ISP) affecting the contrast information of the image, and performing image processing (Y value conversion and gamma parameter correction) and focus value generation based on the Bayer domain.

[0074] The Y conversion in Bayer domain image processing provides a method to combine four pixels of the RGB Bayer domain image (that is, the data directly output by the sensor) into a signal, which is given by the specified weight of each channel, and can effectively improve the contrast of dark pixels in low-light environments.

[0075] Therefore, the above-mentioned image conversion of the scene picture according to the target focus parameters to obtain the converted image can be performed on the scene picture by referring to the digital filter (Infinite Impulse Response Filter, IIR Filter) parameters, Bayer domain auto focus gamma parameters (Bayer Auto Focus Gama, BAF Gama), coring parameters, etc. to obtain the converted image.

[0076] S306: If the peak focus value can be generated according to the converted image, determine the target pixel point position based on the peak focus value.

[0077] Then, the target focus parameter value can be referred to to determine whether a peak focus value (Focus Peak, FP) point can be generated according to the converted image. If a peak focus value Peak point can be generated according to the converted image, the target pixel point position is determined based on the focus value Peak point, and the target pixel point position is the determined most suitable focus point.

[0078] S307: If the peak focus value cannot be generated according to the converted image, the pixel point position corresponding to the annotated image feature in the local image is used as the target pixel point position, wherein the annotated image feature satisfies the set condition.

[0079] If the peak focus value Peak point cannot be generated according to the converted image, the pixel point position corresponding to the annotated image feature in the local image is used as the target pixel point position, wherein the annotated image feature meets the set conditions and the image signal intensity of the annotated image feature is the largest, so that the pixel point position corresponding to the annotated image feature can be determined as the target pixel point position.

[0080] The annotated image feature may be, for example, image signal strength. For example, a local image may include multiple pixels, each pixel having a corresponding image signal strength. The corresponding image signal strength may be called an annotated image feature, so that the annotated image feature satisfies the set conditions. For example, if the image signal strength of a certain pixel is the signal strength with the largest value among multiple image signal strengths, it can be determined that the annotated image feature of the pixel satisfies the set conditions. Of course, the set conditions may also be configured in any other possible form and may be adaptively set according to actual shooting requirements, without limitation.

[0081] S308: Focusing the scene image based on the target pixel position.

[0082] That is to say, in the embodiments of the present disclosure, customized focus parameters are configured for the moon, which can simultaneously solve the impact of scene information (for example, weather, noise, brightness) on focus control, making it easier to find the focus with the strongest signal; and can effectively narrow the search range of optional focus values, effectively avoid the impact of jitter on focus, and replace the judgment of the focus value Peak point based on image features with poor image signals, effectively improving the automated focus control for the object to be focused, and assisting in improving the imaging effect of the object to be focused.

[0083] In this embodiment, by acquiring the scene picture and scene information, if the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and the partial picture is processed to obtain initial focus parameters corresponding to the object to be photographed, and the initial focus parameters are processed according to the scene information to obtain target focus parameters, wherein the target focus parameters are used to focus on the scene picture. When it is detected that the scene picture includes the object to be photographed, it can directly trigger the use of focus parameters adapted to the object to be photographed for focus control without separately setting the corresponding shooting mode, and the initial focus parameters are correspondingly optimized in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed. It can support personalized customization of digital filter (Infinite Impulse Response Filter, IIR Filter) parameters, Bayer Auto Focus Gamma (Bayer Auto Focus Gama, BAF Gama), and Coring parameters based on the image signal strength of the object to be focused, and use IIRFilter parameter values, BAF Gama parameter values, and Coring parameter values ​​that can expand the difference between the target image features and other image features to assist in focus control. Customized focus parameters can be configured for the moon, which can simultaneously solve the impact of scene information (such as weather, noise, brightness) on focus control, making it easier to find the focus with the strongest signal; and can effectively narrow the search range of optional focus values, effectively avoid the impact of jitter on focus, and replace the judgment of the focus value Peak point by image features with poor image signals, effectively improving the automated focus control for the object to be focused, and assisting in improving the imaging effect of the object to be focused.

[0084] Figure 5 is a structural schematic diagram of a focus control device proposed in an embodiment of the present disclosure.

[0085] like Figure 5 As shown, the focus control device 50 includes:

[0086] The acquisition module 501 is used to acquire scene images and scene information;

[0087] The recognition module 502 is used to recognize a partial picture of the object to be photographed from the scene picture when the object to be photographed is included in the scene picture;

[0088] The processing module 503 is used to process the local image to obtain initial focus parameters corresponding to the object to be photographed;

[0089] The focusing module 504 is used to process the initial focusing parameters according to the scene information to obtain the target focusing parameters; wherein the target focusing parameters are used to focus on the scene picture.

[0090] In some embodiments of the present disclosure, the processing module 503 is specifically configured to:

[0091] Determining a partial image corresponding to the partial picture;

[0092] Determine target image features corresponding to the object to be photographed according to the local image;

[0093] Determine the difference information between the target image features and the reference image features;

[0094] According to the difference information, an initial focus parameter corresponding to the object to be photographed is determined.

[0095] In some embodiments of the present disclosure, the processing module 503 is specifically configured to:

[0096] Obtain reference focus parameters corresponding to reference image features;

[0097] The reference focus parameters are adjusted according to the difference information, and the adjusted focus parameters are used as initial focus parameters corresponding to the object to be photographed.

[0098] In some embodiments of the present disclosure, the processing module 503 is specifically configured to:

[0099] The reference focus parameters are adjusted according to the difference information to enlarge the difference between the target image features and other image features; wherein the other image features are features of images corresponding to other pictures, and the other pictures and the partial pictures together constitute the scene picture.

[0100] In some embodiments of the present disclosure, the acquisition module 501 is specifically used to:

[0101] Get scene temperature;

[0102] Get the module parameters corresponding to the focus module;

[0103] Determine the difference information corresponding to the module parameters, the scene temperature and the difference information together constitute the scene information, and the focus module is used to focus the scene picture with reference to the target focus parameters.

[0104] In some embodiments of the present disclosure, the focus module 504 is specifically configured to:

[0105] Determine a focus parameter search range based on scene temperature and difference information;

[0106] The initial focus parameter is processed with reference to the focus parameter search range to obtain the target focus parameter.

[0107] In some embodiments of the present disclosure, the focus module 504 is used to:

[0108] Performing image conversion on the scene picture according to the target focus parameter to obtain a converted image;

[0109] If a peak focus value can be generated according to the converted image, the target pixel point position is determined based on the peak focus value;

[0110] If the peak focus value cannot be generated according to the converted image, the pixel position corresponding to the annotated image feature in the local image is used as the target pixel position, wherein the annotated image feature satisfies the set condition;

[0111] Focus the scene based on the target pixel position.

[0112] It should be noted that the aforementioned explanation of the focus control method embodiment is also applicable to the focus control device of this embodiment, and will not be repeated here.

[0113] In this embodiment, by acquiring the scene picture and scene information, if the scene picture includes the object to be photographed, a partial picture of the object to be photographed is identified from the scene picture, and the partial picture is processed to obtain initial focus parameters corresponding to the object to be photographed, and the initial focus parameters are processed according to the scene information to obtain target focus parameters, wherein the target focus parameters are used to focus on the scene picture. When it is detected that the scene picture includes the object to be photographed, it can directly trigger the use of focus parameters adapted to the object to be photographed for focus control without separately setting the corresponding shooting mode, and the initial focus parameters are correspondingly optimized in combination with the scene information, thereby effectively improving the convenience of focus control for the object to be photographed and effectively improving the shooting effect for the object to be photographed.

[0114] Figure 6 A schematic diagram of the structure of a terminal provided in an embodiment of the present disclosure.

[0115] The terminal includes: a memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .

[0116] When the processor 602 executes the program, the focus control method provided in the above embodiment is implemented.

[0117] In a possible implementation, the terminal includes:

[0118] The communication interface 603 is used for communication between the memory 601 and the processor 602 .

[0119] The memory 601 is used to store computer programs that can be executed on the processor 602 .

[0120] The memory 601 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0121] The processor 602 is used to implement the focus control method of the above embodiment when executing a program.

[0122] If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0123] Optionally, in a specific implementation, if the memory 601, the processor 602 and the communication interface 603 are integrated on a chip, the memory 601, the processor 602 and the communication interface 603 can communicate with each other through an internal interface.

[0124] The processor 602 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure.

[0125] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the focus control method as described above is implemented.

[0126] In order to implement the above embodiments, the present disclosure further proposes a computer program product. When instructions in the computer program product are executed by a processor, the focus control method shown in the above embodiments is executed.

[0127] It should be noted that, in the description of the present disclosure, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present disclosure, unless otherwise specified, the meaning of "plurality" is two or more.

[0128] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present disclosure belong.

[0129] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0130] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0131] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0132] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0133] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0134] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A focus control method, characterized in that: The method comprises: Obtain scene images and scene information; If the scene picture includes the object to be photographed, identifying a partial picture of the object to be photographed from the scene picture; Processing the partial picture to obtain initial focus parameters corresponding to the object to be photographed; Processing the initial focus parameter according to the scene information to obtain a target focus parameter; wherein the target focus parameter is used to focus on the scene picture; Wherein, obtaining the scene information includes: Get scene temperature; Get the module parameters corresponding to the focus module; Determine the difference information corresponding to the module parameters of the reference module and the module parameters of the focus module, the scene temperature and the difference information together constitute the scene information; wherein the focus module is used to focus on the scene image with reference to the target focus parameters.

2. The method according to claim 1, characterized in that The processing of the partial picture to obtain an initial focus parameter corresponding to the object to be photographed includes: Determining a partial image corresponding to the partial picture; Determining target image features corresponding to the object to be photographed according to the partial image; Determining difference information between the target image features and the reference image features; An initial focus parameter corresponding to the object to be photographed is determined according to difference information between the target image feature and the reference image feature.

3. The method according to claim 2, characterized in that The determining, according to the difference information between the target image feature and the reference image feature, an initial focus parameter corresponding to the object to be photographed includes: Obtaining a reference focus parameter corresponding to the reference image feature; The reference focus parameter is adjusted according to the difference information, and the adjusted focus parameter is used as an initial focus parameter corresponding to the object to be photographed.

4. The method according to claim 3, characterized in that The adjusting the reference focus parameter according to the difference information includes: The reference focus parameter is adjusted according to the difference information to enlarge the difference between the target image feature and other image features; wherein the other image features are features of images corresponding to other pictures, and the other pictures and the partial pictures together constitute the scene picture.

5. The method according to claim 1, characterized in that The processing of the initial focus parameter according to the scene information to obtain a target focus parameter includes: determining a focus parameter search range according to the scene temperature and the difference information; The initial focus parameter is processed with reference to the focus parameter search range to obtain a target focus parameter.

6. The method according to claim 1, characterized in that include: Performing image conversion on the scene picture according to the target focus parameter to obtain a converted image; If a peak focus value can be generated according to the converted image, determining the target pixel point position based on the peak focus value; If the peak focus value cannot be generated according to the converted image, the pixel position corresponding to the annotated image feature in the local image is used as the target pixel position, wherein the annotated image feature satisfies a set condition; The scene image is focused based on the target pixel position.

7. A focus control device, characterized in that: The device comprises: An acquisition module is used to acquire scene images and scene information; an identification module, configured to identify a partial picture of the object to be photographed from the scene picture when the object to be photographed is included in the scene picture; A processing module, used for processing the partial picture to obtain an initial focus parameter corresponding to the object to be photographed; A focusing module, configured to process the initial focusing parameters according to the scene information to obtain target focusing parameters; wherein the target focusing parameters are used to focus on the scene picture; The acquisition module is specifically used for: Get scene temperature; Get the module parameters corresponding to the focus module; Determine the difference information corresponding to the module parameters of the reference module and the module parameters of the focus module, the scene temperature and the difference information together constitute the scene information; wherein the focus module is used to focus on the scene image with reference to the target focus parameters.

8. The device according to claim 7, characterized in that The processing module is specifically used for: Determining a partial image corresponding to the partial picture; Determining target image features corresponding to the object to be photographed according to the partial image; Determining difference information between the target image features and the reference image features; An initial focus parameter corresponding to the object to be photographed is determined according to difference information between the target image feature and the reference image feature.

9. The device according to claim 8, characterized in that The processing module is specifically used for: Obtaining a reference focus parameter corresponding to the reference image feature; The reference focus parameter is adjusted according to the difference information, and the adjusted focus parameter is used as an initial focus parameter corresponding to the object to be photographed.

10. The device according to claim 9, characterized in that The processing module is specifically used for: The reference focus parameter is adjusted according to the difference information to enlarge the difference between the target image feature and other image features; wherein the other image features are features of images corresponding to other pictures, and the other pictures and the partial pictures together constitute the scene picture.

11. The device according to claim 7, characterized in that The focusing module is specifically used for: determining a focus parameter search range according to the scene temperature and the difference information; The initial focus parameter is processed with reference to the focus parameter search range to obtain a target focus parameter.

12. The device according to claim 7, characterized in that The focusing module is specifically used for: Performing image conversion on the scene picture according to the target focus parameter to obtain a converted image; If a peak focus value can be generated according to the converted image, determining the target pixel point position based on the peak focus value; If the peak focus value cannot be generated according to the converted image, the pixel position corresponding to the annotated image feature in the local image is used as the target pixel position, wherein the annotated image feature satisfies a set condition; The scene image is focused based on the target pixel position.

13. A terminal, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

14. A storage medium, when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the method according to any one of claims 1 to 6.