Comments (8)
Well, it would be really simple and great, if we use same idea - points first, or points last, across all the library.
Otherwise, one has to consistently look at the documentation.
Old or not, it doesn't matter.
from kornia.
This inconsistency makes it confusing to use.
To me, projection is P: 3x4, intrinsics are K: 3x3, and pose is R: 3x3 ,t: 3x1 alt. T: 4x4
unproject_points
should take K + image_coords + depth -> 3D points
transform_points
should take 3D points + either (R, t) or T -> 3D points
projection_from_KRt
takes K + R + t -> P
project_points
should take 3D points + P -> 2D points
For me this is by far the most common usecase of these functions. Am I supposed to be creating PinholeCamera
objects? To me the functional form is much easier to read.
I mean I can just write these functions myself instead, but I'd like to be able to use standardized stuff.
from kornia.
Composed on the left? I expected it would be on the right.
that was an arbitrary choice i guess when that function was created. Depending on the application you would like in one or the other side, I'd be in favor in deprecating that and just teaching our users to use as follows:
these all should be equivalent (rigid body transform and points conventions are explained here)
t1_from_t2 = compose_transform(t1_from_t0, t0_from_t2)
t1_from_t2 = compose_transform(t0_from_t1.inverse(), t0_from_t2)
t1_from_t2 = compose_transform(t1_from_t0, t2_from_t0.inverse())
t1_from_t2 = compose_transform(t0_from_t1.inverse(), t2_from_t0.inverse())
t1_from_t2 = compose_transform(t2_from_t0, t1_from_t0.inverse()).inverse()
where compose_transform
is just a convenient/tested function that handles matmul
and batching if existing. That's my plan at least for kornia-rs which eventually will be the backend for small rank matrices. Pytorch is extremely inefficient at that link1 link2
from kornia.
what is the confusion here ? even though you can use one to solve the other, in principle the functions in principle are unrelated.
The first, applies a generic transformation to coordinates system of a set points given the mapping transformation
points_in_robot = transform_points(robot_from_world, points_in_world)
the second has a specific purpose to project a set of 3d points to the z1 image plane given the calibration parameters of an affine model. The last is an old function that's is planned to be replaced by the new cameras api (based on sophus conventions): https://kornia.readthedocs.io/en/latest/geometry.camera.html
from kornia.
https://twitter.com/Parskatt/status/1757423036771254499
from kornia.
@Parskatt thanks for the feedback.
The unproject_points
/ project_points
were originally inspired by the tf.graphics.camera
api and possibly the new way to use hem will be following the new Kornia apis here for Projections
/ Distortion
.
The new apis are coming from Sophus / sophus-rs and a bit of Pangolin that have years of iterations for production in known companies and we use internally in our group for camera calibration and slam stuff. Possibly kornia-rs will adopt some of this too since the idea is to converge more and more to the Sophus api.
projection_from_KRt
is part of the epipolar geometry package that's is actually a port from OpenCV SfM module which i contributed many years ago and actually coming from Libmv
(backend mv library for Blender).
transform_points
was kind the first kornia (torchgeometry at Arraiy times) function meant to be generic points coordinate system operator.
That's the context with all the why's for this apis -- said that, i'm totally happy that we define together a standard apif for the calibration / geometry api that makes sense for kornia context and whom we useit everyday. If you like we can open a design docs and discuss there the apis. Keep in mind backward compatibilities and such based on our new releases schedule.
/cc @cjpurackal since he's involved too with the new sensors and lie api
from kornia.
@edgarriba exactly, we have inconsistent inspirations, and we should unify them. Users don't care about the history
from kornia.
Composed on the left? I expected it would be on the right.
from kornia.
Related Issues (20)
- Gradient Illumination augmentations
- Enhance CLAHE - Jit compatible
- More backends support HOT 6
- Important typo in RandAugment default policy list HOT 3
- Optimal Triangulation HOT 2
- [Tracker] Move functions that are not tests from `tests` to `testing`
- [Tracker] Split tests into multiple file tests HOT 2
- Automate simple tests cases
- [Tracker] Migrate test classes to use `BaseTester` and its functionalities.
- Remove `kornia.testing` - dec 2024
- Separate the test coverage job to speed up CI
- Add/move `_differentiable_clipping`, ` _differentiable_polynomial_floor` and ` _differentiable_polynomial_rounding` to our utilities functions HOT 2
- Add some examples of segmentation evaluation metrics such as PQ and AJI
- https://kornia.github.io/tutorials/ response γFile not found 404γ HOT 2
- torch.solve should be always float64
- RandomPlanckianJitter incorrect values on gpu other than 0 HOT 3
- Drop python 3.8 after EOL (oct/2024)
- docs: source button
- Replace Kmeans `euclidean_distance` method by `kornia.geometry.linalg.euclidean_distance` HOT 2
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 kornia.