Object Detection using Template

- Main Page
- Packages
- Classes
- Files

- File List

All Classes Namespaces Files Functions Variables
ExampleTableCreator.java
Go to the documentation of this file.
1 package cz.vutbr.feec.novak68.imageProcessor;
2
3 import java.util.LinkedList;
4 import java.util.List;
5
6 import com.rapidminer.example.Attribute;
7 import com.rapidminer.example.ExampleSet;
8 import com.rapidminer.example.table.AttributeFactory;
9 import com.rapidminer.example.table.DataRowFactory;
10 import com.rapidminer.example.table.MemoryExampleTable;
11 import com.rapidminer.tools.Ontology;
12
13 public class ExampleTableCreator {
14 private final List <Attribute> attributes = new LinkedList<Attribute>();
15 private MemoryExampleTable table;
16 private final Attribute COORDINATES = AttributeFactory.createAttribute("Coordinates", Ontology.STRING);
17 private final Attribute SIMPLE_C = AttributeFactory.createAttribute("simpleC", Ontology.REAL);
18 private final Attribute SYMETRY_C = AttributeFactory.createAttribute("symetryC", Ontology.REAL);
19 private final Attribute X_SYMETRY = AttributeFactory.createAttribute("xSymetry", Ontology.INTEGER);
20 private final Attribute Y_SYMETRY = AttributeFactory.createAttribute("ySymetry", Ontology.INTEGER);
21 private final Attribute ALL_ELEMENT_C = AttributeFactory.createAttribute("allElementC", Ontology.INTEGER);
22 private final Attribute H_ELEMENT_C = AttributeFactory.createAttribute("hElementC", Ontology.INTEGER);
23 private final Attribute V_ELEMENT_C = AttributeFactory.createAttribute("vElementC", Ontology.INTEGER);
24 private final Attribute OTHER_ELEMENT_C = AttributeFactory.createAttribute("otherElementC", Ontology.INTEGER);
25
26 public ExampleTableCreator(){
27 attributes.add(COORDINATES);
28 attributes.add(SIMPLE_C);
29 attributes.add(SYMETRY_C);
30 attributes.add(X_SYMETRY);
31 attributes.add(Y_SYMETRY);
32 attributes.add(ALL_ELEMENT_C);
33 attributes.add(H_ELEMENT_C);
34 attributes.add(V_ELEMENT_C);
35 attributes.add(OTHER_ELEMENT_C);
36
37 table = new MemoryExampleTable(attributes);
38 }
39 public void addRow(String coordinate, double simpleC, double symetryC, int xSymetry,
40 int ySymetry, int allElementC, int hElementC, int vElementC, int otherElementC){
41 DataRowFactory rowFactory = new DataRowFactory(0, '.');
42 String [] data = {coordinate, Double.toString(simpleC),
43 Double.toString(symetryC),
44 Integer.toString(xSymetry),
45 Integer.toString(ySymetry),
46 Integer.toString(allElementC),
47 Integer.toString(hElementC),
48 Integer.toString(vElementC),
49 Integer.toString(otherElementC)
50 };
51 rowFactory.create(data, attributes.toArray(new Attribute[0]));
52 //add data row
53 table.addDataRow(rowFactory.create(data, attributes.toArray(new Attribute[0])));
54 }
55 public ExampleSet getDataSet(){
56 return table.createExampleSet();
57 }
58
59 }
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.addRow
void addRow(String coordinate, double simpleC, double symetryC, int xSymetry, int ySymetry, int allElementC, int hElementC, int vElementC, int otherElementC)
Definition: ExampleTableCreator.java:39
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.Y_SYMETRY
final Attribute Y_SYMETRY
Definition: ExampleTableCreator.java:20
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.SYMETRY_C
final Attribute SYMETRY_C
Definition: ExampleTableCreator.java:18
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.ExampleTableCreator
ExampleTableCreator()
Definition: ExampleTableCreator.java:26
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.COORDINATES
final Attribute COORDINATES
Definition: ExampleTableCreator.java:16
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.getDataSet
ExampleSet getDataSet()
Definition: ExampleTableCreator.java:55
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.H_ELEMENT_C
final Attribute H_ELEMENT_C
Definition: ExampleTableCreator.java:22
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator
Definition: ExampleTableCreator.java:13
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.ALL_ELEMENT_C
final Attribute ALL_ELEMENT_C
Definition: ExampleTableCreator.java:21
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.V_ELEMENT_C
final Attribute V_ELEMENT_C
Definition: ExampleTableCreator.java:23
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.table
MemoryExampleTable table
Definition: ExampleTableCreator.java:15
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.OTHER_ELEMENT_C
final Attribute OTHER_ELEMENT_C
Definition: ExampleTableCreator.java:24
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.X_SYMETRY
final Attribute X_SYMETRY
Definition: ExampleTableCreator.java:19
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.attributes
final List< Attribute > attributes
Definition: ExampleTableCreator.java:14
cz.vutbr.feec.novak68.imageProcessor.ExampleTableCreator.SIMPLE_C
final Attribute SIMPLE_C
Definition: ExampleTableCreator.java:17