1、由明暗度提取外形信息 朱俊 0220080198 一 实验内容 1 由图像的明暗度提取外形信息 二 实验原理 1 Shape From Shading 212 维理解是通过物体表面的明暗度 Shading 分布去提取得到物体外形Shading 信息的一种表达方法。人们把明暗度分布的图像称为外现图像( extrinsic image),把 212 表达称为内在图像( intrinsic image),表示这是排除了光线的影响后直接反映出物体外形的图像。 2 约束方程 从外现图像到内在图像所要做的工作就是解图像辉度约束方程: I(x,y)=R(p,q) 即 11)1(),(22220 ssss q
2、pqp qqppIyxI 其中 0I 为入射光的强度,为物体表面反射系数 3 迭代求解 )1,()1,(),1(),1(41),()1,()1,(),1(),1(41),(),(),(1),(),(),(),(1),(),(N1N1yxqyxqyxqyxqyxqyxpyxpyxpyxpyxpqRqpRyxIyxqyxqpRqpRyxIyxpyxpNNNNNNNNNNNNNN三 实验步骤 首先用 matlab 生成一个灰度的球,具体操作如下: sphere;生成一个球 colormap gray;使得彩色的 球变成灰度的 axis off;去掉多余的坐标轴 axis equal;使得椭球变成圆球
3、 shading flat;和 shading interp 使得圆球表面光滑 光线入射角为默认的 0 度,入射光强度和球表面的反射系数未知。 得到的球如图所示: 2322023220)1()1(qpqqIqRqpPPIpRss代入初始 p, q 0,则显然迭代结果也是 0 代入初始 p, q无穷,则pR和pR也为无穷,迭代结果也不收敛 因此需要进行坐标变换, 使边界值为有限值。所以采用高斯球系统 将球投影到 f g平面,可得关系:2222112,112qpqgqppf把原来的迭代公式转化为: jiNNNNjiNNNNgRyxgyxfRyxIyxgyxgfRyxgyxfRyxIyxfyxf,1
4、,1),(),(),(),(),(,),(),(),(),(),(四 实验结果 迭代的开始点,在遮合边界上 fi,j0=2, gi,j0=2,里面点为 fi,j0=0, gi,j0=0,把图压缩成 19 19 的,则迭代结果为: 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -0.434,-1.952 -0.221,-1.988 0.000,-2.000 0.221,-1.988 0.434,-1.952 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -0.894,-1.789 -0.474,-1.156 -0.339,-1.344
5、-0.171,-1.376 -0.000,-1.384 0.171,-1.376 0.338,-1.344 0.474,-1.156 0.894,-1.789 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -1.162,-1.627 -0.741,-1.257 -0.506,-1.106 -0.333,-1.122 -0.167,-1.140 -0.000,-1.146 0.166,-1.140 0.332,-1.121 0.505,-1.105 0.739,-1.254 1.162,-1.627 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -1.414,
6、-1.414 -0.932,-1.102 -0.687,-0.994 -0.515,-0.978 -0.349,-0.999 -0.178,-1.023 -0.000,-1.030 0.177,-1.023 0.349,-0.999 0.513,-0.975 0.687,-0.993 0.932,-1.102 1.414,-1.414 0,0 0,0 0,0 0,0 0,0 -1.627,-1.162 -1.122,-0.927 -0.858,-0.838 -0.693,-0.834 -0.542,-0.863 -0.378,-0.901 -0.195,-0.931 -0.000,-0.943
7、 0.195,-0.931 0.378,-0.900 0.542,-0.863 0.692,-0.834 0.858,-0.838 1.122,-0.927 1.627,-1.162 0,0 0,0 0,0 0,0 -1.736,-0.992 -1.092,-0.711 -0.869,-0.673 -0.724,-0.696 -0.583,-0.744 -0.417,-0.799 -0.220,-0.842 -0.000,-0.858 0.219,-0.842 0.417,-0.799 0.583,-0.744 0.724,-0.696 0.869,-0.673 1.092,-0.711 1.
8、736,-0.992 0,0 0,0 0,0 -1.873,-0.702 -1.327,-0.575 -1.037,-0.510 -0.891,-0.518 -0.768,-0.554 -0.635,-0.610 -0.464,-0.670 -0.245,-0.709 -0.001,-0.720 0.243,-0.708 0.464,-0.670 0.635,-0.610 0.769,-0.555 0.891,-0.518 1.037,-0.510 1.325,-0.574 1.873,-0.702 0,0 0,0 -1.940,-0.485 -1.273,-0.359 -1.038,-0.3
9、38 -0.919,-0.356 -0.814,-0.392 -0.685,-0.440 -0.494,-0.479 -0.251,-0.489 -0.001,-0.483 0.248,-0.486 0.494,-0.478 0.686,-0.440 0.817,-0.394 0.919,-0.357 1.038,-0.338 1.272,-0.359 1.940,-0.485 0,0 0,0 -1.985,-0.248 -1.277,-0.178 -1.055,-0.171 -0.939,-0.182 -0.846,-0.205 -0.716,-0.231 -0.494,-0.242 -0.
10、232,-0.229 -0.001,-0.230 0.230,-0.228 0.493,-0.242 0.715,-0.232 0.847,-0.206 0.942,-0.183 1.055,-0.171 1.274,-0.177 1.985,-0.248 0,0 0,0 -2.000,0.000 -1.278,-0.000 -1.060,-0.001 -0.950,-0.002 -0.859,-0.003 -0.722,-0.005 -0.480,-0.006 -0.230,-0.007 -0.000,-0.007 0.229,-0.007 0.479,-0.007 0.719,-0.006
11、 0.859,-0.004 0.950,-0.003 1.060,-0.001 1.281,-0.000 2.000,0.000 0,0 0,0 -1.985,0.248 -1.274,0.176 -1.055,0.169 -0.939,0.179 -0.846,0.199 -0.713,0.221 -0.490,0.228 -0.230,0.214 -0.000,0.214 0.229,0.214 0.488,0.226 0.713,0.220 0.846,0.198 0.939,0.178 1.055,0.168 1.274,0.176 1.985,0.248 0,0 0,0 -1.940
12、,0.485 -1.272,0.358 -1.037,0.336 -0.915,0.352 -0.811,0.386 -0.682,0.430 -0.488,0.462 -0.245,0.466 0.000,0.457 0.246,0.466 0.488,0.461 0.685,0.430 0.812,0.385 0.916,0.351 1.037,0.336 1.272,0.358 1.940,0.485 0,0 0,0 -1.873,0.702 -1.324,0.573 -1.033,0.507 -0.887,0.515 -0.767,0.551 -0.632,0.603 -0.459,0
13、.658 -0.241,0.694 0.001,0.702 0.242,0.693 0.461,0.657 0.633,0.601 0.764,0.547 0.888,0.514 1.036,0.508 1.325,0.573 1.873,0.702 0,0 0,0 0,0 -1.736,0.992 -1.086,0.707 -0.866,0.670 -0.724,0.695 -0.579,0.739 -0.414,0.792 -0.217,0.834 0.001,0.849 0.219,0.833 0.416,0.790 0.581,0.737 0.724,0.693 0.866,0.669
14、 1.087,0.707 1.736,0.992 0,0 0,0 0,0 0,0 -1.627,1.162 -1.121,0.926 -0.855,0.836 -0.686,0.829 -0.537,0.859 -0.373,0.893 -0.192,0.925 0.001,0.938 0.194,0.924 0.375,0.891 0.540,0.856 0.689,0.827 0.856,0.836 1.121,0.926 1.627,1.162 0,0 0,0 0,0 0,0 0,0 -1.414,1.414 -0.927,1.097 -0.679,0.990 -0.508,0.979
15、-0.345,0.997 -0.176,1.018 0.000,1.024 0.177,1.017 0.347,0.991 0.511,0.967 0.682,0.985 0.929,1.098 1.414,1.414 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -1.162,1.627 -0.735,1.257 -0.508,1.148 -0.332,1.130 -0.166,1.136 -0.000,1.139 0.165,1.132 0.330,1.112 0.500,1.091 0.735,1.246 1.162,1.627 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -0.894,1.789 -0.556,1.448 -0.349,1.379 -0.172,1.368 -0.001,1.366 0.168,1.359 0.333,1.324 0.465,1.132 0.894,1.789 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 -0.632,1.897 -0.434,1.952 -0.221,1.988 0.000,2.000 0.221,1.988 0.434,1.952 0,0 0,0 0,0 0,0 0,0 0,0 0,0
Copyright © 2018-2021 Wenke99.com All rights reserved
工信部备案号:浙ICP备20026746号-2
公安局备案号:浙公网安备33038302330469号
本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。