Google Tango: Aligning Depth and Color Frames

前端 未结 4 350
面向向阳花
面向向阳花 2021-01-03 12:03

I would like to align a (synchronous) depth/color frame pair, using the Google Tango tablet, such that, assuming that both frames have the same resolution, each pixel in the

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-03 13:08

    I have not tried this but we can probably do: for each (X,Y,Z) from point cloud:

    u_pixel = -(X/Z)* Fx, v_pixel = -(Y/Z)* Fy.
    x = (u-cx)/Fx, y = (v-cy)/Fy.
    

    for distortion correction (k1,k2,k2 can from distortion[] part of TangoInstrinsics, r = Math.sqrt(x^2 + y^2)))

    x_corrected = x * (1 + k1 * r2 + k2 * r4 + k3 * r6) 
    y_corrected = y * (1 + k1 * r2 + k2 * r4 + k3 * r6) 
    

    Then we can convert normalized x_corrected, y_corrected to x_raster, y_raster by using reverse of the above formula (x_raster = x_correct*Fx+ cx)

提交回复
热议问题