Thanks for this guys very much:
- Rob Terpilowski with his Google maps api for JavaFX and
- Bartosz Firyn with his webcam library.
- Luigi Derussis with his really cool and helpful examples and articles
There will be the next attempt to create by using Qt platform to get something like this or more fresh project but this project is suitable to rapid prototyping the main idea.
Here is the screen capture for the main ideas:
Maps (styled):
Audio panel:
Browser:
Video panel with carcams:
Photo viewer:
Phone tab:
Smart tab:
Warn if OpenCV can't be loaded
Build and run:
Note: now application supports:
- Minimum required version of Java for APPLICATION is JDK 10
- OpenCV ver.3.4.1
We will use precompiled libs from our project (folder local-maven-repo)
or
from official web-site OpenCV
or feel free to compile OpenCV from source code (as me).
In case of using from web-site, please, Download OpenCV and unpack it to a <path-to-installed-opencv>
Note: now there is a conflict with came at video tab and smart tab. Choose only one way to get video stream from cams.
You also need to install java lib to a local maven repository by invoking next command:
for Windows:
mvn install:install-file -Dfile=<path-to-installed-opencv>\build\java\opencv-341.jar -DgroupId=org.opencv -DartifactId=opencv.win10_64 -Dversion=3.4.1 -Dpackaging=jar
or
mvn install:install-file -Dfile=${project.basedir}\local-maven-repo\opencv-341.jar -DgroupId=org.opencv -DartifactId=opencv.win10_64 -Dversion=3.4.1 -Dpackaging=jar
for Linux (invoke from project root folder):
mvn install:install-file -Dfile=local-maven-repo/opencv-341.jar -DgroupId=org.opencv -DartifactId=opencv.win10_64 -Dversion=3.4.1 -Dpackaging=jar
then assembly distributive with all JAVA dependencies:
package assembly:single -Dmaven.test.skip=true -f pom.xml
It won't contain native library so it still needs to pass it as JVM argument in order to run it:
java -Djava.library.path=<path-to-installed-opencv>\<path-fith-native-library-folder> -jar <Path-to-your-jar>/main_carauto_board-1.1-SNAPSHOT-jar-with-dependencies.jar
Now I'm starting playing around hardware accelerating with next parameters:
-Dprism.verbose=true
-Dprism.forceGPU=true
-Dprism.order=es2,j2d
-Dsun.java2d.opengl=true
It also good idea to place prebuilt native libraries into resourse folder and use it without passing as JVM argument
Copyright (C) 2017 - 2018 Evgenii Lartcev and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.