Closed Renegade9819 closed 7 years ago
Could you provide some additional information about this issue? Java version, OS, IDE, ...?
The Utils
class is https://github.com/opencv-java/getting-started/blob/master/FXHelloCV/src/it/polito/elite/teaching/cv/utils/Utils.java so I don't get the error...
JDK 1.8 Eclipse Neon 3 Windows 10 professional 64 bit
I fixed the above problem. Just had to create the package which contained Utils.java
Thank you for the quick reply. Your code is simple to understand. You have been a great help :D
You're welcome. I close the issue.
I have the package but I get this error
The method mat2Image(Mat) in the type Utils is not applicable for the arguments (opencv_core.Mat)
and
The method cvtColor(Mat, Mat, int) in the type Imgproc is not applicable for the arguments (opencv_core.Mat, opencv_core.Mat, int)
Hi @gakyoo, could you please confirm that you are using the official OpenCV Java API (included in OpenCV, https://opencv.org) and not JavaCV or similar alternatives? This project works with the (official) OpenCV Java API, only.
The class opencv_core.Mat
doesn't seem an OpenCV class, at least according to the official JavaDocs: https://docs.opencv.org/java/3.0.0/
Thanks @luigidr for prompt reply it happened I was using opencv and javacv at the same time, I used documentation for the link you hared and it now works fine. http://opencv-java-tutorials.readthedocs.io/en/latest/02-first-java-application-with-opencv.html
@Renegede1819 I am also facing the same problem..how to fix it please explain
JDK 1.8 Eclipse Neon 3 Windows 10 professional 64 bit
I fixed the above problem. Just had to create the package which contained Utils.java
Thank you for the quick reply. Your code is simple to understand. You have been a great help :D
how did you solve it, i didn't understand
To solve the issue, you need to create a new Utils.java Class in your Eclipse-Project. This Class contains the function "onFXThread". You can see how it was done by the authors here: https://github.com/opencv-java/getting-started/blob/master/FXHelloCV/src/it/polito/elite/teaching/cv/utils/Utils.java
Errors in FXHelloCVController.java
Error: The method mat2Image(Mat) is undefined for the type Utils
private void updateImageView(ImageView view, Image image){ Utils.onFXThread(view.imageProperty(), image);
Error : The method onFXThread(ObjectProperty, Image) is undefined for the type Utils