internal void inicijalizirajKameru()
        {
            WebcamCtrl = new Webcam();
            WebcamCtrl.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            WebcamCtrl.VerticalAlignment   = System.Windows.VerticalAlignment.Top;
            WebcamCtrl.Visibility          = System.Windows.Visibility.Visible;
            WebcamCtrl.Height = 138;
            WebcamCtrl.Width  = 173;


            Binding binding_1 = new Binding("SelectedValue");

            binding_1.Source = VideoDevicesComboBox;
            WebcamCtrl.SetBinding(Webcam.VideoDeviceProperty, binding_1);

            /*Binding binding_2 = new Binding("SelectedValue");
             * binding_2.Source = AudioDevicesComboBox;
             * WebcamCtrl.SetBinding(Webcam.AudioDeviceProperty, binding_2);  */
            // Create directory for saving image files
            string imagePath = @"C:\WebcamSnapshots";

            if (!Directory.Exists(imagePath))
            {
                Directory.CreateDirectory(imagePath);
            }

            // Set some properties of the Webcam control
            WebcamCtrl.ImageDirectory = imagePath;
            WebcamCtrl.FrameRate      = 30;
            WebcamCtrl.FrameSize      = new System.Drawing.Size(640, 480);

            // Find available a/v devices
            var vidDevices = EncoderDevices.FindDevices(EncoderDeviceType.Video);

            //var audDevices = EncoderDevices.FindDevices(EncoderDeviceType.Audio);
            VideoDevicesComboBox.ItemsSource = vidDevices;
            //AudioDevicesComboBox.ItemsSource = audDevices;
            VideoDevicesComboBox.SelectedIndex = 0;
            //AudioDevicesComboBox.SelectedIndex = 0;
            AudioDevicesComboBox.Visibility = System.Windows.Visibility.Hidden;

            gridCam.Children.Add(WebcamCtrl);
        }