Panepo / Tesatsu

Personal website
https://panepo.github.io/Tesatsu/
1 stars 0 forks source link

Hello, i have some a question about aligning infrared and color images using SDK Realsense #1

Open shinokain opened 4 years ago

shinokain commented 4 years ago

First i want to say i don't know how to contact you so i just created an issue, apologize for that I'm an exchange student who currently studying in Taiwan, I encountered the same problem about how to align the infrared and color streams from the realsense camera. While i was searching for a solution, which is now seems still publicly unavailable, i saw your issue in librealsense. I want to know if you have succeeded in aligning the two streams. If so, could you show me the way to do it by codes? I just started studying python for 3 days and have to carry out my research at the same time, so i'm pretty bad and lack of knowledge to understand complex terms. Many thanks in advance!!!

Panepo commented 4 years ago

Hi @shinokain,

For aligning color and infrared images, I didn't align them pixel by pixel and only process the corner pixel of the roi I want. The processing method is mapping to depth first, then mapping to infrared. My code is written in C++ and you can reference this code to implement it in Python.

shinokain commented 4 years ago

Thanks for the reply, is the accuracy for it good enough?

Panepo commented 4 years ago

That is official code for aligning process. Once you called align, it computes projection pixel by pixel. The aligning color and infrared images is not available just because it does not in the option, so just implement it.

Also the precision of roi border of my project does not matter.

shinokain commented 4 years ago

Thanks for the answer, it is really helpful.

shinokain commented 4 years ago

Sorry to bother you again, how could you project the 2d pixel from RGB image to depth 3d point without knowing the depth value of the 2d pixel?

Panepo commented 4 years ago

Read this code carefully. The projection function uses the corresponding depth value to calculate the 3d point.