Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions on format of the raw kinect correlations #12

Closed
schellmi42 opened this issue Aug 19, 2021 · 0 comments
Closed

Questions on format of the raw kinect correlations #12

schellmi42 opened this issue Aug 19, 2021 · 0 comments

Comments

@schellmi42
Copy link

schellmi42 commented Aug 19, 2021

Hello,

I downloaded the data from the google drive link given in another issue #11 , but now I had some problems loading the measurements and understanding which of the nine measurements is for which frequency at which phase offset.

First, I loaded the raw kinect correlations as described using the given code:

with open(filename,'rb') as f:
	meas=np.fromfile(f, dtype=np.int32)
meas = np.reshape(meas,(424,512,9)).astype(np.float32)

However the correlations are not correct and looked like this: (small snippet of one image)
FLAT_correlations_after_loading
FLAT_ToF_from_Corr

[[-54. -51. -50. -68. -55. -59. -57. -46. -47. -50.]
 [ 45.  39.  45.  60.  45.  55.  49.  52.  54.  60.]
 [-47. -51. -51. -49. -52. -54. -48. -47. -57. -66.]
 [ 49.  48.  49.  62.  48.  46.  41.  41.  48.  39.]
 [-50. -53. -55. -52. -36. -54. -50. -53. -40. -48.]
 [ 56.  45.  52.  53.  50.  65.  54.  49.  41.  47.]
 [-37. -50. -48. -50. -57. -50. -50. -51. -53. -42.]
 [ 56.  50.  56.  48.  45.  49.  46.  52.  43.  44.]
 [-50. -50. -54. -57. -57. -54. -42. -37. -50. -52.]
 [ 67.  54.  42.  43.  56.  45.  51.  45.  50.  43.]
 [-54. -40. -53. -42. -41. -41. -47. -48. -53. -49.]
 [ 50.  48.  43.  44.  46.  51.  57.  45.  32.  34.]
 [-47. -60. -41. -37. -48. -42. -48. -43. -45. -45.]
 [ 47.  49.  44.  40.  43.  46.  44.  48.  50.  44.]
 [-47. -37. -49. -52. -51. -43. -40. -46. -41. -49.]
 [ 40.  44.  57.  48.  35.  62.  34.  51.  57.  49.]
 [-52. -44. -45. -50. -44. -53. -44. -44. -40. -51.]
 [ 38.  51.  45.  40.  42.  46.  47.  44.  39.  46.]
 [-51. -51. -57. -47. -45. -49. -41. -45. -46. -42.]
 [ 39.  45.  42.  42.  51.  42.  48.  46.  37.  38.]]

Every other line seems to have the wrong sign.

To get something that looks like the image in the paper I used this transformation:

sign_fix = np.concatenate(
    (np.tile([1, -1], shape[0] // 4), np.tile([-1, 1], shape[0] // 4)), axis=0
                            ).reshape([ -1, 1, 1])

  meas= meas* sign_fix

Could you verify whether this is the right thing to do, or how to transform the data correctly?
FLAT_correlations_fixed

Also could you provide the frequencies and phase_offsets for the measurements?
I was not able to find them in the paper or the supplementary.

So far I think the first 3 are at 40MHz(T=2.5e-8s) and the last three at ~58MHz (T=1.7e-8s) .
(taken from sim/tof_class/cam_real_mult)
But the middle one (low frequency signal) I did not find the frequency in the your code.

The phase offsets I figured should be [240, 120, 0]. Is this correct?
FLAT_ToF_estimation_phase_offsets_ 240,120,0

I tried with [0, 120, 240] first, but then the ToF-depth reconstruction is off and decreases with object distance.
FLAT_ToF_from_Corr_phase_offset_ 0,120,240

I would be happy if you could help matching frequency, / phase_offsets to the data.

Thanks and best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants