π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
`kornia.sensors` docs update (#2477)
Christie Jacob89ef173ac2b4
diff --git a/docs/source/sensors.camera.rst b/docs/source/sensors.camera.rstindex d96f91ba0..bd31cfaf8 100644--- a/docs/source/sensors.camera.rst+++ b/docs/source/sensors.camera.rst@@ -3,18 +3,41 @@ kornia.sensors.camera.. currentmodule:: kornia.sensors.camera-Camera models available in Kornia are as follows:+.. warning::+ :mod:`kornia.sensors.camera` is an experimental API and is subject to change. Once finished, it will subsume :mod:`kornia.geometry.camera`-#. Pinhole.-#. Brown Conrady.-#. Kannala Brandt K3.-#. Orthographic.+The objective of :mod:`kornia.sensors.camera` is to express well-known camera models such as Pinhole, Kannala Brandt, and others in terms of distortion and projection types while ensuring differentiability.+We also aim to equip the user with tools to define custom camera models.+As of now, only the Pinhole model is supported.-.. autoclass:: CameraModel- :members:+Defining a `Pinhole` camera model is as simple as:-.. autoclass:: PinholeModel- :members:+.. code:: python++ from kornia.image import ImageSize+ from kornia.sensors.camera import CameraModel, CameraModelType++ params = torch.tensor([328., 328., 320., 240.]) # fx, fy, cx, cy+ cam = CameraModel(ImageSize(480, 640), CameraModelType.PINHOLE, params)++To define a custom camera model based on distortion and projection types, one can use the :class:`CameraModelBase` api:++.. code:: python++ from kornia.image import ImageSize+ from kornia.sensors.camera import CameraModelBase+ from kornia.sensors.camera.distortion_model import AffineTransform+ from kornia.sensors.camera.projection_model import Z1Projection++ params = torch.tensor([328., 328., 320., 240.])+ cam = CameraModelBase(AffineTransform(), Z1Projection(), ImageSize(480, 640), params)+++.. note::+ At the moment, the only supported model is Pinhole. However, we plan to add Kannala Brandt, Orthographic, and other models in the near future... autoclass:: CameraModelBase:members:++.. autoclass:: CameraModel+ :members:diff --git a/docs/source/sensors.rst b/docs/source/sensors.rstindex 35677ad5e..98e988f16 100644--- a/docs/source/sensors.rst+++ b/docs/source/sensors.rst@@ -6,6 +6,9 @@ Aims to provide interfaces to sensors like Camera, IMU, GNSS etc... currentmodule:: kornia.sensors+.. warning::+ :mod:`kornia.sensors` is an experimental API and is subject to change.+.. toctree:::maxdepth: 3