public class

FritzVisionSegmentResult

extends FritzVisionResult
java.lang.Object
   ↳ ai.fritz.vision.outputs.FritzVisionResult
     ↳ ai.fritz.fritzvisionsegmentation.FritzVisionSegmentResult

Class Overview

FritzVisionSegmentResult holds the result from the predict(FritzVisionImage) method.

Summary

[Expand]
Inherited Fields
From class ai.fritz.vision.outputs.FritzVisionResult
Public Constructors
FritzVisionSegmentResult(FritzVisionImage originalImage, List<FritzVisionMask> masks)
Public Methods
void drawAllMasks(Canvas canvas, int alpha, Size canvasSize)
Draw a scaled mask for a specific canvas size.
void drawAllMasks(Canvas canvas)
Draw all masks.
void drawAllMasks(Canvas canvas, int alpha)
Draw all masks
FritzVisionMask findMask(MaskType maskType)
Find a mask given the segment class.
List<FritzVisionMask> getMasks()
Get all masks found.
Bitmap getResultBitmap(Size canvasSize)
Get a bitmap with all masks drawn scaled to the given size.
Bitmap getResultBitmap()
Get a bitmap with all masks drawn.
[Expand]
Inherited Methods
From class ai.fritz.vision.outputs.FritzVisionResult
From class java.lang.Object

Public Constructors

public FritzVisionSegmentResult (FritzVisionImage originalImage, List<FritzVisionMask> masks)

Public Methods

public void drawAllMasks (Canvas canvas, int alpha, Size canvasSize)

Draw a scaled mask for a specific canvas size.

public void drawAllMasks (Canvas canvas)

Draw all masks.

Mask color overlays will be 25% opacity.

public void drawAllMasks (Canvas canvas, int alpha)

Draw all masks

public FritzVisionMask findMask (MaskType maskType)

Find a mask given the segment class.

If no mask is found, null is returned.

Returns
  • that matching class

public List<FritzVisionMask> getMasks ()

Get all masks found.

Returns
  • a list of masks

public Bitmap getResultBitmap (Size canvasSize)

Get a bitmap with all masks drawn scaled to the given size.

Parameters
canvasSize - the desired size of the bitmap returned.
Returns
  • a bitmap scaled to the given size.

public Bitmap getResultBitmap ()

Get a bitmap with all masks drawn.

Returns
  • a bitmap.