如何在zerobrane工作室中显示RGB图像?

时间:2016-06-09 18:19:06

标签: lua torch luajit zerobrane

在Ubuntu 14.04上,如果我在通过命令行调用的qlua解释器中运行以下代码(带或不带第一行),它会显示Lena图像:

require('mobdebug').start()    -- for image.display()
require 'image'
image.display( image.lena() )

我可以通过gnuplot显示灰度图像:

require 'gnuplot'
require 'image'
M = image.rgb2y( image.lena() )
P = M[{1,{},{}}]
gnuplot.imagesc(P)

但是,如果我通过Project-> LuaInterpreter将Zerobrane Studio v1.30解释器设置为QLua-LuaJIT(没有“qlua”解释器)并运行它,我会收到此错误:

Program 'qlua' started in '/opt/zbstudio/myprograms' (pid: 4608).
Debugging session started in '/opt/zbstudio/myprograms/'.
tput: No value for $TERM and no -T specified
/home/dj/torch/install/share/lua/5.1/mobdebug.lua:1093: attempt to      call local 'report' (a string value)
stack traceback:
    [string "xpcall(function() io.stdout:setvbuf('no'); re..."]:1: in    function 'report'
    /home/dj/torch/install/share/lua/5.1/mobdebug.lua:1093: in function 'loop'
    [string "xpcall(function() io.stdout:setvbuf('no'); re..."]:1: in function <[string "xpcall(function() io.stdout:setvbuf('no'); re..."]:1>
    [C]: in function 'xpcall'
    [string "xpcall(function() io.stdout:setvbuf('no'); re..."]:1: in  main chunk
    Debugging session completed (traced 4 instructions).
    Program completed in 4.12 seconds (pid: 4608).    

如何在ZBS中显示RGB图像?

0 个答案:

没有答案