【发布时间】:2014-06-04 08:10:48
【问题描述】:
深度图到点颜色图有一点问题, 我只是简单地阈值最近的深度(大约 70-80 厘米),然后我按位和阈值深度图像到相应的颜色图,
Mat depthFilter(Mat depth,Mat color){
Mat I;
depth.convertTo(I, CV_8UC1, 255.0 / 4096.0);
unsigned char *input = (unsigned char*)(I.data);
for (int i = 0; i < I.cols; i++){
for (int j = 0; j < I.rows; j++){
int pixel = input[I.cols*j + i];
if (!(pixel <52 && pixel >42)){
input[I.cols*j + i] = 0;
}
else
{
input[I.cols*j + i] = 255;
}
}
}
cvtColor(color, color, CV_BGR2GRAY);
bitwise_and(I, color, I);
return I;
} (我正在使用 OpenCvKinect,它使用 OpenNi 和 OpenCv) 但我的问题是,要点不一样..我想我需要找到两个图像之间的一些关系,但是如何:)!
【问题讨论】:
-
深度图和RGB图像好像没有注册,尝试在Kinect上开启注册模式。