public class Mask extends Rectangle
This class is usually used to record the results of an Image Segmentation task.
| Constructor and Description |
|---|
Mask(double x,
double y,
double width,
double height,
float[][] dist)
Constructs a Mask with the given data.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics2D g,
int imageWidth,
int imageHeight)
Draws the bounding box using the
Graphics2D. |
float[][] |
getProbDist()
Returns the probability for each pixel.
|
public Mask(double x,
double y,
double width,
double height,
float[][] dist)
x - the left coordinate of the bounding rectangley - the top coordinate of the bounding rectanglewidth - the width of the bounding rectangleheight - the height of the bounding rectangledist - the probability distribution for each pixel in the rectanglepublic float[][] getProbDist()
public void draw(java.awt.Graphics2D g,
int imageWidth,
int imageHeight)
Graphics2D.draw in interface BoundingBoxdraw in class Rectangleg - the Graphics2D object of the imageimageWidth - the width of the imageimageHeight - the height of the image