A shooting method based on automatic focus and zoom, a mobile terminal and a storage medium
By using the strategy of ambient light detection, object position detection and sound source position recognition in mobile terminals to determine the focus position, the problem that existing technology cannot meet the automatic focusing of multi-target scenes is solved, and the intelligence and fun of image and video shooting are improved. .
Patent Information
- Application Number
- CN202111566617.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-12-20
AI Technical Summary
The existing autofocus method cannot satisfy the intelligence of image shooting focus and the fun of video shooting in multi-target scenes, affecting the user experience.
By obtaining the preview image, the preset autofocus zoom strategy based on ambient light detection, object position detection and sound source position recognition determines the current recommended focus position and automatically applies the position in the preview for image or video shooting.
It meets the dynamic focus and zoom needs of multiple subjects in the shooting scene, improves the intelligence of image shooting and focusing and the fun of video shooting in multi-target scenes, and improves the user experience.
Smart Images

Figure CN114143467B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile terminals, and in particular to a shooting method based on automatic focus and zoom, a mobile terminal and a storage medium. Background Art
[0002] Currently, with the increasing popularity of mobile terminals, more and more users are using mobile terminals, and users use mobile terminals more and more frequently in their daily lives, making mobile terminals one of the indispensable mobile devices for users. In addition, the camera functions of mobile terminals are becoming increasingly powerful, and the camera functions of mobile terminals can be used to shoot a variety of scenes.
[0003] In the process of shooting images or videos of mobile terminals, in order to improve the image or video shooting effect of the mobile terminal, accurate focusing is often required during the shooting process. At present, in the image shooting automatic focus technology, it is usually implemented by ambient light detection or subject object position recognition; in the video shooting method, there is a smooth zoom technology based on subject object recognition (such as Hitchcock filter). However, the above-mentioned methods based on ambient light detection or subject object position recognition can only be used for shooting scenes with only one subject object. When there are multiple subject objects in the shooting scene at the same time, whether it is an automatic focus method based on ambient light detection or an automatic focus / zoom method based on object position detection, it is impossible to meet the needs of automatic focus / zoom, and it is impossible to improve the intelligence of image shooting focus in multi-target scenes, and it is also impossible to improve the fun of video shooting, which affects the user experience. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a shooting method, a mobile terminal and a storage medium based on automatic focus and zoom, so as to solve the problem that the existing automatic focus method cannot meet the needs of automatic focus / zoom, cannot improve the intelligence of image shooting and focusing in multi-target scenes, and cannot improve the fun of video shooting, thereby affecting the user experience.
[0005] The technical solution adopted by the present invention to solve the above technical problems is as follows:
[0006] According to one aspect of the present invention, a shooting method based on automatic focus and zoom is provided, the method comprising:
[0007] Get the preview image;
[0008] Determining a current recommended focus position according to the preview image based on a preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition;
[0009] Automatically applying the currently recommended focus position to the subject object in the preview;
[0010] Based on the current recommended focus position, an image or video is captured.
[0011] In a possible design, determining the current recommended focus position according to the preview image based on a preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition includes:
[0012] Determining the subject object contained in the preview image according to the preview image, including:
[0013] Detecting the main object and the main object position contained in the preview image;
[0014] Remove the secondary subject object from the subject object list, keep the primary subject object, and update the subject object list.
[0015] In a possible design, the removing of the secondary subject object in the subject object list, retaining the primary subject object, and updating the subject object list includes:
[0016] Based on the comparison with the predetermined area ratio threshold, the primary secondary main object is removed from the main object in the main object list; and / or,
[0017] Based on the center point position offset, the secondary main object is removed for the second time from the main object in the main object list;
[0018] After the first secondary subject object and / or the second secondary subject object are removed, the remaining subject objects are retained as primary subject objects, and the subject object list is updated according to the retained primary subject objects.
[0019] In a possible design, the preset auto focus zoom strategy includes: determining the auto focus / zoom mode according to the main object in the preview image: when there is no main object, determining to adopt the auto focus mode based on ambient light detection; when there is only one main object, determining to adopt the auto focus / zoom mode based on object position detection; when there are multiple main objects, determining to adopt the auto focus / zoom mode based on sound source position recognition.
[0020] In one possible design, when there is no subject object in the updated subject object list, an automatic focusing method based on ambient light detection is adopted according to the preview image to obtain a recommended first focus position, and the recommended first focus position is determined as the current recommended focus position.
[0021] In a possible design, when there is only one subject object in the updated subject object list, it is determined to adopt an automatic focus / zoom method based on object position detection to obtain the center position of the subject object, and the center position of the subject object is determined as the current recommended focus position.
[0022] In a possible design, when there are multiple subject objects in the updated subject object list, it is determined to adopt an automatic focus / zoom method based on sound source position recognition, and the current recommended focus position is determined in combination with the acquired sound source position.
[0023] In a possible design, the determination adopts an automatic focus / zooming method based on sound source position recognition, and determines the current recommended focus position in combination with the acquired sound source position; including:
[0024] Comparing the acquired microphone sound source strength with the microphone sound source strength threshold, if the microphone sound source strength is less than the microphone sound source strength threshold, determining the acquired recommended first focus position as the current recommended focus position, or determining the acquired center position of the subject object list as the current recommended focus position;
[0025] If the microphone sound source strength is greater than or equal to the microphone sound source strength threshold, further obtain the microphone sound source orientation, and determine the position of the microphone sound source orientation in the preview image; if the microphone sound source orientation is not within the preview image, determine the obtained recommended first focus position as the current recommended focus position, or determine the obtained center position of the subject object list as the current recommended focus position;
[0026] If the microphone sound source orientation is within the preview image, further obtain the distance between the subject object in the subject object list and the microphone sound source orientation, and obtain the subject object closest to the microphone sound source orientation and the distance between it and the microphone sound source orientation; if the distance between the closest subject object and the microphone sound source orientation is greater than the microphone sound source orientation distance threshold, then the obtained recommended first focus position is determined as the current recommended focus position, or the center position of the obtained subject object list is determined as the current recommended focus position;
[0027] If the distance between the nearest subject object and the microphone sound source orientation is less than or equal to the microphone sound source orientation distance threshold, the center position of the nearest subject object is obtained and determined as the current recommended focus position.
[0028] According to another aspect of the present invention, a mobile terminal is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of a shooting method based on automatic focus and zoom provided in an embodiment of the present invention are implemented.
[0029] According to another aspect of the present invention, a storage medium is provided, on which is stored a program for a shooting method based on automatic focus and zoom. When the program for a shooting method based on automatic focus and zoom is executed by a processor, the steps of a shooting method based on automatic focus and zoom provided in an embodiment of the present invention are implemented.
[0030] Compared with the related art, the shooting method, mobile terminal and storage medium based on automatic focus and zoom proposed in the embodiment of the present invention obtain a preview image, and determine the current recommended focus position according to the preview image based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition; automatically apply the current recommended focus position in the preview; and perform image or video shooting based on the current recommended focus position. Therefore, by determining the current recommended focus position according to the preview image based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the needs of automatic focus / zoom can be met, especially the needs of dynamic focus and zoom when there are multiple subject objects in the shooting scene at the same time, the intelligence of image shooting and focusing in multi-target scenes can be improved, the fun of video shooting can be improved, and the user experience can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention;
[0032] Figure 2 A communication network system architecture diagram provided for an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of a process flow of a shooting method based on automatic focus and zoom provided by an embodiment of the present invention;
[0034] Figure 4 A schematic diagram of a process of applying an automatic focus and zoom shooting method to image shooting provided by an embodiment of the present invention;
[0035] Figure 5 A schematic diagram of a process of applying a shooting method based on automatic focus and zoom provided by an embodiment of the present invention to video shooting;
[0036] Figure 6 A schematic diagram of the structure of a mobile terminal provided by an embodiment of the present invention.
[0037] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0038] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0039] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0040] It should be noted that the terms "first", "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0041] The terminal may be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as mobile phones, tablet computers, laptop computers, PDAs, portable media players (PMPs), navigation devices, wearable devices, smart bracelets, pedometers, etc., as well as fixed terminals such as digital TVs and desktop computers.
[0042] The following description will be made by taking a mobile terminal as an example, and those skilled in the art will appreciate that, in addition to components specifically used for mobile purposes, the configuration according to the embodiments of the present invention can also be applied to fixed-type terminals.
[0043] See also Figure 1 , which is a schematic diagram of the hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103, A / V (audio / video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111 and other components. Those skilled in the art can understand that Figure 1 The structure of the mobile terminal shown in the figure does not constitute a limitation on the mobile terminal. The mobile terminal may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0044] Combine the following Figure 1 The following is a detailed introduction to the various components of the mobile terminal:
[0045] The radio frequency unit 101 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving the downlink information of the base station, it is sent to the processor 110 for processing; in addition, the uplink data is sent to the base station. Generally, the radio frequency unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 101 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution), etc.
[0046] WiFi is a short-range wireless transmission technology. Mobile terminals can help users send and receive emails, browse web pages, and access streaming media through WiFi module 102. It provides users with wireless broadband Internet access. Figure 1 The WiFi module 102 is shown, but it is understandable that it is not an essential component of the mobile terminal and can be omitted as required without changing the essence of the invention.
[0047] The audio output unit 103 can convert the audio data received by the RF unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output it as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, etc. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the mobile terminal 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, etc.
[0048] The A / V input unit 104 is used to receive audio or video signals. The A / V input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a telephone call mode, a recording mode, a voice recognition mode, and other operating modes, and can process such sound into audio data. The processed audio (voice) data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 can implement various types of noise elimination (or suppression) algorithms to eliminate (or suppress) noise or interference generated in the process of receiving and sending audio signals.
[0049] The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the mobile terminal 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can also be configured on the mobile phone, such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0050] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0051] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 110, and can receive and execute the command sent by the processor 110. In addition, the touch panel 1071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, the other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, etc., which are not specifically limited here.
[0052] Furthermore, the touch panel 1071 may cover the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of the touch event. Then, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Figure 1 In the figure, the touch panel 1071 and the display panel 1061 are used as two independent components to implement the input and output functions of the mobile terminal. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to implement the input and output functions of the mobile terminal, which is not limited here.
[0053] The interface unit 108 serves as an interface through which at least one external device can be connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
[0054] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0055] The processor 110 is the control center of the mobile terminal. It uses various interfaces and lines to connect various parts of the entire mobile terminal. It executes various functions of the mobile terminal and processes data by running or executing software programs and / or modules stored in the memory 109, and calling data stored in the memory 109, so as to monitor the mobile terminal as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0056] The mobile terminal 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0057] although Figure 1 Not shown, the mobile terminal 100 may further include a Bluetooth module, etc., which will not be described in detail here.
[0058] To facilitate understanding of the embodiments of the present invention, the communication network system on which the mobile terminal of the present invention is based is described below.
[0059] See also Figure 2 , Figure 2 A communication network system architecture diagram is provided for an embodiment of the present invention. The communication network system is an LTE system of universal mobile communication technology. The LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203 and an operator's IP service 204, which are sequentially connected for communication.
[0060] Specifically, UE201 may be the above-mentioned terminal 100, which will not be described in detail here.
[0061] E-UTRAN 202 includes eNodeB 2021 and other eNodeBs 2022 , etc. Among them, eNodeB 2021 can be connected to other eNodeBs 2022 through a backhaul (eg, an X2 interface), and eNodeB 2021 is connected to EPC 203 , and eNodeB 2021 can provide UE 201 with access to EPC 203 .
[0062] EPC203 may include MME (Mobility Management Entity) 2031, HSS (Home Subscriber Server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, PGW (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function) 2036, etc. Among them, MME2031 is a control node that processes signaling between UE201 and EPC203, and provides bearer and connection management. HSS2032 is used to provide some registers to manage functions such as home location register (not shown in the figure), and save some user-specific information such as service features and data rates. All user data can be sent through SGW2034, PGW2035 can provide IP address allocation and other functions for UE 201, PCRF2036 is the policy and charging control policy decision point for service data flow and IP bearer resources, which selects and provides available policy and charging control decisions for the policy and charging execution function unit (not shown in the figure).
[0063] The IP service 204 may include the Internet, an intranet, an IMS (IP Multimedia Subsystem) or other IP services.
[0064] Although the above introduction takes the LTE system as an example, those skilled in the art should know that the present invention is not only applicable to the LTE system, but also to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA and future new network systems, etc., which are not limited here.
[0065] Based on the above mobile terminal hardware structure and communication network system, various embodiments of the method of the present invention are proposed.
[0066] In one embodiment, Figure 3 As shown, the present invention provides a shooting method based on automatic focus and zoom, which is applied to a mobile terminal, and the method includes:
[0067] S1, obtain a preview image;
[0068] S2. Determine a current recommended focus position according to the preview image and based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition;
[0069] S3, automatically applying the current recommended focus position in the preview;
[0070] S4. Capture an image or video based on the current recommended focus position.
[0071] In this embodiment, by acquiring a preview image, according to the preview image, based on a preset auto focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the current recommended focus position is determined; the current recommended focus position is automatically applied in the preview; and based on the current recommended focus position, image or video shooting is performed. Thus, by determining the current recommended focus position according to the preview image based on a preset auto focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the needs of auto focus / zoom can be met, especially the needs of dynamic focus and zoom in shooting scenes with multiple subject objects at the same time, the intelligence of image shooting and focusing in multi-target scenes can be improved, the fun of video shooting can be improved, and the user experience can be improved.
[0072] In one embodiment, in step S1, obtaining a preview image includes:
[0073] Get the preview image preview, as well as the width pre_width and height pre_height of the preview image preview.
[0074] In one embodiment, in step S2, determining the current recommended focus position according to the preview image based on a preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition includes:
[0075] S21 . Obtain a recommended first focus position according to the preview image preview and based on an ambient light detection method.
[0076] Specifically, according to the preview image preview, the recommended first focus position FocusPos1 is obtained by using the ambient light detection method:
[0077] FocusPos1={x1,y1}
[0078] In the above formula, x1 is the horizontal coordinate of the first focus position FocusPos1 in the preview image, and y1 is the vertical coordinate of the first focus position FocusPos1 in the preview image.
[0079] S22: Determine the main object status contained in the preview image according to the preview image preview.
[0080] Specifically, it includes:
[0081] S221, detecting the main object and the main object position contained in the preview image preview:
[0082] Objects={object1, object2..., object n}
[0083] object i ={x i ,y i ,width i , height i}
[0084] Among them, Objects is the main object list, x i For the main object object i The horizontal coordinate of the starting position in the preview image (preferably, the starting position is the upper left corner), y i For the main object object i The vertical coordinate of the starting position in the preview image; width i For the main object object i Width and height of the preview image i For the main object object i The height of the preview image; i is an integer, i≥1.
[0085] S222, remove the secondary subject objects in the subject object list Objects, retain the primary subject objects, and update the subject object list Objects; wherein the secondary subject objects include but are not limited to subject objects whose area ratio is less than a predetermined area ratio threshold, subject objects whose center point position is offset, etc.; including:
[0086] S2221, based on the comparison with the predetermined area ratio threshold, the subject object object in the subject object list Objects i Perform the first secondary subject object removal; specifically including:
[0087] S22211. Obtain a predetermined area ratio threshold value AREA_MIN_RATIO;
[0088] S22212. Get the preview image area pre_area:
[0089] pre area =pre width *pre height
[0090] S22213. For each subject object in the subject object list Objects i , calculate its area object_area i :
[0091]
[0092] S22214. For each subject object in the subject object list Objects i , calculate its area ratio relative to the preview image object_area_ratio i :
[0093]
[0094] S22215, for the area ratio object_area_ratio compared to the preview image i For main objects whose area ratio is smaller than the preset threshold AREA_MIN_RATIO, the first secondary main object removal is performed.
[0095] and / or,
[0096] S2222: Based on the center point position offset, the main object object in the main object list Objects i Perform the second secondary subject object removal; specifically include:
[0097] S22221. Obtain the ratio thresholds of the predetermined center point position: X_MIN_RATIO, Y_MIN_RATIO, X_MAX_RATIO, Y_MAX_RATIO;
[0098] Among them: X_MIN_RATIO is the main object object i The length of the center point on the x-axis is center_x i The minimum ratio of the width pre_width of the preview image preview, Y_MIN_RATIO is the main object object i The length of the center point on the y axis is center_yi The minimum ratio of the height pre_height of the preview image preview, X_MAX_RATIO for the main object object i The length of the center point on the x-axis is center_x i The maximum ratio of the width pre_width of the preview image preview, Y_MAX_RATIO is the main object object i The length of the center point on the y axis is center_x i The maximum ratio of the preview image's height pre_height to the preview image's height.
[0099] S22222. For each subject object in the subject object list Objects i , calculate the center point position object_center_pos i :
[0100] object_center_pos i ={center_x i , center_y i}
[0101] center_x i =(x i +width i ) / 2
[0102] center_y i =(y i +height i ) / 2
[0103] In the above formula, x i For the main object object i The horizontal coordinate in the preview image, y i For the main object object i The vertical coordinate in the preview image, center_x i For the main object object i The center point position object_center_pos i The horizontal coordinate in the preview image, center_y i For the main object object i The center point position object_center_pos i The vertical coordinate in the preview image.
[0104] S22223. For each subject object in the subject object list Objects i , calculate the center point position object_center_pos i The ratio relative to the center point of the preview image object_center_ratio i :
[0105] object_center_ratio i ={center_ratio_x i , center_ratio_y i}
[0106] center_ratio_x i =center_x i / pre_width
[0107] center_ratio_y i =center_y i / pre_height
[0108] Among them, center_ratio_x i For the main object object i The length of the center point on the x-axis is center_x i The ratio of the width pre_width of the preview image preview, center_ratio_y i For the main object object i The height of the center point on the y-axis is center_y i The ratio of the height pre_height of the preview image preview.
[0109] S22224: For the main object whose center point position ratio is not within the predetermined center point position ratio threshold range compared to the preview image, perform a second removal of the secondary main object; wherein, the center point position ratio is not within the predetermined center point position ratio threshold range compared to the preview image if one of the following four conditions is met:
[0110] center_ratio_x i <X_MIN_RATIO
[0111] center_ratio_x i >X_MAX_RATIO
[0112] center_ratio_y i<Y_MIN_RATIO
[0113] center_ratio_y i >Y_MAX_RATIO
[0114] That is: subject object i The length of the center point on the x-axis is center_x i The ratio of center_ratio_x to the width pre_width of the preview image preview i Smaller than the main object object i The length of the center point on the x-axis is center_x i The minimum ratio X_MIN_RATIO to the width pre_width of the preview image preview, that is: center_ratio_x i <X_MIN_RATIO.
[0115] Subject object object i The length of the center point on the x-axis is center_x i The ratio of center_ratio_x to the width pre_width of the preview image preview i Larger than the main object object i The length of the center point on the x-axis is center_x i The maximum ratio of the width pre_width of the preview image preview is X_MAX_RATIO, that is: center_ratio_x i >X_MIN_RATIO.
[0116] Subject object object i The length of the center point on the y axis is center_y i The ratio of center_ratio_y to the height pre_height of the preview image preview i Smaller than the main object object i The length of the center point on the y axis is center_y i The minimum ratio Y_MIN_RATIO to the height pre_height of the preview image preview, that is: center_ratio_y i <Y_MIN_RATIO.
[0117] Subject object object i The length of the center point on the y axis is center_y iThe ratio of center_ratio_y to the height pre_height of the preview image preview i Larger than the main object object i The length of the center point on the y axis is center_y i The maximum ratio Y_MAX_RATIO to the height pre_height of the preview image preview, that is: center_ratio_y i >Y_MIN_RATIO.
[0118] S2223. After the first secondary subject object and / or the second secondary subject object are removed, the remaining subject objects are retained as primary subject objects, and the subject object list Objects is updated according to the retained primary subject objects:
[0119] Objects={object1,...,object m}
[0120] object i ={x i ,y i ,width i , height i}
[0121] Wherein, m≤n; m is the number of retained subject objects after updating the subject object list Objects, and n is the number of subject objects detected and contained in the preview image.
[0122] S23: Determine a current recommended focus position according to the subject object contained in the preview image and based on a preset automatic focus and zoom strategy.
[0123] Among them, the preset auto focus zoom strategy includes: determining the auto focus / zoom mode according to the main object in the preview image: when there is no main object, determining to adopt the auto focus mode based on ambient light detection; when there is only one main object, determining to adopt the auto focus / zoom mode based on object position detection; when there are multiple main objects, determining to adopt the auto focus / zoom mode based on sound source position recognition.
[0124] According to the number of subject objects in the updated subject object list Objects, the current recommended focus position is determined based on the preset auto focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition. Specifically including:
[0125] S231: When the number m of subject objects in the updated subject object list Objects is 0 (ie, no subject object exists), it is determined to adopt an automatic focusing method based on ambient light detection, and the obtained recommended first focus position FocusPos1 is determined as the current recommended focus position:
[0126] FocusPos1 = {x1, y1}
[0127] In the above formula, x1 is the horizontal coordinate of the first focus position FocusPos1 in the preview image, and y1 is the vertical coordinate of the first focus position FocusPos1 in the preview image.
[0128] S232, when the number m of subject objects in the updated subject object list Objects is 1 (that is, there is only one subject object), determine to use the automatic focus / zoom method based on object position detection, obtain the center position object_center_pos1={center_x1, center_y1} of the subject object object1, and obtain the center position object_center_pos1={center_x1, center_y1} of the subject object object1 to determine it as the currently recommended second focus position FocusPos2, and use it as the currently recommended focus position:
[0129] FocusPos2 = {x2, y2}
[0130] in:
[0131]
[0132]
[0133] In the above formula, x2 is the horizontal coordinate of the second focus position FocusPos2 in the preview image, y2 is the vertical coordinate of the second focus position FocusPos2 in the preview image, center_x1 is the horizontal coordinate of the center point position object_center_pos1 of the main object object1 in the preview image, and center_y1 is the vertical coordinate of the center point position object_center_pos1 of the main object object1 in the preview image.
[0134] S233: When the number m of subject objects in the updated subject object list Objects is multiple (i.e., there are multiple subject objects), determine to use the automatic focus / zoom method based on the sound source position recognition, and determine the current recommended focus position in combination with the acquired sound source position. Specifically, it includes:
[0135] S2331, obtain microphone sound source;
[0136] S2332, obtaining the microphone sound source intensity threshold SSI_TH;
[0137] S2333, calculating the acquired microphone sound source intensity ssi;
[0138] S2334, comparing the microphone sound source intensity ssi with the microphone sound source intensity threshold SSI_TH, and determining the current recommended focus position according to the comparison result; specifically including:
[0139] S23341. Compare the microphone sound source strength ssi with the microphone sound source strength threshold SSI_TH. When the microphone sound source strength ssi is less than the microphone sound source strength threshold SSI_TH:
[0140] Optionally, the obtained recommended first focus position FocusPos1 is determined as the current recommended focus position:
[0141] FocusPos1 = {x1, y1}
[0142] In the above formula, x1 is the horizontal coordinate of the first focus position FocusPos1 in the preview image, and y1 is the vertical coordinate of the first focus position FocusPos1 in the preview image.
[0143] or,
[0144] Optionally, the center position of the obtained main object list Objects is determined as the currently recommended third focus position FocusPos3, and is used as the currently recommended focus position:
[0145] FocusPos3 = {x3, y3}
[0146] in:
[0147] x3=(MIN(object i .x i )+MAX(object i .x i +width i )) / 2
[0148] y3=(MIN(object i .y i )+MAX(object i .y i +height i )) / 2
[0149] In the above formula, x3 is the horizontal coordinate of the third focus position FocusPos3 in the preview image, y3 is the vertical coordinate of the third focus position FocusPos3 in the preview image, object i .x i For the main object object i The x coordinate in the preview image i , object i .y i For the main object object i The horizontal coordinate y in the preview image i ,MIN(object i .x i ) is the main object object i The x coordinate in the preview image i The minimum value in MAX(object i .x i +width i ) is the main object object i The x coordinate in the preview image i The width of the preview image. i The maximum value of the sum, MIN(object i .y i ) is the main object object i The horizontal coordinate y in the preview image i The minimum value in MAX(object i .y i +height i ) is the main object object i The horizontal coordinate y in the preview image i The height of the preview image. i The maximum value of the sum of .
[0150] S23342. When the microphone sound source strength ssi ≥ the microphone sound source strength threshold SSI_TH, further obtain the microphone sound source position ss_pos:
[0151] ss pos ={x ss ,y ss}
[0152] In the above formula, x ss y is the horizontal coordinate of the microphone sound source position ss_pos in the preview image, ss It is the vertical coordinate of the microphone sound source position ss_pos in the preview image.
[0153] S23343, determine the position of the microphone sound source position ss_pos in the preview image. If the microphone sound source position ss_pos is not within the preview image, then:
[0154] Optionally, the obtained recommended first focus position FocusPos1 is determined as the current recommended focus position:
[0155] FocusPos1 = {x1, y1}
[0156] In the above formula, x1 is the horizontal coordinate of the first focus position FocusPos1 in the preview image, and y1 is the vertical coordinate of the first focus position FocusPos1 in the preview image.
[0157] or,
[0158] Optionally, the center position of the obtained main object list Objects is determined as the currently recommended third focus position FocusPos3, and is used as the currently recommended focus position:
[0159] FocusPos3 = {x3, y3}
[0160] in:
[0161] x3=(MIN(object i .x i )+MAX(object i .x i +width i )) / 2
[0162] y3=(MIN(object i .y i )+MAX(object i .y i +height i )) / 2
[0163] In the above formula, x3 is the horizontal coordinate of the third focus position FocusPos3 in the preview image, y3 is the vertical coordinate of the third focus position FocusPos3 in the preview image, object i .x i For the main object object i The x coordinate in the preview image i , object i .y i For the main object object i The horizontal coordinate y in the preview image i ,MIN(object i .x i) is the main object object i The x coordinate in the preview image i The minimum value in MAX(object i .x i +width i ) is the main object object i The x coordinate in the preview image i The width of the preview image. i The maximum value of the sum, MIN(object i .y i ) is the main object object i The horizontal coordinate y in the preview image i The minimum value in MAX(object i .y i +height i ) is the main object object i The horizontal coordinate y in the preview image i The height of the preview image. i The maximum value of the sum of .
[0164] The microphone sound source position ss_pos is not within the preview image, and one of the following conditions must be met:
[0165] x ss <0
[0166] x ss >width
[0167] y ss <0
[0168] y ss >height
[0169] S23344. If the microphone sound source position ss_pos is within the preview image, calculate the subject object object in the subject object list Objects. i Distance from microphone sound source position ss_pos:
[0170]
[0171] S23345. Get the subject object that is closest to the microphone sound source position ss_pos i and the nearest subject object i The distance dis from the microphone sound source position ss_pos min :
[0172] dismin =MIN(dis i )
[0173] S23346. Obtain microphone sound source azimuth distance threshold DIS_MAX;
[0174] S23347, if the nearest subject object i The distance dis from the microphone sound source position ss_pos min If it is greater than the microphone sound source direction distance threshold DIS_MAX, then:
[0175] Optionally, the obtained recommended first focus position FocusPos1 is determined as the current recommended focus position:
[0176] FocusPos1 = {x1, y1}
[0177] In the above formula, x1 is the horizontal coordinate of the first focus position FocusPos1 in the preview image, and y1 is the vertical coordinate of the first focus position FocusPos1 in the preview image.
[0178] or,
[0179] Optionally, the center position of the obtained main object list Objects is determined as the currently recommended third focus position FocusPos3, and is used as the currently recommended focus position:
[0180] FocusPos3 = {x3, y3}
[0181] in:
[0182] x3=(MIN(object i .x i )+MAX(object i .x i +width i )) / 2
[0183] y3=(MIN(object i .y i )+MAX(object i .y i +height i )) / 2
[0184] In the above formula, x3 is the horizontal coordinate of the third focus position FocusPos3 in the preview image, y3 is the vertical coordinate of the third focus position FocusPos3 in the preview image, object i .x i For the main object objecti The x coordinate in the preview image i , object i .y i For the main object object i The horizontal coordinate y in the preview image i ,MIN(object i .x i ) is the main object object i The x coordinate in the preview image i The minimum value in MAX(object i .x i +width i ) is the main object object i The x coordinate in the preview image i The width of the preview image. i The maximum value of the sum, MIN(object i .y i ) is the main object object i The horizontal coordinate y in the preview image i The minimum value in MAX(object i .y i +height i ) is the main object object i The horizontal coordinate y in the preview image i The height of the preview image. i The maximum value of the sum of .
[0185] S23348, if the nearest subject object i The distance dis from the microphone sound source position ss_pos min If the distance is less than or equal to the microphone sound source distance threshold DIS_MAX, the nearest subject object is obtained. i The center position of is determined as the currently recommended fourth focus position FocusPos4, and is used as the currently recommended focus position:
[0186] FocusPos4 = {x4, y4}
[0187] in:
[0188]
[0189] y4=center_y i
[0190] In the above formula, x4 is the horizontal coordinate of the fourth focus position FocusPos4 in the preview image, y4 is the vertical coordinate of the fourth focus position FocusPos4 in the preview image, center_x i The nearest subject object i The center point position object_center_pos i The horizontal coordinate in the preview image, center_y i The nearest subject object i The center point position object_center_pos i The vertical coordinate in the preview image.
[0191] The technical solution of the present invention is further described below with reference to two specific embodiments.
[0192] like Figure 4 As shown, an embodiment of the present invention provides a shooting method based on automatic focus and zoom, which is applied to image shooting, and the method includes:
[0193] S501, obtaining a preview image;
[0194] S502, determining a current recommended focus position according to the preview image and based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition;
[0195] S503, automatically applying the current recommended focus position in the preview image;
[0196] S504: Capture an image or video based on the current recommended focus position.
[0197] In this embodiment, by acquiring a preview image, according to the preview image, based on a preset auto focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the current recommended focus position is determined; the current recommended focus position is automatically applied in the preview; and based on the current recommended focus position, image or video shooting is performed. Thus, by determining the current recommended focus position according to the preview image based on a preset auto focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the needs of auto focus / zoom can be met, especially the needs of dynamic focus and zoom when there are multiple subject objects in the shooting scene at the same time, the intelligence of image shooting focus in multi-target scenes can be improved, the fun of image shooting can be improved, and the user experience can be improved.
[0198] like Figure 5 As shown, an embodiment of the present invention provides a shooting method based on automatic focus and zoom, which is applied to video shooting, and the method includes:
[0199] S601, obtaining a current frame of video image.
[0200] S602: Determine a current recommended focus position FocusPos according to the current frame video image and based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition. i :
[0201] FocusPos i ={x i ,y i}
[0202] S603: Based on the above preset automatic focus and zoom strategy, obtain the recommended focus position FocusPos of the previous frame i-1 :
[0203] FocusPos i-1 ={x i-1 ,y i-1}
[0204] S604, calculating the recommended focus position FocusPos of the current frame i The focus position of its previous frame FocusPos i-1 Distance between:
[0205]
[0206] S605 , obtaining a focus distance offset threshold parameter DIS_FP_MAX.
[0207] S606, dis_fp i,i-1 <DIS_FP_MAX? If yes, go to step S607; if no, go to step S608.
[0208] S607, if dis_fp i,i-1 <DIS_FP_MAX, then FocusPos i The image frame is captured as the current recommended focus position.
[0209] S608: Store the captured image frames in a video frame sequence.
[0210] S609, if dis_fp i,i-1 ≥DIS_FP_MAX, then obtain the zoom mode (the zoom mode can be selected by the user or default, such as Hitchcock mode, etc.).
[0211] S610: Read the current video image frame, and apply the acquired zoom method to perform zoom processing on the image frame.
[0212] S611: Store the zoomed image frame in a video frame sequence.
[0213] In this embodiment, by acquiring the current frame video image, according to the current frame video image, based on the preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, the current recommended focus position is determined; the distance between the current frame recommended focus position and the focus position of the previous frame is calculated, and when the distance is less than the focus distance offset threshold parameter, the image frame is captured at the current recommended focus position, and the captured image frame is stored in the video frame sequence; when the distance is greater than or equal to the focus distance offset threshold parameter, the zoom mode is acquired, the image frame is zoomed using the acquired zoom mode, and the zoomed image frame is stored in the video frame sequence. Thus, the current recommended focus position can be determined based on the preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition, which can meet the needs of automatic focus / zoom, especially meet the needs of dynamic focus zoom when multiple subject objects exist in the shooting scene at the same time, improve the intelligence of image shooting focus in multi-target scenes, improve the fun of video shooting, and improve user experience.
[0214] In addition, an embodiment of the present invention further provides a mobile terminal, such as Figure 6 As shown, the mobile terminal 900 includes: a memory 902, a processor 901, and one or more computer programs stored in the memory 902 and executable on the processor 901. The memory 902 and the processor 901 are coupled together via a bus system 903. When the one or more computer programs are executed by the processor 901, a shooting method based on automatic focus and zooming provided in an embodiment of the present invention is implemented. The method includes:
[0215] S1, obtain a preview image;
[0216] S2. Determine a current recommended focus position according to the preview image and based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition;
[0217] S3, automatically applying the current recommended focus position in the preview;
[0218] S4. Capture an image or video based on the current recommended focus position.
[0219] The method disclosed in the above embodiment of the present invention can be applied to the processor 901, or implemented by the processor 901. The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 901. The processor 901 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 901 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 902. The processor 901 reads the information in the memory 902 and completes the steps of the above method in combination with its hardware.
[0220] It can be understood that the memory 902 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory or other memory technology, a compact disk read-only memory (CD-ROM), a digital versatile disk (DVD) or other optical disk storage, a magnetic cassette, a magnetic tape, a magnetic disk storage or other magnetic storage device; the volatile memory can be a random access memory (RAM), and by way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM Memory), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0221] It should be noted that the above-mentioned mobile terminal embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the mobile terminal embodiment, which will not be repeated here.
[0222] In addition, in an exemplary embodiment, an embodiment of the present invention further provides a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 902 storing a computer program, wherein the computer storage medium stores one or more programs of a shooting method based on automatic focus and zoom, and when the one or more programs of the shooting method based on automatic focus and zoom are executed by the processor 901, a shooting method based on automatic focus and zoom provided in an embodiment of the present invention is implemented, and the method includes:
[0223] S1, obtain a preview image;
[0224] S2. Determine a current recommended focus position according to the preview image and based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition;
[0225] S3, automatically applying the current recommended focus position in the preview;
[0226] S4. Capture an image or video based on the current recommended focus position.
[0227] It should be noted that the program embodiment of a shooting method based on automatic focus and zoom on the above-mentioned computer-readable storage medium and the method embodiment belong to the same concept, and its specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the embodiment of the above-mentioned computer-readable storage medium, which will not be repeated here.
[0228] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0229] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0230] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0231] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A shooting method based on automatic focus and zoom, It is characterized in that The method comprises: Get the preview image; Determining a current recommended focus position according to the preview image based on a preset automatic focus zoom strategy including ambient light detection, object position detection and / or sound source position recognition; Automatically applying the currently recommended focus position to the subject object in the preview; Based on the current recommended focus position, capture an image or video; The determining, according to the preview image, a current recommended focus position based on a preset automatic focus and zoom strategy including ambient light detection, object position detection and / or sound source position recognition, includes: According to the preview image, determining the subject object contained in the preview image; The determining, according to the preview image, the subject object contained in the preview image includes: Detecting the main object and the main object position contained in the preview image; Remove the secondary subject object from the subject object list, retain the primary subject object, and update the subject object list; The removing of the secondary subject object in the subject object list, retaining the primary subject object, and updating the subject object list includes: Based on the comparison with the predetermined area ratio threshold, the primary secondary subject objects in the subject object list are removed; and / or, based on the center point position offset, the secondary secondary subject objects in the subject object list are removed for the second time; After the first secondary subject object and / or the second secondary subject object are removed, the remaining subject objects are retained as primary subject objects, and the subject object list is updated according to the retained primary subject objects; The preset automatic focus zoom strategy includes: Determine the auto focus / zoom mode according to the subject object in the preview image, wherein when there is no subject object, determine to use the auto focus mode based on ambient light detection; when there is only one subject object, determine to use the auto focus or zoom mode based on object position detection; when there are multiple subject objects, determine to use the auto focus or zoom mode based on sound source position recognition; When there is no main object, determining to adopt an automatic focusing method based on ambient light detection includes: When there is no subject object in the updated subject object list, obtaining a recommended first focus position according to the preview image and using an automatic focus method based on ambient light detection, and determining the recommended first focus position as a current recommended focus position; When there is only one main object, determining to use an automatic focus or zoom mode based on object position detection includes: When there is only one subject object in the updated subject object list, determine to use an automatic focus or zoom mode based on object position detection, obtain the center position of the subject object, and determine the center position of the subject object as the current recommended focus position; When there are multiple main objects, determining to use an automatic focus or zoom method based on sound source position recognition includes: When there are multiple subject objects in the updated subject object list, it is determined to adopt an automatic focus or zoom method based on sound source position recognition, and the current recommended focus position is determined in combination with the acquired sound source position.
2. The method according to claim 1, It is characterized in that The step of determining the current recommended focus position by using an automatic focus or zooming method based on the sound source position recognition and combining the acquired sound source position includes: Comparing the acquired microphone sound source strength with the microphone sound source strength threshold, if the microphone sound source strength is less than the microphone sound source strength threshold, determining the acquired recommended first focus position as the current recommended focus position, or determining the acquired center position of the subject object list as the current recommended focus position; If the microphone sound source strength is greater than or equal to the microphone sound source strength threshold, further obtain the microphone sound source orientation, and determine the position of the microphone sound source orientation in the preview image; if the microphone sound source orientation is not within the preview image, determine the obtained recommended first focus position as the current recommended focus position, or determine the obtained center position of the subject object list as the current recommended focus position; If the microphone sound source orientation is within the preview image, further obtain the distance between the subject object in the subject object list and the microphone sound source orientation, and obtain the subject object closest to the microphone sound source orientation and the distance between it and the microphone sound source orientation; if the distance between the closest subject object and the microphone sound source orientation is greater than the microphone sound source orientation distance threshold, then the obtained recommended first focus position is determined as the current recommended focus position, or the center position of the obtained subject object list is determined as the current recommended focus position; If the distance between the nearest subject object and the microphone sound source orientation is less than or equal to the microphone sound source orientation distance threshold, the center position of the nearest subject object is obtained and determined as the current recommended focus position.
3. A mobile terminal, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of a shooting method based on automatic focus and zoom as claimed in claim 1 or 2.
4. A storage medium, It is characterized in that The storage medium stores a program for a shooting method based on automatic focus and zoom. When the program for a shooting method based on automatic focus and zoom is executed by a processor, the steps of a shooting method based on automatic focus and zoom as described in claim 1 or 2 are implemented.
Citation Information
Patent Citations
Image processing method, mobile terminal, and computer storage medium
CN107295262A
