CN111405181B - Focusing method and electronic equipment - Google Patents

Focusing method and electronic equipment Download PDF

Info

Publication number
CN111405181B
CN111405181B CN202010220351.9A CN202010220351A CN111405181B CN 111405181 B CN111405181 B CN 111405181B CN 202010220351 A CN202010220351 A CN 202010220351A CN 111405181 B CN111405181 B CN 111405181B
Authority
CN
China
Prior art keywords
shape
size information
camera
focal length
reference object
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
Application number
CN202010220351.9A
Other languages
Chinese (zh)
Other versions
CN111405181A (en
Inventor
周恩高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Shenzhen Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010220351.9A priority Critical patent/CN111405181B/en
Publication of CN111405181A publication Critical patent/CN111405181A/en
Priority to PCT/CN2021/081458 priority patent/WO2021190390A1/en
Application granted granted Critical
Publication of CN111405181B publication Critical patent/CN111405181B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/671Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the invention discloses a focusing method and electronic equipment, wherein the focusing method comprises the following steps: acquiring an image of a reference object, wherein the reference object is positioned between a camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera; acquiring first size information between a camera and a reference object and second size information of an area surrounded by a first shape in an image; and adjusting the focal length of the camera according to the first size information and the second size information. The embodiment of the invention can realize flexible operation of the whole focusing process and is convenient for user operation.

Description

Focusing method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of photographing, in particular to a focusing method and electronic equipment.
Background
With the development of electronic devices, more and more applications are available for taking pictures by using electronic devices, and electronic devices with cameras have become a main tool for taking pictures.
At present, when an electronic device takes a picture, a user needs to manually zoom in or zoom out or the like to operate a screen of the electronic device so as to realize focusing on the electronic device; because the screen of the electronic equipment has certain response sensitivity, the user can only adjust for many times in the focusing process, namely after each focusing, the user can only check the image displayed on the preview interface through the screen, if the image displayed on the preview interface meets the requirements of the user, the focusing can be stopped, the whole focusing process is inflexible and relatively complicated, especially for the electronic equipment with a smaller screen, the operation of manual focusing is limited due to the smaller screen, so that the whole focusing process is inflexible and more complicated, and the user experience is reduced.
Disclosure of Invention
The embodiment of the invention provides an image shooting method and electronic equipment, and aims to solve the problems that a focusing process is inflexible and operation is complex in the prior art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention further provides a method for focusing, which is applied to an electronic device, where the electronic device includes a camera, and the method for focusing includes:
acquiring an image of a reference object, wherein the reference object is positioned between a camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera;
acquiring first size information between a camera and a reference object and second size information of an area surrounded by a first shape in an image;
and adjusting the focal length of the camera according to the first size information and the second size information.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a camera, and the electronic device further includes:
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring an image of a reference object, the reference object is positioned between a camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera;
the acquisition module is further used for acquiring first size information between the camera and the reference object and second size information of an area surrounded by the first shape in the image;
and the adjusting module is used for adjusting the focal length of the camera according to the first size information and the second size information.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the computer program implements the method according to the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method of the first aspect.
In the embodiment of the invention, the focal length of the camera is adjusted by referring to the first size information between the object and the camera and the second size information of the area surrounded by the first shape in the image of the reference object, and the focal length of the electronic equipment can be adjusted without manually amplifying or reducing the screen of the electronic equipment for many times.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a flowchart of a method for focusing according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a focusing method according to an embodiment of the present invention;
FIG. 3 is a schematic view of another focusing method provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram of a reference object provided in accordance with an embodiment of the present invention;
fig. 5 is a flowchart of a method for triggering shooting according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention;
fig. 7 is a schematic diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the embodiment of the present invention, the electronic device may include various smartphones, smartwatches, smartglasses, and the like having a wireless communication function.
Fig. 1 is a flowchart of a method for focusing according to an embodiment of the present invention. As shown in fig. 1, the method for focusing is applied to an electronic device, and the method for focusing includes:
step 101: acquiring an image of a reference object, wherein the reference object is positioned between a camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera;
step 102: acquiring first size information between a camera and a reference object and second size information of an area surrounded by a first shape in an image;
step 103: and adjusting the focal length of the camera according to the first size information and the second size information.
In the embodiment of the invention, the focal length of the camera is adjusted by referring to the first size information between the object and the camera and the second size information of the area surrounded by the first shape in the image of the reference object, and the focal length of the electronic equipment can be adjusted without manually amplifying or reducing the screen of the electronic equipment for many times.
In some embodiments of the present invention, the reference object in step 101 is located between the camera and the object to be photographed, and the reference object has a first shape, where the first shape is used to determine a target object to be photographed in the object to be photographed, that is, to determine a photographing range of the object to be photographed; wherein, the object to be shot is the shot object.
Correspondingly, in this example, the reference object may be a preset shaped object, e.g. a preset shaped gesture, a preset shaped sheet of paper, a preset shaped component. For convenience of description, the gesture of the preset shape is taken as an example.
In fig. 2, the non-zoom image includes a plurality of objects to be photographed, and a reference object is located between the non-zoom image and the camera, where a target object to be photographed in the objects to be photographed is located in the virtual area. In fig. 2, only gestures of a preset shape are taken as an example.
It should be noted that the preset shape is used to determine the photographing range of the subject to be photographed, and therefore, the preset shape is formed by a shape approaching to a closed gesture as much as possible, such as the gesture in fig. 2.
In some embodiments of the present invention, the adjusting the focal length of the camera according to the first size information and the second size information in step 103 includes:
adjusting the focal length of the electronic equipment through first size information between the camera and the reference object and second size information of an area surrounded by the reference object 201, so that the shooting range of the camera is 302 after focusing; here, the photographing range before focus adjustment is 301, as shown in fig. 3.
In addition, when the second size information of the region surrounded by the reference object 201 is determined, the purpose of adjusting the photographing range can be achieved by adjusting the first size information between the reference object 201 and the camera 101; in addition, the adjustment of the second size information of the region surrounded by the reference object 201 and the first size information between the reference object 201 and the camera 101 can also serve the purpose of adjusting the photographing range.
In some embodiments of the present invention, after adjusting the focal length of the camera, the method of focusing further includes:
and shooting the object to be shot passing through the first shape by the camera according to the adjusted first focal length.
Correspondingly, in this example, according to the adjusted first focal length, shooting the target object to be shot passing through the first shape by the camera includes:
triggering to shoot the target to-be-shot object in the first shape through a key on the touch electronic equipment; the key is a touch area used for shooting images on the electronic equipment or a key used for shooting images on the electronic equipment;
alternatively, the first and second electrodes may be,
and when the first shape is changed into the second shape, shooting the target object to be shot which penetrates through the second shape through the camera according to the adjusted second focal length.
In fig. 2, according to the adjusted focal length, a target object to be photographed in the virtual area is triggered and photographed through a key or a touch area on the touch electronic device.
In some embodiments of the present invention, before shooting, by the camera, the target object to be shot which passes through the first shape according to the adjusted first focal length, the method of focusing further includes:
the target point in the first shape is determined as the focus point.
Correspondingly, in this example, the focus point may be any one point in the first shape; for example, the first shape is a circle, and the focus point may be a center point of the circular area.
Correspondingly, in this example, the second size information is diameter information of a largest circle in the region surrounded by the first shape.
In the embodiment of the present invention, the position of the first shape of the reference object is recognized, the outline edge image of the region surrounded by the first shape is drawn, and the maximum circle is drawn in the drawn edge image, as shown in fig. 4. And taking the circle center of the circle as an opposite focus of the shot image, and automatically adjusting the focal length to enable the image range shot by the camera to be within the diameter range of the circle.
In the embodiment of the present invention, whether to start shooting may also be determined by a change from the first shape to the second shape; wherein the first shape may be an arc exceeding a predetermined value, such as 3/4 arc. The second shape is circular, namely, the reference object takes the first shape when focusing is carried out, and when the change from the first shape to the second shape is detected, the target object to be shot which penetrates through the second shape is shot. Wherein the size information of the first shape and the second shape is the same, i.e. the first focal length and the second focal length are the same.
It should be noted that, in the embodiment of the present invention, the first shape and the second shape may represent two different gestures, taking the index finger and the thumb as an example, the first shape may be an arc of the great wall of the index finger and the thumb, which is a non-closed area, and the second shape is a circle of the great wall of the index finger and the thumb, which is to shoot the target object to be shot in the second shape when the index finger and the thumb are detected to be closed.
Correspondingly, as shown in fig. 5, in a case where the first shape is changed into the second shape, shooting the target object to be shot which passes through the first shape by the camera according to the adjusted first focal length includes:
step 501: shooting an image, namely shooting an image of the reference object when the reference object takes the second shape;
step 502: identifying fingertip positions, namely identifying the positions of the fingertips of a thumb and an index finger in the image of the reference object;
step 503: determining whether the distance between the tip of the thumb and the tip of the index finger is smaller than a distance threshold value;
wherein, the distance threshold value can be set according to the image recognition precision of the electronic equipment. In addition, when the distance between the tip of the thumb and the tip of the index finger is less than the distance threshold, the second shape is determined to be a closed shape.
Step 504: and triggering the photographing when the distance between the finger tip of the thumb and the finger tip of the index finger is smaller than the distance threshold, namely photographing the object to be photographed penetrating through the target in the second shape.
It should be noted that when the distance between the tip of the thumb and the tip of the index finger is not less than the distance threshold, step 502 is executed again.
According to the embodiment of the invention, the object to be shot through the target with the second shape can be shot by adjusting the shape of the gesture, so that the interestingness is increased, and the user experience degree is improved.
In the embodiment of the present invention, after adjusting the camera, the method for adjusting further includes:
and generating first prompt information, wherein the first prompt information is used for prompting a user to shoot an image of a target object to be shot.
In some examples of the present invention, after acquiring the image of the reference object, the method of focusing further comprises:
and generating prompt information, wherein the prompt information is used for prompting a user to adjust the first size information and the second size information.
Correspondingly, in this example, after the prompt information is generated, the method for focusing further includes:
shooting a target image;
detecting whether a reference object exists in a target image;
and when the reference object does not exist in the target image, adjusting the focal length of the camera according to the adjusted first size information and the adjusted second size information.
It should be noted that, after adjusting the first size information and the second size information each time, step 102 is executed, then the target image is obtained again, whether a reference object is to be captured in the target image is detected through the image, if the reference object exists in the target image, the first size information and the second size information need to be adjusted again until the reference object does not exist in the captured image, and finally, the focal length of the camera is adjusted according to the adjusted first size information and the adjusted second size information, so as to achieve capturing of the target object to be captured.
In some embodiments of the present invention, after step 103, the method of focusing further comprises:
and storing the image shot according to the adjusted first focal length.
According to the embodiment of the invention, the purpose of adjusting the focal length is achieved by additionally changing the size of a finger ring formed by enclosing the thumb and the forefinger, and the photographing range is determined by combining the distance between the camera and the finger ring; the interest of adjusting the focal length is increased, and the user experience degree is improved.
Fig. 6 is a schematic diagram of an electronic device 600 according to an embodiment of the present invention. This electronic equipment 600 includes the camera, and this electronic equipment 600 still includes:
the image acquisition module 601 is configured to acquire an image of a reference object, where the reference object is located between a camera and an object to be photographed, the reference object is in a first shape, and the first shape is used for photographing, by the camera, a target object to be photographed in the object to be photographed, which penetrates through the first shape;
the obtaining module 601 is further configured to obtain first size information between the camera and the reference object, and second size information of an area surrounded by the first shape in the image;
the adjusting module 602 is configured to adjust a focal length of the camera according to the first size information and the second size information.
In the embodiment of the invention, the focal length of the camera is adjusted by referring to the first size information between the object and the camera and the second size information of the area surrounded by the first shape in the image of the reference object, and the focal length of the electronic equipment can be adjusted without manually amplifying or reducing the screen of the electronic equipment for many times.
Optionally, the electronic device further includes:
and the shooting module is used for shooting the object to be shot through the first shape by the camera according to the adjusted first focal length after the focal length of the camera is adjusted.
Optionally, the shooting module is specifically configured to:
and when the first shape is changed into the second shape, shooting the target object to be shot which penetrates through the second shape through the camera according to the adjusted second focal length.
Optionally, the electronic device further includes:
and the determining module is used for determining the target point in the first shape as the focus point.
Optionally, the electronic device further includes:
and the generating module is used for generating prompt information, and the prompt information is used for prompting a user to adjust the first size information and the second size information.
Optionally, the electronic device further includes:
the shooting module is also used for shooting a target image after the prompt message is generated;
the detection module is used for detecting whether a reference object exists in the target image;
the adjusting module 602 is further configured to, when the reference object does not exist in the target image, adjust the focal length of the camera according to the adjusted first size information and the adjusted second size information.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiment of fig. 1, and is not described herein again to avoid repetition.
In the embodiment of the invention, the focal length of the camera is adjusted by referring to the first size information between the object and the camera and the second size information of the area surrounded by the first shape in the image of the reference object, and the focal length of the electronic equipment can be adjusted without manually amplifying or reducing the screen of the electronic equipment for many times.
Fig. 7 is a schematic diagram of a hardware structure of another electronic device for implementing various embodiments of the present invention.
The electronic device 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, a processor 710, a power supply 711, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable electronic device, a pedometer, and the like.
The input unit 704 is configured to acquire an image of a reference object, where the reference object is located between the camera and the object to be photographed, and the reference object is in a first shape, and the first shape is used for photographing, by the camera, a target object to be photographed in the object to be photographed, which passes through the first shape;
acquiring first size information between a camera and a reference object and second size information of an area surrounded by a first shape in an image;
and the processor 710 is configured to adjust the focal length of the camera according to the first size information and the second size information.
In the embodiment of the invention, the focal length of the camera is adjusted by referring to the first size information between the object and the camera and the second size information of the area surrounded by the first shape in the image of the reference object, and the focal length of the electronic equipment can be adjusted without manually amplifying or reducing the screen of the electronic equipment for many times.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 710; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 701 may also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 702, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output related to a specific function performed by the electronic apparatus 700 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used to receive audio or video signals. The input Unit 704 may include a Graphics Processing Unit (GPU) 7041 and a microphone 7042, and the Graphics processor 7041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 706. The image frames processed by the graphic processor 7041 may be stored in the memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 701 in case of a phone call mode.
The electronic device 700 also includes at least one sensor 705, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or a backlight when the electronic device 700 is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 705 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 706 is used to display information input by the user or information provided to the user. The Display unit 706 may include a Display panel 7061, and the Display panel 7061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 7071 (e.g., operations by a user on or near the touch panel 7071 using a finger, a stylus, or any other suitable object or attachment). The touch panel 7071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 710, receives a command from the processor 710, and executes the command. In addition, the touch panel 7071 can be implemented by various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, the other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation on or near the touch panel 7071, the touch operation is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although the touch panel 7071 and the display panel 7061 are shown in fig. 7 as two separate components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 708 is an interface for connecting an external device to the electronic apparatus 700. 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 having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 708 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 electronic apparatus 700 or may be used to transmit data between the electronic apparatus 700 and the external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 709 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby monitoring the whole electronic device. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 710.
The electronic device 700 may also include a power supply 711 (e.g., a battery) for providing power to the various components, and preferably, the power supply 711 may be logically coupled to the processor 710 via a power management system, such that functions of managing charging, discharging, and power consumption may be performed via the power management system.
In addition, the electronic device 700 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 710, a memory 709, and a computer program stored in the memory 709 and capable of running on the processor 710, where the computer program is executed by the processor 710 to implement each process of the foregoing method for focusing, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing focusing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A method for focusing is applied to an electronic device, the electronic device comprises a camera, and the method is characterized by comprising the following steps:
acquiring an image of a reference object, wherein the reference object is positioned between the camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera;
acquiring first size information between the camera and the reference object and second size information of an area surrounded by the first shape in the image;
adjusting the focal length of the camera according to the first size information and the second size information; after the adjusting the focal length of the camera, the method further comprises:
shooting the target object to be shot penetrating through the first shape through the camera according to the adjusted first focal length;
the shooting of the target object to be shot penetrating through the first shape through the camera according to the adjusted first focal length comprises:
and when the first shape is changed into a second shape, shooting the target object to be shot which penetrates through the second shape through the camera according to the adjusted second focal length.
2. The method according to claim 1, wherein before the photographing of the target object to be photographed through the first shape by the camera according to the adjusted first focal length, the method further comprises:
and determining the target point in the first shape as an in-focus point.
3. The method of claim 1, wherein after said acquiring the image of the reference object, the method further comprises:
and generating prompt information, wherein the prompt information is used for prompting a user to adjust the first size information and the second size information.
4. The method of claim 3, wherein after the generating the hint information, the method further comprises:
shooting a target image;
detecting whether a reference object exists in the target image;
and under the condition that the reference object does not exist in the target image, adjusting the focal length of the camera according to the adjusted first size information and the adjusted second size information.
5. An electronic device, the electronic device comprising a camera, the electronic device further comprising:
the device comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring an image of a reference object, the reference object is positioned between the camera and an object to be shot, the reference object is in a first shape, and the first shape is used for shooting a target object to be shot in the object to be shot which penetrates through the first shape through the camera;
the acquisition module is further configured to acquire first size information between the camera and the reference object and second size information of an area surrounded by the first shape in the image;
the adjusting module is used for adjusting the focal length of the camera according to the first size information and the second size information; the electronic device further includes:
the shooting module is used for shooting the target object to be shot penetrating through the first shape through the camera according to the adjusted first focal length after the focal length of the camera is adjusted; the shooting module is specifically configured to:
and when the first shape is changed into a second shape, shooting the target object to be shot which penetrates through the second shape through the camera according to the adjusted second focal length.
6. The electronic device of claim 5, further comprising:
and the determining module is used for determining a target point in the first shape as an opposite focus before shooting the target to-be-shot object penetrating through the first shape through the camera according to the adjusted first focal length.
7. The electronic device of claim 5, further comprising:
and the generating module is used for generating prompt information after the image of the reference object is acquired, wherein the prompt information is used for prompting a user to adjust the first size information and the second size information.
8. The electronic device of claim 7,
the shooting module is also used for shooting a target image after the prompt message is generated;
the electronic device further includes:
the detection module is used for detecting whether a reference object exists in the target image;
and the adjusting module is further used for adjusting the focal length of the camera according to the adjusted first size information and the adjusted second size information under the condition that the reference object does not exist in the target image.
CN202010220351.9A 2020-03-25 2020-03-25 Focusing method and electronic equipment Active CN111405181B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010220351.9A CN111405181B (en) 2020-03-25 2020-03-25 Focusing method and electronic equipment
PCT/CN2021/081458 WO2021190390A1 (en) 2020-03-25 2021-03-18 Focusing method, electronic device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010220351.9A CN111405181B (en) 2020-03-25 2020-03-25 Focusing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111405181A CN111405181A (en) 2020-07-10
CN111405181B true CN111405181B (en) 2022-01-28

Family

ID=71429158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010220351.9A Active CN111405181B (en) 2020-03-25 2020-03-25 Focusing method and electronic equipment

Country Status (2)

Country Link
CN (1) CN111405181B (en)
WO (1) WO2021190390A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405181B (en) * 2020-03-25 2022-01-28 维沃移动通信有限公司 Focusing method and electronic equipment
CN115118871B (en) * 2022-02-11 2023-12-15 东莞市步步高教育软件有限公司 Shooting pixel mode switching method, shooting pixel mode switching system, terminal equipment and storage medium
CN114845055B (en) * 2022-04-27 2024-03-22 北京市商汤科技开发有限公司 Shooting parameter determining method and device of image acquisition equipment and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259978A (en) * 2013-05-20 2013-08-21 邱笑难 Method for photographing by utilizing gesture
CN104793749A (en) * 2015-04-30 2015-07-22 小米科技有限责任公司 Intelligent glasses and control method and device thereof
CN105306819A (en) * 2015-10-15 2016-02-03 广东欧珀移动通信有限公司 Gesture-based photographing control method and device
JP2016036125A (en) * 2014-08-04 2016-03-17 求 藤川 Imaging device, control method of imaging device, adjustment device, control method of adjustment device, setting device, control method of setting device, and device program
CN109151312A (en) * 2018-09-04 2019-01-04 广州视源电子科技股份有限公司 Focusing method, device and video presenter

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5885395B2 (en) * 2011-04-28 2016-03-15 オリンパス株式会社 Image capturing apparatus and image data recording method
CN111405181B (en) * 2020-03-25 2022-01-28 维沃移动通信有限公司 Focusing method and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103259978A (en) * 2013-05-20 2013-08-21 邱笑难 Method for photographing by utilizing gesture
JP2016036125A (en) * 2014-08-04 2016-03-17 求 藤川 Imaging device, control method of imaging device, adjustment device, control method of adjustment device, setting device, control method of setting device, and device program
CN104793749A (en) * 2015-04-30 2015-07-22 小米科技有限责任公司 Intelligent glasses and control method and device thereof
CN105306819A (en) * 2015-10-15 2016-02-03 广东欧珀移动通信有限公司 Gesture-based photographing control method and device
CN109151312A (en) * 2018-09-04 2019-01-04 广州视源电子科技股份有限公司 Focusing method, device and video presenter

Also Published As

Publication number Publication date
CN111405181A (en) 2020-07-10
WO2021190390A1 (en) 2021-09-30

Similar Documents

Publication Publication Date Title
CN108668083B (en) Photographing method and terminal
CN108471498B (en) Shooting preview method and terminal
CN111182205B (en) Photographing method, electronic device, and medium
CN109078319B (en) Game interface display method and terminal
CN110505400B (en) Preview image display adjustment method and terminal
AU2020263183B2 (en) Parameter Obtaining Method and Terminal Device
CN110213440B (en) Image sharing method and terminal
CN110913139B (en) Photographing method and electronic equipment
CN111263071B (en) Shooting method and electronic equipment
CN110445984B (en) Shooting prompting method and electronic equipment
CN111405181B (en) Focusing method and electronic equipment
CN111147752B (en) Zoom factor adjusting method, electronic device, and medium
CN110602389B (en) Display method and electronic equipment
CN107741814B (en) Display control method and mobile terminal
CN111031234B (en) Image processing method and electronic equipment
CN108174110B (en) Photographing method and flexible screen terminal
CN111049510A (en) Touch key, control method and electronic equipment
CN108111750B (en) Zoom adjustment method, mobile terminal and computer readable storage medium
CN110944114B (en) Photographing method and electronic equipment
CN109542321B (en) Control method and device for screen display content
CN109005337B (en) Photographing method and terminal
CN111246105B (en) Photographing method, electronic device, and computer-readable storage medium
CN110913133B (en) Shooting method and electronic equipment
CN110427149B (en) Terminal operation method and terminal
CN107728919B (en) Image display method and mobile terminal

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220808

Address after: Tower a 2301-09, 2401-09, 2501-09, 2601-09, phase III, North District, Yifang center, 99 Xinhu Road, N12 District, Haiwang community, Xin'an street, Bao'an District, Shenzhen, Guangdong 518000

Patentee after: VIVO MOBILE COMMUNICATIONS (SHENZHEN) Co.,Ltd.

Address before: 523860 No. 283 BBK Avenue, Changan Town, Changan, Guangdong.

Patentee before: VIVO MOBILE COMMUNICATION Co.,Ltd.