联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> javajava

日期:2018-12-26 09:26

Description

Stereo matching is an important algorithm in computer vision. Recall the dynamic programming algorithm Prof. Yu talked about in week 14. Now you are required to implement this algorithm. The goal of this algorithm is to find the lowest cost matching between the left and right images.

Input

On the first line, there will be two integers mm and nn, which denotes the size of each image. Following is 2m2m lines. Line 22to m+1m+1 give the left eye image and line m+2m+2 to 2m+12m+1 give the right eye image. These two 2m2m lines each contains nnintegers within [0,255][0,255], which denotes the grey level of the corresponding pixel.

Output

mm lines, representing the output image. Each line should contain nn integers, representing the corresponding pixel.

Sample

Input

(Converted to image)

Left eye image


Right eye image


Output

(Converted to image)


Tools

You can use this MATLAB tool to convert between images and integer text files.

Image Utilities


描述

立体匹配是计算机视觉中的一种重要算法。回想一下Yu教授在第14周谈到的动态编程算法。现在你需要实现这个算法。该算法的目标是找到左图像和右图像之间的最低成本匹配。

输入

在第一行,将有两个整数 米我和?n,表示每个图像的大小。以下是2米2?条线。线22到m + 1个m + 1给出左眼图像和线条M + 2m + 2到2M + 12 m + 1给出右眼图像。这两个2米每条2米线包含?n整数[0255][0,2 55],它表示对应的像素的灰度级。

产量

米m行,代表输出图像。每行应包含n个整数,表示相应的像素。

样品

输入

(转换为图片)

左眼图像


右眼图像


产量

(转换为图片)


工具

您可以使用此MATLAB工具在图像和整数文本文件之间进行转换。

图像工具


版权所有:留学生程序网 2020 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。