public class Resolution
extends java.lang.Object
| Constructor and Description |
|---|
Resolution(int width,
int height)
Creates an instance of an image's resolution in pixels.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static Resolution |
fromMat(org.opencv.core.Mat image)
Create a resolution from an image.
|
int |
getArea()
Get the area of the image in pixels.
|
int |
getHeight()
Get the height of the image in pixels.
|
int |
getWidth()
Get the width of the image in pixels.
|
int |
hashCode() |
Resolution |
scaleBy(double scale)
Create a scaled resolution.
|
void |
setHeight(int height)
Set the height of the image in pixels.
|
void |
setWidth(int width)
Set the width of the image in pixels.
|
java.lang.String |
toString() |
public Resolution(int width,
int height)
width - The width of the image in pixels.height - The height of the image in pixels.public int getWidth()
public void setWidth(int width)
width - The width.public int getHeight()
public void setHeight(int height)
height - The height.public int getArea()
public Resolution scaleBy(double scale)
scale - The scale to multiply by.public static Resolution fromMat(org.opencv.core.Mat image)
image - The image to base the resolution off of.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object