Skip to content
Snippets Groups Projects

Shape dimensions

Merged Naser Azizi requested to merge shape_dimensions into main
import robokudo.types.core
import robokudo.types.core
import robokudo.types.tf
import robokudo.types.tf
import numpy as np
class Classification(robokudo.types.core.Annotation):
class Classification(robokudo.types.core.Annotation):
def __init__(self):
def __init__(self):
@@ -26,28 +26,24 @@ class Plane(robokudo.types.core.Annotation):
@@ -26,28 +26,24 @@ class Plane(robokudo.types.core.Annotation):
self.inliers = [] # List of pointcloud indices
self.inliers = [] # List of pointcloud indices
class Cuboid(robokudo.types.core.Type):
class Shape(robokudo.types.core.Annotation):
def __init__(self):
def __init__(self):
super().__init__()
super().__init__()
self.model = [] # Has shape (3,4) - 3 plane equations
self.inliers = [] # List of pointcloud indices
self.inliers = [] # List of pointcloud indices
self.type = '' # Can be Cuboid, Sphere, etc.
class Sphere(robokudo.types.core.Type):
class Cuboid(Shape):
def __init__(self):
def __init__(self):
super().__init__()
super().__init__()
self.radius = 0.0 # Radius of sphere shape
self.model = [] # Has shape (3,4) - 3 plane equations
self.center = np.zeros(3) # ndarray with shape (3,) represents a single coordinate
self.inliers = [] # List of pointcloud indices
# Store dimensions of oriented bounding box
class Sphere(Shape):
class OBBDimensions(robokudo.types.core.Type):
def __init__(self):
def __init__(self):
super().__init__()
super().__init__()
self.width = 0.0
self.radius = 0.0 # Radius of sphere shape
self.height = 0.0
self.center = np.zeros(3) # ndarray with shape (3,) represents a single coordinate
self.depth = 0.0
# Usually a 2D histogram containing hue and saturation
# Usually a 2D histogram containing hue and saturation
Loading