zoukankan      html  css  js  c++  java
  • tile_images_offset的简单使用

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    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)

    。。。

  • 相关阅读:
    ehcache 的 配置文件: ehcache.xml的认识
    Hibernate的二级缓存(SessionFaction的外置缓存)-----Helloword
    QBC检索和本地SQL检索
    HQL的检索方式
    HQL的第一个程序
    Ubuntu Error: No module named 'apt_pkg' 怎么办?
    Linux 后台运行python .sh等程序,以及查看和关闭后台运行程序操作
    ubuntu install redis/mongo 以及 监控安装
    Mac 上的 redis
    Mac 解决硬盘插入不能写的问题
  • 原文地址:https://www.cnblogs.com/xiawuhao2013/p/9372929.html
Copyright © 2011-2022 走看看