class Box2d extends Serializable
2-D Bounding Box
- Annotations
- @SQLUserDefinedType() @SerialVersionUID()
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Box2d
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new Box2d(xmin: Double, ymin: Double, xmax: Double, ymax: Double)
Create a 2-D Bounding Box.
Create a 2-D Bounding Box.
- xmin
x-corrdinate of the top-left of the box.
- ymin
y-corrdinate of the top-left of the box.
- xmax
x-corrdinate of the bottom-right of the box.
- ymax
y-corrdinate of the bottom-right of the box.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def &(that: Box2d): Option[Box2d]
Return the intersection/overlap of two bounding boxes if exist.
Return the intersection/overlap of two bounding boxes if exist.
val overlap = box1 & box2 val overlap_area = overlap.map(b => b.area()).getOrElse(0);
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def area: Double
Calculate the size of the bounding box.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(b: Any): Boolean
- Definition Classes
- Box2d → AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def intersect(that: Box2d): Option[Box2d]
Return the intersection of two bounding boxes if exist.
Return the intersection of two bounding boxes if exist.
val overlap = box1 intersect box2 val overlap_area = overlap.map(b => b.area()).getOrElse(0);
- def iou(that: Box2d): Double
Calculate IOU between two Box2d bounding boxes.
Calculate IOU between two Box2d bounding boxes.
https://www.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def overlaps(that: Box2d): Boolean
Return True of the two bounding box overlaps.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Box2d → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val xmax: Double
- val xmin: Double
- val ymax: Double
- val ymin: Double