为何输出的都是0

Icelandgreenland 2016-08-29 01:09:35
为何输出的都是0

Int32 nfaces = fdata.QueryNumberOfDetectedFaces();
Console.WriteLine(nfaces);//为何输出的都是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();
}
}
}
...全文
1090 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

566

社区成员

发帖
与我相关
我的任务
社区描述
英特尔® 边缘计算,聚焦于边缘计算、AI、IoT等领域,为开发者提供丰富的开发资源、创新技术、解决方案与行业活动。
社区管理员
  • 英特尔技术社区
  • shere_lin
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧