create opencv camera matrix for iPhone 5 solvepnp

后端 未结 5 986
春和景丽
春和景丽 2021-01-31 12:35

I am developing an application for the iPhone using opencv. I have to use the method solvePnPRansac:

http://opencv.willowgarage.com/documentation/cpp/camera_calibration_

5条回答
  •  梦如初夏
    2021-01-31 13:12

    Here you have a table with the spec of the cameras for iPhone 4 and 5. The calculation is:

    double f = 4.1;
    double resX = (double)(sourceImage.cols);
    double resY = (double)(sourceImage.rows);
    double sensorSizeX = 4.89;
    double sensorSizeY = 3.67;
    double fx = f * resX / sensorSizeX;
    double fy = f * resY / sensorSizeY;
    double cx = resX/2.;
    double cy = resY/2.;
    

提交回复
热议问题