计算右图像的深度图 [英] Calculate Depth map of right image
问题描述
我做了什么:
要从左图(给定)创建一个新的视图(右图),我使用的公式纯视图之间的翻译(从Zissermann书)为:
x'= x + Kt / 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 - 左图像中的像素深度
图像和相机矩阵取自Middlebury stereo 2014数据集。
通过实现这个,
我有一个带有漏洞的图片(黑色区域)。
我需要做的: p>
为了填补这些洞,有几种算法在修改之前修改右视图的深度图。
告诉我如何找到我的合成(右)视图的深度图?
results matlab
以上是我到现在为止的结果,请帮助!
我的回答实际上是从 Priyamvadha的上一个问题和我的答案的解决方法。
如果您有外在/内在参数和3D点,请考虑反转过程。
-
转换(如同我前面的答案)所有的3D点在正确的相机参考系> R 和 t ,转换转换)
-
系统,记住Z值与每个点及其Z坐标的视差
-
强烈相关,差异应等于
D =(b * f)/ Z
和f是来自内在函数的焦距。
您应该已经为合成图像获得了合成的差异。将每个视差值与合成图像中的相应投影点相链接。
是的,我可以加入所有段落并给出一个唯一的公式,对你来说意味着什么。
PS如果你没有意义,图片中就不会有黑洞的深度。
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!
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.
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)
now that you have all the 3D coordinates in that system, remember that the Z value is strongly linked with the disparity
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.
这篇关于计算右图像的深度图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!