1

estoy desarrollando la manipulacion de camara Ip con la libreria Ozeki, la descargue e instale pero al momento de ejecutar mi codigo fuente no reconoce la libreria OzekiSDK.dll codigo:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
/*using Ozeki.Media.IPCamera;
using Ozeki.Media.MediaHandlers;
using Ozeki.Media.MediaHandlers.Video;
using Ozeki.Media.MJPEGStreaming;
using Ozeki.Media.Video.Controls;*/
using Ozeki.Media;
using Ozeki.Camera;

namespace Basic_CameraViewer
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private VideoViewerWPF _videoViewerWpf;

        private DrawingImageProvider _provider;

        private IIPCamera _ipCamera;

        private WebCamera _webCamera;

        private MediaConnector _connector;

        private MotionDetector _detector;

        public MainWindow()
        {
            InitializeComponent();

            _connector = new MediaConnector();

            _provider = new DrawingImageProvider();

            _detector = new MotionDetector();

            SetVideoViewer();
        }

        private void SetVideoViewer()
        {
            _videoViewerWpf = new VideoViewerWPF
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch,
                Background = Brushes.Black
            };
            CameraBox.Children.Add(_videoViewerWpf);

            _videoViewerWpf.SetImageProvider(_provider);
        }

        #region USB Camera Connect/Disconnect

        private void ConnectUSBCamera_Click(object sender, RoutedEventArgs e)
        {
            _webCamera = WebCamera.GetDefaultDevice();
            if (_webCamera == null) return;
            _connector.Connect(_webCamera, _detector);
            _connector.Connect(_detector, _provider);

            _webCamera.Start();
            _videoViewerWpf.Start();
        }

        private void DisconnectUSBCamera_Click(object sender, RoutedEventArgs e)
        {
            _videoViewerWpf.Stop();

            _webCamera.Stop();
            _webCamera.Dispose();

            _connector.Disconnect(_webCamera, _detector);
            _connector.Disconnect(_detector, _provider);
        }
        #endregion

        #region IP Camera Connect/Disconnect

        private void ConnectIPCamera_Click(object sender, RoutedEventArgs e)
        {
            var host = HostTextBox.Text;
            var user = UserTextBox.Text;
            var pass = Password.Password;

            _ipCamera = IPCameraFactory.GetCamera(host, user, pass);
            if (_ipCamera == null) return;
            _connector.Connect(_ipCamera.VideoChannel, _detector);
            _connector.Connect(_detector, _provider);

            _ipCamera.Start();
            _videoViewerWpf.Start();
        }

        private void DisconnectIPCamera_Click(object sender, RoutedEventArgs e)
        {
            _videoViewerWpf.Stop();

            _ipCamera.Disconnect();
            _ipCamera.Dispose();

            _connector.Disconnect(_ipCamera.VideoChannel, _detector);
            _connector.Disconnect(_detector, _provider);
        }
        #endregion

        void GuiThread(Action action)
        {
            Dispatcher.BeginInvoke(action);
        }

        private void StartMotionDetection()
        {
            _detector.HighlightMotion = HighlightMotion.Highlight;
            _detector.MotionColor = MotionColor.Red;
            _detector.MotionDetection += detector_MotionDetection;
            _detector.Start();
        }

        void detector_MotionDetection(object sender, MotionDetectionEvent e)
        {
            GuiThread(() =>
            {
                if (e.Detection)
                    MotionEventLabel.Content = "Motion Detected";
                else
                    MotionEventLabel.Content = "Motion Stopped";
            });
        }

        private void StopMotionDetection()
        {
            _detector.Stop();
            _detector.MotionDetection -= detector_MotionDetection;
            _detector.Dispose();
        }

        private void MotionChecked(object sender, RoutedEventArgs e)
        {
            MotionEventLabel.Content = String.Empty;
            var check = sender as CheckBox;
            if (check != null)
            {
                if ((bool)check.IsChecked)
                    StartMotionDetection();
                else
                    StopMotionDetection();
            }
        }
    }
}

Alguien podria ayudarme.

introducir la descripción de la imagen aquí

La libreria esta referenciada esta marcado con rojo

6
  • Puedes agregar una foto del error para verlo mas claramente? Commented el 20 ago. 2018 a las 22:43
  • Lo agregaste a las referencias del proyecto? No tiene ningún warning? Has probado ejecutarlo en x86? Commented el 21 ago. 2018 a las 9:01
  • disculpen tengo foto solo que me olvide agregarlo Commented el 21 ago. 2018 a las 12:50
  • Cierra y vuelve a abrir VS Commented el 21 ago. 2018 a las 14:22
  • ya hice ese proceso de cerrar y volver abrir VS Commented el 21 ago. 2018 a las 14:58

0

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

Examina otras preguntas con la etiqueta o formula tu propia pregunta.