Companion

object Companion

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

Functions

Link copied to clipboard
fun filterByArea(minArea: Int, maxArea: Int, blobs: List<ColourBlob>): List<ColourBlob>

Filter blobs by minimum and maximum area.

Link copied to clipboard
fun filterByAspectRatio(minAspectRatio: Double, maxAspectRatio: Double, blobs: List<ColourBlob>): List<ColourBlob>

Filter blobs by minimum and maximum aspect ratio.

Link copied to clipboard
fun filterByDensity(minDensity: Double, maxDensity: Double, blobs: List<ColourBlob>): List<ColourBlob>

Filter blobs by minimum and maximum density.

Link copied to clipboard
fun sortByArea(sortOrder: SortOrder, blobs: List<ColourBlob>): List<ColourBlob>

Sorts a list of blobs by area.

Link copied to clipboard
fun sortByAspectRatio(sortOrder: SortOrder, blobs: List<ColourBlob>): List<ColourBlob>

Sorts a list of blobs by aspect ratio.

Link copied to clipboard
fun sortByDensity(sortOrder: SortOrder, blobs: List<ColourBlob>): List<ColourBlob>

Sorts a list of blobs by density.