Software Archive
Read-only legacy content

Camera pop up

agund4
Novice
361 Views

Hello All,

 

I am using the below code. I am getting a console and camera is initialized (yellow light is blinking in the camera) but I didn't get the popup window of my image. pls help

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace ConsoleApplication2

{

 

class Program

{

static void Main(string[] args)

{

// Create a PXCMSenseManager instance

PXCMSenseManager sm = PXCMSenseManager.CreateInstance();

// Select the color stream

sm.EnableStream(PXCMCapture.StreamType.STREAM_TYPE_COLOR, 640, 480);

// Initialize and Stream samples

sm.Init();

for (;;)

{

// This function blocks until a color sample is ready

if (sm.AcquireFrame(true).IsError()) break;

// retrieve the sample

PXCMCapture.Sample sample = sm.QuerySample();

// work on the image sample.color

// go fetching the next sample

 

sm.ReleaseFrame();

}

// Close down

sm.Dispose();

}

}

 

}

0 Kudos
2 Replies
mzc
Beginner
361 Views

have you defined this in xml and you need to call this form cs code right?

0 Kudos
agund4
Novice
361 Views

Dear mzc,

I amm doing as console app. do you want me to do as wpf?

0 Kudos
Reply