Skip to content

Commit

Permalink
Merge branch 'liezl/add-multiview-datastructures' into liezl/add-came…
Browse files Browse the repository at this point in the history
…ragroup-class
  • Loading branch information
roomrys authored Jan 21, 2025
2 parents d9ca34b + af92f2c commit 84921ad
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sleap_io/model/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,15 +568,15 @@ def to_dict(self) -> dict:
Returns:
Dictionary containing camera information with the following keys:
- name: Camera name.
- size: Image size (width, height) of camera in pixels of size (2,) and
type int.
- matrix: Intrinsic camera matrix of size (3, 3) and type float64.
- distortions: Radial-tangential distortion coefficients
name: Camera name.
size: Image size (width, height) of camera in pixels of size (2,) and type
int.
matrix: Intrinsic camera matrix of size (3, 3) and type float64.
distortions: Radial-tangential distortion coefficients
[k_1, k_2, p_1, p_2, k_3] of size (5,) and type float64.
- rotation: Rotation vector in unnormalized axis-angle representation of
size (3,) and type float64.
- translation: Translation vector of size (3,) and type float64.
rotation: Rotation vector in unnormalized axis-angle representation of size
(3,) and type float64.
translation: Translation vector of size (3,) and type float64.
"""
camera_dict = {
"name": self.name,
Expand All @@ -596,15 +596,15 @@ def from_dict(cls, camera_dict: dict) -> Camera:
Args:
camera_dict: Dictionary containing camera information with the following
keys:
- name: Camera name.
- size: Image size (width, height) of camera in pixels of size (2,) and
name: Camera name.
size: Image size (width, height) of camera in pixels of size (2,) and
type int.
- matrix: Intrinsic camera matrix of size (3, 3) and type float64.
- distortions: Radial-tangential distortion coefficients
matrix: Intrinsic camera matrix of size (3, 3) and type float64.
distortions: Radial-tangential distortion coefficients
[k_1, k_2, p_1, p_2, k_3] of size (5,) and type float64.
- rotation: Rotation vector in unnormalized axis-angle representation of
rotation: Rotation vector in unnormalized axis-angle representation of
size (3,) and type float64.
- translation: Translation vector of size (3,) and type float64.
translation: Translation vector of size (3,) and type float64.
Returns:
`Camera` object created from dictionary.
Expand Down

0 comments on commit 84921ad

Please sign in to comment.