I can compile my code in netbeans 14!
I've checked the opencv 4.7.0 libary's been added, tried putting the opencv-470.jar and .dll in the working directory and have added the models to it too, but it still won't run!
I have also tried a older version of the libary 4.6.0, again no luck!
but when I run the code I get the following error:
run:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.opencv.dnn.Dnn.readNetFromCaffe_0(java.lang.String, java.lang.String)'
at org.opencv.dnn.Dnn.readNetFromCaffe_0(Native Method)
at org.opencv.dnn.Dnn.readNetFromCaffe(Dnn.java:130)
at AgeGenderRecognition.AgeGenderRecognition.main(AgeGenderRecognition.java:27)
C:\Users\cam30\AppData\Local\NetBeans\Cache\14\executor-snippets\run.xml:111: The following error occurred while executing this line:
C:\Users\cam30\AppData\Local\NetBeans\Cache\14\executor-snippets\run.xml:68: Java returned: 1
BUILD FAILED (total time: 0 seconds)
From the code:
public static void main(String[] args){
// Load networks
Net ageNet = Dnn.readNetFromCaffe("age_net.caffemodel", "age_deploy.prototxt");
Net genderNet = Dnn.readNetFromCaffe("gender_net.caffemodel", "gender_deploy.prototxt");
Net faceNet = Dnn.readNetFromTensorflow("opencv_face_detector_uint8.pb", "opencv_face_detector.pbtxt");
My Code works with a newer version of OpenCV 4.8.0