- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why the output is 0
Int32 nfaces = fdata.QueryNumberOfDetectedFaces();
Console.WriteLine(nfaces);//Why the output is 0
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
// Create the SenseManager instance
PXCMSenseManager sm = PXCMSenseManager.CreateInstance();
// Enable face trackcing
sm.EnableFace();
// Initialize the pipeline
sm.Init();
// Stream data
while (sm.AcquireFrame(true).IsSuccessful())
{
// Get a face instance here (or inside the AcquireFrame/ReleaseFrame loop) for configuration
PXCMFaceModule face = sm.QueryFace();
// face is a PXCMFaceModule instance
PXCMFaceData fdata = face.CreateOutput();
// Get the number of tracked faces
Int32 nfaces = fdata.QueryNumberOfDetectedFaces();
Console.WriteLine(nfaces);//Why the output is 0
// Clean up
fdata.Dispose();
}
// Clean up
sm.Dispose();
}
}
}
Link Copied

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page