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

Can I use this method for lytro style light field? #18

Closed
DarwinSenior opened this issue Oct 10, 2019 · 5 comments
Closed

Can I use this method for lytro style light field? #18

DarwinSenior opened this issue Oct 10, 2019 · 5 comments

Comments

@DarwinSenior
Copy link

As stated, since colmap fails to register for Lytro style data, I am trying to manually generate poses and mpi_bds. However, I think I might do something wrong here.

I figured out that the poses is a 5x3 matrix which generates the homography.
If the horizontal baseline and vertical baseline of each view is x and y and the image is of size hxw and the focus is f, is this the right matrix for poses?

1 0 0 (-y) h
0 1 0 (-x) w
0 0 1 0    f
@rodrygojose
Copy link
Collaborator

Hi @DarwinSenior ,
You should be able to use lytro-style photos if you manage to create the poses_bounds.npy file.
Please, notice that the stored cameras represent camera-to-world transformations and that the camera coordinate system is [ down, right, backwards ].
For more information, please check this previous issue:
#10

@DarwinSenior
Copy link
Author

I was trying with CG generated images, but it seems the images wrapped together but the inference does not have any effects. In the code, I generate MPI with

ibr_runner = DeepIBR()
ibr_runner.load_graph('./checkpoints/papermodel/checkpoint')
mpis = run_inference(imgs, poses, mpi_bds, ibr_runner, num_planes, patched)

and did

    plt.imsave(os.path.join(savedir, 'mpi{:02d}/disps.png'.format(i)), mpis[i].disps)

for each image
I have got the following images from MPI. Is it possible to speculate where it got wrong?

plane_8
plane_7
plane_6
plane_5

@rodrygojose
Copy link
Collaborator

Are you using only 4 input images?
If that's the case I would recommend to use more. At least 9 (a grid of 3x3).
The line:
plt.imsave(os.path.join(savedir, 'mpi{:02d}/disps.png'.format(i)), mpis[i].disps)
does not save MPIs, but a visualization of the estimated disparity.

@DarwinSenior
Copy link
Author

Thank you. I have solved it. It was my mistake in using too few planes as parameters and mixing up with num_planes and N

@bishengderen
Copy link

如上所述,由于 colmap 无法注册 Lytro 样式数据,因此我正在尝试手动生成姿势并mpi_bds。但是,我认为我可能会在这里做错事。

我发现这些姿势是一个5x3矩阵,它产生单调性。如果每个视图的水平基线和垂直基线为 x 和 y,图像大小为 hxw,焦点为 f,那么这是姿势的正确矩阵吗?

1 0 0 (-y) h
0 1 0 (-x) w
0 0 1 0    f

Hello, I would like to ask you how you generate the attitude matrix from lytro data and convert it into an NPY file?

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

3 participants