简体   繁体   English

Torch / Lua上的gfx.js,如何可视化图像?

[英]gfx.js on Torch / Lua, how to visualize an image?

I would like to use gfx.js in my Torch / Lua code, but it does not seem to work. 我想在我的Torch / Lua代码中使用gfx.js,但它似乎不起作用。 I tried to install it and to run it by following the instructions here . 我尝试按照此处的说明进行安装和运行。

The installation worked fine. 安装工作正常。 Then I ran: 然后我跑了:

$ luajit -lgfx.start
$ th
> gfx = require 'gfx.js'
> gfx.image(image.lena())

But then no image is shown. 但随后没有图像显示。 Instead, this string is printed: 而是打印以下字符串:

[gfx.js] rendering cell <dom_1442598176079420629243124>

I've no idea about what this means and why I got it. 我不知道这意味着什么以及为什么得到它。 Can someone give me some suggestions? 有人可以给我一些建议吗?

I'm working on CentOS Linux release 7.1.1503 (Core). 我正在使用CentOS Linux版本7.1.1503(核心)。

The way the documentation reads it sounds like the gfx.image call will create the new image window in the browser accessed "page" that the first call started the server for. 文档的读取方式听起来像gfx.image调用将在浏览器访问的“页面”中创建新的图像窗口,第一个调用为其启动了服务器。

That message looks very much like a "success" status message about gfx.js having done that. 该消息看起来非常像有关gfx.js的“成功”状态消息。

Do you have that page loaded in your browser when you try this? 尝试此操作时,您是否在浏览器中加载了该页面?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM