psi icon indicating copy to clipboard operation
psi copied to clipboard

Using Kinect and a Webcam

Open sanmii opened this issue 1 month ago • 3 comments

Hi!

I am planning to use a Kinect camera and a webcam to gather data. To gather data from Kinect I have tried and I know that this works:

// Kinect Camera 1
    var cam = new AzureKinectSensor(p, new AzureKinectSensorConfiguration()
    {
        DeviceIndex = 0,
        OutputColor = true,
        CameraFPS = FPS.FPS30,
        //WiredSyncMode = WiredSyncMode.Master,
        PowerlineFrequency = AzureKinectSensorConfiguration.PowerlineFrequencyTypes.SixtyHz,
        ExposureTime = TimeSpan.FromTicks(80000),
        ColorResolution = ColorResolution.R720p
    });
    var imageStream = cam.ColorImage.EncodeJpeg(75, DeliveryPolicy.LatestMessage);
    imageStream.Write("Image1", store);
    var decodedImageStream = imageStream.Decode();

However I am not certain at all how to gather the information from the webcam. Should be this way? var webcam = new Microsoft.Psi.Media.MediaCapture(pipeline, 1920, 1080, 30);

How do I know that this will take data from the Webcam and not from the Kinect camera? is there any way to specify the name of the camera you want to gather the data from?

Thank you in advance.

sanmii avatar May 13 '24 18:05 sanmii