WO2021190390A1 - Focusing method, electronic device, storage medium and program product - Google Patents
Focusing method, electronic device, storage medium and program product Download PDFInfo
- Publication number
- WO2021190390A1 WO2021190390A1 PCT/CN2021/081458 CN2021081458W WO2021190390A1 WO 2021190390 A1 WO2021190390 A1 WO 2021190390A1 CN 2021081458 W CN2021081458 W CN 2021081458W WO 2021190390 A1 WO2021190390 A1 WO 2021190390A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- shape
- camera
- electronic device
- size information
- photographed
- Prior art date
Links
Images
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
- 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
- H04N23/671—Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects
Definitions
- the embodiments of the present invention relate to the field of photography technology, and in particular, to a focusing method, an electronic device, a storage medium, and a program product.
- the user needs to manually zoom out or zoom in on the screen of the electronic device to realize the focus adjustment of the electronic device; because the screen of the electronic device has a certain response sensitivity, the user is in the process of focusing It can only be adjusted multiple times, that is, after each focusing, the user can only view the image displayed on the preview interface on the screen. If the image displayed on the preview interface meets the needs of the user, the focusing can be stopped, and the entire focusing process It is inflexible and cumbersome, especially for electronic devices with small screens. Due to the small screen, manual focusing operations will also be restricted, making the entire focusing process more inflexible and cumbersome, and reducing user experience.
- the embodiments of the present invention provide an image shooting method, electronic equipment, storage medium, and program product to solve the problems of inflexible focusing process and cumbersome operation in the prior art.
- the present invention is implemented as follows:
- an embodiment of the present invention also provides a focusing method, which is applied to an electronic device, the electronic device includes a camera, and the focusing method includes:
- the reference object Acquiring an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the target object to be photographed in the object to be photographed through the first shape through the camera;
- the focal length of the camera is adjusted.
- an embodiment of the present invention provides an electronic device, the electronic device includes a camera, and the electronic device further includes:
- the acquisition module is used to acquire an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape by the camera Target to be photographed;
- the acquiring module is also used to acquire the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
- the adjustment module is used to adjust the focal length of the camera according to the first size information and the second size information.
- an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, the computer program being executed by the processor When implementing the method described in the first aspect.
- an embodiment of the present invention provides an electronic device configured to execute the method described in the first aspect.
- an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the method described in the first aspect when the computer program is executed by a processor.
- an embodiment of the present invention provides a computer program product, the program product is stored in a nonvolatile storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
- 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times.
- the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
- FIG. 1 is a flowchart of a focusing method provided by an embodiment of the present invention
- FIG. 2 is a schematic diagram of focusing provided by an embodiment of the present invention.
- FIG. 3 is a schematic diagram of another focus adjustment provided by an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a reference object provided by 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 provided by an embodiment of the present invention.
- FIG. 7 is a schematic diagram of another electronic device provided by an embodiment of the present invention.
- the electronic device may include various smart phones, smart watches, smart glasses, etc. with unlimited communication functions.
- FIG. 1 is a flowchart of a method for focusing according to an embodiment of the present invention. As shown in Fig. 1, the focusing method is applied to an electronic device, and the focusing method includes:
- Step 101 Obtain 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.
- Step 102 Obtain the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
- Step 103 Adjust the focal length of the camera according to the first size information and the second size information.
- 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times.
- the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
- the reference object described in step 101 is located between the camera and the object to be photographed, and the reference object presents a first shape, and the first shape is used to determine the target object to be photographed among the objects to be photographed, That is, the photographing range of the object to be photographed is determined; among them, the object to be photographed is the object to be photographed.
- the reference object may be an object with a preset shape, for example, a gesture with a preset shape, a piece of paper with a preset shape, and a component with a preset shape.
- a gesture with a preset shape is taken as an example.
- the unzoomed image includes multiple objects to be photographed, and the object between the unzoomed image and the camera is the reference object, and the virtual area is the target object to be photographed among the objects to be photographed.
- a gesture with a preset shape is taken as an example.
- the preset shape is used to determine the photographing range of the object to be photographed. Therefore, the preset shape is composed of a shape that is close to a closed gesture as much as possible, such as the gesture in FIG. 2.
- adjusting the focal length of the camera according to the first size information and the second size information in step 103 may include:
- the focal length of the electronic device is adjusted so that after the focus is adjusted, the photographing range of the camera is 302; among them, the focus is not adjusted
- the previous photographing range was 301, as shown in Figure 3.
- the first size information between the reference object 201 and the camera 101 can be adjusted to achieve the purpose of adjusting the photographing range; in addition, the reference object 201 can be adjusted.
- the second size information of the enclosed area and the first size information between the reference object 201 and the camera 101 can also serve the purpose of adjusting the photographing range.
- the focusing method may further include:
- the target object to be photographed through the first shape is photographed by the camera.
- photographing the target object to be photographed through the first shape through the camera may include:
- the button is a touch area on the electronic device for capturing an image or a button on the electronic device for capturing an image
- the target object to be photographed through the second shape is captured by the camera.
- the target object to be photographed in the virtual area is triggered by touching the button or the touch area on the electronic device.
- the focusing method before photographing the target object to be photographed through the first shape through the camera according to the adjusted first focal length, the focusing method may further include:
- the focus point may be any point in the first shape; for example, if the first shape is a circle, the focus point may be the center point of the circular area.
- the second size information is the diameter information of the largest circle in the area enclosed by the first shape.
- the position of the first shape of the reference object is recognized, the contour edge image of the area enclosed by the first shape is drawn, and the largest circle is drawn in the drawn edge image, as shown in FIG. 4.
- the focal length is automatically adjusted so that the range of the image captured by the camera is within the diameter of the circle.
- whether to start shooting may also be determined by the change from the first shape to the second shape; wherein, the first shape may be an arc that exceeds a preset value, for example, a 3/4 arc.
- the second shape is a circle, that is, when the focus is adjusted, the reference object presents the first shape, and when the change from the first shape to the second shape is detected, the target object to be photographed through the second shape is photographed.
- the size information of the first shape and the second shape are the same, that is, the first focal length and the second focal length are the same.
- the first shape and the second shape can represent two different gestures.
- the first shape can be the arc of the city surrounded by the index finger and the thumb.
- the second shape is a circle surrounded by the index finger and the thumb, that is, when the index finger and the thumb are detected to be closed, the target object to be photographed in the second shape is photographed.
- photographing the target object to be photographed through the first shape through the camera may include:
- Step 501 Take an image, that is, take an image of the reference object when the reference object presents the second shape
- Step 502 Identify the position of the fingertip, that is, identify the position of the fingertip of the thumb and index finger in the image of the reference object;
- Step 503 Determine whether the distance between the fingertip of the thumb and the fingertip of the index finger is less than a distance threshold.
- the distance threshold can be set according to the image recognition accuracy of the electronic device.
- the second shape is determined to be a closed shape;
- Step 504 When the distance between the fingertip of the thumb and the fingertip of the index finger is less than the distance threshold, trigger a photograph, that is, photograph the target object to be photographed through the second shape.
- step 502 may be executed again.
- the target object to be photographed through the second shape can be photographed, which increases the interest and improves the user experience.
- the adjustment method may further include:
- the first prompt information is generated, and the first prompt information is used to prompt the user to take an image of the target object to be photographed.
- the method of focusing may further include:
- Prompt information is generated, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
- the focusing method may further include:
- the focal length of the camera is adjusted according to the adjusted first size information and the adjusted second size information.
- step 102 is executed, and then the target image is obtained, and the target image is detected through the image whether the reference object is photographed in the target image. If there is a reference in the target image Object, you need to adjust the first size information and the second size information until there is no reference object in the captured image, and finally adjust the focal length of the camera according to the adjusted first size information and second size information to achieve alignment. The shooting of the target to be photographed.
- the focusing method may further include:
- the image taken according to the adjusted first focal length is stored.
- the embodiment of the present invention achieves the purpose of adjusting the focal length by increasing and changing the size of the finger circle enclosed by the thumb and index finger, and the distance between the camera and the finger circle is combined to determine the photographing range; the interest of adjusting the focal length is increased, and the user experience is improved Spend.
- FIG. 6 is a schematic diagram of an electronic device 600 provided by an embodiment of the present invention.
- the electronic device 600 includes a camera, and the electronic device 600 further includes:
- the acquisition module 601 is used to acquire an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape by the camera The target to be photographed;
- the acquiring module 601 is also used to acquire the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
- the adjustment module 602 is configured to adjust the focal length of the camera according to the first size information and the second size information.
- 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times.
- the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
- the electronic device may also include:
- the photographing module is used to photograph the target object to be photographed 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 can be specifically used for:
- the target object to be photographed through the second shape is captured by the camera.
- the electronic device may also include:
- the determining module is used to determine the target point in the first shape as the focus point.
- the electronic device may also include:
- the generating module is used to generate prompt information, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
- the electronic device may also include:
- the photographing module is also used to photograph the target image after generating the prompt information
- the detection module is used to detect whether there is a reference object in the target image
- the adjustment module 602 is further configured to adjust the focal length of the camera according to the adjusted first size information and the adjusted second size information when there is no reference object in the target image.
- the electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiment in FIG.
- 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times.
- the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
- An embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and running on the processor.
- the computer program is executed by the processor to implement the above-mentioned focusing method embodiment
- Each process can achieve the same technical effect. To avoid repetition, I won’t repeat it here.
- FIG. 7 is a schematic diagram of the hardware structure of another electronic device that implements 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, and Power 711 and other components.
- a radio frequency unit 701 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, and Power 711 and other components.
- the electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout.
- electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable electronic devices, and pedometers.
- the input unit 704 is used to obtain an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape through the camera.
- the target to be photographed in the subject is used to obtain an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape through the camera.
- the target to be photographed in the subject is used to obtain an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape through the camera.
- the target to be photographed in the subject is used to obtain an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape,
- the processor 710 is configured to adjust the focal length of the camera according to the first size information and the second size information.
- 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times.
- the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
- the radio frequency unit 701 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, after receiving the downlink data from the base station, it is processed by the processor 710; Uplink data is sent to the base station.
- the 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.
- the radio frequency unit 701 can also communicate with the network and other devices through a wireless communication system.
- the electronic device provides users with wireless broadband Internet access through the network module 702, such as helping users to send and receive emails, browse web pages, and access streaming media.
- the audio output unit 703 can convert the 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 it as sound. Moreover, the audio output unit 703 may also provide audio output related to a specific function performed by the electronic device 700 (for example, call signal reception sound, 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.
- the graphics processor 7041 is used to capture images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Data is processed.
- the processed image frame may be displayed on the display unit 706.
- the image frame processed by the graphics processor 7041 may be stored in the memory 709 (or other storage medium) or sent via the radio frequency unit 701 or the network module 702.
- the microphone 7042 can receive sound, and can process such sound into audio data.
- the processed audio data can be converted into a format that can be sent to the mobile communication base station via the radio frequency unit 701 for output in the case of a telephone call mode.
- the electronic device 700 further includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors.
- the light sensor includes an ambient light sensor and a proximity sensor.
- the ambient light sensor can adjust the brightness of the display panel 7061 according to the brightness of the ambient light.
- the proximity sensor can turn off the display panel 7061 and the display panel 7061 when the electronic device 700 is moved to the ear. / Or backlight.
- the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 705 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
- 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), etc.
- LCD liquid crystal display
- OLED organic light-emitting diode
- the user input unit 707 may be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the electronic device.
- the user input unit 707 includes a touch panel 7071 and other input devices 7072.
- the touch panel 7071 also called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 7071 or near the touch panel 7071. operate).
- the touch panel 7071 may include two parts: a touch detection device and a touch controller.
- the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 710, the command sent by the processor 710 is received and executed.
- the touch panel 7071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
- the user input unit 707 may also include other input devices 7072.
- other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
- the touch panel 7071 can be overlaid on the display panel 7061.
- the touch panel 7071 detects a touch operation on or near it, it is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 determines the type of touch event according to the touch.
- the type of event provides corresponding visual output on the display panel 7061.
- the touch panel 7071 and the display panel 7061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated
- the implementation of the input and output functions of the electronic device is not specifically limited here.
- the interface unit 708 is an interface for connecting an external device and the electronic device 700.
- the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
- the interface unit 708 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 700 or can be used to connect the electronic device 700 to an external device. Transfer data between devices.
- the memory 709 can be used to store software programs and various data.
- the memory 709 may mainly include a program storage area and a data storage area.
- the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
- the memory 709 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
- the processor 710 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes software programs and/or modules stored in the memory 709, and calls data stored in the memory 709 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole.
- the processor 710 may include one or more processing units; in some embodiments, the processor 710 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc.
- the modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 710.
- the electronic device 700 may also include a power source 711 (such as a battery) for supplying power to various components.
- a power source 711 such as a battery
- the power source 711 may be logically connected to the processor 710 through a power management system, so that the power management system can manage charging, discharging, and Functions such as power management.
- the electronic device 700 includes some functional modules not shown, which will not be repeated here.
- An embodiment of the present invention also provides an electronic device, which is configured to perform the focusing method of any one of the foregoing embodiments, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
- the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
- a computer program is stored on the computer-readable storage medium.
- the technical effect, in order to avoid repetition, will not be repeated here.
- the computer-readable storage medium include non-transitory computer-readable storage media, such as read-only memory (Read-Only Memory, ROM for short), Random Access Memory (RAM for short), and magnetic CD or CD, etc.
- the embodiment of the present invention provides a computer program product, the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement each process of the above-mentioned focusing method embodiment, and can To achieve the same technical effect, in order to avoid repetition, I will not repeat them here.
- the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present invention.
- a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
- the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices.
- the present invention is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be different from the order in the embodiments, or several steps may be performed at the same time.
- Such a processor can be, but is not limited to, a general-purpose processor, a dedicated processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and/or flowchart and the combination of the blocks in the block diagram and/or flowchart can also be implemented by dedicated hardware that performs specified functions or actions, or can be implemented by dedicated hardware and A combination of computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
Disclosed in the embodiments of the present invention are a focusing method, an electronic device, a storage medium and a program product. The focusing method comprises: acquiring an image of a reference object, which is located between a camera and objects to be photographed and is in a first shape, the camera photographing a target object to be photographed among the objects through the first shape; acquiring first size information between the camera and the reference object, and second size information of an area enclosed by the first shape in the image; and adjusting the focal length of the camera according to the first size information and the second size information.
Description
相关申请的交叉引用Cross-references to related applications
本申请主张在2020年03月25日在中国提交的中国专利申请号202010220351.9的优先权,其全部内容通过引用包含于此。This application claims the priority of Chinese Patent Application No. 202010220351.9 filed in China on March 25, 2020, the entire content of which is incorporated herein by reference.
本发明实施例涉及拍照技术领域,尤其涉及一种调焦的方法、电子设备、存储介质及程序产品。The embodiments of the present invention relate to the field of photography technology, and in particular, to a focusing method, an electronic device, a storage medium, and a program product.
随着电子设备的发展,利用电子设备拍照的应用越来越多,带摄像头的电子设备已经成为拍照的主要工具。With the development of electronic devices, there are more and more applications using electronic devices to take pictures, and electronic devices with cameras have become the main tool for taking pictures.
目前,在电子设备进行拍照时,用户需要手动缩小或者放大等操作电子设备的屏幕,以实现对电子设备的调焦;由于,电子设备的屏幕存在一定的响应灵敏度,使得用户在调焦的过程中,只能多次调整,即在每一次调焦之后,用户只能通过屏幕查看预览界面显示的图像,如果预览界面显示的图像满足用户的需求时,则可以停止调焦,整个调焦过程不灵活,且比较繁琐,尤其针对屏幕较小的电子设备,由于屏幕较小,手动调焦的操作也将受到限制,使得整个调焦过程更不灵活,更为繁琐,降低了用户体验度。At present, when an electronic device takes a picture, the user needs to manually zoom out or zoom in on the screen of the electronic device to realize the focus adjustment of the electronic device; because the screen of the electronic device has a certain response sensitivity, the user is in the process of focusing It can only be adjusted multiple times, that is, after each focusing, the user can only view the image displayed on the preview interface on the screen. If the image displayed on the preview interface meets the needs of the user, the focusing can be stopped, and the entire focusing process It is inflexible and cumbersome, especially for electronic devices with small screens. Due to the small screen, manual focusing operations will also be restricted, making the entire focusing process more inflexible and cumbersome, and reducing user experience.
发明内容Summary of the invention
本发明实施例提供一种图像拍摄方法、电子设备、存储介质及程序产品,以解决现有技术中调焦过程不灵活,操作比较繁琐的问题。The embodiments of the present invention provide an image shooting method, electronic equipment, storage medium, and program product to solve the problems of inflexible focusing process and cumbersome operation in the prior art.
为了解决上述技术问题,本发明是这样实现的:In order to solve the above technical problems, the present invention is implemented as follows:
第一方面,本发明实施例还提供了一种调焦的方法,应用于电子设 备,电子设备包括摄像头,调焦的方法包括:In the first aspect, an embodiment of the present invention also provides a focusing method, which is applied to an electronic device, the electronic device includes a camera, and the focusing method includes:
获取参照对象的图像,其中,参照对象位于摄像头和待拍对象之间,参照对象呈第一形状,第一形状用于通过摄像头拍摄透过第一形状的待拍对象中的目标待拍对象;Acquiring an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the target object to be photographed in the object to be photographed through the first shape through the camera;
获取摄像头与参照对象之间的第一尺寸信息,以及图像中第一形状所围成区域的第二尺寸信息;Acquiring the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
根据第一尺寸信息和第二尺寸信息,调整摄像头的焦距。According to the first size information and the second size information, the focal length of the camera is adjusted.
第二方面,本发明实施例提供了一种电子设备,该电子设备包括摄像头,电子设备还包括:In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device includes a camera, and the electronic device further includes:
获取模块,用于获取参照对象的图像,其中,参照对象位于摄像头和待拍对象之间,参照对象呈第一形状,第一形状用于通过摄像头拍摄透过第一形状的待拍对象中的目标待拍对象;The acquisition module is used to acquire an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape by the camera Target to be photographed;
获取模块,还用于获取摄像头与参照对象之间的第一尺寸信息,以及图像中第一形状所围成区域的第二尺寸信息;The acquiring module is also used to acquire the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
调整模块,用于根据第一尺寸信息和第二尺寸信息,调整摄像头的焦距。The adjustment module is used to adjust 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, including a processor, a memory, and a computer program stored on the memory and running on the processor, the computer program being executed by the processor When implementing the method described in the first aspect.
第四方面,本发明实施例提供了一种电子设备,被配置为用于执行第一方面所述的方法。In a fourth aspect, an embodiment of the present invention provides an electronic device configured to execute the method described in the first aspect.
第五方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现第一方面所述的方法。In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the method described in the first aspect when the computer program is executed by a processor.
第六方面,本发明实施例提供了一种计算机程序产品,程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现第一方面所述的方法。In a sixth aspect, an embodiment of the present invention provides a computer program product, the program product is stored in a nonvolatile storage medium, and the program product is executed by at least one processor to implement the method described in the first aspect.
在本发明实施例中,通过参照对象和摄像头之间的第一尺寸信息和参照对象的图像中第一形状所围成区域的第二尺寸信息,调整摄像头的焦 距,不需要多次手动放大或缩小操作电子设备的屏幕,就可以实现对电子设备的焦距进行调整,整个调焦过程操作灵活,便捷,提高了用户体验。In the embodiment of the present 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times. By reducing the screen of the operating electronic device, the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
从下面结合附图对本发明的具体实施方式的描述中可以更好地理解本发明其中,相同或相似的附图标记表示相同或相似的特征。The present invention can be better understood from the following description of the specific embodiments of the present invention in conjunction with the accompanying drawings, wherein the same or similar reference signs indicate the same or similar features.
图1为本发明实施例提供的一种调焦的方法的流程图;FIG. 1 is a flowchart of a focusing method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种调焦的示意图;2 is a schematic diagram of focusing provided by an embodiment of the present invention;
图3为本发明实施例提供的另一种调焦的示意图;FIG. 3 is a schematic diagram of another focus adjustment provided by an embodiment of the present invention;
图4为本发明实施例提供的参照对象的示意图;4 is a schematic diagram of a reference object provided by an embodiment of the present invention;
图5为本发明实施例提供的一种触发拍摄的方法的流程图;FIG. 5 is a flowchart of a method for triggering shooting according to an embodiment of the present invention;
图6为本发明实施例提供的一种电子设备的示意图;FIG. 6 is a schematic diagram of an electronic device provided by an embodiment of the present invention;
图7为本发明实施例提供的另一种电子设备的示意图。FIG. 7 is a schematic diagram of another electronic device provided by an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
在本发明实施例中,电子设备可以包括各种具有无限通信功能的智能手机、智能手表、智能眼镜等。In the embodiment of the present invention, the electronic device may include various smart phones, smart watches, smart glasses, etc. with unlimited communication functions.
图1为本发明实施例提供的一种调焦的方法的流程图。如图1所示,该调焦的方法应用于电子设备,该调焦的方法包括:FIG. 1 is a flowchart of a method for focusing according to an embodiment of the present invention. As shown in Fig. 1, the focusing method is applied to an electronic device, and the focusing method includes:
步骤101:获取参照对象的图像,其中,参照对象位于摄像头和待拍对象之间,参照对象呈第一形状,第一形状用于通过摄像头拍摄透过第一形状的待拍对象中的目标待拍对象;Step 101: Obtain 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. Shoot object
步骤102:获取摄像头与参照对象之间的第一尺寸信息,以及图像中第一形状所围成区域的第二尺寸信息;Step 102: Obtain the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
步骤103:根据第一尺寸信息和第二尺寸信息,调整摄像头的焦距。Step 103: Adjust the focal length of the camera according to the first size information and the second size information.
在本发明实施例中,通过参照对象和摄像头之间的第一尺寸信息和参照对象的图像中第一形状所围成区域的第二尺寸信息,调整摄像头的焦距,不需要多次手动放大或缩小操作电子设备的屏幕,就可以实现对电子设备的焦距进行调整,整个调焦过程操作灵活,便捷,提高了用户体验。In the embodiment of the present 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times. By reducing the screen of the operating electronic device, the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
在本发明的一些实施例中,步骤101所述的参照对象位于摄像头和待拍对象之间,参照对象呈现第一形状,该第一形状用于确定待拍对象的中的目标待拍对象,即确定待拍对象的拍照范围;其中,待拍对象为被拍摄的对象。In some embodiments of the present invention, the reference object described in step 101 is located between the camera and the object to be photographed, and the reference object presents a first shape, and the first shape is used to determine the target object to be photographed among the objects to be photographed, That is, the photographing range of the object to be photographed is determined; among them, the object to be photographed is the object to be photographed.
对应地,在该示例中,参照对象可以为预设形状的对象,例如,预设形状的手势,预设形状的纸片,预设形状的部件。下面为了描述方便,以预设形状的手势为示例。Correspondingly, in this example, the reference object may be an object with a preset shape, for example, a gesture with a preset shape, a piece of paper with a preset shape, and a component with a preset shape. For the convenience of description, a gesture with a preset shape is taken as an example.
在图2中,未变焦前图像包括多个待拍对象,位于未变焦前图像和摄像头之间的为参照对象,其中,虚拟区域中为待拍对象中的目标待拍对象。在图2中以预设形状的手势为示例。In FIG. 2, the unzoomed image includes multiple objects to be photographed, and the object between the unzoomed image and the camera is the reference object, and the virtual area is the target object to be photographed among the objects to be photographed. In FIG. 2, a gesture with a preset shape is taken as an example.
需要说明的是,预设形状是用来确定待拍对象的拍照范围的,因此,预设形状尽量由趋近于闭合手势的形状构成,如图2中的手势。It should be noted that the preset shape is used to determine the photographing range of the object to be photographed. Therefore, the preset shape is composed of a shape that is close to a closed gesture as much as possible, such as the gesture in FIG. 2.
在本发明的一些实施例中,步骤103所述的根据第一尺寸信息和第二尺寸信息,调整摄像头的焦距,可以包括:In some embodiments of the present invention, adjusting the focal length of the camera according to the first size information and the second size information in step 103 may include:
通过摄像头和参照对象之间的第一尺寸信息,以及参照对象201所围成区域的第二尺寸信息,调整电子设备的焦距,使得调焦之后,摄像头的拍照范围为302;其中,未调焦之前拍照范围为301,如图3所示。Through the first size information between the camera and the reference object, and the second size information of the area enclosed by the reference object 201, the focal length of the electronic device is adjusted so that after the focus is adjusted, the photographing range of the camera is 302; among them, the focus is not adjusted The previous photographing range was 301, as shown in Figure 3.
另外,在参照对象201所围成区域的第二尺寸信息确定时,可以通过调整参照对象201与摄像头101之间的第一尺寸信息,可以起到调整拍照范围的目的;另外,调整参照对象201所围成区域的第二尺寸信息和参照对象201与摄像头101之间的第一尺寸信息,也可以起到调整拍照范围的目的。In addition, when the second size information of the area enclosed by the reference object 201 is determined, the first size information between the reference object 201 and the camera 101 can be adjusted to achieve the purpose of adjusting the photographing range; in addition, the reference object 201 can be adjusted. The second size information of the enclosed area 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 focusing method may further include:
根据调整后的第一焦距,通过摄像头拍摄透过第一形状的目标待拍对象。According to the adjusted first focal length, the target object to be photographed through the first shape is photographed by the camera.
对应地,在该示例中,根据调整后的第一焦距,通过摄像头拍摄透过第一形状的目标待拍对象,可以包括:Correspondingly, in this example, according to the adjusted first focal length, photographing the target object to be photographed through the first shape through the camera may include:
通过触控电子设备上的按键,触发拍摄第一形状的目标待拍对象,按键为电子设备上用于拍摄图像的触控区域或电子设备上用于拍摄图像的按键;By touching a button on the electronic device, the first shape of the target object to be photographed is triggered, and the button is a touch area on the electronic device for capturing an image or a button on the electronic device for capturing an image;
或者,or,
在第一形状变化为第二形状的情况下,根据调整后的第二焦距,通过摄像头拍摄透过第二形状的目标待拍对象。In the case where the first shape changes to the second shape, according to the adjusted second focal length, the target object to be photographed through the second shape is captured by the camera.
在图2中,根据调整后的焦距,通过触控电子设备上的按键或者触控区域,触发拍摄虚拟区域中的目标待拍对象。In FIG. 2, according to the adjusted focal length, the target object to be photographed in the virtual area is triggered by touching the button or the touch area on the electronic device.
在本发明的一些实施例中,在根据调整后的第一焦距,通过摄像头拍摄透过第一形状的目标待拍对象之前,该调焦的方法还可以包括:In some embodiments of the present invention, before photographing the target object to be photographed through the first shape through the camera according to the adjusted first focal length, the focusing method may further include:
将第一形状中的目标点,确定为对焦点。Determine the target point in the first shape as the focus point.
对应地,在该示例中,对焦点可以为第一形状中任意一个点;例如,第一形状为圆形,对焦点可以为圆形区域的中心点。Correspondingly, in this example, the focus point may be any point in the first shape; for example, if the first shape is a circle, the focus point may be the center point of the circular area.
对应地,在该示例中,第二尺寸信息为第一形状所围成区域中最大圆形的直径信息。Correspondingly, in this example, the second size information is the diameter information of the largest circle in the area enclosed by the first shape.
在本发明实施例中,识别出参照对象的第一形状的位置,绘制第一形状所围成区域的轮廓边缘图像,在绘制的边缘图像中,绘制最大圆,如图4所示。以该圆的圆心为拍摄图像的对焦点,自动调节焦距,使得摄像头拍摄的图像范围在该圆直径范围内。In the embodiment of the present invention, the position of the first shape of the reference object is recognized, the contour edge image of the area enclosed by the first shape is drawn, and the largest circle is drawn in the drawn edge image, as shown in FIG. 4. Taking the center of the circle as the focus point of the captured image, the focal length is automatically adjusted so that the range of the image captured by the camera is within the diameter of the circle.
在本发明实施例中,还可以通过第一形状到第二形状的变化来确定是否开始拍摄;其中,第一形状可以为超过预设值得弧形,例如3/4圆弧。第二形状为圆形,即在调焦的时候,参照对象呈现第一形状,在检测到由第一形状变化到第二形状时,拍摄透过第二形状的目标待拍对象。其中,第一形状和第二形状的尺寸信息相同,即,第一焦距和第二焦距相同。In the embodiment of the present invention, whether to start shooting may also be determined by the change from the first shape to the second shape; wherein, the first shape may be an arc that exceeds a preset value, for example, a 3/4 arc. The second shape is a circle, that is, when the focus is adjusted, the reference object presents the first shape, and when the change from the first shape to the second shape is detected, the target object to be photographed through the second shape is photographed. Wherein, the size information of the first shape and the second shape are the same, that is, 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 can represent two different gestures. Taking the index finger and the thumb as an example, the first shape can be the arc of the city surrounded by the index finger and the thumb. In the closed area, the second shape is a circle surrounded by the index finger and the thumb, that is, when the index finger and the thumb are detected to be closed, the target object to be photographed in the second shape is photographed.
对应地,如图5所示,在第一形状变化为第二形状的情况下,根据调整后的第一焦距,通过摄像头拍摄透过第一形状的目标待拍对象,可以包括:Correspondingly, as shown in FIG. 5, when the first shape is changed to the second shape, according to the adjusted first focal length, photographing the target object to be photographed through the first shape through the camera may include:
步骤501:拍摄图像,即拍摄参考对象呈现第二形状时,参考对象的图像;Step 501: Take an image, that is, take an image of the reference object when the reference object presents the second shape;
步骤502:识别指尖位置,即识别参考对象的图像中拇指和食指指尖的位置;Step 502: Identify the position of the fingertip, that is, identify the position of the fingertip of the thumb and index finger in the image of the reference object;
步骤503:确定拇指指尖与食指指尖的距离是否小于距离阈值,距离阈值可以根据电子设备的图像识别精度来进行设置。另外,在拇指指尖与食指指尖的距离小于距离阈值时,则确定第二形状为封闭的形状;Step 503: Determine whether the distance between the fingertip of the thumb and the fingertip of the index finger is less than a distance threshold. The distance threshold can be set according to the image recognition accuracy of the electronic device. 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;
步骤504:在拇指指尖与食指指尖的距离小于距离阈值时,触发拍照,即拍摄透过第二形状的目标待拍对象。Step 504: When the distance between the fingertip of the thumb and the fingertip of the index finger is less than the distance threshold, trigger a photograph, that is, photograph the target object to be photographed through the second shape.
需要说明的是,在拇指指尖与食指指尖的距离不小于距离阈值时,可以重新执行步骤502。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 may be executed again.
本发明实施例,通过调整手势的形状,就能拍摄透过第二形状的目标待拍对象,增加了趣味性,提高用户体验度。In the embodiment of the present invention, by adjusting the shape of the gesture, the target object to be photographed through the second shape can be photographed, which increases the interest and improves the user experience.
在本发明实施例中,在调整摄像头之后,该调整的方法还可以包括:In the embodiment of the present invention, after adjusting the camera, the adjustment method may further include:
生成第一提示信息,该第一提示信息用于提示用户拍摄目标待拍摄对象的图像。The first prompt information is generated, and the first prompt information is used to prompt the user to take an image of the target object to be photographed.
在本发明的一些示例中,在获取参照对象的图像之后,该调焦的方法还可以包括:In some examples of the present invention, after acquiring the image of the reference object, the method of focusing may further include:
生成提示信息,该提示信息用于提示用户调整第一尺寸信息和第二尺寸信息。Prompt information is generated, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
对应地,在该示例中,在生成提示信息之后,该调焦的方法还可以包括:Correspondingly, in this example, after the prompt information is generated, the focusing method may further include:
拍摄目标图像;Take the target image;
检测目标图像中是否存在参照对象;Detect whether there is a reference object in the target image;
在目标图像中不存在参照对象的情况下,根据调整后的第一尺寸信息和调整后的第二尺寸信息,调整摄像头的焦距。When there is no reference object in the target image, the focal length of the camera is adjusted according to the adjusted first size information and the adjusted second size information.
需要说明的是,在每次调整第一尺寸信息和第二尺寸信息之后,执行步骤102,然后再获取目标图像,通过该图像检测是否将参照对象拍摄在目标图像中,如果目标图像中存在参照对象,则需要再调整第一尺寸信息和第二尺寸信息,直至拍摄的图像中不存在参考对象为止,最终根据调整之后的第一尺寸信息和第二尺寸信息,调整摄像头的焦距,以实现对目标待拍对象的拍摄。It should be noted that after each adjustment of the first size information and the second size information, step 102 is executed, and then the target image is obtained, and the target image is detected through the image whether the reference object is photographed in the target image. If there is a reference in the target image Object, you need to adjust the first size information and the second size information until there is no reference object in the captured image, and finally adjust the focal length of the camera according to the adjusted first size information and second size information to achieve alignment. The shooting of the target to be photographed.
在本发明的一些实施例中,在步骤103之后,该调焦的方法还可以包括:In some embodiments of the present invention, after step 103, the focusing method may further include:
存储根据调整后的第一焦距拍摄的图像。The image taken according to the adjusted first focal length is stored.
本发明实施例,通过增加改变拇指和食指围成的手指圈的大小,达到调整焦距的目的,且结合摄像头与手指圈的距离,确定拍照范围;增加了调整焦距的趣味性,提高了用户体验度。The embodiment of the present invention achieves the purpose of adjusting the focal length by increasing and changing the size of the finger circle enclosed by the thumb and index finger, and the distance between the camera and the finger circle is combined to determine the photographing range; the interest of adjusting the focal length is increased, and the user experience is improved Spend.
图6为本发明实施例提供的一种电子设备600的示意图。该电子设备600包括摄像头,该电子设备600还包括:FIG. 6 is a schematic diagram of an electronic device 600 provided by an embodiment of the present invention. The electronic device 600 includes a camera, and the electronic device 600 further includes:
获取模块601,用于获取参照对象的图像,其中,参照对象位于摄像头和待拍对象之间,参照对象呈第一形状,第一形状用于通过摄像头拍摄透过第一形状的待拍对象中的目标待拍对象;The acquisition module 601 is used to acquire an image of a reference object, where the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape by the camera The target to be photographed;
获取模块601,还用于获取摄像头与参照对象之间的第一尺寸信息,以及图像中第一形状所围成区域的第二尺寸信息;The acquiring module 601 is also used to acquire the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
调整模块602,用于根据第一尺寸信息和第二尺寸信息,调整摄像头的焦距。The adjustment module 602 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 present 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times. By reducing the screen of the operating electronic device, the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
可选的,电子设备还可以包括:Optionally, the electronic device may also include:
拍摄模块,用于在所述调整所述摄像头的焦距之后,根据调整后的第一焦距,通过摄像头拍摄透过第一形状的目标待拍对象。The photographing module is used to photograph the target object to be photographed through the first shape through the camera according to the adjusted first focal length after the focal length of the camera is adjusted.
可选的,拍摄模块,具体可以用于:Optionally, the shooting module can be specifically used for:
在第一形状变化为第二形状的情况下,根据调整后的第二焦距,通过摄像头拍摄透过第二形状的目标待拍对象。In the case where the first shape changes to the second shape, according to the adjusted second focal length, the target object to be photographed through the second shape is captured by the camera.
可选的,电子设备还可以包括:Optionally, the electronic device may also include:
确定模块,用于将第一形状中的目标点,确定为对焦点。The determining module is used to determine the target point in the first shape as the focus point.
可选的,电子设备还可以包括:Optionally, the electronic device may also include:
生成模块,用于生成提示信息,提示信息用于提示用户调整第一尺寸信息和第二尺寸信息。The generating module is used to generate prompt information, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
可选的,电子设备还可以包括:Optionally, the electronic device may also include:
拍摄模块,还用于在生成提示信息之后,拍摄目标图像;The photographing module is also used to photograph the target image after generating the prompt information;
检测模块,用于检测目标图像中是否存在参照对象;The detection module is used to detect whether there is a reference object in the target image;
调整模块602,还用于在目标图像中不存在参照对象的情况下,根据调整后的第一尺寸信息和调整后的第二尺寸信息,调整摄像头的焦距。The adjustment module 602 is further configured to adjust the focal length of the camera according to the adjusted first size information and the adjusted second size information when there is no reference object in the target image.
本发明实施例提供的电子设备能够实现图1的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。The electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiment in FIG.
在本发明实施例中,通过参照对象和摄像头之间的第一尺寸信息和参照对象的图像中第一形状所围成区域的第二尺寸信息,调整摄像头的焦距,不需要多次手动放大或缩小操作电子设备的屏幕,就可以实现对电子设备的焦距进行调整,整个调焦过程操作灵活,便捷,提高了用户体验。In the embodiment of the present 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times. By reducing the screen of the operating electronic device, the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
本发明实施例还提供一种电子设备,包括处理器,存储器,存储在存储器上并可在所述处理器上运行的计算机程序,该计算机程序被处理器执行时实现上述调焦的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and running on the processor. The computer program is executed by the processor to implement the above-mentioned focusing method embodiment Each process can achieve the same technical effect. To avoid repetition, I won’t repeat it here.
图7为实现本发明各个实施例的另一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of another electronic device that implements various embodiments of the present invention.
该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、处理器710、以及电源711等部件。本 领域技术人员可以理解,图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴式电子设备、以及计步器等。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, and Power 711 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. Layout. In the embodiments of the present invention, electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable electronic devices, and pedometers.
其中,输入单元704,用于获取参照对象的图像,其中,参照对象位于摄像头和待拍对象之间,参照对象呈第一形状,第一形状用于通过摄像头拍摄透过第一形状的待拍对象中的目标待拍对象;Wherein, the input unit 704 is used to obtain an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph the object to be photographed through the first shape through the camera. The target to be photographed in the subject;
获取摄像头与参照对象之间的第一尺寸信息,以及图像中第一形状所围成区域的第二尺寸信息;Acquiring the first size information between the camera and the reference object, and the second size information of the area enclosed by the first shape in the image;
处理器710,用于根据第一尺寸信息第二尺寸信息,调整摄像头的焦距。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 present 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 enclosed by the first shape in the image of the reference object, and there is no need to manually zoom in or out multiple times. By reducing the screen of the operating electronic device, the focal length of the electronic device can be adjusted. The entire focusing process is flexible and convenient, and the user experience is improved.
应理解的是,本发明实施例中,射频单元701可用于收发信息或通话过程中,信号的接收和发送,具体地,将来自基站的下行数据接收后,给处理器710处理;另外,将上行的数据发送给基站。通常,射频单元701包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元701还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 701 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, after receiving the downlink data from the base station, it is processed by the processor 710; Uplink data is sent to the base station. Generally, the 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 can also communicate with the network and other devices through a wireless communication system.
电子设备通过网络模块702为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides users with wireless broadband Internet access through the network module 702, such as helping users to send and receive emails, browse web pages, and access streaming media.
音频输出单元703可以将射频单元701或网络模块702接收的或者在存储器709中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元703还可以提供与电子设备700执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元703包括扬声器、蜂鸣器以及受话器等。The audio output unit 703 can convert the 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 it as sound. Moreover, the audio output unit 703 may also provide audio output related to a specific function performed by the electronic device 700 (for example, call signal reception sound, message reception sound, etc.). The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
输入单元704用于接收音频或视频信号。输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元706上。经图形处理器7041处理后的图像帧可以存储在存储器709(或其它存储介质)中或者经由射频单元701或网络模块702进行发送。麦克风7042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元701发送到移动通信基站的格式输出。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. The graphics processor 7041 is used to capture images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Data is processed. The processed image frame may be displayed on the display unit 706. The image frame processed by the graphics processor 7041 may be stored in the memory 709 (or other storage medium) or sent via the radio frequency unit 701 or the network module 702. The microphone 7042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to the mobile communication base station via the radio frequency unit 701 for output in the case of a telephone call mode.
电子设备700还包括至少一种传感器705,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板7061的亮度,接近传感器可在电子设备700移动到耳边时,关闭显示面板7061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器705还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 700 further includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 7061 according to the brightness of the ambient light. The proximity sensor can turn off the display panel 7061 and the display panel 7061 when the electronic device 700 is moved to the ear. / Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 705 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
显示单元706用于显示由用户输入的信息或提供给用户的信息。显示单元706可包括显示面板7061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板7061。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), etc.
用户输入单元707可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板7071上或在触控面板7071附近的操作)。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其 中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器710,接收处理器710发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板7071。除了触控面板7071,用户输入单元707还可以包括其他输入设备7072。具体地,其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 707 may be used to receive inputted numeric or character information, and generate key signal input 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 called a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 7071 or near the touch panel 7071. operate). The touch panel 7071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 710, the command sent by the processor 710 is received and executed. In addition, the touch panel 7071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 7071, the user input unit 707 may also include other input devices 7072. Specifically, other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
进一步的,触控面板7071可覆盖在显示面板7061上,当触控面板7071检测到在其上或附近的触摸操作后,传送给处理器710以确定触摸事件的类型,随后处理器710根据触摸事件的类型在显示面板7061上提供相应的视觉输出。虽然在图7中,触控面板7071与显示面板7061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板7071与显示面板7061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 7071 can be overlaid on the display panel 7061. When the touch panel 7071 detects a touch operation on or near it, it is transmitted to the processor 710 to determine the type of the touch event, and then the processor 710 determines the type of touch event according to the touch. The type of event provides corresponding visual output on the display panel 7061. Although in FIG. 7, the touch panel 7071 and the display panel 7061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 can be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.
接口单元708为外部装置与电子设备700连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元708可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备700内的一个或多个元件或者可以用于在电子设备700和外部装置之间传输数据。The interface unit 708 is an interface for connecting an external device and the electronic device 700. For example, the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc. The interface unit 708 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 700 or can be used to connect the electronic device 700 to an external device. Transfer data between devices.
存储器709可用于存储软件程序以及各种数据。存储器709可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器709可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 709 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
处理器710是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器709内的软件程序和/或模块,以及调用存储在存储器709内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器710可包括一个或多个处理单元;在一些实施例中,处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。The processor 710 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes software programs and/or modules stored in the memory 709, and calls data stored in the memory 709 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole. The processor 710 may include one or more processing units; in some embodiments, the processor 710 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc. The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 710.
电子设备700还可以包括给各个部件供电的电源711(比如电池),在一些实施例中,电源711可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 700 may also include a power source 711 (such as a battery) for supplying power to various components. In some embodiments, the power source 711 may be logically connected to the processor 710 through a power management system, so that the power management system can manage charging, discharging, and Functions such as power management.
另外,电子设备700包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 700 includes some functional modules not shown, which will not be repeated here.
本发明实施例还提供一种电子设备,被配置为用于执行上述任意一项实施例的调焦的方法,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present invention also provides an electronic device, which is configured to perform the focusing method of any one of the foregoing embodiments, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述调焦的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质的示例包括非暂态计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. The technical effect, in order to avoid repetition, will not be repeated here. Wherein, examples of the computer-readable storage medium include non-transitory computer-readable storage media, such as read-only memory (Read-Only Memory, ROM for short), Random Access Memory (RAM for short), and magnetic CD or CD, etc.
本发明实施例提供了一种计算机程序产品,程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现上述调焦的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present invention provides a computer program product, the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement each process of the above-mentioned focusing method embodiment, and can To achieve the same technical effect, in order to avoid repetition, I will not repeat them here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更 多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article or device that includes the element.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present invention.
还需要说明的是,本发明中提及的示例性实施例,基于一系列的步骤或者装置描述一些方法或系统。但是,本发明不局限于上述步骤的顺序,也就是说,可以按照实施例中提及的顺序执行步骤,也可以不同于实施例中的顺序,或者若干步骤同时执行。It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be different from the order in the embodiments, or several steps may be performed at the same time.
上面参考根据本公开的实施例的方法、装置(系统)和计算机存储介质的流程图和/或框图描述了本公开的各方面。应当理解,流程图和/或框图中的每个方框以及流程图和/或框图中各方框的组合可以由计算机程序指令实现。这些计算机程序指令可被提供给通用计算机、专用计算机、或其它可编程数据处理装置的处理器,以产生一种机器,使得经由计算机或其它可编程数据处理装置的处理器执行的这些指令使能对流程图和/或框图的一个或多个方框中指定的功能/动作的实现。这种处理器可以是但不限于是通用处理器、专用处理器、特殊应用处理器或者现场可编程逻辑电路。还可理解,框图和/或流程图中的每个方框以及框图和/或流程图中的方框的组合,也可以由执行指定的功能或动作的专用硬件来实现,或可由专用硬件和计算机指令的组合来实现。The various aspects of the present disclosure have been described above with reference to the flowcharts and/or block diagrams of the method, apparatus (system) and computer storage medium according to the embodiments of the present disclosure. It should be understood that each block in the flowcharts and/or block diagrams and combinations of blocks in the flowcharts and/or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine that enables the execution of these instructions via the processor of the computer or other programmable data processing device Implementation of the functions/actions specified in one or more blocks of the flowcharts and/or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a dedicated processor, a special application processor, or a field programmable logic circuit. It can also be understood that each block in the block diagram and/or flowchart and the combination of the blocks in the block diagram and/or flowchart can also be implemented by dedicated hardware that performs specified functions or actions, or can be implemented by dedicated hardware and A combination of computer instructions.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护 之内。The embodiments of the present invention are described above with reference to the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of the present invention, many forms can be made without departing from the purpose of the present invention and the scope of protection of the claims, and they all fall within the protection of the present invention.
Claims (16)
- 一种调焦的方法,应用于电子设备,所述电子设备包括摄像头,所述方法包括:A method of focusing is applied to an electronic device, the electronic device includes a camera, and the method includes:获取参照对象的图像,其中,所述参照对象位于所述摄像头和待拍对象之间,所述参照对象呈第一形状,所述第一形状用于通过所述摄像头拍摄透过所述第一形状的所述待拍对象中的目标待拍对象;Acquire an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to shoot through the first The target object to be photographed in the shape of the object to be photographed;获取所述摄像头与所述参照对象之间的第一尺寸信息,以及所述图像中所述第一形状所围成区域的第二尺寸信息;Acquiring first size information between the camera and the reference object, and second size information of the area enclosed by the first shape in the image;根据所述第一尺寸信息和所述第二尺寸信息,调整所述摄像头的焦距。Adjust the focal length of the camera according to the first size information and the second size information.
- 根据权利要求1所述的方法,其中,在所述调整所述摄像头的焦距之后,所述方法还包括:The method according to claim 1, wherein, after the adjusting the focal length of the camera, the method further comprises:根据调整后的第一焦距,通过所述摄像头拍摄透过所述第一形状的所述目标待拍对象。According to the adjusted first focal length, the target object to be photographed through the first shape is photographed by the camera.
- 根据权利要求2所述的方法,其中,所述根据调整后的第一焦距,通过所述摄像头拍摄透过所述第一形状的所述目标待拍对象,包括:The method according to claim 2, wherein the photographing the target object to be photographed through the first shape by the camera according to the adjusted first focal length comprises:在所述第一形状变化为第二形状的情况下,根据调整后的第二焦距,通过所述摄像头拍摄透过所述第二形状的所述目标待拍对象。In the case where the first shape changes to the second shape, according to the adjusted second focal length, the target object to be photographed through the second shape is captured by the camera.
- 根据权利要求1所述的方法,其中,在所述根据调整后的第一焦距,通过所述摄像头拍摄透过所述第一形状的所述目标待拍对象之前,所述方法还包括:The method according to claim 1, wherein, before the photographing the target object to be photographed through the first shape by the camera according to the adjusted first focal length, the method further comprises:将所述第一形状中的目标点,确定为对焦点。The target point in the first shape is determined as the focus point.
- 根据权利要求1所述的方法,其中,在所述获取参照对象的图像之后,所述方法还包括:The method according to claim 1, wherein after said acquiring the image of the reference object, the method further comprises:生成提示信息,所述提示信息用于提示用户调整所述第一尺寸信息和所述第二尺寸信息。Prompt information is generated, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
- 根据权利要求5所述的方法,其中,在所述生成提示信息之后,所述方法还包括:The method according to claim 5, wherein, after said generating the prompt information, the method further comprises:拍摄目标图像;Take the target image;检测所述目标图像中是否存在参照对象;Detecting whether there is a reference object in the target image;在所述目标图像中不存在所述参照对象的情况下,根据调整后的第一尺寸信息和调整后的第二尺寸信息,调整所述摄像头的焦距。In the case that the reference object does not exist in the target image, the focal length of the camera is adjusted according to the adjusted first size information and the adjusted second size information.
- 一种电子设备,所述电子设备包括摄像头,所述电子设备还包括:An electronic device, the electronic device includes a camera, and the electronic device further includes:获取模块,用于获取参照对象的图像,其中,所述参照对象位于所述摄像头和待拍对象之间,所述参照对象呈第一形状,所述第一形状用于通过所述摄像头拍摄透过所述第一形状的所述待拍对象中的目标待拍对象;The acquisition module is used to acquire an image of a reference object, wherein the reference object is located between the camera and the object to be photographed, the reference object is in a first shape, and the first shape is used to photograph through the camera. The target object to be photographed among the objects to be photographed in the first shape;所述获取模块,还用于获取所述摄像头与所述参照对象之间的第一尺寸信息,以及所述图像中所述第一形状所围成区域的第二尺寸信息;The acquiring module is further configured to acquire first size information between the camera and the reference object, and second size information of the area enclosed by the first shape in the image;调整模块,用于根据所述第一尺寸信息和所述第二尺寸信息,调整所述摄像头的焦距。The adjustment module is configured to adjust the focal length of the camera according to the first size information and the second size information.
- 根据权利要求7所述的电子设备,其中,所述电子设备还包括:The electronic device according to claim 7, wherein the electronic device further comprises:拍摄模块,用于在所述调整所述摄像头的焦距之后,根据调整后的第一焦距,通过所述摄像头拍摄透过所述第一形状的所述目标待拍对象。The photographing module is configured to photograph the target object to be photographed through the first shape through the camera according to the adjusted first focal length after the focal length of the camera is adjusted.
- 根据权利要求8所述的电子设备,其中,所述拍摄模块,具体用于:The electronic device according to claim 8, wherein the photographing module is specifically configured to:在所述第一形状变化为第二形状的情况下,根据调整后的第二焦距,通过所述摄像头拍摄透过所述第二形状的所述目标待拍对象。In the case where the first shape changes to the second shape, according to the adjusted second focal length, the target object to be photographed through the second shape is captured by the camera.
- 根据权利要求8所述的电子设备,其中,所述电子设备还包括:The electronic device according to claim 8, wherein the electronic device further comprises:确定模块,用于在根据调整后的第一焦距,通过所述摄像头拍摄透过所述第一形状的所述目标待拍对象之前,将所述第一形状中的目标点,确定为对焦点。The determining module is configured to determine the target point in the first shape as the focus point before photographing the target object to be photographed through the first shape by the camera according to the adjusted first focal length .
- 根据权利要求7所述的电子设备,其中,所述电子设备还包括:The electronic device according to claim 7, wherein the electronic device further comprises:生成模块,用于在获取参照对象的图像之后,生成提示信息,所述提示信息用于提示用户调整所述第一尺寸信息和所述第二尺寸信息。The generating module is configured to generate prompt information after acquiring the image of the reference object, and the prompt information is used to prompt the user to adjust the first size information and the second size information.
- 根据权利要求11所述的电子设备,其中,The electronic device according to claim 11, wherein:拍摄模块,还用于在生成提示信息之后,拍摄目标图像;The photographing module is also used to photograph the target image after generating the prompt information;所述电子设备还包括:The electronic device also includes:检测模块,用于检测所述目标图像中是否存在参照对象;The detection module is used to detect whether there is a reference object in the target image;调整模块,还用于在所述目标图像中不存在所述参照对象的情况下, 根据调整后的第一尺寸信息和调整后的第二尺寸信息,调整所述摄像头的焦距。The adjustment module is further configured to adjust the focal length of the camera according to the adjusted first size information and the adjusted second size information when the reference object does not exist in the target image.
- 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1-6任意一项所述的方法。An electronic device, comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor. The computer program is executed by the processor to implement any one of claims 1 to 6 The method described in the item.
- 一种电子设备,被配置为用于执行如权利要求1-6任意一项所述的方法。An electronic device configured to execute the method according to any one of claims 1-6.
- 一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1-6任意一项所述的方法。A computer-readable storage medium storing a computer program on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is realized.
- 一种计算机程序产品,所述程序产品被存储在非易失的存储介质中,所述程序产品被至少一个处理器执行以实现如权利要求1-6任一项所述的方法。A computer program product, the program product is stored in a non-volatile storage medium, and the program product is executed by at least one processor to implement the method according to any one of claims 1-6.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010220351.9 | 2020-03-25 | ||
CN202010220351.9A CN111405181B (en) | 2020-03-25 | 2020-03-25 | Focusing method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021190390A1 true WO2021190390A1 (en) | 2021-09-30 |
Family
ID=71429158
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/081458 WO2021190390A1 (en) | 2020-03-25 | 2021-03-18 | Focusing method, electronic device, storage medium and program product |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111405181B (en) |
WO (1) | WO2021190390A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115118871A (en) * | 2022-02-11 | 2022-09-27 | 东莞市步步高教育软件有限公司 | Photographing pixel mode switching method and system, terminal device and storage medium |
CN114845055B (en) * | 2022-04-27 | 2024-03-22 | 北京市商汤科技开发有限公司 | Shooting parameter determining method and device of image acquisition equipment and electronic equipment |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111405181B (en) * | 2020-03-25 | 2022-01-28 | 维沃移动通信有限公司 | Focusing method and electronic equipment |
Citations (6)
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 and device and video exhibition stand |
CN111405181A (en) * | 2020-03-25 | 2020-07-10 | 维沃移动通信有限公司 | Focusing method and electronic equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5885395B2 (en) * | 2011-04-28 | 2016-03-15 | オリンパス株式会社 | Image capturing apparatus and image data recording method |
-
2020
- 2020-03-25 CN CN202010220351.9A patent/CN111405181B/en active Active
-
2021
- 2021-03-18 WO PCT/CN2021/081458 patent/WO2021190390A1/en active Application Filing
Patent Citations (6)
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 and device and video exhibition stand |
CN111405181A (en) * | 2020-03-25 | 2020-07-10 | 维沃移动通信有限公司 | Focusing method and electronic equipment |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115118871A (en) * | 2022-02-11 | 2022-09-27 | 东莞市步步高教育软件有限公司 | Photographing pixel mode switching method and system, terminal device and storage medium |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN111405181A (en) | 2020-07-10 |
CN111405181B (en) | 2022-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111541845B (en) | Image processing method and device and electronic equipment | |
CN109639970B (en) | Shooting method and terminal equipment | |
WO2021104197A1 (en) | Object tracking method and electronic device | |
WO2021036536A1 (en) | Video photographing method and electronic device | |
WO2021051995A1 (en) | Photographing method and terminal | |
CN111182205B (en) | Photographing method, electronic device, and medium | |
WO2021190390A1 (en) | Focusing method, electronic device, storage medium and program product | |
CN108989672B (en) | Shooting method and mobile terminal | |
WO2020216129A1 (en) | Parameter acquisition method and terminal device | |
WO2021104227A1 (en) | Photographing method and electronic device | |
WO2021169851A1 (en) | Photographing method and electronic device | |
WO2021013009A1 (en) | Photographing method and terminal device | |
CN108174103B (en) | Shooting prompting method and mobile terminal | |
WO2021036623A1 (en) | Display method and electronic device | |
WO2021104226A1 (en) | Photographing method and electronic device | |
CN108881721B (en) | Display method and terminal | |
CN109413333B (en) | Display control method and terminal | |
WO2021147911A1 (en) | Mobile terminal, method for detecting image capturing mode, and storage medium | |
WO2021104159A1 (en) | Display control method and electronic device | |
WO2021082772A1 (en) | Screenshot method and electronic device | |
CN108174110B (en) | Photographing method and flexible screen terminal | |
US20220345631A1 (en) | Shooting method and electronic device | |
WO2020156119A1 (en) | Application program interface adjustment method and mobile terminal | |
CN109005337B (en) | Photographing method and terminal | |
CN111031246A (en) | Shooting method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21776270 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21776270 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 27/02/2023) |