# PnP - void \*Fadas3D\_SolvePnP\_Create(bool useExtrinsicGuess, uint32\_t maxNumPts = 500) - Initializes the required resources for the pose estimator. - Parameters: - - **useExtrinsicGuess** – Flag to indicate whether to use the input vectors provided in [Fadas3D\_SolvePnP\_Run()](https://docs.qualcomm.com/doc/80-63309-1/topic/pnp.html#group__three__d__pnp_1gaecfe11e2e2ebc5c98e90f7b1993da972) as the initial estimate for the iterative solver. - **maxNumPts** – Maximum number of input points. - Returns: - Handle to pose estimator. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) Fadas3D\_SolvePnP\_Destroy(void \*hSolvePnP) - Deinitializes resources allocated for pose estimator. - Parameters: - **hSolvePnP** – Handle to pose estimator. - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) Fadas3D\_SolvePnP\_Run(void \*hSolvePnP, [FadasCameraProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_camera_props__t.html#_CPPv418FadasCameraProps_t) camProps, [FadasDistCoeffs\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_dist_coeffs__t.html#_CPPv417FadasDistCoeffs_t) distCoeffs, [FadasMatrix\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrix__t.html#_CPPv413FadasMatrix_t) objPts, [FadasMatrix\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrix__t.html#_CPPv413FadasMatrix_t) imgPts, [FadasMatrix\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrix__t.html#_CPPv413FadasMatrix_t) rVec, [FadasMatrix\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrix__t.html#_CPPv413FadasMatrix_t) tVec) - Estimates pose from 3D object points and corresponding 2D image points. - Parameters: - - **hSolvePnP** – Handle to pose estimator. - **camProps** – Camera calibration parameters. - **distCoeffs** – Camera distortion coefficients. - **objPts** – Matrix object containing 3D object points. Dimensions of the matrix must be 1 x 3N (N = number of points). - **imgPts** – Matrix object containing 2D image points. Dimensions of the matrix must be set to 1 x 2N. - **rVec** – Matrix object to store output rotation vector. Dimensions of the matrix must be 1 x 3. - **tVec** – Matrix object to store output translation vector. Dimensions of the matrix must be 1 x 3. - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success. - void \*Fadas3D\_SolvePnPf64\_Create(bool useExtrinsicGuess, uint32\_t maxNumPts = 500) - Same as [Fadas3D\_SolvePnP\_Create](https://docs.qualcomm.com/doc/80-63309-1/topic/pnp.html#group__three__d__pnp_1ga36cd7126454b5666fbffe2938d8db9e7) for 64-bit floating point data. - Parameters: - - **useExtrinsicGuess** – Flag to indicate whether to use the input vectors provided in [Fadas3D\_SolvePnPf64\_Run()](https://docs.qualcomm.com/doc/80-63309-1/topic/pnp.html#group__three__d__pnp_1gac55a3bdb59c4ff1c9dd6c0415d6fc55e) as the initial estimate for the iterative solver. - **maxNumPts** – Maximum number of input points. - Returns: - Handle to pose estimator. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) Fadas3D\_SolvePnPf64\_Destroy(void \*hSolvePnP) - Same as [Fadas3D\_SolvePnP\_Destroy](https://docs.qualcomm.com/doc/80-63309-1/topic/pnp.html#group__three__d__pnp_1ga1c269abeccec09189ad13296156cbbec) for 64-bit floating point data. - Parameters: - **hSolvePnP** – Handle to pose estimator. - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success. - [FadasError\_e](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#_CPPv412FadasError_e) Fadas3D\_SolvePnPf64\_Run(void \*hSolvePnP, [FadasCameraProps\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_camera_props__t.html#_CPPv418FadasCameraProps_t) camProps, [FadasDistCoeffs\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_dist_coeffs__t.html#_CPPv417FadasDistCoeffs_t) distCoeffs, [FadasMatrixf64\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrixf64__t.html#_CPPv416FadasMatrixf64_t) objPts, [FadasMatrixf64\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrixf64__t.html#_CPPv416FadasMatrixf64_t) imgPts, [FadasMatrixf64\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrixf64__t.html#_CPPv416FadasMatrixf64_t) rVec, [FadasMatrixf64\_t](https://docs.qualcomm.com/doc/80-63309-1/topic/struct_fadas_matrixf64__t.html#_CPPv416FadasMatrixf64_t) tVec) - Same as [Fadas3D\_SolvePnP\_Run](https://docs.qualcomm.com/doc/80-63309-1/topic/pnp.html#group__three__d__pnp_1gaecfe11e2e2ebc5c98e90f7b1993da972) for 64-bit floating point data. - Parameters: - - **hSolvePnP** – Handle to pose estimator. - **camProps** – Camera calibration parameters. - **distCoeffs** – Camera distortion coefficients. - **objPts** – Matrix object containing 3D object points. Dimensions of the matrix must be 1 x 3N (N = number of points). - **imgPts** – Matrix object containing 2D image points. Dimensions of the matrix must be set to 1 x 2N. - **rVec** – Matrix object to store output rotation vector. Dimensions of the matrix must be 1 x 3. - **tVec** – Matrix object to store output translation vector. Dimensions of the matrix must be 1 x 3. - Returns: - [FADAS\_ERROR\_NONE](https://docs.qualcomm.com/doc/80-63309-1/topic/enum_fadas_8h_1a280abf443019bfc722ac1158e5fe1013.html#fadas_8h_1a280abf443019bfc722ac1158e5fe1013aea09a4171f0866f38326d7e5323f2d12) — Success. Last Published: Sep 30, 2024 [Previous Topic Recover Pose](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/recover_pose.md) [Next Topic Project Points](https://docs.qualcomm.com/bundle/publicresource/80-63309-1/topics/project_points.md)