Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
NotificationsYou must be signed in to change notification settings

gaowenliang/camera_model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Main version:##Source Tree:

Acknowledgements

The origin author, Lionel Heng.

Support Camera Models:

Pinhole Camera

Cata Camera

Equidistant Camera

Scaramuzza Camera Model

Polynomial Fisheye Camera

This is my camera model

Fov Camera

#Install

To use this package, need:

Calibration:

Useintrinsic_calib.cc to calibrate your camera.The template is likefisheye_calibration.sh:

./Calibration --camera-name mycamera --input mycameara_images/ -p IMG -e png -w 11 -h 8 --size 70 --camera-model myfisheye --opencv true

USE:

Two main files for you to use camera model:Camera.h andCameraFactory.h.##1.load in the camera model calibration fileUse function inCameraFactory.h to load in the camra calibration file:

#include<camera_model/camera_models/CameraFactory.h>camera_model::CameraPtr cam;voidloadCameraFile(std::string camera_model_file){    cam =camera_model::CameraFactory::instance()->generateCameraFromYamlFile(camera_model_file);}

##2.projection and back-projection pointSeeCamera.h for general interface:

Projection (3D ---> 2D) function:spaceToPlane :Projects 3D points to the image plane (Pi function)

#include<camera_model/camera_models/CameraFactory.h>camera_model::CameraPtr cam;voidloadCameraFile(std::string camera_model_file){    cam =camera_model::CameraFactory::instance()->generateCameraFromYamlFile(camera_model_file);}voiduseProjection(Eigen::Vector3d P){    Eigen::Vector2d p_dst;    cam->spaceToPlane(P, p_dst);}

Back Projection (2D ---> 3D) function:liftSphere: Lift points from the image plane to the projective space.

#include<camera_model/camera_models/CameraFactory.h>camera_model::CameraPtr cam;voidloadCameraFile(std::string camera_model_file){    cam =camera_model::CameraFactory::instance()->generateCameraFromYamlFile(camera_model_file);}voiduseProjection(Eigen::Vector3d P){    Eigen::Vector2d p_dst;    cam->spaceToPlane(P, p_dst);}voiduseBackProjection(Eigen::Vector2d p){    Eigen::Vector3d P_dst;    cam->liftSphere(p, P_dst);}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp