Object Detection using Template

- Main Page
- Packages
- Classes
- Files

- File List

All Classes Namespaces Files Functions Variables
Coordinate.java
Go to the documentation of this file.
1 package cz.vutbr.feec.novak68.tools;
2
3 import java.awt.Dimension;
4 import java.awt.Point;
5
6 import cz.vutbr.feec.novak68.imageProcessor.ImageFacade;
7
15 public final class Coordinate {
16 public final Point leftTop;
17 public final double scale;
18 public final Point center;
19 public final Dimension dimension;
20 public Coordinate(int posX, int posY, int width, int height){
21 leftTop = new Point(posX, posY);
22 dimension = new Dimension(width, height);
23 this.center = new Point(leftTop.x + dimension.width / 2, leftTop.y + dimension.height /2);
24 this.scale = height / ImageFacade.IMAGE_BASE_SIZE.height;
25 }
26 public Coordinate(int posX, int posY, double scale){
27 leftTop = new Point(posX, posY);
28 this.scale = scale;
29 dimension = new Dimension((int)(ImageFacade.IMAGE_BASE_SIZE.width * scale), (int)(ImageFacade.IMAGE_BASE_SIZE.height * scale));
30 this.center = new Point(leftTop.x + dimension.width / 2, leftTop.y + dimension.height /2);
31 }
32 }
cz.vutbr.feec.novak68.tools.Coordinate.center
final Point center
Definition: Coordinate.java:18
cz.vutbr.feec.novak68.tools.Coordinate.dimension
final Dimension dimension
Definition: Coordinate.java:19
cz.vutbr.feec.novak68.tools.Coordinate
Definition: Coordinate.java:15
cz.vutbr.feec.novak68.imageProcessor.ImageFacade.IMAGE_BASE_SIZE
static final Dimension IMAGE_BASE_SIZE
Definition: ImageFacade.java:22
cz.vutbr.feec.novak68.tools.Coordinate.leftTop
final Point leftTop
Definition: Coordinate.java:16
cz.vutbr.feec.novak68.tools.Coordinate.Coordinate
Coordinate(int posX, int posY, double scale)
Definition: Coordinate.java:26
cz.vutbr.feec.novak68.tools.Coordinate.scale
final double scale
Definition: Coordinate.java:17
cz.vutbr.feec.novak68.imageProcessor.ImageFacade
Definition: ImageFacade.java:21
cz.vutbr.feec.novak68.tools.Coordinate.Coordinate
Coordinate(int posX, int posY, int width, int height)
Definition: Coordinate.java:20