在 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 图像?