Verilook Exposure Control

General information about Neurotechnology and its software

Verilook Exposure Control

Postby zerokewl88 » Feb 16, 2019 12:15

Hello,

Using the Verilook and NCamera -> NFaceView Control, I'm taking images and allowing a preview screen to be seen using the SDK. I've noticed that the Async Capture methods of the NCamera however seem to always start from a Low Exposure and works its way forward until a Subject Face is detected. This sometimes leads to a 'purple - tinge image' being captured on the Face of the returned subject. Is there any way to control the Camera behaviour in the way it captures?

Thank you.
zerokewl88
 
Posts: 11
Joined: Feb 14, 2019 01:26

Re: Verilook Exposure Control

Postby zerokewl88 » Feb 18, 2019 05:53

I wanted to further add to this question, and since it's related to Camera Control thought i can add it on here.

Is there a way to adjust the NFaceView camera feed and capture image rotation ? Sometimes our cameras are mounted either 90, 180, 270 degrees. I think the obvious answer already to this would be capturing the image from the event handler, and then adjusting it to be displayed in a NFaceView - but was wondering if the API has any built in features to create a similar rotation behaviour.

Thank you.
zerokewl88
 
Posts: 11
Joined: Feb 14, 2019 01:26

Re: Verilook Exposure Control

Postby MartynasV » Feb 18, 2019 14:18

Hello,

I've noticed that the Async Capture methods of the NCamera however seem to always start from a Low Exposure and works its way forward until a Subject Face is detected. This sometimes leads to a 'purple - tinge image' being captured on the Face of the returned subject.

If you use normal method(not async), does the same issue happen?

Is there any way to control the Camera behaviour in the way it captures?

No, the only thing you can do is start capture, get frames, stop capturing.

Is there a way to adjust the NFaceView camera feed and capture image rotation ? Sometimes our cameras are mounted either 90, 180, 270 degrees. I think the obvious answer already to this would be capturing the image from the event handler, and then adjusting it to be displayed in a NFaceView - but was wondering if the API has any built in features to create a similar rotation behaviour.

Unfortunately, no(no inbuilt frames rotation). You'll have to rotate frames yourself.
Also there are couple other alternative ways to achieve it(other than your mentioned):
  1. Use NVirtualCameraSource. Idea would be to capture frame by frame from camera, then rotate frames and pass them to NBiometricClient as frames from virtual device.
    Code: Select all
     
    namespace Neurotec.Devices.Virtual
    {
    public class NVirtualCameraSource : NObject
    {
      public static NType NativeType { get; }
      public NCamera Camera { get; }
     
      public static NVirtualCameraSource Connect(NDeviceManager deviceManger);
      public static int NVirtualCameraSourceTypeOf(out HNObject hType);
      public int PushSample(NImage image, TimeSpan start, TimeSpan duration);
      public int PushSample(string fileName, TimeSpan start, TimeSpan duration);
    }
    }

  2. Use camera’s manufacturers provided SDK and our provided ndm plugin sample (SDK\Samples\Devices\C\NdmSample\), to write a module, so that you would take frame by frame from the camera, manipulate frame however you need(e.g. rotate) and pass it to our API.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 479
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Verilook Exposure Control

Postby zerokewl88 » Feb 20, 2019 09:25

Thanks again for your response!

Is there a way to convert a NImage back to a MemoryStream or Image, and not a NMemoryStream / NImage - so that i can take the bytearray from the camera stream and output to my WPF Control ? At the moment i found that there is a method NImage.Save (which only saves to disk), and then ToByteArray isn't returning a image byte array.

With this i would like to get the ImageAttributes, perform some calculations and manipulation to adjust the color matrix which is similarily done on a ImagePallete and then recreate the image.

Thank you.

EDIT

Sorry, but I think I have already found my answer and will test this today.

_biometricClient.FaceCaptureDevice.StartCapturing();
var image = _biometricClient.FaceCaptureDevice.GetFrame();
_biometricClient.FaceCaptureDevice.StopCapturing();
var test = image.ToBitmap();
zerokewl88
 
Posts: 11
Joined: Feb 14, 2019 01:26

Re: Verilook Exposure Control

Postby MartynasV » Feb 22, 2019 15:22

zerokewl88 wrote:Thanks again for your response!

Is there a way to convert a NImage back to a MemoryStream or Image, and not a NMemoryStream / NImage - so that i can take the bytearray from the camera stream and output to my WPF Control ? At the moment i found that there is a method NImage.Save (which only saves to disk), and then ToByteArray isn't returning a image byte array.

With this i would like to get the ImageAttributes, perform some calculations and manipulation to adjust the color matrix which is similarily done on a ImagePallete and then recreate the image.

Thank you.

EDIT

Sorry, but I think I have already found my answer and will test this today.

_biometricClient.FaceCaptureDevice.StartCapturing();
var image = _biometricClient.FaceCaptureDevice.GetFrame();
_biometricClient.FaceCaptureDevice.StopCapturing();
var test = image.ToBitmap();

Hello,

Yes, you can get Bitmap that way.
Also you can get BitmapSource by calling "image.ToBitmapSource()"(it comes from our WpfExtensions class). And if you want to get image's byte array, then call "image.Save().ToArray();".
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 479
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: No registered users and 2 guests

cron