-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenFaceOffline.exe crashes when trying to open webcam #506
Comments
If I try File/Open Webcam without the webcam plugged in, it shows a "No cameras detected" dialog box. Then if I do it again, it shows the same dialog ... then crashes (It shows the Windows dialog "OpenFaceOffline has stopped working") with the following exception: System.InvalidOperationException: 'Cannot set Visibility or call Show, ShowDialog, or WindowInteropHelper.EnsureHandle after a Window has closed.' In MainWindow.xaml.cs as line 875. The line is |
For the first part of the issue:
|
The RealSense camera has both depth and RGB. When I list the webcam devices in Unity they each show up as a separate device. I seem to have fixed it by going to CameraSelection.xaml.cs line 63 and adding:
to the start of the foreach loop so it skips over the depth camera which I'm assuming was failing to give its width and height for whatever reason. Should I still be incrementing the |
Thanks for the update, I will investigate this further with a multi-camera setup. |
Hi, |
Thanks, interestingly it seems to be listing negative values for resolutions. Annoyingly, I can't seem to reproduce the issue my end, but the negative values might provide a hint of what's going wrong. |
If I do gui/OpenFaceOffline/UI_items/CameraSelection.xaml.cs:43
It works |
Thanks for the fix, I'll include it in the next version |
I just downloaded the latest executables (OpenFace_2.0.3_win_x64.zip) from https://github.com/TadasBaltrusaitis/OpenFace/releases and it works fine with a video file but I can't get it to work with a webcam. When I go to File/Open Webcam it opens another window that says "Loading Webcams" then crashes after a few seconds.
Compiling it from source and running inside VS in Debug mode gives the following exception:
System.ArgumentException: 'Value does not fall within the expected range.'
In OpenCVWrappers.h at line 230
The line is
return gcnew WriteableBitmap(Width, Height, 72, 72, Format, nullptr);
Width and Height are 0 and Format is Gray8
I'm using Windows 10 with an Intel RealSense D435 camera in case it matters.
The text was updated successfully, but these errors were encountered: