Object Detection using Template

- Main Page
- Packages
- Classes
- Files

- File List

All Classes Namespaces Files Functions Variables
Separe.java
Go to the documentation of this file.
1 package cz.vutbr.feec.novak68;
2
3
4 import ij.ImagePlus;
5
6 import java.io.File;
7 import java.io.IOException;
8 import java.util.Arrays;
9
10 import cz.vutbr.feec.novak68.detector.Detector;
11 import cz.vutbr.feec.novak68.detector.DetectorImpl;
12
17 public class Separe {
18 private final static double DETECTION_THRESHOLD = 0.75;//0.75
19 private final static double DETECTION_THRESHOLD_NEGATIVE = 0.513;//0.75
20 // private final static double DETECTION_THRESHOLD = 0.82;
21 private final static boolean USE_THRESHOLD = true; //Zapnout/vypnout threshold
22 private final static boolean USE_THRESHOLD_NEGATIVE = false; //Zapnout/vypnout threshold
23
24 private final static boolean USE_VARIANCE = false;
25 // private static final double scale = 3;
26 private static final double step = 0.2;
27 private static final double zoom = 0.60; //poměr výšky detekčního okna : testovacímu obrázku
28
29 private static Detector detector;
30 public static void main(String[] args) throws IOException {
31 File Folder = new File("data/test");
32 File[] listOfFiles = Folder.listFiles();
33 Arrays.sort(listOfFiles);
34
35 ImagePlus[] sourceImage = new ImagePlus[listOfFiles.length];
36 detector = new DetectorImpl(DETECTION_THRESHOLD, DETECTION_THRESHOLD_NEGATIVE, USE_THRESHOLD, USE_THRESHOLD_NEGATIVE, USE_VARIANCE, step, zoom);
37 for (int i = 0; i<listOfFiles.length ; i++) {
38
39 // ImagePlus sourceImage = new ImagePlus("data/pedestrian/test/stažený soubor (1).jpg");
40 sourceImage[i] = new ImagePlus("data/test/" + listOfFiles[i].getName());
41 System.out.println("Detecting: " + listOfFiles[i].getName());
42 detector.detect(sourceImage[i]);
43 }
44 System.out.println("Detection done");
45 return;
46 }
47 }
cz.vutbr.feec.novak68.detector.Detector
Definition: Detector.java:12
cz.vutbr.feec.novak68.Separe.detector
static Detector detector
Definition: Separe.java:29
cz.vutbr.feec.novak68.Separe
Definition: Separe.java:17
cz.vutbr.feec.novak68.Separe.DETECTION_THRESHOLD
static final double DETECTION_THRESHOLD
Definition: Separe.java:18
cz.vutbr.feec.novak68.Separe.zoom
static final double zoom
Definition: Separe.java:27
cz.vutbr.feec.novak68.Separe.DETECTION_THRESHOLD_NEGATIVE
static final double DETECTION_THRESHOLD_NEGATIVE
Definition: Separe.java:19
cz.vutbr.feec.novak68.Separe.USE_VARIANCE
static final boolean USE_VARIANCE
Definition: Separe.java:24
cz.vutbr.feec.novak68.Separe.USE_THRESHOLD_NEGATIVE
static final boolean USE_THRESHOLD_NEGATIVE
Definition: Separe.java:22
cz.vutbr.feec.novak68.Separe.USE_THRESHOLD
static final boolean USE_THRESHOLD
Definition: Separe.java:21
cz.vutbr.feec.novak68.Separe.step
static final double step
Definition: Separe.java:26
cz.vutbr.feec.novak68.detector.DetectorImpl
Definition: DetectorImpl.java:27
cz.vutbr.feec.novak68.Separe.main
static void main(String[] args)
Definition: Separe.java:30