操作系统: ubuntu
我试图使用cv包中的函数来检测给定图像中的对象的边缘。
首先,我在我的ubuntu终端运行“qlua”。
local cv = reuqire 'cv'
require 'cv'
reuqire 'image'
lena_p = image.load('/home/stone/codes/lena1.jpg')
image.dispaly(lena_p)
cv.rectangle{lena_p,{5,5},{10,10},color = {30,30,180},thickness = 2}
ca_l = cv.Canny{image=limg,threshold=1,threshold=10}但是,如果出现以下错误,则会失败:
字符串"cv.rectangle{lena_p,{5,5},{10,10},color ={30.“:1:尝试索引全局'cv‘(一个零值)堆栈回溯: string "cv.rectangle{lena_p,{5,5},{10,10},color ={30.”:1:主块C: at 0x7f6be51eaba0 字符串"ca_l = cv.Canny{image=limg,threshold=1,阈值.“:1:尝试索引全局'cv‘(一个零值)堆栈回溯: string "ca_l = cv.Canny{image=limg,threshold=1,阈值.”:1:主块C: at 0x7feb66429ba0
我的问题是,如何使用'cv‘包中的函数来检测对象轮廓?
参考文献:https://github.com/VisionLabs/torch-opencv/tree/master/cv
发布于 2016-06-14 19:38:13
你错过了火炬。您可以通过在终端中执行以下命令来安装它:
luarocks install cvhttps://stackoverflow.com/questions/37805432
复制相似问题