Comments (6)
Indeed, CameraMode
defines how the cameras are shared across images and camera_model
defines the type of camera (pinhole, radial, etc.) but the focal length is always inferred from the EXIF (image size + sensor specs) while the distortion parameters are initialized to zero.
To actually force a known camera, for now it is best to directly modify the database:
from hlco.utils.database import COLMAPDatabase
db = COLMAPDatabase.connect(database_path)
cam_id = 0
cam_tuple = (cam.model_id, cam.width, cam.height, tuple(cam.params))
db.add_camera(*cam_tuple, camera_id=cam_id)
for i, name in enumerate(sorted(image_list)):
db.add_image(name, cam_id, image_id=i+1)
db.commit()
db.close()
We should instead bind ImageReaderOptions
to have access to ImageReaderOptions.camera_params
- you're welcome to submit a PR :)
from pycolmap.
Yes, you can set shared intrinsics with camera_mode=pycolmap.CameraMode.SINGLE in hloc reconstruction or in pycolmap.import_images.
With shared intrinsics, COLMAP uses one camera for all images, and the intrinsics will be adjusted jointly during bundle adjustment.
from pycolmap.
Thanks!
from pycolmap.
Regarding shared / per image intrinsic. I see that we can set CameraMode
SINGLE or PER_IMAGE. But where do we pass the known intrinsics? I see the option of adding camera_model
, but not the actual intrinsic parameters in insert_images
function.
Is it possible to pass the intrinsic parameters? If yes, how? Or is there any other way to assign cameras to the added images?
Thanks!
from pycolmap.
As the known camera intrinsic, some details to consult.
Firstly, "cam_tuple = (cam.model_id....) " If we should define a camera structure before the code
Secondly, shoud the image_list be put into the hloc function (import_images)
details!
import_images is the hloc function.
from pycolmap.
if you want to use fixed camera paremeters, you can download the pycolmap source codes.
- to change the images.cc you will find it use the colmap as the base. so you can change the ImageOption (class).
- rebuild pycolmap & holc.
from pycolmap.
Related Issues (20)
- AttributeError: module 'pycolmap' has no attribute 'Database' HOT 2
- Trying to install pycolmap either via the pip or via source not working HOT 4
- camera.img_from_cam not working HOT 1
- May I ask about the changes in the new version? HOT 1
- AttributeError: module 'pycolmap' has no attribute 'patch_match_stereo' HOT 2
- Type hints for python? HOT 4
- Are Point3D and Image 0 indexed? HOT 2
- Error when importing pycolmap HOT 5
- How to set up scaling sparse models to realistic sizes? HOT 1
- When should a class be bound with shared_ptr as its holder? HOT 2
- pycolmap build from source error HOT 1
- estimate_triangulation result not equal to incremental_mapper result HOT 2
- absolute_pose_estimation HOT 1
- using pycolmap align two scene But either the exact same image is not captured (no overlapping images), or only part of the images overlap
- Question about pycolmap.incremental_mapping HOT 3
- Bind Iterative Global SfM HOT 2
- error in absolute_pose_estimation
- Script to export our own wheel HOT 5
- How to resolve conflicts between pycolmap and pytorch HOT 3
- About the function pycolmap.triangulate_points HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycolmap.