Skip to content

Commit

Permalink
repackaged
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Rode committed Mar 29, 2018
1 parent df6a2a2 commit 66151e9
Show file tree
Hide file tree
Showing 29 changed files with 47 additions and 101 deletions.
40 changes: 14 additions & 26 deletions app/src/main/java/de/serviceflow/frankenstein/fxml/FxMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@
import de.serviceflow.frankenstein.plugin.api.NativeSegmentFilter;
import de.serviceflow.frankenstein.plugin.api.SegmentVideoFilter;
import de.serviceflow.frankenstein.vf.segment.BWFilter;
import de.serviceflow.frankenstein.vf.segment.GLExampleFilter;
import de.serviceflow.frankenstein.vf.segment.NativeExampleFilter;
import de.serviceflow.frankenstein.vf.segment.StereoDistanceFilter;
import de.serviceflow.frankenstein.vf.segment.VideoEqualizerFilter;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import samplefilters.SampleFilter;

public class FxMain extends Application implements ConfigManager {

Expand Down Expand Up @@ -92,8 +88,8 @@ public void start(Stage primaryStage) {
(Object[]) null);
// nu.pattern.OpenCV.loadShared();
// nu.pattern.OpenCV.loadLocal();
System.out.println("Loading from " + System.getProperty("java.library.path"));
System.loadLibrary(org.opencv.core.Core.NATIVE_LIBRARY_NAME);
System.out.println("Loading from " + System.getProperty("java.library.path"));
System.loadLibrary(org.opencv.core.Core.NATIVE_LIBRARY_NAME);
} catch (ClassNotFoundException e) {
System.out.println("WARNING: nu.pattern.OpenCV not found.");
} catch (Throwable t) {
Expand Down Expand Up @@ -210,30 +206,22 @@ public void createSegmentFilters() {
try {
segmentFilters.add(new BWFilter());
segmentFilters.add(new StereoDistanceFilter());
segmentFilters.add(new SampleFilter());
segmentFilters.add(new GLExampleFilter());
} catch (Throwable t) {
t.printStackTrace();
}

// Filters with native proxy in jar
try {
segmentFilters.add(new NativeExampleFilter()); // try to load from
// plugin jar
segmentFilters.add(new VideoEqualizerFilter()); // try to load from
// plugin jar
} catch (Throwable t) {
t.printStackTrace();
}
/*
// Filters completly in jar
try {
segmentFilters
.add(loadExternalFilterInstance("de.serviceflow.frankenstein.vf.external.ExternalSampleFilter"));
} catch (Throwable t) {
t.printStackTrace();
}
*/
/*
* // Filters completly in jar try { segmentFilters
* .add(loadExternalFilterInstance(
* "de.serviceflow.frankenstein.plugin.opencv.NativeExampleFilter"));
* segmentFilters .add(loadExternalFilterInstance(
* "de.serviceflow.frankenstein.plugin.opencv.VideoEqualizerFilter"));
* segmentFilters .add(loadExternalFilterInstance(
* "de.serviceflow.frankenstein.plugin.opencv.ExternalSampleFilter"));
* segmentFilters .add(loadExternalFilterInstance(
* "de.serviceflow.frankenstein.plugin.jogamp.GLExampleFilter")); }
* catch (Throwable t) { t.printStackTrace(); }
*/
}

private SegmentVideoFilter loadExternalFilterInstance(String filterClassName) {
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/samplefilters/SampleConfigController.java

This file was deleted.

25 changes: 0 additions & 25 deletions app/src/main/java/samplefilters/SampleFilter.java

This file was deleted.

8 changes: 5 additions & 3 deletions plugin-jogamp/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,15 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding><!-- try to force encoding -->
</configuration>
</plugin>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.jogamp;

import de.serviceflow.frankenstein.plugin.api.SegmentConfigController;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.jogamp;

import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
Expand Down

This file was deleted.

This file was deleted.

8 changes: 5 additions & 3 deletions plugin-opencv/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding><!-- try to force encoding -->
</configuration>
</plugin>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.external;
package de.serviceflow.frankenstein.plugin.opencv;

import de.serviceflow.frankenstein.plugin.api.SegmentConfigController;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.serviceflow.frankenstein.vf.external;
package de.serviceflow.frankenstein.plugin.opencv;

import java.lang.reflect.Method;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.opencv;

import de.serviceflow.frankenstein.plugin.api.SegmentConfigController;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.opencv;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.opencv;

import de.serviceflow.frankenstein.plugin.api.SegmentConfigController;
import javafx.fxml.FXML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package de.serviceflow.frankenstein.vf.segment;
package de.serviceflow.frankenstein.plugin.opencv;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.external;
package de.serviceflow.frankenstein.plugin.opencv.jni;

import de.serviceflow.frankenstein.plugin.api.NativeFilter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cc0;
package de.serviceflow.frankenstein.plugin.opencv.jni;

import de.serviceflow.frankenstein.plugin.api.NativeFilter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.serviceflow.frankenstein.vf.jni;
package de.serviceflow.frankenstein.plugin.opencv.jni;

import de.serviceflow.frankenstein.plugin.api.NativeFilter;

Expand Down
4 changes: 2 additions & 2 deletions plugin-opencv/native/src/main/native/ExternalSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using namespace std;
using namespace cv;

JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_external_ExternalSample_init
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_ExternalSample_init
(JNIEnv* env, jobject obj)
{
JwMat* mat = JwMat::matptr;
Expand All @@ -21,7 +21,7 @@ JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_external_ExternalSamp
}
}

JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_external_ExternalSample_process
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_ExternalSample_process
(JNIEnv* env, jobject obj,
jobject matobj, jint frameId, jobject context)
{
Expand Down
4 changes: 2 additions & 2 deletions plugin-opencv/native/src/main/native/NativeExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using namespace std;
using namespace cv;

JNIEXPORT void JNICALL Java_cc0_NativeExample_init
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_NativeExample_init
(JNIEnv* env, jobject obj)
{
JwMat* mat = JwMat::matptr;
Expand All @@ -24,7 +24,7 @@ JNIEXPORT void JNICALL Java_cc0_NativeExample_init
cout << "Java_cc0_NativeExample_init END" << endl;
}

JNIEXPORT void JNICALL Java_cc0_NativeExample_process
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_NativeExample_process
(JNIEnv* env, jobject obj,
jobject matobj, jint frameId, jobject context)
{
Expand Down
4 changes: 2 additions & 2 deletions plugin-opencv/native/src/main/native/VideoEqualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using namespace std;
using namespace cv;

JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_jni_VideoEqualizer_init
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_VideoEqualizer_init
(JNIEnv* env, jobject obj)
{
JwMat* mat = JwMat::matptr;
Expand All @@ -21,7 +21,7 @@ JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_jni_VideoEqualizer_in
}
}

JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_vf_jni_VideoEqualizer_process
JNIEXPORT void JNICALL Java_de_serviceflow_frankenstein_plugin_opencv_jni_VideoEqualizer_process
(JNIEnv* env, jobject obj,
jobject matobj, jint frameId, jobject context, jint brightness, jint contrast, jint saturation)
{
Expand Down
6 changes: 3 additions & 3 deletions plugin-opencv/native/win32/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
<javahOutputFileName>nativeCode.h</javahOutputFileName>
<javahClassNames>
<javahClassName>cc0.JniTest</javahClassName>
<javahClassName>cc0.NativeExample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.vf.jni.VideoEqualizer</javahClassName>
<javahClassName>de.serviceflow.frankenstein.vf.external.ExternalSample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.NativeExample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.VideoEqualizer</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.ExternalSample</javahClassName>
</javahClassNames>
</configuration>
<goals>
Expand Down
6 changes: 3 additions & 3 deletions plugin-opencv/native/win64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
<javahOutputFileName>nativeCode.h</javahOutputFileName>
<javahClassNames>
<javahClassName>cc0.JniTest</javahClassName>
<javahClassName>cc0.NativeExample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.vf.jni.VideoEqualizer</javahClassName>
<javahClassName>de.serviceflow.frankenstein.vf.external.ExternalSample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.NativeExample</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.VideoEqualizer</javahClassName>
<javahClassName>de.serviceflow.frankenstein.plugin.opencv.jni.ExternalSample</javahClassName>
</javahClassNames>
</configuration>
<goals>
Expand Down

0 comments on commit 66151e9

Please sign in to comment.