0

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)

ただし、Zerobrane Studio v1.30 インタープリターを Project->LuaInterpreter 経由で 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 画像を表示するにはどうすればよいですか?

4

0 に答える 0