【问题标题】:Negative of an image in lua/torchlua/torch 中图像的负片
【发布时间】:2016-09-30 06:38:06
【问题描述】:

如何使用 lua/torch 获得图像的底片?我想这样做是为了将机器学习项目的训练集规模扩大一倍。

【问题讨论】:

    标签: image-processing lua torch


    【解决方案1】:

    image.load 返回范围为 [0,1] 的图像,因此这里是将图像翻转为负图像的代码:

    require 'image';
    a=image.lena()
    a:add(-1):abs();
    

    【讨论】:

      猜你喜欢
      • 2015-10-09
      • 2015-12-15
      • 1970-01-01
      • 2019-05-11
      • 2015-03-23
      • 2016-03-24
      • 2016-01-25
      • 2016-11-23
      • 2016-03-25
      相关资源
      最近更新 更多