Skip to content
This repository was archived by the owner on Feb 21, 2021. It is now read-only.

Commit 90494e7

Browse files
committed
published version
0 parents  commit 90494e7

File tree

13 files changed

+538
-0
lines changed

13 files changed

+538
-0
lines changed

.classpath

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
5+
<classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/opencv2"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin

.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Lab6</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
21+
<nature>org.eclipse.jdt.core.javanature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=1.7
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11+
org.eclipse.jdt.core.compiler.source=1.7

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Image Segmentation with OpenCV and JavaFX
2+
3+
*Computer Vision course - [Politecnico di Torino](http://www.polito.it) - academic year 2014-2015*
4+
5+
A project, made in Eclipse (Luna), for experimenting with edge detection, erosion and dilatation. It performs image segmentation upon a webcam video stream.
6+
7+
Please, note that the project is an Eclipse project, made for teaching purposes. Before using it, you need to install the OpenCV library (version 2.4.9) and JavaFX (version 2 or superior) and create a `User Library` named `opencv2` that links to the OpenCV jar and native libraries.

build.fxbuild

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="ASCII"?>
2+
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build">
3+
<deploy>
4+
<application name="Lab6"/>
5+
<info/>
6+
</deploy>
7+
<signjar/>
8+
</anttasks:AntTask>

results/background-removal.png

64.9 KB
Loading

results/foreground-removal.png

149 KB
Loading

results/original.png

191 KB
Loading
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import javafx.geometry.*?>
4+
<?import javafx.scene.control.*?>
5+
<?import javafx.scene.layout.*?>
6+
<?import javafx.scene.image.*?>
7+
<?import javafx.scene.text.*?>
8+
9+
<BorderPane xmlns:fx="http://javafx.com/fxml" fx:controller="it.polito.teaching.cv.ImageSegController">
10+
<top>
11+
<VBox>
12+
<HBox alignment="CENTER" spacing="10">
13+
<padding>
14+
<Insets top="10" bottom="10" />
15+
</padding>
16+
<CheckBox fx:id="canny" onAction="#cannySelected" text="Edge detection"/>
17+
<Label text="Canny Threshold" />
18+
<Slider fx:id="threshold" disable="true" />
19+
</HBox>
20+
<Separator />
21+
<HBox alignment="CENTER" spacing="10">
22+
<padding>
23+
<Insets top="10" bottom="10" />
24+
</padding>
25+
<CheckBox fx:id="dilateErode" onAction="#dilateErodeSelected" text="Background removal"/>
26+
<CheckBox fx:id="inverse" text="Invert" disable="true"/>
27+
</HBox>
28+
<Separator />
29+
</VBox>
30+
</top>
31+
<center>
32+
<VBox alignment="CENTER">
33+
<padding>
34+
<Insets right="10" left="10" />
35+
</padding>
36+
<ImageView fx:id="originalFrame" />
37+
</VBox>
38+
</center>
39+
<bottom>
40+
<HBox alignment="CENTER">
41+
<padding>
42+
<Insets top="25" right="25" bottom="25" left="25" />
43+
</padding>
44+
<Button fx:id="cameraButton" alignment="center" text="Start camera" onAction="#startCamera" disable="true" />
45+
</HBox>
46+
</bottom>
47+
</BorderPane>

0 commit comments

Comments
 (0)