^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
date:2018.07.26
1 void TileImagesOffset(const HObject &Images, HObject *TiledImage, 2 const HTuple &OffsetRow, const HTuple &OffsetCol, 3 const HTuple &Row1, const HTuple &Col1, const HTuple &Row2, const HTuple &Col2, 4 const HTuple &Width, const HTuple &Height); 5 6 HImage HImage::TileImagesOffset(const HTuple &OffsetRow, const HTuple &OffsetCol, 7 const HTuple &Row1, const HTuple &Col1, const HTuple &Row2, const HTuple &Col2, 8 Hlong Width, Hlong Height)const; 9 10 HImage HImage::TileImagesOffset(Hlong OffsetRow, Hlong OffsetCol, 11 Hlong Row1, Hlong Col1, Hlong Row2, Hlong Col2, 12 Hlong Width, Hlong Height)const;
后两种形式为类的常量成员函数(把默认的常量指针this转换为常指针常量)。
官方文档给出了说明:输入参数Images(可以是单张图像或concat_obj的n张图像)必须具有相同的通道数,至于说每个图像的size则不要求一致;输出参数TiledImage拥有和Images一样的channels;它的size完全由输入参数width & height决定。输入图像的左上点在输出图像的位置由offsetRow & offsetCol决定;另外,可以把输入图像crop为原始图像的一小块来作为输出图像的一部分,需要设置row1, col1 & row2, col2来实现(-1表示不切割原始图像);当然,这些参数要与n的个数保持一致的。
反正官方也有demo和说明,比我自己翻译的强多了。
这里记录一下使用的tips:
>. 输入单张图像,实现图像切割or添加黑边(也就是说可以用来归一化一组图像的size)
。。。