CN114143450B - Mobile terminal focusing processing method and device, mobile terminal and storage medium - Google Patents
Mobile terminal focusing processing method and device, mobile terminal and storage medium Download PDFInfo
- Publication number
- CN114143450B CN114143450B CN202111375580.9A CN202111375580A CN114143450B CN 114143450 B CN114143450 B CN 114143450B CN 202111375580 A CN202111375580 A CN 202111375580A CN 114143450 B CN114143450 B CN 114143450B
- Authority
- CN
- China
- Prior art keywords
- tracking target
- focus tracking
- focus
- focusing
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 67
- 230000008569 process Effects 0.000 claims abstract description 48
- 238000001514 detection method Methods 0.000 claims description 13
- 230000006870 function Effects 0.000 claims description 7
- 238000012545 processing Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 13
- 238000004590 computer program Methods 0.000 description 4
- 230000006872 improvement Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/0202—Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
- H04M1/026—Details of the structure or mounting of specific components
- H04M1/0264—Details of the structure or mounting of specific components for a camera module assembly
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Studio Devices (AREA)
Abstract
The invention discloses a focusing processing method and device of a mobile terminal, the mobile terminal and a storage medium, wherein the method comprises the following steps: when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target; when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm; and when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored. The technical problems that in the prior art, poor focusing can occur when a target is temporarily shielded in an automatic focus tracking process of a mobile terminal, so that the target is lost in the focus tracking process, poor experience is caused, and the use of a user is inconvenient are solved. The main focusing effect can not be affected if the target is temporarily lost/shielded in the focusing process, and convenience is provided for the use of a user.
Description
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a method and apparatus for focusing a mobile terminal, and a storage medium.
Background
With the development of technology and the continuous improvement of living standard of people, various mobile terminals such as mobile phones are becoming more and more popular, and mobile phones have become an indispensable communication tool in people's life.
In the prior art, in order to acquire a clearer picture when a mobile object is shot by a mobile terminal such as a mobile phone, a plurality of mobile phone factories and businesses add a click focus tracking function in a camera. But in the process of tracking focus, if the target is lost (possibly only temporarily blocked), it will revert to auto-focus. The motor stretches back and forth in the process, if the tracking target is a near view and the focus is at a far view after automatic focusing is restored, the short-time focusing effect is poor because the near view is blurring and cannot be tracked again, namely, poor focusing can occur when the target is temporarily shielded in the automatic focusing process of the mobile terminal in the prior art, poor experience is caused when the target is lost in the focusing process, and the use of a user is inconvenient.
Accordingly, there is a need for improvement and advancement in the art.
Disclosure of Invention
The invention aims to solve the technical problems that in the prior art, poor focusing occurs when a target is temporarily shielded in an automatic focus tracking process of the mobile terminal, so that the target is lost in the focus tracking process, poor experience is caused, and the use of a user is inconvenient. The main focusing effect can not be affected if the target is temporarily lost/shielded in the focusing process, and convenience is provided for the use of a user.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a mobile terminal focus processing method, wherein the method comprises:
detecting a focus tracking target needing to be focused;
when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target;
detecting whether the focus tracking target is lost or not in the continuous focus tracking process;
when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm;
and when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored.
The mobile terminal focusing processing method, wherein the step of detecting and acquiring the focus tracking target to be focused comprises the following steps:
and detecting that the camera function is started, and detecting a focus tracking target which needs to be focused in real time on a preview interface.
According to the mobile terminal focusing processing method, when a focus tracking target needing to be focused is detected, a focusing instruction is started, and the step of continuously tracking the focus tracking target comprises the following steps:
detecting whether an operation instruction for clicking a focus tracking target exists on a preview interface;
when an operation instruction for clicking the focus tracking target is detected on the preview interface, confirming that the focus tracking target needing to be focused is detected;
and starting a focusing instruction based on the detection of a focus tracking target needing focusing, and continuously tracking the focus tracking target.
The mobile terminal focusing processing method, wherein the step of detecting whether the focus tracking target is lost or not in the continuous focus tracking process comprises the following steps:
judging whether the focus tracking target is lost from a preview picture or not in the continuous focus tracking process;
when the focus tracking target is not lost from the preview picture, continuing to track focus;
and when the focus tracking target is lost from the preview picture, judging whether the loss time of the focus tracking target exceeds a preset time.
According to the mobile terminal focusing processing method, when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is smaller than or equal to a preset time, the focusing distance is controlled to be unchanged, and the focus tracking target is continuously retrieved through an object tracking algorithm, the method comprises the following steps:
when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is smaller than or equal to the preset time, the position of the camera motor and the focusing distance are controlled to be unchanged temporarily, and the focus tracking target is continuously retrieved through an object tracking algorithm.
The step of continuously retrieving the focus-tracking target through the object tracking algorithm further comprises the following steps of:
judging whether the focus tracking target is retrieved;
when the focus tracking target is found back, controlling the focus tracking target to continuously track focus;
and when the focus tracking target is not retrieved, judging whether the loss time of the focus tracking target exceeds a preset time.
According to the mobile terminal focusing processing method, when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is smaller than or equal to a preset time, the focusing distance is controlled to be unchanged, and the focus tracking target is continuously retrieved through an object tracking algorithm, the method comprises the following steps:
when the temporary shielding of the focus-tracking target is detected, and the temporary shielding time is less than or equal to the preset time, controlling the camera motor to be protected so as to keep the focusing distance unchanged, and continuously retrieving the focus-tracking target through an object tracking algorithm.
A mobile terminal focus processing apparatus, wherein the apparatus comprises:
the focus tracking target detection module is used for detecting a focus tracking target needing to be focused;
the continuous focus tracking module is used for starting a focusing instruction when a focus tracking target needing to be focused is detected, and carrying out continuous focus tracking on the focus tracking target;
the target detection module is used for detecting whether the focus tracking target is lost or not in the continuous focus tracking process;
the detection control module is used for controlling the focusing distance to be unchanged when the focus tracking target is detected to be lost and the loss time of the focus tracking target is smaller than or equal to the preset time, and continuously finding the focus tracking target through an object tracking algorithm;
and the overtime control module is used for recovering automatic focusing when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time.
The mobile terminal comprises a memory, a processor and a mobile terminal focusing processing program which is stored in the memory and can run on the processor, wherein the processor realizes the steps of any one of the mobile terminal focusing processing methods when executing the mobile terminal focusing processing program.
A computer readable storage medium, wherein a mobile terminal focusing processing program is stored on the computer readable storage medium, and when the mobile terminal focusing processing program is executed by a processor, the steps of any one of the mobile terminal focusing processing methods are implemented.
The beneficial effects are that: compared with the prior art, the invention provides a focusing processing method and device for a mobile terminal, the mobile terminal and a storage medium. The method and the device can keep the focusing point unchanged if the target is lost temporarily in the automatic focus tracking process, are convenient for an object tracking algorithm to find the focus tracking target at any time, are particularly suitable for complex scenes such as crowd and the like, and provide convenience for users. In the automatic focus tracking process of the mobile terminal, when a target is temporarily shielded, the mobile terminal can control the motor to keep motionless, and the focusing distance is not changed; the focusing of the focus tracking target is not influenced, the main focusing effect is not influenced, and convenience is provided for the use of users.
Drawings
Fig. 1 is a schematic diagram of a focusing effect of a mobile terminal in the prior art.
Fig. 2 is a flowchart of a specific implementation of the focusing processing method of the mobile terminal provided in embodiment 1 of the present invention.
Fig. 3 is a schematic diagram of a preview interface of a focusing processing method of a mobile terminal according to an embodiment of the present invention.
Fig. 4 is a flowchart of a specific implementation of the focusing processing method of the mobile terminal provided in embodiment 2 of the present invention.
Fig. 5 is a schematic block diagram of a focusing processing device of a mobile terminal according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of an internal structure of a mobile terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and more specific, the present invention will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear … …) are included in the embodiments of the present invention, the directional indications are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
With the development of technology and the continuous improvement of living standard of people, various mobile terminals such as mobile phones are becoming more and more popular, and mobile phones have become an indispensable communication tool in people's life.
In the prior art, in order to acquire a clearer picture when a mobile object is shot by a mobile terminal such as a mobile phone, a plurality of mobile phone factories and businesses add a click focus tracking function in a camera. But in the process of tracking focus, if the target is lost (possibly only temporarily blocked), it will revert to auto-focus. The motor stretches back and forth in the process, if the tracking target is a near view and the focus is at a far view after automatic focusing is restored, the short-time focusing effect is poor because the near view is blurring and cannot be tracked again, namely, poor focusing can occur when the target is temporarily shielded in the automatic focusing process of the mobile terminal in the prior art, poor experience is caused when the target is lost in the focusing process, and the use of a user is inconvenient.
Fig. 1 is a schematic diagram of a mobile terminal in the prior art during a camera shooting process. As shown in fig. 1, when a dog in a computer video is shot by a mobile terminal in the prior art, a focus is caught on the dog, as shown in the left diagram of fig. 1, when a shielding object appears, a target object dog is temporarily shielded by a pen holder, the middle diagram of fig. 1 loses a tracking target due to the existence of the shielding object, the middle diagram of fig. 1 is changed into that the shooting of the pen holder focusing dog is unclear, automatic focusing is restored, and when the camera is restored to automatic focusing, if the position of the focus-catching target exceeds the depth of field range after automatic focusing, the object tracking algorithm cannot be recognized again due to blurring; if the target position can be identified again, the user can obviously perceive the motor movement and focusing action because of focusing back and forth change, so that the process of' clear- & gt fuzzy- & gt clear- & gt is performed, and the technical problem of poor experience is brought.
The depth of field refers to the distance range of clear images presented in the range before and after the focus is finished; whereas blurring: objects beyond the depth of field exhibit unclear states.
In order to solve the above problems, an embodiment of the present invention provides a focusing processing method for a mobile terminal, which adopts a method for detecting a focus tracking target to be focused; when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target; detecting whether the focus tracking target is lost or not in the continuous focus tracking process; when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm; and when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored. According to the invention, when the tracking target is temporarily shielded, the motor is kept still, the focusing distance is not changed, the experience is better, convenience is provided for the use of a user, and the user experience is improved.
Exemplary method
First embodiment
As shown in fig. 2, an embodiment of the present invention provides a mobile terminal focusing processing method, which can be used in mobile devices such as a mobile phone and a tablet computer. The method in the embodiment of the invention comprises the following steps:
step S100, detecting a focus tracking target needing to be focused;
in the embodiment of the invention, in order to acquire a clearer picture when a moving object is shot, a click focus-tracking function is added in a camera, and if a target is lost (possibly only temporarily shielded) in the focus-tracking process, automatic focusing is suspended, a motor is controlled to be kept motionless, and the focusing distance is kept unchanged.
When the mobile terminal is operated by a user, for example, the mobile phone is operated to start a camera, the mobile terminal can detect that the camera function is started and display a preview interface on a shooting picture. I.e. detecting whether a user operates to click on a focus tracking target which needs to be focused.
In the embodiment of the invention, the focus tracking finger is as follows: the focusing point of the camera always follows the shot object, and the camera focuses in real time along with the movement of the object in the picture.
Step 200, when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus of the focus tracking target;
when the step is specifically implemented, detecting whether an operation instruction for clicking a focus tracking target exists on a preview interface of a camera, namely detecting whether a user clicks on which object clicks the focus tracking target on the preview interface; the click focus tracking in the embodiment of the invention is to click a certain object in a picture, continuously identify the object by using an object tracking algorithm, and perform focus tracking on the object.
In the invention, when an operation instruction for clicking a focus tracking target is detected on a preview interface, the focus tracking target which needs to be focused is confirmed to be detected; and starting a focusing instruction based on the detection of a focus tracking target needing focusing, and continuously tracking the focus tracking target.
In other words, in the embodiment of the present invention, when it is detected that a certain object is clicked in the screen, the object is continuously identified by using the object tracking algorithm, and focus tracking is performed on the object, so that the focusing point of the camera always follows the photographed object, and focusing is performed in real time along with the movement of the object in the screen, so that focusing is performed on the object that is clicked by the user, and step S300 is performed.
Step S300, detecting whether a loss condition occurs to the focus tracking target in the continuous focus tracking process;
in the embodiment of the invention, whether the focus tracking target is lost or not is detected in the continuous focus tracking process. Namely, the invention detects whether the focus tracking target is lost or temporarily blocked when the focus tracking is continued.
In the specific implementation, judging whether the focus tracking target is lost from a preview picture (including whether the focus tracking target is temporarily blocked or not) in the continuous focus tracking process; when the focus tracking target is not lost from the preview picture, continuing to track focus;
in the embodiment of the present invention, when the focus tracking target is lost from the preview image, in the embodiment of the present invention, the loss is that the focus tracking target is lost from the image (may be only temporarily blocked, or partially blocked, as shown in fig. 3), then it is determined whether the loss time of the focus tracking target exceeds a predetermined time, for example, as shown in fig. 3, it is determined whether the dog of the focus tracking target is blocked for more than 3 seconds, so as to determine whether the loss of the focus tracking target is blocked by a temporary blocking object or is temporarily moved out of the image.
Step S400, when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to a preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm;
in the embodiment of the invention, when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to the preset time, the focusing distance is controlled to be unchanged, and the focus tracking target is continuously retrieved through an object tracking algorithm. For example, as shown in the middle diagram of fig. 3, when the dog of the focus tracking target is blocked and lost in the preview screen, and the blocked and lost time of the focus tracking target is less than or equal to a predetermined time (3 seconds), the focusing distance is controlled to remain unchanged in the embodiment of the present invention, so that the focus tracking target is not blurred, and the focus tracking target is continuously retrieved through an object tracking algorithm.
As shown in the middle diagram of fig. 3, when the loss of the focus tracking target (dog in the middle of fig. 3) is detected and the focus tracking target loss time is equal to or less than a predetermined time (for example, 3 seconds), the control temporarily keeps the camera motor position for focusing and the focusing distance unchanged and continuously retrieves the focus tracking target through an object tracking algorithm. In other words, in the embodiment of the invention, when a focus tracking process is performed on the focus tracking target, a shielding object temporarily shields the focus tracking target, or the focus tracking target temporarily moves a picture, the temporary time is not longer than 3 seconds, the invention can not refocus again, and the position and the focusing distance of a camera motor for focusing are controlled to be unchanged temporarily, as described in the middle of fig. 3, so that a focusing object can not be blurred even if the focusing object is temporarily shielded or lost in the focusing process, the invention can keep the picture of a main focusing object clear in the focusing process, and provides convenience for users.
Specifically, when the temporary shielding of the focus tracking target is detected, and the temporary shielding time is less than or equal to a preset time (3 seconds), the camera motor is controlled to be kept stationary, so that the focusing distance is kept unchanged, the focus tracking target is continuously retrieved through an object tracking algorithm, and the clicked focus tracking target can continuously keep a clear picture.
In the embodiment of the invention, the step of continuously retrieving the focus-tracking target through the object tracking algorithm further comprises the following steps: judging whether the focus tracking target is retrieved; when the focus tracking target is found back, controlling the focus tracking target to continuously track focus; and when the focus tracking target is not retrieved, judging whether the loss time of the focus tracking target exceeds a preset time, continuously executing the step S400 when the loss time does not exceed the preset time until the step S500 is overtime, and directly executing the step S500 when the loss time exceeds the preset time.
And S500, when the focus tracking target is detected to be lost, and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored.
In the embodiment of the invention, if the focus tracking target is lost, for example, more than 3 seconds, the user is considered to give up the focus tracking target of the current clicking operation, and the automatic focusing is controlled to be restored again, so that convenience is provided for the user.
The following describes the present invention in further detail through a specific application embodiment, as shown in fig. 4, a mobile terminal focusing processing method of the specific application embodiment of the present invention includes the following steps:
step S10, starting and entering step S11;
s11, clicking an object, and identifying a focus tracking target; and proceeds to step S12;
step S12, continuously tracking focus, wherein the clicked tracking focus target is continuously tracked;
step S13, judging whether the object is lost, namely judging whether the focus tracking target is lost or blocked, if yes, entering step S14, and if not, returning to step S12;
step S14, judging whether n seconds are exceeded, namely judging whether the focus tracking target is lost for more than n seconds (for example, 3 seconds), if yes, entering step S17, and if not, entering step S15;
and step S15, keeping the focusing point unchanged, continuously identifying the picture by the object tracking algorithm, and proceeding to step S16.
Namely, in the invention, when the focus tracking target is detected to be lost or blocked for more than a preset time, for example, 3 seconds, the motor is controlled to be kept still, the focusing distance is not changed, and the focus tracking target is kept clear.
Step S16, judging whether the focus tracking target object is retrieved, if yes, proceeding to step S12, otherwise proceeding to step S14
Step S17, automatic focusing is restored
Step S18, ending.
As shown in fig. 3, according to the embodiment of the method of the present invention, when a shielding object appears in front of a selected focus tracking target, that is, when the tracking target is temporarily shielded, the motor is controlled to remain motionless, and the focusing distance is not changed; the focusing of the focus-following target is not influenced, the process of 'clear-clear (after shielding by the focus-following target is clear) →continue clear' is experienced, and convenience is provided for the use of users.
Exemplary apparatus
As shown in fig. 5, an embodiment of the present invention provides a focusing processing device for a mobile terminal, including:
a focus tracking target detection module 610, configured to detect a focus tracking target that needs to be focused;
a continuous focus tracking module 620, configured to, when a focus tracking target that needs to be focused is detected, start a focusing instruction, and perform continuous focus tracking on the focus tracking target;
the target detection module 630 is configured to detect whether a loss situation occurs in the focus tracking target in the continuous focus tracking process;
the detection control module 640 is configured to, when it is detected that the focus tracking target is lost, and the loss time of the focus tracking target is less than or equal to a predetermined time, control the focusing distance to remain unchanged, and continuously find the focus tracking target through an object tracking algorithm;
and a timeout control module 650, configured to restore autofocus when the loss of the focus tracking target is detected and the loss time of the focus tracking target exceeds a predetermined time, as described above.
Based on the above embodiment, the present invention also provides a mobile terminal, and a functional block diagram thereof may be shown in fig. 6. The mobile terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein the processor of the mobile terminal is configured to provide computing and control capabilities. The memory of the mobile terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the mobile terminal is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a mobile terminal focusing process. The display screen of the mobile terminal may be a liquid crystal display screen or an electronic ink display screen.
It will be appreciated by those skilled in the art that the schematic block diagram of fig. 6 is merely a block diagram of a portion of the structure associated with the present invention and is not intended to limit the mobile terminal to which the present invention is applied, and that a particular mobile terminal may include more or fewer components than those shown, or may combine certain components or have a different arrangement of components.
In one embodiment, a mobile terminal is provided, the mobile terminal including a memory, a processor, and a mobile terminal focus processing program stored on the processor and executable on the processor, the process performing the steps of:
detecting a focus tracking target needing to be focused;
when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target;
detecting whether the focus tracking target is lost or not in the continuous focus tracking process;
when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm;
and when the loss of the focus tracking target is detected, and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored, and the method is particularly described above.
The step of detecting and acquiring the focus tracking target to be focused comprises the following steps:
and detecting that the camera function is started, and detecting a focus tracking target which needs to be focused in real time on a preview interface.
When a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target, wherein the step of continuously tracking the focus comprises the following steps:
detecting whether an operation instruction for clicking a focus tracking target exists on a preview interface;
when an operation instruction for clicking the focus tracking target is detected on the preview interface, confirming that the focus tracking target needing to be focused is detected;
and starting a focusing instruction based on the detection of the focus tracking target needing focusing, and continuously tracking the focus tracking target, wherein the specific steps are as described above.
Wherein, when in the continuous focus tracking process, the step of detecting whether the focus tracking target has a loss condition comprises the following steps:
judging whether the focus tracking target is lost from a preview picture or not in the continuous focus tracking process;
when the focus tracking target is not lost from the preview picture, continuing to track focus;
when the focus tracking target is lost from the preview picture, judging whether the focus tracking target loss time exceeds a preset time or not, and particularly judging that the focus tracking target loss time exceeds the preset time.
When the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to a preset time, the step of controlling the focusing distance to keep unchanged and continuously finding the focus tracking target through an object tracking algorithm comprises the following steps:
when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is smaller than or equal to the preset time, the position of the camera motor and the focusing distance are controlled to be unchanged temporarily, and the focus tracking target is continuously retrieved through an object tracking algorithm.
Wherein, the step of continuously retrieving the focus-tracking target through the object tracking algorithm further comprises the following steps:
judging whether the focus tracking target is retrieved;
when the focus tracking target is found back, controlling the focus tracking target to continuously track focus;
and when the focus tracking target is not retrieved, judging whether the loss time of the focus tracking target exceeds a preset time or not, wherein the specific steps are as described above.
When the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to a preset time, the step of controlling the focusing distance to keep unchanged and continuously finding the focus tracking target through an object tracking algorithm comprises the following steps:
when the temporary shielding of the focus-tracking target is detected, and the temporary shielding time is less than or equal to the preset time, controlling the camera motor to be protected so as to keep the focusing distance unchanged, and continuously retrieving the focus-tracking target through an object tracking algorithm, wherein the specific steps are as described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
In summary, the invention discloses a mobile terminal focusing processing method, a device, a mobile terminal and a storage medium, wherein the method comprises the following steps: when a focus tracking target needing to be focused is detected, starting a focusing instruction, and continuously tracking the focus tracking target; when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm; and when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored. The technical problems that in the prior art, poor focusing can occur when a target is temporarily shielded in an automatic focus tracking process of a mobile terminal, so that the target is lost in the focus tracking process, poor experience is caused, and the use of a user is inconvenient are solved. The main focusing effect can not be affected if the target is temporarily lost/shielded in the focusing process, and convenience is provided for the use of a user.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (7)
1. A method for focusing a mobile terminal, the method comprising:
detecting a focus tracking target needing to be focused;
when a focus-following target needing to be focused is detected, starting a focusing instruction, and continuously focusing the focus-following target, so that a camera focuses in real time along with the movement of the focus-following target in a picture;
detecting whether the focus tracking target is lost or not in the continuous focus tracking process;
the step of detecting whether the focus tracking target is lost or not in the continuous focus tracking process comprises the following steps:
judging whether the focus tracking target is lost from a preview picture or not in the continuous focus tracking process;
when the focus tracking target is not lost from the preview picture, continuing to track focus;
when the focus tracking target is lost from the preview picture, judging whether the loss time of the focus tracking target exceeds a preset time; the loss of the focus tracking target from the preview picture comprises the temporary shielding of the focus tracking target;
when the focus tracking target is detected to be lost, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to remain unchanged, and continuously finding the focus tracking target through an object tracking algorithm;
when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to the preset time, the step of controlling the focusing distance to keep unchanged and continuously finding the focus tracking target through an object tracking algorithm comprises the following steps:
when the fact that the focus tracking target is temporarily lost in the focusing process is detected, and the loss time of the focus tracking target is smaller than or equal to the preset time, the position of a camera motor and the focusing distance are controlled to be unchanged temporarily, and the focus tracking target is continuously retrieved through an object tracking algorithm;
and when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time, the automatic focusing is restored.
2. The method for focusing a mobile terminal according to claim 1, wherein the step of detecting and acquiring a focus tracking target to be focused comprises:
and detecting that the camera function is started, and detecting a focus tracking target which needs to be focused in real time on a preview interface.
3. The method for focusing a mobile terminal according to claim 1, wherein when a focus tracking target requiring focusing is detected, starting a focusing instruction, and continuously tracking the focus tracking target comprises:
detecting whether an operation instruction for clicking a focus tracking target exists on a preview interface;
when an operation instruction for clicking the focus tracking target is detected on the preview interface, confirming that the focus tracking target needing to be focused is detected;
and starting a focusing instruction based on the detection of a focus tracking target needing focusing, and continuously tracking the focus tracking target.
4. The method for focusing a mobile terminal according to claim 1, wherein the step of continuously retrieving the focus-recovered target by the object tracking algorithm further comprises:
judging whether the focus tracking target is retrieved;
when the focus tracking target is found back, controlling the focus tracking target to continuously track focus;
and when the focus tracking target is not retrieved, judging whether the loss time of the focus tracking target exceeds a preset time.
5. A mobile terminal focus processing apparatus, the apparatus comprising:
the focus tracking target detection module is used for detecting a focus tracking target needing to be focused;
the continuous focus tracking module is used for starting a focusing instruction when a focus tracking target needing to be focused is detected, and continuously tracking the focus tracking target, so that a camera focuses in real time along with the movement of the focus tracking target in a picture;
the target detection module is used for detecting whether the focus tracking target is lost or not in the continuous focus tracking process;
when the focus tracking target is in the continuous focus tracking process, detecting whether the focus tracking target is lost comprises:
judging whether the focus tracking target is lost from a preview picture or not in the continuous focus tracking process;
when the focus tracking target is not lost from the preview picture, continuing to track focus;
when the focus tracking target is lost from the preview picture, judging whether the loss time of the focus tracking target exceeds a preset time; the loss of the focus tracking target from the preview picture comprises the temporary shielding of the focus tracking target;
the detection control module is used for controlling the focusing distance to be unchanged when the focus tracking target is detected to be lost and the loss time of the focus tracking target is smaller than or equal to the preset time, and continuously finding the focus tracking target through an object tracking algorithm;
when the loss of the focus tracking target is detected, and the loss time of the focus tracking target is less than or equal to the preset time, controlling the focusing distance to keep unchanged, and continuously finding the focus tracking target through an object tracking algorithm comprises:
when the fact that the focus tracking target is temporarily lost in the focusing process is detected, and the loss time of the focus tracking target is smaller than or equal to the preset time, the position of a camera motor and the focusing distance are controlled to be unchanged temporarily, and the focus tracking target is continuously retrieved through an object tracking algorithm;
and the overtime control module is used for recovering automatic focusing when the focus tracking target is detected to be lost and the loss time of the focus tracking target exceeds the preset time.
6. A mobile terminal, characterized in that the mobile terminal comprises a memory, a processor and a mobile terminal focusing processing program stored in the memory and operable on the processor, the processor implementing the steps of the mobile terminal focusing processing method according to any one of claims 1-4 when executing the mobile terminal focusing processing program.
7. A computer readable storage medium, wherein a mobile terminal focusing processing program is stored on the computer readable storage medium, and when the mobile terminal focusing processing program is executed by a processor, the steps of the mobile terminal focusing processing method according to any one of claims 1 to 4 are implemented.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111375580.9A CN114143450B (en) | 2021-11-19 | 2021-11-19 | Mobile terminal focusing processing method and device, mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111375580.9A CN114143450B (en) | 2021-11-19 | 2021-11-19 | Mobile terminal focusing processing method and device, mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114143450A CN114143450A (en) | 2022-03-04 |
CN114143450B true CN114143450B (en) | 2024-04-12 |
Family
ID=80390332
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111375580.9A Active CN114143450B (en) | 2021-11-19 | 2021-11-19 | Mobile terminal focusing processing method and device, mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114143450B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086599A (en) * | 2006-06-09 | 2007-12-12 | 索尼株式会社 | Imaging apparatus, imaging apparatus control method, and computer program |
CN103997598A (en) * | 2013-02-14 | 2014-08-20 | 三星电子株式会社 | Method of tracking object using camera and camera system for object tracking |
CN104954695A (en) * | 2015-07-14 | 2015-09-30 | 厦门美图之家科技有限公司 | Focusing locking method and system for video shooting |
CN104994297A (en) * | 2015-07-09 | 2015-10-21 | 厦门美图之家科技有限公司 | Focusing and metering locking method and system for panoramic shooting |
CN105007426A (en) * | 2015-07-27 | 2015-10-28 | 厦门美图之家科技有限公司 | Focusing method and focusing system based on face recognition |
CN112291480A (en) * | 2020-12-03 | 2021-01-29 | 维沃移动通信有限公司 | Tracking focusing method, tracking focusing device, electronic device and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4874669B2 (en) * | 2006-02-22 | 2012-02-15 | Hoya株式会社 | Autofocus unit and digital camera |
CN116418975A (en) * | 2022-01-04 | 2023-07-11 | 北京小米移动软件有限公司 | Occlusion detection method, device and medium for camera group |
-
2021
- 2021-11-19 CN CN202111375580.9A patent/CN114143450B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086599A (en) * | 2006-06-09 | 2007-12-12 | 索尼株式会社 | Imaging apparatus, imaging apparatus control method, and computer program |
CN103997598A (en) * | 2013-02-14 | 2014-08-20 | 三星电子株式会社 | Method of tracking object using camera and camera system for object tracking |
CN104994297A (en) * | 2015-07-09 | 2015-10-21 | 厦门美图之家科技有限公司 | Focusing and metering locking method and system for panoramic shooting |
CN104954695A (en) * | 2015-07-14 | 2015-09-30 | 厦门美图之家科技有限公司 | Focusing locking method and system for video shooting |
CN105007426A (en) * | 2015-07-27 | 2015-10-28 | 厦门美图之家科技有限公司 | Focusing method and focusing system based on face recognition |
CN112291480A (en) * | 2020-12-03 | 2021-01-29 | 维沃移动通信有限公司 | Tracking focusing method, tracking focusing device, electronic device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114143450A (en) | 2022-03-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109167931B (en) | Image processing method, device, storage medium and mobile terminal | |
AU2018203279A1 (en) | Enhanced image capture | |
EP2752816A1 (en) | Method for processing an image and an electronic device thereof | |
CN105549814B (en) | Photographing method based on mobile terminal and mobile terminal | |
EP2426911A1 (en) | Image processing methods and systems for handheld devices | |
CN111970437B (en) | Text shooting method, wearable device and storage medium | |
CN107003730B (en) | Electronic equipment, photographing method and photographing device | |
CN114143450B (en) | Mobile terminal focusing processing method and device, mobile terminal and storage medium | |
CN110933314B (en) | Focus-following shooting method and related product | |
CN109547678B (en) | Processing method, device, equipment and readable storage medium | |
CN112015316A (en) | Panoramic picture display and adjustment method, system, equipment and storage medium | |
CN113315903B (en) | Image acquisition method and device, electronic equipment and storage medium | |
CN114666490B (en) | Focusing method, focusing device, electronic equipment and storage medium | |
CN112672058B (en) | Shooting method and device | |
CN107197155B (en) | Method and system for focusing after photographing, mobile terminal and storage device | |
EP3905660A1 (en) | Method and device for shooting image, and storage medium | |
CN112764599B (en) | Data processing method, device and medium | |
CN111970435A (en) | Method and device for macro photography | |
CN112528107A (en) | Content data display method and device and server | |
CN107783704B (en) | Picture effect adjusting method and device and terminal | |
CN112911148B (en) | Image processing method and device and electronic equipment | |
CN114339015B (en) | Photographing processing method, photographing processing device and storage medium | |
CN115118950B (en) | Image processing method and device | |
CN112199250B (en) | Picture monitoring method and device, electronic equipment and storage medium | |
CN111414245B (en) | Method, device and medium for controlling flash memory read-write rate |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |