Use Kinect LiDAR for camera matchmoving in PFTrack | 用Kinect的激光测距来帮助PFTrack的摄影机反求

So yea I got the idea becaues I wanted to deploy some close-up shots in my small project, but close-ups are always a pain to matchmove according to my experience. We know that this device’s resolution is quite limited, so does it work?

Couldn’t find anybody done the same thing using this low cost toy on Internet, or at least they didn’t post it. So here you go, the result turns out neat and I’m really happy with it. Notice at the end of the clip, the shot is pretty close and it worked fine. Video:


Youtube

所以我想用些近距离镜头但是tracking的问题很麻烦,不知道Kinect作为PFTrack的信息源行不行,网上也没人说(这个属于杀牛用鸡刀.. 专业的LiDAR三十万向上)只能自己实验了。试了一下结果很满意:



I used Skanec to generate the model and export it into a .ply file, then converted it to a .xyz file with some script, which was really easy and straightforward.

[cpp]
#include <iostream>
#include <fstream>

using namespace std;

int main() {
fstream scene0;
scene0.open("scene.txt");
fstream scene1("./scene1.txt");

while(!scene0.eof()) {

char tmp[1000000];

/*
if(scene0.peek()>’9′ || scene0.peek()<‘0’) {
scene0.getline(tmp, 1000000);
continue;
}
*/

int x,y,z;
for(int i=0;i<3;i++) {
double a;
scene0 >> a;
scene1<< a <<" ";
}

for(int i=0;i<3;i++) {
double a;
scene0 >> a;
}

for(int i=0;i<3;i++) {
int a;
scene0 >> a;
scene1 << a << ‘ ‘;
}

scene0.getline(tmp, 1000000);
scene1<<‘\n’;
}

scene0.close();
scene1.close();

return 0;
}

[/cpp]
建模用的Skanect,写了个小脚本转换成带RGB的.xyz文件,很简单。(查了3天这格式到底是什么,终于有人提到和我猜的一样就是x y z r g b,最初不行只是要重新导一遍.. 泪)

[cpp]
#include <iostream>
#include <fstream>

using namespace std;

int main() {
fstream scene0;
scene0.open("scene.txt");
fstream scene1("./scene1.txt");

while(!scene0.eof()) {

char tmp[1000000];

/*
if(scene0.peek()>’9′ || scene0.peek()<‘0’) {
scene0.getline(tmp, 1000000);
continue;
}
*/

int x,y,z;
for(int i=0;i<3;i++) {
double a;
scene0 >> a;
scene1<< a <<" ";
}

for(int i=0;i<3;i++) {
double a;
scene0 >> a;
}

for(int i=0;i<3;i++) {
int a;
scene0 >> a;
scene1 << a << ‘ ‘;
}

scene0.getline(tmp, 1000000);
scene1<<‘\n’;
}

scene0.close();
scene1.close();

return 0;
}

[/cpp]

90 thoughts on “Use Kinect LiDAR for camera matchmoving in PFTrack | 用Kinect的激光测距来帮助PFTrack的摄影机反求

  1. https://as.uv.es/cgi-bin/AuthServer?LOGOUT=&RECONNECTURL=https://www.russianrealty.ru/bitrix/redirect.php?goto=https://de.trustpilot.com/review/der-wikinger-shop.de</a

    References:

    Hitnspin willkommensbonus https://as.uv.es/cgi-bin/AuthServer?LOGOUT=&RECONNECTURL=https://www.russianrealty.ru/bitrix/redirect.php?goto=https://de.trustpilot.com/review/der-wikinger-shop.dehttps://as.uv.es/cgi-bin/AuthServer?LOGOUT=&RECONNECTURL=https://www.russianrealty.ru/bitrix/redirect.php?goto=https://de.trustpilot.com/review/der-wikinger-shop.de</a

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *