Closed maxizu closed 8 years ago
Have a look at prq #4 . Fixed #2 and #3
Hey @maxizu,
thanks for opening this issue. Since I have never come across this bug, can you provide more details? In particular, for curiosity and, possibly, for further testing:
I know that the piece of code present in the project is not performant, so your suggestion is welcomed. My only "concern" is that you need to import awt packages... but I can survive to this thing. :)
I would like to think about it for some time before modifying the code in the project, read the links you provided, and perform some tests. Then, I will propagate the modification to the other projects in this organization that uses the same method.
Hey @luigidr , I am running OpenCV 3.1.0 , Java 1.8.0_91-b14 on ubuntu 14.04.4. I captured a lot of images from the webcam and sometimes the ImageViewer stopped working (not periodically). I debbuged the code and saved the image bevor and after the mat2Image function. The image which was saved at the beginning of the fct was fine. The Image which was saved after running the fct was (I think is was null). Since i changed the fct to the suggested one from blogspot i dont have any problems anymore.
Perfect, thanks for the clarification. I never tried with OpenCV 3.1.0 nor with a Java version newer than 1.8.0_31.
Solved by bc68dd37a5df6538eaa1a05fd895a79ca758777f.
Hey @luigidr at FXHelloCVController.java Lines 160-168 you convert a mat to a JavaFX Image. Sometimes this fct (random time) will not convert a mat correctly and the ImageViewer stops working(Will not receive a correct image anymore). Atm i dont know why, but i will find it out. I found this code which works well and is more performant. http://stackoverflow.com/questions/29120869/how-to-convert-matopencv-to-imagejavafx
Performance: Mat -> BufferedImage -> JavaFXImage http://cell0907.blogspot.de/2013/12/from-mat-to-bufferedimage.html -->