有学图像处理的大侠帮下忙吗?作业题目没搞懂。。。
题目如下。上课打瞌睡了,不知道那么多文件和数据都怎么用,要搞出什么来。
Stereo Reconstruction
Reconstruct a spatial representation range(x, y), containing the z-coordinate of objects in the stereo pair castle left.pgm and castle right.pgm. This image pair can be found in the xv vision/images directory in the cs603 common directory. Choose the cycloptic coordinate frame for this representation so the disparity equation for depth discussed in class works (you can compare your results to ground truth if you wish, but this takes a great deal of additional work, so it is optional, but some presentation of your results is required). All spatial dimensions are given in mm. In the images directory, you will find:
castle % .pgm − pgm formatted images
castle % .par − image parameters
castlepoints.txt − text description of the ground truth points
castlepoints.xyz − world coordinates of the ground truth
castle % .gt − image coordinates where ground truth is reported
There is a README file in this directory with more detail. The image geometry is arranged so that corresponding rows in the images can be used roughly as epipolar lines.
Construct the depth map by extracting a neighborhood in the left image and searching the corresponding row in the right image for the maximum normalized cross correlation. Compute the disparity for this correspondance and use the disparity relation discussed in class to solve for the spatial coordinates of this point in space. Do this over an entire sub-image that you designate. The z coordinate of the result can be saved in an array indexed by the x and y coordinate of the left image plane. Remap the result into ranges between 0 − 255 and write the result as a pgm image. Illustrate and comment on your results.