首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >水下图像没有显示-为什么?

水下图像没有显示-为什么?
EN

Stack Overflow用户
提问于 2014-02-14 23:02:36
回答 4查看 1K关注 0票数 1

我已经安装了openni2.2、nite2.2和kinect SDK1.6以及Simpleopenni库进行处理。一切正常工作,除了红外图像-它根本不存在。这是非常奇怪的,因为在同一时间,我可以清楚地看到深度图像(而且深度图像逻辑上需要水下摄像机和投影仪来运行)。所以我认为驱动程序或软件有问题吗?我想用kinect作为红外相机。请帮助,下面我附上我的测试代码:

代码语言:javascript
复制
/* --------------------------------------------------------------------------
 * SimpleOpenNI IR Test
 * --------------------------------------------------------------------------
 * Processing Wrapper for the OpenNI/Kinect library
 * http://code.google.com/p/simple-openni
 * --------------------------------------------------------------------------
 * prog:  Max Rheiner / Interaction Design / zhdk / http://iad.zhdk.ch/
 * date:  02/16/2011 (m/d/y)
 * ----------------------------------------------------------------------------
 */

import SimpleOpenNI.*;


SimpleOpenNI  context;

void setup()
{
  context = new SimpleOpenNI(this);

  // enable depthMap generation 
  if(context.enableDepth() == false)
  {
     println("Can't open the depthMap, maybe the camera is not connected!"); 
     exit();
     return;
  }

  // enable ir generation
  if(context.enableIR() == false)
  {
     println("Can't open the depthMap, maybe the camera is not connected!"); 
     exit();
     return;
  }

  background(200,0,0);
  size(context.depthWidth() + context.irWidth() + 10, context.depthHeight()); 
}

void draw()
{
  // update the cam
  context.update();

  // draw depthImageMap
  image(context.depthImage(),0,0);

  // draw irImageMap
  image(context.irImage(),context.depthWidth() + 10,0);
}
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2014-04-18 20:01:12

这样做的工作是:

代码语言:javascript
复制
context.enableIR(1,1,1);
票数 2
EN

Stack Overflow用户

发布于 2014-03-11 15:25:48

我也有同样的问题。这不是一个解决方案,但我能从kinect获得红外线图像的最接近的方法是从soltuion所在的深度图像中获取点云。

代码语言:javascript
复制
import SimpleOpenNI.*;

import processing.opengl.*;

SimpleOpenNI kinect;

void setup()
{

  size( 1024, 768, OPENGL);

  kinect = new SimpleOpenNI( this );

  kinect.enableDepth();

}

void draw()
{

  background( 0);

  kinect.update();
  image(kinect.depthImage(),0,0,160,120);//check depth image

  translate( width/2,  height/2, -1000);

  rotateX( radians(180));

  stroke(255);

  PVector[] depthPoints = kinect.depthMapRealWorld();

  //the program get stucked in the for loop it loops 307200 times and I don't have any points output

  for( int i = 0; i < depthPoints.length ; i+=4)//draw point for every 4th pixel
  {

    PVector currentPoint = depthPoints[i];
    if(i == 0) println(currentPoint);
    point(currentPoint.x,  currentPoint.y, currentPoint.z );
  }

}
票数 0
EN

Stack Overflow用户

发布于 2014-06-04 00:07:51

你能捕捉到红外线流,但你看不到吗?

然后问题可能是RANGE (它应该在0,255中)。

我在PythonandC++中遇到了这个问题;我通过将数组除以范围(max-min)来解决这个问题,然后将所有条目乘以255。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21791032

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档