Object Detection using Template

- Main Page
- Packages
- Classes
- Files

- File List

All Classes Namespaces Files Functions Variables
SimpleSymetryComparator.java
Go to the documentation of this file.
1 package cz.vutbr.feec.novak68.hogcomparators;
2
3 import cz.vutbr.feec.novak68.HOG;
4
10 public class SimpleSymetryComparator extends SymetryBaseComparator{
11
12 private int threshold;
13
14 public SimpleSymetryComparator() {
15 this.threshold = 1000;
16 }
17
18 public SimpleSymetryComparator(int threshold) {
19 this.threshold = threshold;
20 }
21
22 @Override
23 public double getDistance(HOG hog1, HOG hog2) {
24 int xSymetry = 0;
25 int ySymetry = 0;
26 xSymetry = computeXSymetry(threshold, hog1.getCells()) - computeXSymetry(threshold, hog2.getCells());
27 ySymetry = computetYSymetry(threshold, hog1.getCells()) - computetYSymetry(threshold, hog2.getCells());
28 return Math.sqrt(Math.pow(xSymetry, 2) + Math.pow(ySymetry, 2));
29 }
30
31 }
cz.vutbr.feec.novak68.hogcomparators.SimpleSymetryComparator
Definition: SimpleSymetryComparator.java:10
cz.vutbr.feec.novak68.hogcomparators.SimpleSymetryComparator.getDistance
double getDistance(HOG hog1, HOG hog2)
Definition: SimpleSymetryComparator.java:23
cz.vutbr.feec.novak68.hogcomparators.SimpleSymetryComparator.SimpleSymetryComparator
SimpleSymetryComparator()
Definition: SimpleSymetryComparator.java:14
cz.vutbr.feec.novak68.hogcomparators.SymetryBaseComparator.computetYSymetry
int computetYSymetry(float threshold, float[][][] cells)
Definition: SymetryBaseComparator.java:14
cz.vutbr.feec.novak68.hogcomparators.SymetryBaseComparator.computeXSymetry
int computeXSymetry(float threshold, float[][][] cells)
Definition: SymetryBaseComparator.java:45
cz.vutbr.feec.novak68.HOG.getCells
float[][][] getCells()
Definition: HOG.java:345
cz.vutbr.feec.novak68.hogcomparators.SimpleSymetryComparator.SimpleSymetryComparator
SimpleSymetryComparator(int threshold)
Definition: SimpleSymetryComparator.java:18
cz.vutbr.feec.novak68.HOG
Definition: HOG.java:19
cz.vutbr.feec.novak68.hogcomparators.SimpleSymetryComparator.threshold
int threshold
Definition: SimpleSymetryComparator.java:12
cz.vutbr.feec.novak68.hogcomparators.SymetryBaseComparator
Definition: SymetryBaseComparator.java:10