Webcam and cameras related questions

General information about Neurotechnology and its software

Webcam and cameras related questions

Postby TheKing1388 » Jul 02, 2011 09:52

I am using VistaFA32 irises sacnner, some times I am facing with problems and can't install driver. it show yellow question mark in device managers.
TheKing1388
 
Posts: 3
Joined: Mar 20, 2011 10:23

Re: Error Installing Camera Driver

Postby Martynas » Jul 04, 2011 10:45

TheKing1388 wrote:I am using VistaFA32 irises sacnner, some times I am facing with problems and can't install driver. it show yellow question mark in device managers.

Hi,

we never heard about such issue. What operating system are you using?
Also I have sent you via email drivers of the VistaFA2 drivers. Please try to use them.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Webcam and cameras related questions

Postby 1uuuuu » Jun 07, 2012 03:03

May i know what's the correct code to use for video live camera using C# ?
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 07, 2012 06:43

1uuuuu wrote:May i know what's the correct code to use for video live camera using C# ?

hello,

the SDK contains samples and tutorials, which shows how to capture frame from the camera. i.e. if you need to enroll the face from the live camera, then you can look at tutorial "EnrollFaceFromCamera".
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 11, 2012 01:58

i tried using this source code for the live camera, but it does not work .
Code: Select all
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            bool extractStarted = false;
            try
            {
                _camera.StartCapturing();
                _capture = false;

                while (true)
                {
                    using (NImage frame = _camera.GetFrame())
                    {
                        if (frame == null || backgroundWorker.CancellationPending)
                        {
                            UpdateView(null, null, NleExtractionStatus.None);
                            return;
                        }
                        using (NGrayscaleImage grayscaleImage = frame.ToGrayscale())
                        {
                            if (!_capture)
                            {
                                NleFace[] faces = _extractor.DetectFaces(grayscaleImage);
                                NleDetectionDetails[] details = new NleDetectionDetails[faces.Length];
                                for (int i = 0; i < details.Length; i++)
                                {
                                    details[i] = _extractor.DetectFacialFeatures(grayscaleImage, faces[i]);
                                }
                                UpdateView(frame.ToBitmap(), details, NleExtractionStatus.None);
                            }
                            else
                            {
                                if (!extractStarted)
                                {
                                    _extractor.ExtractStart();
                                    extractStarted = true;
                                }

                                NleDetectionDetails details;
                                NleExtractionStatus status = _extractor.ExtractNext(grayscaleImage, out details);
                                _capturedImages.Add((NImage)frame.Clone());
                                if (status != NleExtractionStatus.None)
                                {
                                    int frameIndex;
                                    NLTemplate template = _extractor.ExtractEnd(out frameIndex, out status);
                                    extractStarted = false;
                                    _capture = false;
                                   
                                   
                                    UpdateView(frame.ToBitmap(), null, status);
                                    continue;
                                }
                                UpdateView(frame.ToBitmap(), new NleDetectionDetails[] { details }, status);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                if (extractStarted)
                {
                    int baseFrameIndex;
                    NleExtractionStatus status;
                    _extractor.ExtractEnd(out baseFrameIndex, out status);
                }
                if (_camera != null) _camera.StopCapturing();
            }
        }
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 11, 2012 06:51

1uuuuu wrote:i tried using this source code for the live camera, but it does not work .
Code: Select all
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            bool extractStarted = false;
            try
            {
                _camera.StartCapturing();
                _capture = false;

                while (true)
                {
                    using (NImage frame = _camera.GetFrame())
                    {
                        if (frame == null || backgroundWorker.CancellationPending)
                        {
                            UpdateView(null, null, NleExtractionStatus.None);
                            return;
                        }
                        using (NGrayscaleImage grayscaleImage = frame.ToGrayscale())
                        {
                            if (!_capture)
                            {
                                NleFace[] faces = _extractor.DetectFaces(grayscaleImage);
                                NleDetectionDetails[] details = new NleDetectionDetails[faces.Length];
                                for (int i = 0; i < details.Length; i++)
                                {
                                    details[i] = _extractor.DetectFacialFeatures(grayscaleImage, faces[i]);
                                }
                                UpdateView(frame.ToBitmap(), details, NleExtractionStatus.None);
                            }
                            else
                            {
                                if (!extractStarted)
                                {
                                    _extractor.ExtractStart();
                                    extractStarted = true;
                                }

                                NleDetectionDetails details;
                                NleExtractionStatus status = _extractor.ExtractNext(grayscaleImage, out details);
                                _capturedImages.Add((NImage)frame.Clone());
                                if (status != NleExtractionStatus.None)
                                {
                                    int frameIndex;
                                    NLTemplate template = _extractor.ExtractEnd(out frameIndex, out status);
                                    extractStarted = false;
                                    _capture = false;
                                   
                                   
                                    UpdateView(frame.ToBitmap(), null, status);
                                    continue;
                                }
                                UpdateView(frame.ToBitmap(), new NleDetectionDetails[] { details }, status);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                if (extractStarted)
                {
                    int baseFrameIndex;
                    NleExtractionStatus status;
                    _extractor.ExtractEnd(out baseFrameIndex, out status);
                }
                if (_camera != null) _camera.StopCapturing();
            }
        }

could you specify what exactly was wrong (what did not work)? Was the camera detected by the NDeviceManager? What kind of camera are you using?
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 11, 2012 07:12

when i want to run the programme with the source code attached previously, the camera was not detected, using web cams.
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 11, 2012 12:10

1uuuuu wrote:when i want to run the programme with the source code attached previously, the camera was not detected, using web cams.

is it your application or the sample/tutorial from the SDK?
If it is your application, then question is if the samples/tutorials detects the camera?
What operating system are you using?
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 11, 2012 13:36

It is the sample from the SDK .
I tried to run from the sample itself , it works , but when i used it as reference , it does not works .
Running on windows32 .
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby 1uuuuu » Jun 12, 2012 08:41

If i were to use the "EnrollFaceFromCamera" tutorial codes , where do i place the codes ? Is it inside the Form itself or under Program.cs ?
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 12, 2012 11:11

Hi,

1uuuuu wrote:Running on windows32 .

Which version of Windows - XP/Vista/7?

1uuuuu wrote:It is the sample from the SDK .
I tried to run from the sample itself , it works , but when i used it as reference , it does not works .

I am a little confused. From first sentence it could be understood, that you have problems with the sample. then in second one you write that the sample works, but if you reference it it does not. So as I understand it does not work, when you are using the code from sample/tutorial in your project. Am i right? If I am, then could you provide details if you are receiving any errors or is it only the camera not detected?

1uuuuu wrote:If i were to use the "EnrollFaceFromCamera" tutorial codes , where do i place the codes ? Is it inside the Form itself or under Program.cs ?

You can reuse this code anywhere where it will be executed by your application.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 12, 2012 12:09

Windows 7
Yes , i am trying to implement that the code from the sample/tutorial does not work in my project .
I want to attach a screenshot of the errors here , but i can't seems to attach any files here , is there a way to attach a file or image ?
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 12, 2012 12:37

1uuuuu wrote:Windows 7
Yes , i am trying to implement that the code from the sample/tutorial does not work in my project .
I want to attach a screenshot of the errors here , but i can't seems to attach any files here , is there a way to attach a file or image ?

you can write an email to support@neurotechnology.com and provide description and all details about your issue.
In my previous post i have asked if you are receiving any errors and if you do, then asked to provide details on errors.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 14, 2012 01:45

Code: Select all
private void settingsForm_Load(object sender, EventArgs e)
        {           
            _camera.StartCapturing();   //  [ the error occurs here : [b]Null Reference Exception was unhandled[/b] ]
            try
            {
                cameraLabel.Text = string.Empty;
                _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                saveImageDialog.Filter = NImages.GetSaveFileFilterString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 14, 2012 06:57

1uuuuu wrote:
Code: Select all
private void settingsForm_Load(object sender, EventArgs e)
        {           
            _camera.StartCapturing();   //  [ the error occurs here : [b]Null Reference Exception was unhandled[/b] ]
            try
            {
                cameraLabel.Text = string.Empty;
                _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                saveImageDialog.Filter = NImages.GetSaveFileFilterString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

as it is seen from your code, first of all you try to start the camera and only then you are initializing the NDeviceManager.
To be able to capture from camera, you need to follow these steps:

1. initialize the NDeviceManager (i.e. NDeviceManager devMan = new NDeviceManager(NDeviceType.Camera, true, false);)
2. get the camera from the NDeviceManager (i.e. NCamera camera = (NCamera)devMan.Devices[0];)
3. start capturing from camera (i.e. camera.StartCapturing();)
4. get frames from the camera (i.e. NImage image = camera.GetFrame();)
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 14, 2012 08:38

Now i tried following ur method
Code: Select all
private void settingsForm_Load(object sender, EventArgs e)
        {
            _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);  [ there is still errror here " [b]Type Initilasation was Unhandled[/b] " ]
            NCamera _camera = (NCamera) _deviceManager.Devices[0];
            _camera.StartCapturing();
            try
            {
                cameraLabel.Text = string.Empty;
               
                saveImageDialog.Filter = NImages.GetSaveFileFilterString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 14, 2012 10:16

1uuuuu wrote:Now i tried following ur method
Code: Select all
private void settingsForm_Load(object sender, EventArgs e)
        {
            _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);  [ there is still errror here " [b]Type Initilasation was Unhandled[/b] " ]
            NCamera _camera = (NCamera) _deviceManager.Devices[0];
            _camera.StartCapturing();
            try
            {
                cameraLabel.Text = string.Empty;
               
                saveImageDialog.Filter = NImages.GetSaveFileFilterString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

copy all dlls, from the SDK to your application output folder (the same folder, where your application executable is located).
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jun 15, 2012 05:41

This is the whole codes for the live camera , but i still cannot get the live camera working , when i run the programme . But there is no error when i run the programme with this code , is there anything that i am missing out or is there any mistake in this codes ?

Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Neurotec.Biometrics;
using Neurotec.Biometrics.Gui;
using Neurotec.Devices;
using Neurotec.Images;
using Neurotec.Licensing;
using Neurotec.IO;

namespace ICareMonitoringSystem
{
    public partial class settingsForm : Form
    {

        public settingsForm()
        {
            InitializeComponent();
        }
               

        private readonly List<NImage> _capturedImages = new List<NImage>();

        private NLExtractor _extractor;
        private NImage _bestFrame;
        private NDeviceManager _deviceManager;
        private NCamera _camera = null;
        private bool _capture;
        private bool _fromCamera = true;
             

        public NLExtractor Extractor
        {
            get
            {
                return _extractor;
            }
            set
            {
                _extractor = value;
            }
        }

        private void UpdateCameraList()
        {
            cbCamera.BeginUpdate();
            try
            {
                cbCamera.Items.Clear();
                _deviceManager.Refresh();
                foreach (NDevice device in _deviceManager.Devices)
                {
                    cbCamera.Items.Add(device);
                }

                if (_camera != null && _camera.IsDisposed) _camera = null;

                if (_camera == null && cbCamera.Items.Count > 0)
                {
                    cbCamera.SelectedIndex = 0;
                    return;
                }

                if (_camera != null)
                {
                    cbCamera.SelectedIndex = cbCamera.Items.IndexOf(_camera);
                }
            }
            finally
            {
                cbCamera.EndUpdate();
            }
        }

        private void EnableControls(bool capturing)
        {
            cbCamera.Enabled = !capturing;
            saveButton.Enabled = !capturing && _bestFrame != null;
            snapButton.Enabled = capturing;           
        }


        private delegate void UpdateViewDelegate(Bitmap image, NleDetectionDetails[] details, NleExtractionStatus status);

        private void UpdateView(Bitmap image, NleDetectionDetails[] details, NleExtractionStatus status)
        {
            if (InvokeRequired)
            {
                UpdateViewDelegate del = UpdateView;
                BeginInvoke(del, image, details, status);
                return;
            }

            Image oldImage = nlView.Image;
            if (oldImage != null) oldImage.Dispose();
            nlView.Image = image;
            nlView.DetectionDetails = details;

            if (status != NleExtractionStatus.None)
            {
                cameraLabel.Text = status.ToString();
            }
            else if (_capture)
            {
                cameraLabel.Text = @"Extracting ...";
            }
        }       

        private void settingsForm_Load(object sender, EventArgs e)
        {
            if (_camera != null && _fromCamera)
            {
                NDeviceManager _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                NCamera camera = (NCamera)_deviceManager.Devices[0];
                _camera.StartCapturing();
                try
                {
                    cameraLabel.Text = string.Empty;
                    _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                    saveImageDialog.Filter = NImages.GetSaveFileFilterString();
                    UpdateCameraList();
                   
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }

        private void cbCamera_SelectedIndexChanged(object sender, EventArgs e)
        {
            _camera = cbCamera.SelectedItem as NCamera;
        }

        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            bool extractStarted = false;
            try
            {
                _camera.StartCapturing();
                _capture = false;

                while (true)
                {
                    using (NImage frame = _camera.GetFrame())
                    {
                        if (frame == null || backgroundWorker.CancellationPending)
                        {
                            UpdateView(null, null, NleExtractionStatus.None);
                            return;
                        }
                        using (NGrayscaleImage grayscaleImage = frame.ToGrayscale())
                        {
                            if (!_capture)
                            {
                                NleFace[] faces = _extractor.DetectFaces(grayscaleImage);
                                NleDetectionDetails[] details = new NleDetectionDetails[faces.Length];
                                for (int i = 0; i < details.Length; i++)
                                {
                                    details[i] = _extractor.DetectFacialFeatures(grayscaleImage, faces[i]);
                                }
                                UpdateView(frame.ToBitmap(), details, NleExtractionStatus.None);
                            }
                            else
                            {
                                if (!extractStarted)
                                {
                                    _extractor.ExtractStart();
                                    extractStarted = true;
                                }

                                NleDetectionDetails details;
                                NleExtractionStatus status = _extractor.ExtractNext(grayscaleImage, out details);
                                _capturedImages.Add((NImage)frame.Clone());
                                if (status != NleExtractionStatus.None)
                                {
                                    int frameIndex;
                                    NLTemplate template = _extractor.ExtractEnd(out frameIndex, out status);
                                    extractStarted = false;
                                    _capture = false;


                                    UpdateView(frame.ToBitmap(), null, status);
                                    continue;
                                }
                                UpdateView(frame.ToBitmap(), new NleDetectionDetails[] { details }, status);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                if (extractStarted)
                {
                    int baseFrameIndex;
                    NleExtractionStatus status;
                    _extractor.ExtractEnd(out baseFrameIndex, out status);
                }
                if (_camera != null) _camera.StopCapturing();

            }
        }

       

        private void BackgroundWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            EnableControls(false);           
        }

        private void snapButton_Click(object sender, EventArgs e)
        {
            if (_bestFrame != null && saveImageDialog.ShowDialog() == DialogResult.OK)
            {
                _bestFrame.Save(saveImageDialog.FileName);
            }
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void alertModelabel_Click(object sender, EventArgs e)
        {

        }

        private void addButton_Click(object sender, EventArgs e)
        {
            monitoringTimeDisplayListBox.Items.Add(monitoringTimeComboBox.Text);
        }

        private void pickADateGroupBox_Enter(object sender, EventArgs e)
        {

        }

        private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
        {

        }

        private void monitoringTimeGroupBox_Enter(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void removeButton_Click(object sender, EventArgs e)
        {
            if (monitoringTimeDisplayListBox.SelectedIndex != -1)
            {
                monitoringTimeDisplayListBox.Items.RemoveAt(monitoringTimeDisplayListBox.SelectedIndex);
            }
            else
            {
                monitoringTimeDisplayListBox.Items.Clear();
            }
        }

        private void timeApplyButton_Click(object sender, EventArgs e)
        {
            mainForm frm = new mainForm();
            frm._activitiesTextBox = _monitoringTimeDisplayListBox;
            frm.Show();
        }

        private void monitoringTimeDisplayListBox_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        public string _monitoringTimeDisplayListBox
        {
            get
            {
                return monitoringTimeDisplayListBox.Text;
            }
        }

       

        private void cameraLabel_Click(object sender, EventArgs e)
        {

        }

        private void saveButton_Click(object sender, EventArgs e)
        {
            if (_bestFrame != null && saveImageDialog.ShowDialog() == DialogResult.OK)
            {
                _bestFrame.Save(saveImageDialog.FileName);
            }
        }

        private void saveImageDialog_FileOk(object sender, CancelEventArgs e)
        {

        }
                     

        private void nlView_Paint(object sender, PaintEventArgs e)
        {

        }

       

       
    }
}
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jun 15, 2012 07:03

1uuuuu wrote:This is the whole codes for the live camera , but i still cannot get the live camera working , when i run the programme . But there is no error when i run the programme with this code , is there anything that i am missing out or is there any mistake in this codes ?

Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Neurotec.Biometrics;
using Neurotec.Biometrics.Gui;
using Neurotec.Devices;
using Neurotec.Images;
using Neurotec.Licensing;
using Neurotec.IO;

namespace ICareMonitoringSystem
{
    public partial class settingsForm : Form
    {

        public settingsForm()
        {
            InitializeComponent();
        }
               

        private readonly List<NImage> _capturedImages = new List<NImage>();

        private NLExtractor _extractor;
        private NImage _bestFrame;
        private NDeviceManager _deviceManager;
        private NCamera _camera = null;
        private bool _capture;
        private bool _fromCamera = true;
             

        public NLExtractor Extractor
        {
            get
            {
                return _extractor;
            }
            set
            {
                _extractor = value;
            }
        }

        private void UpdateCameraList()
        {
            cbCamera.BeginUpdate();
            try
            {
                cbCamera.Items.Clear();
                _deviceManager.Refresh();
                foreach (NDevice device in _deviceManager.Devices)
                {
                    cbCamera.Items.Add(device);
                }

                if (_camera != null && _camera.IsDisposed) _camera = null;

                if (_camera == null && cbCamera.Items.Count > 0)
                {
                    cbCamera.SelectedIndex = 0;
                    return;
                }

                if (_camera != null)
                {
                    cbCamera.SelectedIndex = cbCamera.Items.IndexOf(_camera);
                }
            }
            finally
            {
                cbCamera.EndUpdate();
            }
        }

        private void EnableControls(bool capturing)
        {
            cbCamera.Enabled = !capturing;
            saveButton.Enabled = !capturing && _bestFrame != null;
            snapButton.Enabled = capturing;           
        }


        private delegate void UpdateViewDelegate(Bitmap image, NleDetectionDetails[] details, NleExtractionStatus status);

        private void UpdateView(Bitmap image, NleDetectionDetails[] details, NleExtractionStatus status)
        {
            if (InvokeRequired)
            {
                UpdateViewDelegate del = UpdateView;
                BeginInvoke(del, image, details, status);
                return;
            }

            Image oldImage = nlView.Image;
            if (oldImage != null) oldImage.Dispose();
            nlView.Image = image;
            nlView.DetectionDetails = details;

            if (status != NleExtractionStatus.None)
            {
                cameraLabel.Text = status.ToString();
            }
            else if (_capture)
            {
                cameraLabel.Text = @"Extracting ...";
            }
        }       

        private void settingsForm_Load(object sender, EventArgs e)
        {
            if (_camera != null && _fromCamera)
            {
                NDeviceManager _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                NCamera camera = (NCamera)_deviceManager.Devices[0];
                _camera.StartCapturing();
                try
                {
                    cameraLabel.Text = string.Empty;
                    _deviceManager = new NDeviceManager(NDeviceType.Camera, true, false);
                    saveImageDialog.Filter = NImages.GetSaveFileFilterString();
                    UpdateCameraList();
                   
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                }
            }
        }

        private void cbCamera_SelectedIndexChanged(object sender, EventArgs e)
        {
            _camera = cbCamera.SelectedItem as NCamera;
        }

        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            bool extractStarted = false;
            try
            {
                _camera.StartCapturing();
                _capture = false;

                while (true)
                {
                    using (NImage frame = _camera.GetFrame())
                    {
                        if (frame == null || backgroundWorker.CancellationPending)
                        {
                            UpdateView(null, null, NleExtractionStatus.None);
                            return;
                        }
                        using (NGrayscaleImage grayscaleImage = frame.ToGrayscale())
                        {
                            if (!_capture)
                            {
                                NleFace[] faces = _extractor.DetectFaces(grayscaleImage);
                                NleDetectionDetails[] details = new NleDetectionDetails[faces.Length];
                                for (int i = 0; i < details.Length; i++)
                                {
                                    details[i] = _extractor.DetectFacialFeatures(grayscaleImage, faces[i]);
                                }
                                UpdateView(frame.ToBitmap(), details, NleExtractionStatus.None);
                            }
                            else
                            {
                                if (!extractStarted)
                                {
                                    _extractor.ExtractStart();
                                    extractStarted = true;
                                }

                                NleDetectionDetails details;
                                NleExtractionStatus status = _extractor.ExtractNext(grayscaleImage, out details);
                                _capturedImages.Add((NImage)frame.Clone());
                                if (status != NleExtractionStatus.None)
                                {
                                    int frameIndex;
                                    NLTemplate template = _extractor.ExtractEnd(out frameIndex, out status);
                                    extractStarted = false;
                                    _capture = false;


                                    UpdateView(frame.ToBitmap(), null, status);
                                    continue;
                                }
                                UpdateView(frame.ToBitmap(), new NleDetectionDetails[] { details }, status);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                if (extractStarted)
                {
                    int baseFrameIndex;
                    NleExtractionStatus status;
                    _extractor.ExtractEnd(out baseFrameIndex, out status);
                }
                if (_camera != null) _camera.StopCapturing();

            }
        }

       

        private void BackgroundWorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            EnableControls(false);           
        }

        private void snapButton_Click(object sender, EventArgs e)
        {
            if (_bestFrame != null && saveImageDialog.ShowDialog() == DialogResult.OK)
            {
                _bestFrame.Save(saveImageDialog.FileName);
            }
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void textBox3_TextChanged(object sender, EventArgs e)
        {

        }

        private void alertModelabel_Click(object sender, EventArgs e)
        {

        }

        private void addButton_Click(object sender, EventArgs e)
        {
            monitoringTimeDisplayListBox.Items.Add(monitoringTimeComboBox.Text);
        }

        private void pickADateGroupBox_Enter(object sender, EventArgs e)
        {

        }

        private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
        {

        }

        private void monitoringTimeGroupBox_Enter(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void removeButton_Click(object sender, EventArgs e)
        {
            if (monitoringTimeDisplayListBox.SelectedIndex != -1)
            {
                monitoringTimeDisplayListBox.Items.RemoveAt(monitoringTimeDisplayListBox.SelectedIndex);
            }
            else
            {
                monitoringTimeDisplayListBox.Items.Clear();
            }
        }

        private void timeApplyButton_Click(object sender, EventArgs e)
        {
            mainForm frm = new mainForm();
            frm._activitiesTextBox = _monitoringTimeDisplayListBox;
            frm.Show();
        }

        private void monitoringTimeDisplayListBox_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        public string _monitoringTimeDisplayListBox
        {
            get
            {
                return monitoringTimeDisplayListBox.Text;
            }
        }

       

        private void cameraLabel_Click(object sender, EventArgs e)
        {

        }

        private void saveButton_Click(object sender, EventArgs e)
        {
            if (_bestFrame != null && saveImageDialog.ShowDialog() == DialogResult.OK)
            {
                _bestFrame.Save(saveImageDialog.FileName);
            }
        }

        private void saveImageDialog_FileOk(object sender, CancelEventArgs e)
        {

        }
                     

        private void nlView_Paint(object sender, PaintEventArgs e)
        {

        }

       

       
    }
}

could you provide your application compiling solution to support@neurotechnology.com with detailed description?
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: live camera

Postby 1uuuuu » Jul 26, 2012 03:53

Hi,
may i know where it goes wrong with my codes below,
even though there's no error while running the programme.
My objective is to be able to do a refresh to the camera in order to capture image again, however,
i tried to click on the ok button to save my image,
i managed to save my image,
but it did not do a refresh to the camera.
Code: Select all
//Save image
        private void okButton_Click(object sender, EventArgs e)
        {
            try
            {
                string _bestFrame = Application.StartupPath + @"C:\Users\Pictures" + ".jpg";
                if (!Directory.Exists(_bestFrame))
                {
                        s++;
                        this._bestFrame.Save(@"C:\Users\Pictures\Captured" + s + ".jpg");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
                _camera.Dispose();
            }
            finally
            {
                if (_camera.IsDisposed)
                {
                    _camera.StopCapturing();
                    _camera.StartCapturing();
                }               
            }
        }
1uuuuu
 
Posts: 10
Joined: Jun 07, 2012 02:48

Re: live camera

Postby Martynas » Jul 26, 2012 06:13

1uuuuu wrote:Hi,
may i know where it goes wrong with my codes below,
even though there's no error while running the programme.
My objective is to be able to do a refresh to the camera in order to capture image again, however,
i tried to click on the ok button to save my image,
i managed to save my image,
but it did not do a refresh to the camera.
Code: Select all
//Save image
        private void okButton_Click(object sender, EventArgs e)
        {
            try
            {
                string _bestFrame = Application.StartupPath + @"C:\Users\Pictures" + ".jpg";
                if (!Directory.Exists(_bestFrame))
                {
                        s++;
                        this._bestFrame.Save(@"C:\Users\Pictures\Captured" + s + ".jpg");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
                _camera.Dispose();
            }
            finally
            {
                if (_camera.IsDisposed)
                {
                    _camera.StopCapturing();
                    _camera.StartCapturing();
                }               
            }
        }

This part of the source code does not show how the captured images are passed to the NLView component. So it is not possible to say what you are doing wrong.
Please provide the solution, which we would be able to debug on our side.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

[Cam] VeriLook and Cameras

Postby mbogliacino » Oct 01, 2012 19:04

Hi,


What are the camera's requirement to manipulate the camera (no webcam) with the skd? wia drivers? twain drivers?.

Thanks

Admin: merged to "Webcam and cameras related questions"
mbogliacino
 
Posts: 36
Joined: Mar 02, 2012 13:28

Re: VeriLook and Cameras

Postby vaidasz » Oct 04, 2012 14:31

mbogliacino wrote:Hi,


What are the camera's requirement to manipulate the camera (no webcam) with the skd? wia drivers? twain drivers?.

Thanks


Hello,

We support several hi-res digital cameras, regular webcams and IP cameras with RTSP support. We do not support analog cameras.

See also the requirements for cameras and image size
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

[Cam] VeriLook Camera To Black And White

Postby vino » Oct 17, 2012 10:09

Hi,

I created an app with your Samples. Its working perfectly fine. Is there any possible way to convert the camera color into Black and White as a Default. I have tried this line of code in the following snippet parameters.setColorEffect(Camera.Parameters.EFFECT_MONO); but it doesn't seems to working.

Am i adding correctly or need to add some where in the coding?

Do you support Black and White Camera?

Code: Select all
private void initParameters() {
      Camera.Parameters parameters = mCamera.getParameters();
      //Setting the Color to Balck and White
      parameters.setColorEffect(Camera.Parameters.EFFECT_MONO);
      
      mPreviewFormat = parameters.getPreviewFormat();
      Log.d(TAG, "Default preview format: " + mPreviewFormat);
      WindowManager manager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
      Display display = manager.getDefaultDisplay();
      mScreenResolution = mCamera.new Size(display.getWidth(), display.getHeight());
      Log.d(TAG, "Screen resolution: " + mScreenResolution);

      if (mFlashMode == null) {
         mFlashMode = initFlashModePreference();
         loadFlashMode();
      }

      if (mCameraResolution == null) {
         mCameraResolution = initCameraResolutionPreference();
         loadCameraResolution();
         Log.d(TAG, "Camera resolution: " + mCameraResolution.get().getValue());

      }

      if (mSupportedCameraResolutions == null) {
         mSupportedCameraResolutions = initSupporetCameraResolutions(parameters);
      }

      mDefaultFlashMode = parameters.getFlashMode();
      Log.d(TAG, "Default flash mode: " + mDefaultFlashMode);
   }


Any help is much appreciated.

Admin: merged to "Webcam and cameras related questions"
vino
 
Posts: 22
Joined: Sep 27, 2012 14:43

Re: VeriLook Camera To Black And White

Postby Martynas » Oct 17, 2012 12:21

vino wrote:Hi,

I created an app with your Samples. Its working perfectly fine. Is there any possible way to convert the camera color into Black and White as a Default. I have tried this line of code in the following snippet parameters.setColorEffect(Camera.Parameters.EFFECT_MONO); but it doesn't seems to working.

Am i adding correctly or need to add some where in the coding?

Do you support Black and White Camera?

Code: Select all
private void initParameters() {
      Camera.Parameters parameters = mCamera.getParameters();
      //Setting the Color to Balck and White
      parameters.setColorEffect(Camera.Parameters.EFFECT_MONO);
      
      mPreviewFormat = parameters.getPreviewFormat();
      Log.d(TAG, "Default preview format: " + mPreviewFormat);
      WindowManager manager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
      Display display = manager.getDefaultDisplay();
      mScreenResolution = mCamera.new Size(display.getWidth(), display.getHeight());
      Log.d(TAG, "Screen resolution: " + mScreenResolution);

      if (mFlashMode == null) {
         mFlashMode = initFlashModePreference();
         loadFlashMode();
      }

      if (mCameraResolution == null) {
         mCameraResolution = initCameraResolutionPreference();
         loadCameraResolution();
         Log.d(TAG, "Camera resolution: " + mCameraResolution.get().getValue());

      }

      if (mSupportedCameraResolutions == null) {
         mSupportedCameraResolutions = initSupporetCameraResolutions(parameters);
      }

      mDefaultFlashMode = parameters.getFlashMode();
      Log.d(TAG, "Default flash mode: " + mDefaultFlashMode);
   }


Any help is much appreciated.

Hi,

we do not support camera parameters. But you can convert captured frames to gray scale images, by using NImage.ToGrayScale() method.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

[Cam] Webcam Resolution

Postby mbogliacino » Oct 25, 2012 15:55

Hi,

What is the recomended resolutions to enroll a person with the VeriLook?

The maximum resolutions of my webcam is 2048x1536, Is it recommended use the max resolutions, or set a lower resolution?

Best regards

Admin: merged to "Webcam and cameras related questions"
mbogliacino
 
Posts: 36
Joined: Mar 02, 2012 13:28

Re: Webcam Resolution

Postby Martynas » Oct 26, 2012 08:20

mbogliacino wrote:Hi,

What is the recomended resolutions to enroll a person with the VeriLook?

The maximum resolutions of my webcam is 2048x1536, Is it recommended use the max resolutions, or set a lower resolution?

Best regards

Hi,

according to our requirements, the capture frame should be at least 640x480. You can use a bigger one, but the bigger the image will be the slower the face detection will work on it.
Another requirement is that the distance between eyes would be at least 50 pixels (recommended that it would be 75 pixels).
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

VeriLook SDK and camera settings

Postby mbogliacino » Nov 13, 2012 12:23

Hi,

How can I change the webcam settings to balance the brightness, contrast, gain, etc.?.

Thanks

Admin: merged to "Webcam and cameras related questions"
mbogliacino
 
Posts: 36
Joined: Mar 02, 2012 13:28

Re: VeriLook SDK and camera settings

Postby Martynas » Nov 14, 2012 08:47

mbogliacino wrote:Hi,

How can I change the webcam settings to balance the brightness, contrast, gain, etc.?.

Thanks

Hello,

our SDKs do not provide functionality to control these camera parameters.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Compatible Cameras for VeriLook 4.3 SDK

Postby vaidasz » Jan 04, 2013 09:50

Wilson Nah wrote:Hello. I would like to know if IP Cameras are compatible with the current VeriLook 4.3 Extended SDK. The camera I'm using now is AXIS IP Camera.

Thanks. :)


Hello Wilson,

First of all, the current version is VeriLook 5.3 SDK. There was no such version as VeriLook 4.3 SDK.
The following IP cameras are supported with VeriLook 5.3 SDK (it could also be found on http://www.neurotechnology.com/verilook-system-requirements.html webiste):
Any IP camera, that supports RTSP (Real Time Streaming Protocol):
    Only RTP over UDP is supported.
    H.264/MPEG-4 AVC or Motion JPEG should be used for encoding the video stream.
Also these specific models of high-resolution cameras are supported:
    Axis M1114 camera (Microsoft Windows and Linux)
    Basler scA1000-30gm IP camera (Microsoft Windows only; requires Basler Pylon SDK)
    Basler BIP2-1600-25c-DN IP camera (Microsoft Windows and Linux)
    Cisco 4500 IP camera (Microsoft Windows only)
    IrisGuard IG-AD100 – face & iris camera (Microsoft Windows only)
    Mobotix DualNight M12 IP camera (Microsoft Windows and Linux)
    PiXORD N606 camera (Microsoft Windows and Linux)
    Prosilica GigE Vision camera (Microsoft Windows only)
    Sony SNC-CS50 camera (Microsoft Windows and Linux)
    VistaFA2 / VistaFA2E / VistaEY2 face & iris cameras (Microsoft Windows only)
    VistaMT Multimodal Biometric Device (Microsoft Windows only)
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Fail to connect to my IP Cam [Cam]

Postby ericgaofz » May 08, 2013 03:43

Hi,

I have trouble to connect my Ip Cam to the demo code.
I'm using the latest version of VeriLook Surveillance SDK and Try to connect my Hikvision Ip Cam to the demo code I found the rtsp url of my Ip Cam and configure the ’NdmMedia.ini‘ like this:
Code: Select all
[Camera]
Url=rtsp://admin:12345@192.168.0.64:554/h264/ch1/sub/av_strea
DisplayName=Hikvision
Id=MyHikCam

[NVideoSource]
UseDirectShow=True
UseWindowsMediaFoundation=False
PreferDirectShow=True

The error message I‘v got is 'Error occured: wxNNotSupportedException: Authentication is not supported yet'.

Thanks for any help.

Admin: merged to "Webcam and cameras related questions"
Last edited by Sergey on May 16, 2013 06:45, edited 4 times in total.
Reason: Wrapped NdmMedia.ini contents into code tags
ericgaofz
 
Posts: 2
Joined: Apr 28, 2013 08:01

Re: Fail to connect to my IP Cam

Postby ericgaofz » May 08, 2013 05:49

One thing I want to follow is I can access the stream by VLC at the same URL above.
ericgaofz
 
Posts: 2
Joined: Apr 28, 2013 08:01

Re: Fail to connect to my IP Cam

Postby Vytautas » May 08, 2013 08:45

ericgaofz wrote:Hi,

I have trouble to connect my Ip Cam to the demo code.
I'm using the latest version of VeriLook Surveillance SDK and Try to connect my Hikvision Ip Cam to the demo code I found the rtsp url of my Ip Cam and configure the ’NdmMedia.ini‘ like this:
Code: Select all
[Camera]
Url=rtsp://admin:12345@192.168.0.64:554/h264/ch1/sub/av_strea
DisplayName=Hikvision
Id=MyHikCam

[NVideoSource]
UseDirectShow=True
UseWindowsMediaFoundation=False
PreferDirectShow=True

The error message I‘v got is 'Error occured: wxNNotSupportedException: Authentication is not supported yet'.

Thanks for any help.

ericgaofz wrote:One thing I want to follow is I can access the stream by VLC at the same URL above.

The error thrown is caused by authentication:
failed to start camera (result = -6)!
ERROR: NError: [TID: 19956] (-6) Operation is not supported.

[Camera]
Url=rtsp://admin:12345@192.168.0.64:554/h264/ch1/main/av_stream

In general case RTSP should be used without authentication.
Testing the samples with your camera would require to disable login requirement to the stream and use “Url=rtsp://192.168.0.64:554/h264/ch1/main/av_stream“ instead.
Sometimes manufacturers call this function “Enable anonymous viewer login (no user name or password required)”.

There are few exceptions, we have custom made support for these cameras: Cisco Video Surveillance IP 4500, Mobotix DualNight M12, Prosilica GigE Vision.
Vytautas P
Neurotechnology
Vytautas
Neurotechnology
 
Posts: 25
Joined: Apr 23, 2013 13:04

analog camera via video capture device [Cam]

Postby changux » May 08, 2013 16:03

Hi all.
I got some analog cameras and i want to test with the Surveillance SDK. I thought that with a video capture device (EasyCAP USB 2.0 Audio/Video Capture/Surveillance Dongle) and one camera, I could do the test but i have an error:
Code: Select all
Error while processing event: wxNComException: El MTF de hardware no pudo iniciar la transmision por secuencias porque no hay suficientes recursos de hardware.
ErrorCode: -1072875772 ---> wxNComException: No se encontro ninguna combinacion de filtros intermedios para realizar la conexiÛn.
ErrorCode: -2147220969 ---> wxNException: Actual media type does not match expected media subype
   --- End of inner exception stack trace ---
   at ICaptureGraphBuilder2::RenderStream
   --- End of external call stack ---
   --- End of remote call stack ---

   --- End of inner exception stack trace ---
   at IMFMediaSession::Start
   --- End of external call stack ---

Any idea? Thank you!

Admin: merged to "Webcam and cameras related questions"
Last edited by Sergey on May 09, 2013 07:29, edited 1 time in total.
changux
 
Posts: 6
Joined: Sep 28, 2011 17:31

Re: analog camera via video capture device

Postby Vytautas » May 09, 2013 06:42

changux wrote:Hi all.
I got some analog cameras and i want to test with the Surveillance SDK. I thought that with a video capture device (EasyCAP USB 2.0 Audio/Video Capture/Surveillance Dongle) and one camera, I could do the test but i have an error:
Code: Select all
Error while processing event: wxNComException: El MTF de hardware no pudo iniciar la transmision por secuencias porque no hay suficientes recursos de hardware.
ErrorCode: -1072875772 ---> wxNComException: No se encontro ninguna combinacion de filtros intermedios para realizar la conexiÛn.
ErrorCode: -2147220969 ---> wxNException: Actual media type does not match expected media subype
   --- End of inner exception stack trace ---
   at ICaptureGraphBuilder2::RenderStream
   --- End of external call stack ---
   --- End of remote call stack ---

   --- End of inner exception stack trace ---
   at IMFMediaSession::Start
   --- End of external call stack ---

Any idea? Thank you!

please ensure you have video codecs installed on your machine. e.g. K-lite mega pack or 64-bit.
Vytautas P
Neurotechnology
Vytautas
Neurotechnology
 
Posts: 25
Joined: Apr 23, 2013 13:04

Re: analog camera via video capture device [VLS][Cam]

Postby changux » May 09, 2013 16:28

No, i haven't. Any other codec to install?

Thank you!
changux
 
Posts: 6
Joined: Sep 28, 2011 17:31

Re: analog camera via video capture device

Postby changux » May 09, 2013 16:36

Vytautas wrote:please ensure you have video codecs installed on your machine. e.g. K-lite mega pack or 64-bit.


I installed K-Lite_Codec_Pack_990_x64.exe with default settings and not working yet :(

Any other suggestion?
changux
 
Posts: 6
Joined: Sep 28, 2011 17:31

Re: analog camera via video capture device

Postby Vytautas » May 10, 2013 06:40

changux wrote:I installed K-Lite_Codec_Pack_990_x64.exe with default settings and not working yet :(

Any other suggestion?


Are you trying 64bit sample? For 32bit sample you need 32bit codecs (e.g. megapack, not 64bit pack).
Vytautas P
Neurotechnology
Vytautas
Neurotechnology
 
Posts: 25
Joined: Apr 23, 2013 13:04

How to make it flip when capture from camera

Postby Jacen » Apr 22, 2014 16:24

Hi,
When i do the capture from from camera,i want also to flip the camera input in control NFaceView
which now i have code like this:
Code: Select all
               
                var face = new NFace { CaptureOptions = NBiometricCaptureOptions.Manual | NBiometricCaptureOptions.Stream };
                var _subject = new NSubject();
               
               face.Image.FlipHorizontally();

                _subject.Faces.Add(face);
                nFaceView1.Face = face;


                _biometricClient.FacesDetectAllFeaturePoints = true;

                // Begin capturing faces
                _biometricClient.BeginCapture(_subjectForCap, OnCapturingCompleted, null);
                //_biometricClient.Capture(_subjectForCap);



But as long as i use this face.Image.FlipHorizontally(); in program , there is no camera input ,and when i remove this line of code ,everything all right.
So how do i do could make this capture input in NFaceView is flip?

Thanks

Admin: merged to "Webcam and cameras related questions"
Jacen
 
Posts: 6
Joined: Apr 14, 2014 17:12

Re: How to make it flip when capture from camera

Postby vaidasz » Apr 28, 2014 14:36

Jacen wrote:Hi,
When i do the capture from from camera,i want also to flip the camera input in control NFaceView
which now i have code like this:
Code: Select all
               
                var face = new NFace { CaptureOptions = NBiometricCaptureOptions.Manual | NBiometricCaptureOptions.Stream };
                var _subject = new NSubject();
               
               face.Image.FlipHorizontally();

                _subject.Faces.Add(face);
                nFaceView1.Face = face;


                _biometricClient.FacesDetectAllFeaturePoints = true;

                // Begin capturing faces
                _biometricClient.BeginCapture(_subjectForCap, OnCapturingCompleted, null);
                //_biometricClient.Capture(_subjectForCap);



But as long as i use this face.Image.FlipHorizontally(); in program , there is no camera input ,and when i remove this line of code ,everything all right.
So how do i do could make this capture input in NFaceView is flip?

Thanks


Hello,

NFaceView is not designed to flip images automatically from the camera as you have written.
If you want to flip the frames, then you should use the loop that retrieves each the frame, flip it and set it for NFacesView.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: Error Installing Camera Driver

Postby sicomx » Apr 30, 2014 22:19

TheKing1388 wrote:I am using VistaFA32 irises sacnner, some times I am facing with problems and can't install driver. it show yellow question mark in device managers.

Have same problem...

My O.S. is Windows 7 64 bits.

Admin: merged to "Webcam and cameras related questions"
sicomx
 
Posts: 1
Joined: Apr 30, 2014 22:16

Re: Error Installing Camera Driver

Postby Martynas » May 05, 2014 07:15

sicomx wrote:Have same problem...

My O.S. is Windows 7 64 bits.

Hello,

do you use drivers, which are provided on our website?
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

C++ NVideoFormat in VeriLook SDK

Postby uranus » Sep 25, 2014 03:26

Hi for all.
I now developing software using Extended SDK. Using language is C++. My camera is IP camera (RTSP stream).
I have problem. :|
Using NMediaReader class, after creating getting NMediaSource object from that NMediaReader object.
I need know video format parameters. I know have class NVideoFormat for getting video information.
And NMediaSource has function GetCurrentFormat(), return type is NMediaFormat *.

Probem is how i may conver NMediaFormat to NVideoFormat. Both of classes has not copy constructors.

EX: NVideoFormat * vf = m_source->GetCurrentFormat(nmtVideo); // CAN"T CONVERT :!: :?:

Admin: merged to "Webcam and cameras related questions"
uranus
 
Posts: 3
Joined: Sep 25, 2014 03:12

Re: C++ NVideoFormat in VeriLook SDK

Postby vaidasz » Oct 06, 2014 11:11

uranus wrote:Hi for all.
I now developing software using Extended SDK. Using language is C++. My camera is IP camera (RTSP stream).
I have problem. :|
Using NMediaReader class, after creating getting NMediaSource object from that NMediaReader object.
I need know video format parameters. I know have class NVideoFormat for getting video information.
And NMediaSource has function GetCurrentFormat(), return type is NMediaFormat *.

Probem is how i may conver NMediaFormat to NVideoFormat. Both of classes has not copy constructors.

EX: NVideoFormat * vf = m_source->GetCurrentFormat(nmtVideo); // CAN"T CONVERT :!: :?:


Hello,

Use the following code:
Code: Select all
NMediaFormat * format = NULL;
Media::NVideoFormat * videoFormat = NULL;
format = source->GetCurrentFormat(Media::nmtVideo);
videoFormat = (Media::NVideoFormat *)(format);
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 559
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Relative question about front camera [Cam]

Postby Helen » Nov 19, 2014 02:26

Hi,
I'm using Neurotec_Biometric_5_0_SDK(Android) to develop the face detection and recognition application. How can I open the front camera through the NCamera Class or other Classes when I start the application ? Thank you!

Best regards,
Helen

Admin: merged to "Webcam and cameras related questions"
Helen
 
Posts: 9
Joined: Oct 31, 2014 11:01

Re: Relative question about front camera

Postby Martynas » Nov 19, 2014 07:59

Helen wrote:Hi,
I'm using Neurotec_Biometric_5_0_SDK(Android) to develop the face detection and recognition application. How can I open the front camera through the NCamera Class or other Classes when I start the application ? Thank you!

Best regards,
Helen

Hello,

You need to set which camera will be used in NBiometricClient, by using method setFaceCaptureDevice.
The list of available cameras can be retrieved from NDeviceManager.

FaceActivity.java has this code below, which shows how to get the devices from the NDeviceManager and how to set the camera as capturing device.

Code: Select all
          for (NDevice device : client.getDeviceManager().getDevices()) {
             if (device.getDeviceType().contains(NDeviceType.CAMERA)) {
                if (!device.equals(currentCamera)) {
                   client.setFaceCaptureDevice((NCamera) device);
                   startCapturing();
                   break;
                }
             }
          }


So, if you want to set some camera by default, this should be done before the capturing is started in your application.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: Webcam and cameras related questions

Postby cadburies » Nov 30, 2014 17:20

Hi,

I want to automate the selection of camera resolution to the highest or best resolution, but it seems as if I am missing something. How do I do this? Because I can see in the debug screen that the width and height are displayed, but I can find the property or function to get to it?

Or is there a better way to select the best resolution?

Warm Regards
Frik
cadburies
 
Posts: 4
Joined: Sep 23, 2014 09:40

Re: Webcam and cameras related questions

Postby Martynas » Dec 01, 2014 09:47

cadburies wrote:Hi,

I want to automate the selection of camera resolution to the highest or best resolution, but it seems as if I am missing something. How do I do this? Because I can see in the debug screen that the width and height are displayed, but I can find the property or function to get to it?

Or is there a better way to select the best resolution?

Warm Regards
Frik


Hello,

at the moment there is no possibility to get the Height or Width as property. It is planned to add such properties in the future, but we do not have an estimated time for it.
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2195
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

NError[3509]

Postby lRAGEl » Apr 23, 2015 16:39

Code: Select all
failed to create media source (result = -27)!
NError[3509]: [TID: 3064108800] (-27) Failed to load required library
Param: libgstvideo-1.0.so.0

How can i fix that error on my Ubuntu 14.04 (Neurotec_Biometric_5_1_SDK) when iam try to open videofile. Tried reinstall gstreamer pack but it didnt help. For images works well. On Windows 8.1 works well for images and videofiles.

Admin: merged to "Webcam and cameras related questions"
lRAGEl
 
Posts: 2
Joined: Feb 18, 2015 07:38

Next

Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests