Skip to content

Commit

Permalink
better AbstractFiducial.orientation description
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Apr 26, 2024
1 parent 62e77ae commit 1a35c4a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
21 changes: 18 additions & 3 deletions opencsp/common/lib/cv/AbstractFiducials.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,24 @@ def origin(self) -> p2.Pxy:
@property
@abstractmethod
def orientation(self) -> v3.Vxyz:
"""The orientation(s) of this instance, in radians. This is relative to
the source image, where x is positive to the right, y is positive down,
and z is positive in (away from the camera)."""
"""
The orientation of the normal vector(s) of this instance, in radians.
This is relative to the orthorectified source image, where x is positive
to the right, y is positive down, and z is positive in (away from the
camera).
This can be used to describe the forward transformation from the
camera's perspective. For example, an aruco marker whose origin is in
the center of the image and is facing towards the camera could have the
orientation::
Vxyz([0, np.pi, 0])
If that same aruco marker was also placed upside down, then it's
orientation could be::
Vxyz([0, np.pi, np.pi])
"""

@property
@abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion opencsp/common/lib/cv/fiducials/BcsFiducial.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def origin(self) -> p2.Pxy:

@property
def orientation(self) -> v3.Vxyz:
return v3.Vxyz([0, 0, 0])
raise NotImplementedError("Orientation is not yet implemented for PointFiducials")

@property
def size(self) -> list[float]:
Expand Down
4 changes: 2 additions & 2 deletions opencsp/common/lib/cv/fiducials/PointFiducials.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def origin(self) -> p2.Pxy:

@property
def orientation(self) -> v3.Vxyz:
# TODO untested
return np.zeros((3, self.points.x.size))
# return np.zeros((3, len(self.points))) # TODO untested
raise NotImplementedError("Orientation is not yet implemented for PointFiducials")

@property
def size(self) -> list[float]:
Expand Down

0 comments on commit 1a35c4a

Please sign in to comment.