我在wpf应用程序中工作,我在XAML中创建了一个复选框,然后我的代码在一个类中调用一个函数,在这个函数中有一个if条件,它检查复选框是否被选中但是没有看到复选框在这堂课上,怎么做呢?
非常感谢
编辑:
这是我做的步骤:我在KinectSkeleton的同一项目下创建了ViewModel类,如下所示:ViewModel类:
public class ViewModel
{
public bool IsChecked { get; set; }
public bool is_clicked { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
在KinectSkeleton中我定义了一个属性,如下所示:
public static readonly DependencyProperty ViewModelProperty =
DependencyProperty.Register("ViewModelH", typeof(ViewModel), typeof(KinectSkeleton), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender));
public ViewModel ViewModelH
{
get
{
return (ViewModel)GetValue(ViewModelProperty);
}
set
{
SetValue(ViewModelProperty, value);
}
}
Run Code Online (Sandbox Code Playgroud)
并且KinectWindow.xaml中的复选框和按钮的代码是:
<Button Content="Calibrate" Height="24" x:Name="Calibrate" x:FieldModifier="public" Width="90" Click="Calibrate_Click" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Left" DockPanel.Dock="Left" Panel.ZIndex="0" Padding="0" VerticalAlignment="Center" />
<CheckBox IsChecked="{Binding Mode=TwoWay, Path=IsChecked}" Content="AngleDifference" Height="22" x:Name="AngleDifference" x:FieldModifier="public" Width="117" Checked="AngleDifference_Checked" Unchecked="AngleDifference_Unchecked" HorizontalAlignment="Left" VerticalAlignment="Center" …Run Code Online (Sandbox Code Playgroud) 我正在考虑在我的一个项目中使用Kinect,但我在所有库之间完全迷失了.不知道到底是什么.最重要的是,我正在阅读有关OpenNI和OpenKinect的内容.但不知道他们的关系/差异.PS.我正在使用Ubuntu或Mac.
我想根据玩家使用kinect和Unity的动作来移动头像,有没有好的教程?
我们使用unity和Kinect接口来创建一个简单的应用程序.根据玩家的动作,我们需要移动头像.
我们都应该使用Unity有GAKUNITY,无OpenNI或任何第三方工具.
有什么好的教程GakUnity with Kinect吗?
GAK 手段 Gadget Accelerator Kit
我们只想avatar在kinect界面前移动任何玩家移动.即使帮助在手运动也高度赞赏.
您还可以分享有关统一和kinect编程的有用链接或书籍.
我正在开发一个使用Kinect的课程项目.根据[Microsoft Kinect for Windows Information Page] [1]:
如果您收到这些错误消息中的任何一个,您可能正在使用Kinect for Xbox 360而不是新的Kinect for Windows.确保您的Kinect传感器是Kinect for Windows传感器.(这很简单:只要确保它说不在前面说"Xbox 360".)
如果您是软件开发人员,可以将Kinect for Xbox 360与计算机一起使用来测试您正在使用的软件.但是,要获得完整的Kinect for Windows体验,我们建议您下载Kinect for Windows SDK并将其与Kinect for Windows一起使用.
注意确保您的Kinect传感器是Kinect for Windows传感器.如果它在前面说"Xbox 360",那就是Xbox 360的Kinect,而不是适用于Windows的Kinect.
尽管这条消息含糊不清,但似乎我应该可以使用XBox 360 Kinect进行开发.SDK仅限制部署,这对我的项目来说非常好.
但是,当我运行以下代码时:
Console.WriteLine("Sensor count: " + KinectSensor.KinectSensors.Count);
Console.WriteLine("Sensor status: " + KinectSensor.KinectSensors[0].Status);
Run Code Online (Sandbox Code Playgroud)
我得到输出:
Sensor count: 1
Sensor status: NotReady
Run Code Online (Sandbox Code Playgroud)
是什么赋予了?我的Kinect已连接到我的电脑.前面的绿灯闪烁.任何帮助在这里将不胜感激.
我正在使用一个数据集,其中包含图像,其中每个像素是一个16位无符号int,以mm为单位存储该像素的深度值.我试图通过执行以下操作将其可视化为灰度深度图像:
cv::Mat depthImage;
depthImage = cv::imread("coffee_mug_1_1_1_depthcrop.png", CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR ); // Read the file
depthImage.convertTo(depthImage, CV_32F); // convert the image data to float type
namedWindow("window");
float max = 0;
for(int i = 0; i < depthImage.rows; i++){
for(int j = 0; j < depthImage.cols; j++){
if(depthImage.at<float>(i,j) > max){
max = depthImage.at<float>(i,j);
}
}
}
cout << max << endl;
float divisor = max / 255.0;
cout << divisor << endl;
for(int i = 0; i < depthImage.rows; i++){
for(int j …Run Code Online (Sandbox Code Playgroud) 我目前使用名为procamcalib的JavaCV软件来校准Kinect-Projector设置,该设置以Kinect RGB Camera为原点.此设置仅包括Kinect RGB相机(我现在大致使用Kinect作为普通相机)和一台投影仪.该校准软件使用LibFreenect(OpenKinect)作为Kinect驱动程序.
一旦软件完成其过程,它将为我提供相机和投影仪的内在和外在参数,这些参数被抛出在OpenGL软件上以验证校准,并且是一些问题开始的地方.正确设置投影和模型视图后,我应该能够适应Kinect所看到的投影内容,但为了达到这个目的,我必须在所有3轴上进行手动平移,最后一部分不做对我有任何意义!你能帮我解整一下吗?用于检索Kinect数据的SDK是OpenNI(不是最新的2.x版本,应该是1.5.x)
我将解释我正在做什么来重现这个错误.校准参数使用如下:
投影矩阵设置为(基于 http://sightations.wordpress.com/2010/08/03/simulating-calibrated-cameras-in-opengl/):
r = width/2.0f; l = -width/2.0f;
t = height/2.0f; b = -height/2.0f;
alpha = fx; beta = fy;
xo = cx; yo = cy;
X = kinectCalibration.c_near + kinectCalibration.c_far;
Y = kinectCalibration.c_near*kinectCalibration.c_far;
d = kinectCalibration.c_near - kinectCalibration.c_far;
float* glOrthoMatrix = (float*)malloc(16*sizeof(float));
glOrthoMatrix[0] = 2/(r-l); glOrthoMatrix[4] = 0.0f; glOrthoMatrix[8] = 0.0f; glOrthoMatrix[12] = (r+l)/(l-r);
glOrthoMatrix[1] = 0.0f; glOrthoMatrix[5] = 2/(t-b); glOrthoMatrix[9] = …Run Code Online (Sandbox Code Playgroud) 我需要找到任何使用Kinect的人在面对镜头时的胸部前部尺寸.我目前的解决方案是:
当MultiFrameSource到达时获取颜色(以显示ui中的主体)主体(获取关节)和bodyIndex帧.
使用以下方法将BodyIndexFrame复制到byte [] _bodyData:
bodyIndexFrame.CopyFrameDataToArray(_bodyData);
Run Code Online (Sandbox Code Playgroud)我得到了Joint对象:spineShoulder和spineMid.我认为胸部总是在这些点之间.
我通过使用将两个关节转换为CameraSpacePoint(x,y,z)并从CameraSpacePoint转换为DepthSpacePoint(x,y)
_sensor.CoordinateMapper.MapCameraPointToDepthSpace(jointPosition);
Run Code Online (Sandbox Code Playgroud)我仍然保留对spineShoulder的z值的引用.
第二个假设=> 从spineShoulderY开始到spineMidY我试图找到播放器区域中最宽的点.为了做到这一点,我将尝试找到spineShoulderX和找到的第一个不属于玩家的左边区域之间的最长段,以及发现不属于玩家的spineShoulderX和第一个右侧区域之间的最长段.找到的两个x段必须位于相同的y坐标中.
/***************
* Returns the distance between 2 points
*/
private static int getDistanceToMid(int pointX, int midX)
{
if (midX > pointX)
{
return (midX - pointX);
}
else if (pointX > midX)
{
return (pointX - midX);
}
else
{
return 0;
}
}
/*********
* Loops through the bodyData array
* It will look for the longest x distance from midX to the last left …Run Code Online (Sandbox Code Playgroud)Kinect for Windows 刚刚于2月1日发布.
有没有什么好方法可以让它与HTML5游戏一起使用?甚至可能以某种方式使用即将推出的GamePad API ......?在这里寻找想法,特别是对于浏览网页的用户而言,只需要最少的额外安装费用.
我知道这是一个一般性的问题主题,但我仍然想知道C++中最快的语音识别库是什么?
目前我正在使用带有kniect的Microsoft SAPI.它工作正常并识别单词,但它的速度很慢,有时候识别单词需要1,2秒,在我的情况下,这种滞后会给用户带来很多交互问题.
我检查了kinect提供的样本,其中乌龟根据识别出的单词向右移动,但即便有点慢.
所以我想知道是否有更快的库然后sapi,可以用于像机器人使用语音识别的情况下你说"左"然后"右"但机器人继续向左移动并在1,2秒之后向右转令用户感到沮丧.
有没有人有一个很好的教程或信息如何使用Kinect开始编程C#应用程序?我一直在搜索,我找到的只是视频,但没有真正的文章.