Note that there are some explanatory texts on larger screens.

plurals
  1. POSEHException was unhandeled
    primarykey
    data
    text
    <p>I am using Windows 7 x64, EmguCV 2.4.9. When I run the code in my laptop it is showing this problem below. In my Desktop the code is working well. Can anyone please tell me what is the problem:</p> <p>The Code is Given Below:</p> <pre><code> public MainWindow() { InitializeComponent(); } void timer_Tick(object sender, EventArgs e) { Image&lt;Bgr, Byte&gt; currentFrame = capture.QueryFrame(); if (currentFrame != null) { Image&lt;Gray, Byte&gt; grayFrame = currentFrame.Convert&lt;Gray, Byte&gt;(); **var detectedFaces = grayFrame.DetectHaarCascade(haarCascade)[0]; ///Problem arises in this line::: SEHException was unhandeled** foreach (var face in detectedFaces) currentFrame.Draw(face.rect, new Bgr(0, double.MaxValue, 0), 3); image1.Source = ToBitmapSource(currentFrame); } } [DllImport("gdi32")] private static extern int DeleteObject(IntPtr o); public static BitmapSource ToBitmapSource(IImage image) { using (System.Drawing.Bitmap source = image.Bitmap) { IntPtr ptr = source.GetHbitmap(); //obtain the Hbitmap BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( ptr, IntPtr.Zero, Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions()); DeleteObject(ptr); //release the HBitmap return bs; } } private void Window_Loaded(object sender, RoutedEventArgs e) { capture = new Capture(); haarCascade = new HaarCascade(@"C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\opencv\data\haarcascades\haarcascade_frontalface_default.xml"); timer = new DispatcherTimer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = new TimeSpan(0, 0, 0); timer.Start(); } } </code></pre> <p>}</p> <p>I have copied the opencv_xxx.dll in my bin\debug and system32. But still getting the problem. Some help will be appreciated. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload