Articles

Affichage des articles du 2015

odules:ty:compileJavaWARNING

modules:ty:compileJava WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/Users/---/.gradle/caches/3.0/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages() WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

How load css file in javafx 8

Problem : scene.getStylesheets().add("application.css");  Use : scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm())

ComboBox was to be editable !!! getValue() doesn't work

 the raw user input (before they press enter) is not available, only what the user commits after pressing the Enter key.

java.lang.OutOfMemoryError: Java heap space

java.lang.OutOfMemoryError: Java heap space Solution : To increase the heap size you can use the -Xmx argument when starting Java; e.g. - Xmx256M

no rxtxSerial in java.library.path thrown while loading

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path cause of problem : use plus then one JAR

VideoCapture camera

Exception in thread "main" java.lang.Exception: unknown exception at org.opencv.videoio.VideoCapture.VideoCapture_2(Native Method) at org.opencv.videoio.VideoCapture.<init>(VideoCapture.java:54) at cam.Webcam.main(Webcam.java:16) TRY this code after VideoCapture VideoCapture camera = new VideoCapture();     try { Thread.sleep(4000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); }

openCv Errors

 Highgui.imwrite("camera.jpg", frame); doesn't work any more use Imgcodecs.imwrite instead

CascadeClassifier faceDetector

OpenCV Error: Assertion failed (!empty()) in cv::CascadeClassifier::detectMultiScale, file C:\builds\master_PackSlaveAddon-win32-vc12-static\opencv\modules\objdetect\src\cascadedetect.cpp, line 1634 Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: C:\builds\master_PackSlaveAddon-win32-vc12-static\opencv\modules\objdetect\src\cascadedetect.cpp:1634: error: (-215) !empty() in function cv::CascadeClassifier::detectMultiScale ] at org.opencv.objdetect.CascadeClassifier.detectMultiScale_1(Native Method) at org.opencv.objdetect.CascadeClassifier.detectMultiScale(CascadeClassifier.java:103) solution : make sure that you do this following steps : - path absolute - test if empty  CascadeClassifier faceDetector = new CascadeClassifier("C:/opencv/sources/data/haarcascades/haarcascade_frontalface_alt.xml");               Mat image = Imgcodecs.imread("D:/network/opencv/lena2.png");           if (faceDetector.empty(

FaceDetector.java

Running FaceDetector Exception in thread "main" java.lang.NullPointerException at cam.FaceDetector.main(FaceDetector.java:20) solution the path absolute solution : make sure that you do this following steps : - path absolute - test if empty  CascadeClassifier faceDetector = new CascadeClassifier("C:/opencv/sources/data/haarcascades/haarcascade_frontalface_alt.xml");               Mat image = Imgcodecs.imread("D:/network/opencv/lena2.png");         if (faceDetector.empty()){      System.out.println("faceless");     }     if(image.empty()){      System.out.println("imageless");     }