Calculate Depth map of right image

北城以北 提交于 2019-12-08 04:32:14

问题


What I have done: To create a novel view(right image) from left image(given), I used the formula for pure translation between views(from Zissermann book) as:

x' = x + K.t/Z

x'= [u' v' 1]; x = [u v 1]; K = [f 0 cx; 0 f cy;0 0 1]; t = [t1 t2 t3]^T; Z - depth of pixel in left image

The images and camera matrix were taken from Middlebury stereo 2014 dataset.

By implementing this, I have an image with holes(black regions) due to disocclusions.

What I need to do :

To fill these holes, several algorithms exist which modify the depth map of right view prior to warping.

Can you tell me how I can find depth map of my synthesized(right) view ?

results matlab Above is the result I have got till now, please help!


回答1:


My answer actually is a workaround from Priyamvadha's previous question and my answer to it. If you have extrinsic/intrinsic parameters and 3D points, consider to reverse the process.

  1. transform (as you did with my previous answer) all the 3D points in the right camera's reference system (use extrinsic R and t, "reversing" the transformation)

  2. now that you have all the 3D coordinates in that system, remember that the Z value is strongly linked with the disparity

  3. for each point and its Z coordinate, the disparity should be equal to

    D = (b*f)/Z

with b the baseline and f the focal length from intrinsics.
You should have obtained syntethized disparity for your syntetized image. Link each disparity value with the correspondant projected point in the syntethized image.

Yes, I could have join all the passage and give you a unique formula, but it would not have meant anything for you.

PS if you have no point, there will be no depth for black holes in the image.



来源:https://stackoverflow.com/questions/39898247/calculate-depth-map-of-right-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!