Laex / Delphi-OpenCV

Project Delphi-OpenCV. Translation of OpenCV library header files in Delphi
500 stars 226 forks source link

Bug in Tocvcamerasource .onimage #115

Closed JeanYvesJonet closed 5 years ago

JeanYvesJonet commented 5 years ago

Hello, when you are triggering camera , if you disconnected it, it's impossible to reconnect it. You need to restart delphi application. (all threads are frozen) But if you are sending frames in continous it's possible to disconnect camera en re-connect on line without any problem. I think it's a problem into the thread of frame capture, it is waiting for a frame capture ... and stay blocked. Thank you for your help. Best regards

JeanYvesJonet commented 5 years ago

Hello, no changement. I try it but after "Device Unplugged" it's impossible to restart camera without stop application. Perhaps i don't execute good code to reconnect it ? Best regards.

HuguesDug commented 5 years ago

Hello Laex,

I think it has to see with the handling of error when you use cvgrabeframe inside the ThreadExecute. You have a try finally, but in case you have an exception, you do not "manage" the error, then the thread loops permanently.

Laex commented 5 years ago

This bug was fixed in OpenCV 3.0 (https://github.com/opencv/opencv/issues/5746)

HuguesDug commented 5 years ago

Possible to use your wrapper with OpenCV 3.0 ?