Problems with image.display()

3,240 views
Skip to first unread message

Cristina

unread,
May 1, 2015, 2:34:21 PM5/1/15
to tor...@googlegroups.com

Hello 

I installed Torch 7 in Ubuntu 14.04 using the instructions from here http://torch.ch/docs/getting-started.html#_    and zbs-torch using the instructions from here https://github.com/soumith/zbs-torch, then I tried to debug the following program 

require('mobdebug').start()
require 'image'
print('Wheres Waldo?')
a=image.rotate(image.lena(), 1.0)
image.display(a)
print('OK Bye')

When the debugger reached image.display(a), I received the following errors 

/home/ubu/torch/install/bin/luajit: /home/ubu/torch/install/share/lua/5.1/trepl/init.lua:354: module 'qt' not found:No LuaRocks module found for qt
    no field package.preload['qt']
    no file '/home/ubu/.luarocks/share/lua/5.1/qt.lua'
    no file '/home/ubu/.luarocks/share/lua/5.1/qt/init.lua'
    no file '/home/ubu/torch/install/share/lua/5.1/qt.lua'
    no file '/home/ubu/torch/install/share/lua/5.1/qt/init.lua'
    no file '/home/ubu/torch/install/bin/../share/lua/5.1/qt.lua'
    no file '/home/ubu/torch/install/bin/../share/lua/5.1/qt/init.lua'
    no file './qt.lua'
    no file '/home/ubu/torch/install/share/luajit-2.1.0-alpha/qt.lua'
    no file '/usr/local/share/lua/5.1/qt.lua'
    no file '/usr/local/share/lua/5.1/qt/init.lua'
    no file './qt/init.lua'
    no file './lua/qt.lua'
    no file './lua/qt/init.lua'
    no file '/home/ubu/torch/zbs-torch/lualibs/qt/qt.lua'
    no file '/home/ubu/torch/zbs-torch/lualibs/qt.lua'
    no file '/home/ubu/torch/zbs-torch/lualibs/qt/qt/init.lua'
    no file '/home/ubu/torch/zbs-torch/lualibs/qt/init.lua'
    no file '/home/ubu/.luarocks/lib/lua/5.1/qt.so'
    no file '/home/ubu/torch/install/lib/lua/5.1/qt.so'
    no file '/home/ubu/torch/install/bin/../lib/lua/5.1/qt.so'
    no file '/home/ubu/torch/install/bin/../lib/lua/5.1/qt.dylib'
    no file '/home/ubu/torch/install/bin/../lib/lua/5.1/loadall.so'
    no file '/home/ubu/torch/install/bin/../lib/lua/5.1/loadall.dylib'
    no file './qt.so'
    no file '/usr/local/lib/lua/5.1/qt.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    no file '/home/ubu/torch/zbs-torch/bin/linux/x64/libqt.so'
    no file '/home/ubu/torch/zbs-torch/bin/linux/x64/clibs/qt.so'
stack traceback:
    [C]: in function 'error'
    /home/ubu/torch/install/share/lua/5.1/trepl/init.lua:354: in function 'require'
    /home/ubu/torch/install/share/lua/5.1/image/init.lua:1185: in function 'display'
    /home/ubu/torch/zbs-torch/untitled.lua:5: in main chunk
    [C]: in function 'dofile'
    .../ubu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x00406670

When I installed I received no error. Can you tell me please what went wrong ? What can I do to be able to use image.display. I also can't use itorch for displaying an image. So please tell me how can I display images?

Thank you very much in advance 

Ajay Talati

unread,
May 2, 2015, 9:45:24 AM5/2/15
to tor...@googlegroups.com
Hello,

I think you can run your code using the qlua interpreter. You can start it using

qlua -e "require('trepl')()" 

at the command line, and you should get the prompt

th> 

if you then run your code


require 'image';
print('Wheres Waldo?')
a=image.rotate(image.lena(), 1.0)
image.display(a)
print('OK Bye')

That should work, and display the rotated lena image? 

Cristina

unread,
May 2, 2015, 12:32:42 PM5/2/15
to tor...@googlegroups.com
Thank you very much. It worked !

Ajay Talati

unread,
May 2, 2015, 4:13:07 PM5/2/15
to tor...@googlegroups.com
Cool :) Glad I could help you!

If you have other problems, as well as the Google group, there's also a Gitter forum here,

Message has been deleted
Message has been deleted

arv

unread,
Oct 5, 2015, 4:11:02 AM10/5/15
to torch7
image.display() function not working in zbs it works fine from command prmt

Nitheesh A S

unread,
Oct 5, 2015, 4:31:26 AM10/5/15
to torch7
Same problem here. image.display() works fine from command line, but not working in zbs-torch. Tried with qlua interpretor in zbs-torch.

Vislab

unread,
Oct 6, 2015, 7:47:33 AM10/6/15
to torch7
image.display() does work with Qlua-JIT option in zbs. When you are in debug mode it doesn't though.

Nitheesh A S

unread,
Oct 8, 2015, 1:20:58 AM10/8/15
to torch7
I feel stupid for not trying that! :| Thanks a ton!
Reply all
Reply to author
Forward
0 new messages