Search

CN-121985217-A - Fusion focusing method and device

CN121985217ACN 121985217 ACN121985217 ACN 121985217ACN-121985217-A

Abstract

The embodiment of the application provides a fusion focusing method and device, which are applied to the field of shooting. The method is applied to electronic equipment and comprises the steps of determining a plurality of phase detection areas in a target image, determining a TOF area in the target image, wherein the TOF area is an area corresponding to a field angle FOV of a time-of-flight TOF sensor, determining an overlapping area of each phase detection area and the TOF area, correcting a phase detection value of at least one target phase detection area according to TOF depth information, wherein the target phase detection area is a phase detection area, of which the overlapping area with the TOF area is larger than a threshold value, in the plurality of phase detection areas, and focusing according to the plurality of phase detection areas. Based on the technical scheme, the electronic equipment is used for the TOF depth information in the target image, and the TOF area corresponding to the TOF sensor is an area with the overlapping range larger than the threshold value, so that the areas using the TOF depth information are correspondingly matched with the TOF sensor, and the focusing accuracy is improved.

Inventors

  • JIANG KAIYUAN
  • YAN YU

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260505
Application Date
20241025

Claims (15)

  1. 1. A fusion focusing method applied to an electronic device, the method comprising: determining a plurality of phase detection areas in the target image; determining a time-of-flight TOF region in the target image, wherein the TOF region is a region corresponding to a field angle FOV of a TOF sensor; Determining an overlap region of each phase detection region and the TOF region; Correcting a phase detection PD value of at least one target phase detection region according to TOF depth information, wherein the TOF depth information is image depth information in the TOF region acquired by the TOF sensor, and the target phase detection region is a phase detection region with the overlapping region with the TOF region being larger than a threshold value in the plurality of phase detection regions; Focusing is performed according to a plurality of phase detection areas including at least one target phase detection area after PD value correction.
  2. 2. The method of claim 1, wherein correcting the phase detection PD value of the at least one target phase detection region based on TOF depth information comprises: Determining a corresponding first focal length according to the TOF depth information; Determining a corresponding second focal length according to the phase detection PD value of the target phase detection area; and correcting the PD value of the target phase detection area according to the TOF depth information, wherein the focal length corresponding to the corrected phase detection PD value is a weighted average of the first focal length and the second focal length.
  3. 3. The method of claim 2, wherein the TOF depth information comprises ranging values and lens position information.
  4. 4. The method of claim 1, wherein the determining the TOF region in the target image comprises: calculating the field angle FOV of the TOF sensor according to the internal parameters of the TOF sensor; and then calculating the TOF area according to the external parameters of the TOF sensor, the external parameters of the RGB sensor and the internal parameters of the RGB sensor, wherein the RGB sensor is an image sensor for acquiring the target image.
  5. 5. The method of claim 4, wherein the internal parameters include at least one of focal length, principal point, distortion coefficient, and pixel size, and the external parameters include at least one of rotation matrix and translation vector.
  6. 6. The method of claim 5, wherein focusing according to a plurality of phase detection regions comprises: Determining a focusing area according to the plurality of phase detection areas; and adjusting the focal length of the electronic equipment according to the PD value corresponding to the focusing area.
  7. 7. An electronic device, the electronic device comprising: a first determining module for determining a plurality of phase detection areas in the target image; The second determining module is used for determining a TOF region in the target image, wherein the TOF region is a region corresponding to the field angle FOV of the time-of-flight TOF sensor; A third determining module for determining an overlap region of each phase detection region and the TOF region; the correcting module is used for correcting the phase detection value of at least one target phase detection area according to TOF depth information, wherein the TOF depth information is the image depth information in the TOF area acquired by the TOF sensor, and the target phase detection area is a phase detection area, of which the overlapping area with the TOF area is larger than a threshold value, in the plurality of phase detection areas; And the focusing module is used for focusing according to a plurality of phase detection areas, wherein the plurality of phase detection areas comprise at least one target phase detection area after PD value correction.
  8. 8. The method of claim 7, wherein the correction module comprises: a first determining unit, configured to determine a corresponding first focal length according to the TOF depth information; a second determining unit, configured to determine a corresponding second focal length according to a phase detection PD value of the target phase detection region; and the correcting unit is used for correcting the PD value of the target phase detection area according to the TOF depth information, and the focal length corresponding to the corrected phase detection PD value is the weighted average of the first focal length and the second focal length.
  9. 9. The method of claim 8, wherein the depth information comprises ranging values and lens position information.
  10. 10. The method of claim 7, wherein the second determination module comprises: a first calculation unit for calculating the field angle FOV of the TOF sensor according to the internal parameter of the TOF sensor; And the second calculation unit is used for calculating the TOF area according to the external parameters of the TOF sensor, the external parameters of the RGB sensor and the internal parameters of the RGB sensor, wherein the RGB sensor is an image sensor for acquiring the target image.
  11. 11. The method of claim 10, wherein the internal parameters include at least one of focal length, principal point, distortion coefficient, and pixel size, and the external parameters include at least one of rotation matrix and translation vector.
  12. 12. The method of claim 11, wherein the focusing module comprises: a third determination unit configured to determine a focusing area from the plurality of phase detection areas; and the adjusting unit is used for adjusting the focal length of the electronic equipment according to the PD value corresponding to the focusing area.
  13. 13. An electronic device comprising a memory for storing a computer program and a processor for invoking the computer program to perform the fused focus method of any of claims 1 to 6.
  14. 14. A computer readable storage medium, characterized in that a computer program or instructions is stored in the computer readable storage medium, which, when executed, implements the fusion focusing method according to any one of claims 1 to 6.
  15. 15. A computer program product comprising a computer program which, when run, causes a computer to perform the fused focus method as claimed in any one of claims 1 to 6.

Description

Fusion focusing method and device Technical Field The application relates to the field of shooting, in particular to a fusion focusing method and device. Background When the electronic equipment shoots, the focal length of the shooting module is required to be adjusted through an automatic focusing algorithm, so that a clear image is obtained. In the existing focusing scheme, the electronic device may determine a plurality of windows for phase detection according to the acquired image, and then focus by using a phase detection autofocus (phasedetectionautofocus, PDAF) technology according to the phase detection values of the windows. When the PDAF technology cannot meet the focusing requirement, the electronic device may acquire depth information through a Time of flight (TOF) sensor, and then focus through a depth auto focus (DepthAF) technology according to the depth information. In the existing focusing scheme, because the physical positions of the sensor for acquiring the image and the TOF sensor corresponding to the depth automatic focusing are different on the electronic equipment, when focusing is performed through the depth automatic focusing technology, the depth information acquired by the depth sensor is not completely matched with the acquired image, so that the using effect on the depth information is poor, and the focusing result is inaccurate. Disclosure of Invention The embodiment of the application provides a fusion focusing method and device, wherein among a plurality of phase detection areas determined by electronic equipment through a PDAF technology, the electronic equipment determines at least one phase detection area with overlapping area larger than a threshold value of a TOF area corresponding to a TOF sensor, then corrects the PD value of the at least one phase detection area according to TOF depth information, and focuses according to the PDAF technology, so that the areas using the TOF depth information are correspondingly matched with the TOF sensor, the using effect of the TOF depth information is improved, and the focusing accuracy is improved. The embodiment of the application provides a fusion focusing method, which comprises the steps of determining a plurality of phase detection areas in an acquired target image, determining a TOF area in the target image, wherein the TOF area is an area corresponding to a field angle FOV of a time-of-flight TOF sensor, determining an overlapping area of each phase detection area and the TOF area, correcting a phase detection value of at least one target phase detection area according to TOF depth information, wherein the TOF depth information is image depth information in the TOF area acquired by the TOF sensor, the target phase detection area is a phase detection area, of which the overlapping area is larger than a threshold value, in the plurality of phase detection areas, focusing according to the plurality of phase detection areas, and the plurality of phase detection areas comprise at least one target phase detection area after PD value correction. Based on the technical scheme, the application area of the TOF depth information on the target image by the electronic equipment is an area with the overlapping range of the TOF area corresponding to the TOF sensor larger than the threshold value, so that the area using the TOF depth information is correspondingly matched with the TOF sensor, the application effect of the TOF depth information is improved, the focusing of the electronic equipment is more accurate, and the definition of the image is improved. On the other hand, in the existing scheme, the PDAF technology is preferentially used for focusing, and when the PDAF technology cannot meet the focusing requirement, the DepthAF technology is used for focusing. However, in a scene of a small object, a point light source or the like, the reliability of the phase detection PD value is low, but the PD value is normal, so that focusing still can be performed by using the PDAF technology. Based on the scheme, the PD value of the target phase detection area is corrected according to the TOF depth information in a fused focusing mode, so that the TOF depth information can be used under the condition of the PDAF technical weakness, and the focusing accuracy is improved. In one possible implementation manner, the correcting the phase detection value of the at least one target phase detection area according to the TOF depth information includes determining a corresponding first focal length according to the TOF depth information, determining a corresponding second focal length according to the phase detection PD value of the target phase detection area, correcting the PD value of the target phase detection area according to the TOF depth information, and setting the focal length corresponding to the corrected phase detection PD value as a weighted average of the first focal length and the second focal length. In this possible implementation man