how to take points InputArray objectPoints, InputArray imagePoints could you please explain in detail with an example

asked 2018-08-29 10:36:57 -0500

solvePnP¶ Finds an object pose from 3D-2D point correspondences.

C++: bool solvePnP(InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int flags=ITERATIVE )

edit retag flag offensive close merge delete

Comments

Example here or here

tutorial here

outputarray doc

LBerger gravatar imageLBerger ( 2018-08-29 11:50:33 -0500 )edit

Whats unclear? InputArray and OutputArray are just proxy arguments. You can pass for objectPoints and imagePoints either std::vector<cv::Point> or a cv::Mat. Even a cv::UMat would be OK. InputArray is never changed inside the function, whereas OutputArray is normally created and filled inside the function. There are also some other proxys such as InputArrayOfArrays or OutputArrayOfArrays which can handle std::vector<std::vector<cv::Point>> or std::vector<Mat> for example.

matman gravatar imagematman ( 2018-08-29 11:56:54 -0500 )edit

i need to pass in vector give some example for this

srinath14144 gravatar imagesrinath14144 ( 2018-08-29 12:00:50 -0500 )edit

i need to know how the points are taken InputArray objectPoints, InputArray imagePoints,

srinath14144 gravatar imagesrinath14144 ( 2018-08-29 12:01:46 -0500 )edit

Show us your code

LBerger gravatar imageLBerger ( 2018-08-29 12:38:51 -0500 )edit