Search

CN-121999023-A - Image processing method based on fixed camera and cradle head camera and electronic equipment

CN121999023ACN 121999023 ACN121999023 ACN 121999023ACN-121999023-A

Abstract

The application provides an image processing method based on a fixed camera and a cradle head camera and electronic equipment. The electronic equipment provided with the fixed camera and the cradle head camera can determine total external parameters between the fixed camera and the cradle head camera at any moment according to real-time cradle head posture data, further carry out depth processing on images reported by the fixed camera and the cradle head camera based on the total external parameters, determine depth information of the images, and meet shooting requirements of users on background blurring, three-dimensional reconstruction and size measurement based on depth.

Inventors

  • TANG JIXIANG
  • ZHANG LEI

Assignees

  • 荣耀终端股份有限公司

Dates

Publication Date
20260508
Application Date
20250904

Claims (20)

  1. 1. An image processing method applied to an electronic device, wherein the electronic device comprises a fixed camera and a cradle head camera, the method comprising: After entering a first shooting mode, acquiring a fixed image reported by the fixed camera, a cradle head image reported by the cradle head camera and cradle head posture data; Determining total external parameters between the fixed camera and the cradle head camera according to the cradle head posture data; And determining image depth information according to the fixed image, the cradle head image and the total external parameters.
  2. 2. The method according to claim 1, wherein the method further comprises: Rotating the tripod head, and updating total external parameters between the fixed camera and the tripod head camera according to the rotated tripod head posture data; and determining depth information of the new image according to the new image and the new total external parameters reported by the fixed camera and the cradle head camera.
  3. 3. The method according to claim 1, wherein the method further comprises: and outputting a depth image according to the fixed image, the cradle head image and the image depth information.
  4. 4. The method of claim 1, wherein determining the total external parameters between the fixed camera and the pan-tilt camera from the pan-tilt pose data comprises: determining a third external parameter between the head end of the cradle head and the tail end of the cradle head according to the cradle head posture data; Determining total external parameters between the fixed camera and the cradle head camera according to a first external parameter, a second external parameter and the third external parameter, wherein the first external parameter is the external parameter between the fixed camera and the cradle head end, and the second external parameter is the external parameter between the cradle head end and the cradle head camera.
  5. 5. The method of claim 4, wherein determining a third external parameter between a head end of the pan-tilt head and a tip end of the pan-tilt head based on the pan-tilt pose data comprises: And processing the holder posture data through a holder kinematic model to determine a third external parameter between the head end and the tail end of the holder, wherein the holder kinematic model is preset and determined according to the size of the holder.
  6. 6. The method according to claim 4, wherein the method further comprises: Displaying a first notification for notifying a user to correct the first and second external parameters.
  7. 7. The method of claim 6, further comprising correcting the first and second external parameters in response to a user operation of the first notification.
  8. 8. The method of claim 6, wherein displaying the first notification comprises: and displaying the first notification when the time interval from the last correction of the first external parameter and the second external parameter is longer than a first duration and the screen is turned off.
  9. 9. The method of claim 1, wherein the pan-tilt camera is folded into a back-plate recess of the electronic device prior to entering the first capture mode, and wherein the method further comprises ejecting the pan-tilt camera from the back-plate recess and unfolding the pan-tilt camera after entering the first capture mode.
  10. 10. The method of claim 9, wherein the stationary camera is turned off before entering the first capture mode and wherein the method further comprises turning on the stationary camera after entering the first capture mode.
  11. 11. A camera exogenous correction method applied to an electronic device, wherein the electronic device comprises a fixed camera and a cradle head camera, the method comprising: Acquiring a first image reported by the fixed camera and depth information corresponding to the first image; Acquiring a multi-frame third image reported by the cradle head camera under different postures; determining total external parameters between the pan-tilt camera and the fixed camera according to the first image, the third image and the depth information; And determining a first external parameter between the fixed camera and the head end of the cradle head and a second external parameter between the tail end of the cradle head and the cradle head camera according to the total external parameter and cradle head posture data corresponding to each frame of image in the third image.
  12. 12. The method of claim 11, wherein the fixed camera is a depth camera and the depth information corresponding to the first image is reported by the depth camera.
  13. 13. The method of claim 11, wherein the method further comprises: Acquiring a second image reported by a cradle head camera; The obtaining the first image reported by the fixed camera and the depth information corresponding to the first image includes: acquiring a first image reported by a first fixed camera; when the number of the characteristic point pairs of the first image and the second image is larger than or equal to a preset value, a second fixed camera is started, and a fourth image reported by the second fixed camera is obtained; determining depth information corresponding to the first image according to the first image and the fourth image; The obtaining the multi-frame third image reported by the pan-tilt camera under different postures comprises the following steps: And acquiring a plurality of frames of third images reported by the cradle head camera under different postures when the number of the characteristic point pairs of the first image and the second image is larger than or equal to a preset value.
  14. 14. The method of claim 13, wherein the method further comprises: and when the number of the characteristic point pairs of the first image and the second image is smaller than a preset value, displaying prompt information to prompt a user that the current environment is not suitable for camera external parameter correction.
  15. 15. The method of claim 11, wherein the obtaining the first image reported by the fixed camera and the depth information corresponding to the first image includes: Acquiring a first image reported by the fixed camera; When the first image comprises a calibration plate, acquiring calibration plate information; And determining depth information corresponding to the first image according to the first image and the calibration plate information.
  16. 16. The method of claim 14, wherein the obtaining calibration plate information includes displaying an input box, and determining calibration plate information based on user input received in the input box.
  17. 17. The method of claim 11, wherein the determining the total external parameters between the pan-tilt camera and the fixed camera from the first image, the third image, and the depth information comprises: determining characteristic point pairs of the first image and each third image; and determining the total external parameters between the cradle head camera and the fixed camera according to the characteristic point pairs and the depth information.
  18. 18. The method of claim 17, wherein determining a first external parameter between the fixed camera and a head end of the pan-tilt and a second external parameter between a tail end of the pan-tilt and the pan-tilt camera according to the total external parameter and pan-tilt pose data corresponding to each frame of image in the third image comprises: Determining a third external parameter between the head end of the cradle head and the tail end of the cradle head according to the cradle head posture data; And determining a first external parameter between the fixed camera and the head end of the cradle head and a second external parameter between the tail end of the cradle head and the camera of the cradle head according to the third external parameter and the total external parameter.
  19. 19. The method of claim 18, wherein the pairs of feature points of the first image and a third image correspond to a total outlier and the pan-tilt pose data in a pose corresponds to a third outlier; determining a first external parameter between the fixed camera and the head end of the cradle head according to the third external parameter and the total external parameter, and a second external parameter between the tail end of the cradle head and the cradle head camera, wherein the method comprises the following steps: And determining 1 first external parameters between the fixed camera and the head end of the cradle head and 1 second external parameters between the tail end of the cradle head and the camera of the cradle head according to the N third external parameters and the N total external parameters.
  20. 20. The method of claim 18, wherein determining a third external parameter between a head end and a tail end of the pan-tilt based on the pan-tilt pose data comprises: And processing the holder posture data through a holder kinematic model to determine a third external parameter between the head end and the tail end of the holder, wherein the holder kinematic model is preset and determined according to the size of the holder.

Description

Image processing method based on fixed camera and cradle head camera and electronic equipment Technical Field The present application relates to the field of terminals, and in particular, to an image processing method and an electronic device based on a fixed camera and a pan-tilt camera. Background Before the camera equipment leaves the factory, a detector can perform initial calibration on the camera equipment to determine internal parameters and external parameters of the camera. However, in some electronic devices, such as pan-tilt cameras and optically stabilized image (Optical Image Stabilization, OIS) cameras with large angular travel, lens movement can cause changes in its parameters. At this time, when the lens moves, the electronic device cannot directly use the initial external parameters calibrated in factory to perform depth calculation, and further cannot perform shooting tasks such as background blurring, three-dimensional reconstruction, size measurement and the like based on depth. Disclosure of Invention The application provides an image processing method based on a fixed camera and a cradle head camera and electronic equipment. In a first aspect, the application provides an image processing method applied to electronic equipment comprising a fixed camera and a cradle head camera, wherein the method comprises the steps of acquiring a fixed image reported by the fixed camera, a cradle head image reported by the cradle head camera and cradle head gesture data after entering a first shooting mode, determining total external parameters between the fixed camera and the cradle head camera according to the cradle head gesture data, and determining image depth information according to the fixed image, the cradle head image and the total external parameters. By implementing the method provided in the first aspect, the electronic device can determine the total external parameters between the fixed camera and the pan-tilt camera at any moment according to the pan-tilt gesture data, and further perform depth processing on the images reported by the fixed camera and the pan-tilt camera based on the total external parameters, so as to determine the depth information of the images. In some embodiments, the method further comprises rotating the cradle head, updating total external parameters between the fixed camera and the cradle head camera according to the rotated cradle head posture data, and determining depth information of the new image according to the new image and the new total external parameters reported by the fixed camera and the cradle head camera. Thus, the electronic equipment can rotate the tripod head at any time, update the view finding range of the tripod head camera, determine the external parameters between the updated tripod head camera and the fixed camera in real time, and calculate the depth according to the external parameters. In some embodiments, the method further includes outputting a depth image based on the fixed image, the pan-tilt image, and the image depth information. In the background blurring shooting scene based on depth, the electronic equipment can perform background blurring on the image reported by the cradle head camera and/or the fixed equipment according to the calculated image depth information, and output a blurring image. In the three-dimensional reconstruction scene, the electronic device can perform three-dimensional reconstruction according to the calculated image depth information and images reported by the cradle head camera and the fixed device, and output a three-dimensional model. The depth image described in the above method is for example a virtual image and a three-dimensional model as described above. In some embodiments, determining the total external parameters between the fixed camera and the pan-tilt camera based on pan-tilt pose data includes determining a third external parameter between the pan-tilt head end and the pan-tilt head end based on pan-tilt pose data, and determining the total external parameters between the fixed camera and the pan-tilt camera based on the first external parameter, the first external parameter being the external parameters between the fixed camera and the pan-tilt head end, and the second external parameter being the external parameters between the pan-tilt head end and the pan-tilt camera based on the first external parameter, the second external parameter, and the third external parameter. In the embodiment, the step of determining the third external parameters between the head end and the tail end of the cradle head according to the cradle head gesture data comprises the step of determining the third external parameters between the head end and the tail end of the cradle head by processing the cradle head gesture data through a cradle head kinematic model, wherein the cradle head kinematic model is preset and determined according to the size of the cradle head. Through the cradle head kinematics model whic