Documentation ¶
Index ¶
- Variables
- func DetectionBoxes(img *gocv.Mat, detectResults []postprocess.DetectResult, classNames []string, ...)
- func FaceKeyPoints(img *gocv.Mat, keyPoints [][]postprocess.KeyPoint)
- func OrientedBoundingBoxes(img *gocv.Mat, detectResults []postprocess.DetectResult, classNames []string, ...)
- func PaintSegmentToFile(filename string, height, width int, segMask []uint8, alpha float32) error
- func PoseKeyPoints(img *gocv.Mat, keyPoints [][]postprocess.KeyPoint, lineThickness int)
- func SegmentMask(img *gocv.Mat, segMask []uint8, alpha float32)
- func SegmentOutline(img *gocv.Mat, segMask []uint8, detectResults []postprocess.DetectResult, ...) error
- func TrackerBoxes(img *gocv.Mat, trackResults []*tracker.STrack, classNames []string, font Font, ...)
- func TrackerMask(img *gocv.Mat, segMask []uint8, trackResults []*tracker.STrack, ...)
- func TrackerOrientedBoundingBoxes(img *gocv.Mat, trackResults []*tracker.STrack, ...)
- func TrackerOutlines(img *gocv.Mat, segMask []uint8, trackResults []*tracker.STrack, ...) error
- func Trail(img *gocv.Mat, trackResults []*tracker.STrack, trail *tracker.Trail, ...)
- type Alignment
- type Font
- type TrailStyle
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DetectionBoxes ¶
func DetectionBoxes(img *gocv.Mat, detectResults []postprocess.DetectResult, classNames []string, font Font, lineThickness int)
DetectionBoxes renders the bounding boxes around the object detected
func FaceKeyPoints ¶
func FaceKeyPoints(img *gocv.Mat, keyPoints [][]postprocess.KeyPoint)
FaceKeyPoints renders the provided face landmark keypoints for all faces detected
func OrientedBoundingBoxes ¶
func OrientedBoundingBoxes(img *gocv.Mat, detectResults []postprocess.DetectResult, classNames []string, font Font, lineThickness int)
OrientedBoundingBoxes renders the oriented bounding boxes around the object detected
func PaintSegmentToFile ¶
PaintSegmentToFile paints the segment mask to and image file
func PoseKeyPoints ¶
func PoseKeyPoints(img *gocv.Mat, keyPoints [][]postprocess.KeyPoint, lineThickness int)
PoseKeyPoints renders the provided pose estimation keypoints for all objects
func SegmentMask ¶
SegmentMask renders the provided segment masks as a transparent overlay on top of the whole image
func SegmentOutline ¶
func SegmentOutline(img *gocv.Mat, segMask []uint8, detectResults []postprocess.DetectResult, minArea float64, classNames []string, font Font, lineThickness int) error
SegmentOutline renders the provided segment masks object outline for all objects. The minArea is the value required for the masks minimum area for it to be used, this is needed to filter out small amounts of noise/artifacts contained in the mask from inferencing.
func TrackerBoxes ¶
func TrackerBoxes(img *gocv.Mat, trackResults []*tracker.STrack, classNames []string, font Font, lineThickness int)
TrackerBoxes renders the bounding boxes around the object detected for tracker results
func TrackerMask ¶
func TrackerMask(img *gocv.Mat, segMask []uint8, trackResults []*tracker.STrack, detectResults []postprocess.DetectResult, alpha float32)
TrackerMask renders the provided segment masks as a transparent overlay on top of the whole image. alpha is the amount of opacity to apply to the mask overlay.
func TrackerOrientedBoundingBoxes ¶
func TrackerOrientedBoundingBoxes(img *gocv.Mat, trackResults []*tracker.STrack, detectResults []postprocess.DetectResult, classNames []string, font Font, lineThickness int)
func TrackerOutlines ¶
func TrackerOutlines(img *gocv.Mat, segMask []uint8, trackResults []*tracker.STrack, detectResults []postprocess.DetectResult, minArea float64, classNames []string, font Font, lineThickness int, epsilon float64) error
TrackerOutlines draws the object segmentation outlines around tracker objects. The minArea is the value required for the masks minimum area for it to be used, this is needed to filter out small amounts of noise/artifacts contained in the mask from inferencing. The epsilon value effects the shape of the polygon outline. The higher the value the more round it becomes.
Types ¶
type Font ¶
type Font struct { Face gocv.HersheyFont Scale float64 Color color.RGBA Thickness int LineType gocv.LineType // Padding to place around text LeftPad int RightPad int TopPad int BottomPad int // Alignment of the text label to the bounding box Alignment Alignment }
Font defines the parameters for rendering text on an image using GoCV
func DefaultFontAlign ¶
DefaultFont returns default font settings with specified alignment
type TrailStyle ¶
type TrailStyle struct { // LineSame defines if the color of the trail line should be the // same color as that of the bounding box. If set to false then use // the color specified at LineColor LineSame bool LineColor color.RGBA LineThickness int // CircleSame defines if the color of the midpoint circle should be the // same color as that of the bounding box. If set to false then use // the color specified at CircleColor CircleSame bool CircleColor color.RGBA CircleRadius int }
TrailStyle defines the parameters used for rendering the trail style
func DefaultTrailStyle ¶
func DefaultTrailStyle() TrailStyle
DefaultTrailStyle returns default trail style settings