CN-122027891-A - Power-on initialization method of automatic focusing device and electronic equipment
Abstract
The application provides a power-on initialization method of an automatic focusing device and electronic equipment, and relates to the field of terminals. The method can acquire the current image distance of the camera module when the electronic equipment starts the camera module, so as to initialize the automatic focusing device according to the image distance. Therefore, when the automatic focusing device is initialized, the lens is not required to be moved, but the lens is initialized according to the image distance by acquiring the image distance, so that abnormal sound generated in the process of moving the lens is avoided, and the experience of a user when the user uses the mobile terminal to photograph is improved.
Inventors
- LI XIAOQIN
Assignees
- 荣耀终端股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241111
Claims (10)
- 1. A power-on initialization method of an automatic focusing device, which is applied to an electronic device, wherein the electronic device comprises a camera module, and the camera module comprises the automatic focusing device, the method comprises: Detecting to start the camera module; Acquiring the current image distance of the camera module; and according to the image distance, powering up and initializing the automatic focusing device.
- 2. The method of claim 1, wherein said powering up initialization of said autofocus device based on said image distance comprises: obtaining initialization parameters according to the image distance; writing the initialization parameters into the automatic focusing device.
- 3. The method of claim 1, wherein the camera module further comprises an image sensor, the obtaining a current image distance of the camera module comprising: Collecting image data by the image sensor; and determining the image distance according to the image data.
- 4. A method according to claim 3, wherein said determining said image distance from said image data comprises: And determining the image distance according to the image data by adopting an automatic focusing algorithm.
- 5. The method of claim 1, wherein the obtaining the current image distance of the camera module comprises: Acquiring the current object distance of the camera module; And determining the image distance according to the object distance.
- 6. The method of claim 5, wherein the electronic device further comprises a ranging sensor, the obtaining the current object distance of the camera module comprises: and acquiring the current object distance of the camera module through the ranging sensor.
- 7. The method of claim 6, wherein the ranging sensor comprises a direct time-of-flight dtof sensor.
- 8. An electronic device comprising a processor, a memory and a communication interface, the memory and the communication interface coupled with the processor, the memory for storing computer program code comprising computer instructions, wherein the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-7.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method of any of claims 1 to 7.
- 10. A chip system comprising a processor and an interface circuit, the processor and the interface circuit being interconnected by a line, wherein the interface circuit is configured to receive a signal from an electronic device and to send the signal to the processor, the signal comprising computer instructions, which when executed by the processor, cause the chip system to perform the method of any one of claims 1 to 7.
Description
Power-on initialization method of automatic focusing device and electronic equipment Technical Field The present application relates to the field of terminals, and in particular, to a method for initializing an automatic focusing device and an electronic device. Background With the rapid development of mobile terminals, people use mobile terminals to take pictures more and more frequently. In order to provide a good photographing experience for a user, a camera module used by a mobile terminal is generally provided with an automatic focusing device, so that a distance between a lens of the camera module and an image sensor is automatically adjusted through the automatic focusing device, and therefore the image sensor can be clearly imaged. When the camera module is started by the mobile terminal and the automatic focusing device is powered on, the automatic focusing device needs to be powered on and initialized to determine the current focusing position (namely the position of the current lens in the focusing moving range), so that the movement of the lens can be accurately controlled according to an automatic focusing algorithm based on the current focusing position to perform automatic focusing. Currently, for an autofocus device that uses an incremental feedback device to measure the displacement of the lens during autofocus, when the autofocus device is powered on to initialize, its initialized focus position is a pre-configured known position. For example, the end point position of the lens movable range. Thus, when the automatic focusing device is initialized, the lens is moved to the end point so that the current focusing position and the initialized focusing position are consistent. However, in the process of initializing by moving the lens to the end point of the movable range, abnormal sound is generated when the lens moves to the end point of the movable range, so that the experience of a user when the user uses the mobile terminal to photograph is affected. Disclosure of Invention The application provides a power-on initialization method of an automatic focusing device and electronic equipment, which can avoid abnormal sound generated during power-on initialization of the automatic focusing device and improve experience of a user when using the electronic equipment to photograph. In order to achieve the above purpose, the application adopts the following technical scheme: the first aspect provides a power-on initialization method of an automatic focusing device, which can be applied to electronic equipment, wherein the electronic equipment can comprise a camera module, the camera module comprises the automatic focusing device, the method can comprise the steps of detecting to start the camera module, obtaining the current image distance of the camera module, and carrying out power-on initialization on the automatic focusing device according to the image distance. It can be understood that, based on the above method, when the electronic device starts the camera module, the current image distance of the camera module can be obtained, so as to initialize the automatic focusing device according to the image distance. Therefore, when the automatic focusing device is electrified and initialized, the lens is not required to be moved, but the image distance is acquired, and the electrified and initialized according to the image distance, so that abnormal sound generated in the process of moving the lens is avoided, and the experience of a user when the user uses the mobile terminal to photograph is improved. In one possible implementation manner, the powering-on initialization of the automatic focusing device according to the image distance comprises obtaining initialization parameters according to the image distance and writing the initialization parameters into the automatic focusing device. In this way, the focus position for initialization can be efficiently and accurately indicated to the automatic focusing apparatus by means of the initialization parameter. In another possible implementation, the camera module further includes an image sensor, and the acquiring the current image distance of the camera module includes acquiring image data by the image sensor and determining the image distance according to the image data. Therefore, the image distance can be obtained rapidly and conveniently based on the image, and the power-on initialization efficiency of the automatic focusing device is improved. In another possible implementation, the determining the image distance from the image data includes determining the image distance from the image data using an auto-focus algorithm. Therefore, the image distance can be conveniently obtained according to the image data based on the existing automatic focusing algorithm, and the efficiency of obtaining the image distance is improved. In another possible implementation manner, the obtaining the current image distance of the camera module comprises obtaining