From: http://www.haystack.mit.edu/edu/pcr/MOSAIC/ 1.The universe behaves in a consistent and predictablemanner, independent of whom the observer is or where the observer happens tobe. Physics is the branch of science which seeks to study, understand, and quantify the interaction of all matter and energy. 2.We study matter and energy through observation. Data collection and analysis reveal simple relationships between measurable physical quantities or variables. These observations become postulates, theories, or laws of science. 3.We use the language of mathematics to express therelationships among variables as formal equations. These equations are constantly being tested in every observable event and experiment. 4.If a conflict arises between an observed fact and theory,we trust our observations and seek to discover why the conflict exists. Ifnecessary, the scientific community must modify the theory to match trusted,repeatable observations. 5.We can solve physics problems using a standard methodology. This Appendix has suggested an 8-step problem solving method whichcan be applied to any given problem. When executed properly, there should be a high degree of confidence in the solution obtained from such a method.
Summary 前贴 已经介绍同等尺寸的若干图片镶嵌操作的方法,本帖代码将比之前贴更加强大。若干图片还是要求具有同样的尺寸,并含有相同的波段数量。 Code Specification 代码设定在前端这些内容, N=2; 定义输出列数 color= ; 定义输出背景颜色 blkimg.width =0.08; 定义插入图片之间水平方向间距,归一化为图片的 width blkimg.height =0.12; 定义插入图片之间垂直方向间距,归一化为图片的 height edgimg.width =0.5; 定义图片与边缘之间水平方向间距,归一化为图片的 width edgimg.height=0.2; 定义图片与边缘之间垂直方向间距,归一化为图片的 height 如果 blkimg.width 、 blkimg.height 、 edgimg.width 、 edgimg.height 四变量全部赋值为 0 ,此时结果将与 前贴 代码结果一致,不留出任何空白。比之 前贴 方法二同样具有优势,虽然都可以留出间距空白,但前贴方法对图像信息有损失,本帖代码没有损失。 Fig. 1 Acknowledgements These images used here are all from MakotoChannel Google+ , she is a dancer, special thanks to the nic e lovely Japanese girl. MatMosaic.rar References Matlab: 图片镶嵌 .
最近需要处理连续10年的MODIS LAI产品数据(MOD15A2)。根据自己的需求,写了一个MS-DOS批处理小程序,主要解决的问题是:YEAR和DOY两重循环,并将YEAR和DOY连接成YEAR+DOY的形式(如2001001)用以搜索符合条件的待拼接文件。 需要注意的地方(代码中红色标注处): 1、用set设置数据文件夹环境变量时,等号的前后都不能出现空格。如果等号前面有空格,则环境变量名称变为“MRTDATADIR ”,如果等号后有空格,则数据文件夹路径前面多出空格会导致MRT工具找不到相关数据文件。 2、DOY的设置采用了“曲线救国”方案,即先设置为10001的形式,然后截取最后三个字符作为标准DOY。 3、DOS下的字符截取操作:%DOY:~-3%表示截取DOY变量的最后三个字符,等效于%DOY:~4,3%,表示从DOY变量的第5个字符开始截取3个字符。 4、进行YEAR的循环时需要对DOY进行初始化。 代码如下: @echo off rem **This is a MS-DOS batch file to do multi-yearly mosaicing and resampling preprocessing by using MRT rem **author: pengbin, institute of remote sensing and digital earth, CAS rem **Memo: developed at May 7th, 2013 rem **Set the MRTDATADIR environmental var to the MRT data directory. set MRTDATADIR=D:\MOD15A2_h24-26_v4-5 rem **set batch data start time set /a YEAR = 2001 set /a DOY = 10001 rem **set batch data end time set /a ENDYEAR = 2010 set /a ENDDOY = 10365 :start if %YEAR% leq %ENDYEAR% (goto ORDER1) else exit :ORDER1 if %DOY% leq %ENDDOY% (goto ORDER2) else ( set /a YEAR = %YEAR% +1 set /a DOY = 10001 goto start ) :ORDER2 set /a DAY = %YEAR%%DOY:~-3% rem **save the file name into a notepad dir %MRTDATADIR%\*%DAY%.*.hdf/a/b/s %MRTDATADIR%\MOSAICINPUT.TXT rem **execute mosaic mrtmosaic.exe -i %MRTDATADIR%\MOSAICINPUT.TXT -o %MRTDATADIR%\MOSAIC_TMP.hdf rem **execute resample resample.exe -p %MRTDATADIR%\MOD15A2.prm -i %MRTDATADIR%\MOSAIC_TMP.hdf -o %MRTDATADIR%\%DAY%.tif set /a DOY = %DOY% + 8 goto ORDER1