ColourBlob

data class ColourBlob(val contour: MatOfPoint, val contourPoints: List<Point>, val contourArea: Int, val density: Double, val aspectRatio: Double, val boxFit: RotatedRect) : VisionData

Data class for storing data related to the return results of a ColorBlobLocatorProcessor.

Since

5.0.0

Constructors

Link copied to clipboard
constructor(cameraDimensions: Size?, contour: MatOfPoint, contourPoints: List<Point>, contourArea: Int, density: Double, aspectRatio: Double, boxFit: RotatedRect)

Alternate constructor that supports the usage of the toContourData method, which needs camera dimensions.

constructor(contour: MatOfPoint, contourPoints: List<Point>, contourArea: Int, density: Double, aspectRatio: Double, boxFit: RotatedRect)

Types

Link copied to clipboard
object Companion

Collection of utility functions found via the Util inner class of ColorBlobLocatorProcessor.

Properties

Link copied to clipboard

The aspect ratio i.e. the ratio of the longer side of the bounding box to the shorter side.

Link copied to clipboard
val boxFit: RotatedRect

"Best fit" bounding box for this blob.

Link copied to clipboard
val contour: MatOfPoint

The OpenCV contour corresponding to this blob.

Link copied to clipboard

The enclosed area by this blob's contour.

Link copied to clipboard
val contourPoints: List<Point>

The contour points for this blob.

Link copied to clipboard

The density i.e. ratio of the contour area to convex hull area.

Functions

Link copied to clipboard

Convert the ColourBlob information stored by this instance into ContourData information.