Package trclib.vision
Class TrcOpenCvFaceDetector.DetectedObject
java.lang.Object
trclib.vision.TrcOpenCvDetector.DetectedObject<org.opencv.core.Rect>
trclib.vision.TrcOpenCvFaceDetector.DetectedObject
- All Implemented Interfaces:
TrcVisionTargetInfo.ObjectInfo
- Enclosing class:
- TrcOpenCvFaceDetector
public static class TrcOpenCvFaceDetector.DetectedObject
extends TrcOpenCvDetector.DetectedObject<org.opencv.core.Rect>
This class encapsulates info of the detected object. It extends TrcOpenCvDetector.DetectedObject that requires
it to provide a method to return the detected object rect and area.
-
Field Summary
FieldsFields inherited from class trclib.vision.TrcOpenCvDetector.DetectedObject
label, object
-
Constructor Summary
ConstructorsConstructorDescriptionDetectedObject
(String label, org.opencv.core.Rect rect) Constructor: Creates an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptiondouble
This method returns the area of the detected object.This method returns the real world depth of the detected object.This method returns the pose of the detected object relative to the camera.org.opencv.core.Rect
This method returns the rect of the detected object.This method returns the real world width of the detected object.This method returns the object's pixel height.This method returns the object's pixel width.This method returns the object's rotated rectangle angle.org.opencv.core.Point[]
This method returns the rotated rect vertices of the detected object (not supported).Methods inherited from class trclib.vision.TrcOpenCvDetector.DetectedObject
toString
-
Field Details
-
rect
final org.opencv.core.Rect rect
-
-
Constructor Details
-
DetectedObject
Constructor: Creates an instance of the object.- Parameters:
label
- specifies the object label.rect
- specifies the rect of the detected object.
-
-
Method Details
-
getObjectRect
public org.opencv.core.Rect getObjectRect()This method returns the rect of the detected object.- Returns:
- rect of the detected object.
-
getObjectArea
public double getObjectArea()This method returns the area of the detected object.- Returns:
- area of the detected object.
-
getPixelWidth
This method returns the object's pixel width.- Returns:
- object pixel width, null if not supported.
-
getPixelHeight
This method returns the object's pixel height.- Returns:
- object pixel height, null if not supported.
-
getRotatedAngle
This method returns the object's rotated rectangle angle.- Returns:
- rotated rectangle angle.
-
getObjectPose
This method returns the pose of the detected object relative to the camera.- Returns:
- pose of the detected object relative to camera.
-
getObjectWidth
This method returns the real world width of the detected object.- Returns:
- real world width of the detected object.
-
getObjectDepth
This method returns the real world depth of the detected object.- Returns:
- real world depth of the detected object.
-
getRotatedRectVertices
public org.opencv.core.Point[] getRotatedRectVertices()This method returns the rotated rect vertices of the detected object (not supported).- Returns:
- rotated rect vertices.
-