Skip to content

Commit

Permalink
Add backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
vniclas committed Jun 25, 2022
1 parent 41d9e92 commit 19aa602
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/opendr/engine/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,14 @@ def numpy(self):
# Since this class stores the data as NumPy arrays, we can directly return the data.
return self.data

def opencv(self):
"""
Required to support the ros bridge for images.
:return: a NumPy-compatible representation of data
:rtype: numpy.ndarray
"""
return self.numpy()

def shape(self) -> Tuple[int, ...]:
"""
Returns the shape of the underlying NumPy array.
Expand Down

0 comments on commit 19aa602

Please sign in to comment.