OS: ubuntu
I am trying to to detect edges for objects in a given image using functions from the cv package.
First, I run 'qlua' in my ubuntu terminal.
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}
However, it fails with the following error:
[string "cv.rectangle{lena_p,{5,5},{10,10},color = {30..."]:1: attempt to index global 'cv' (a nil value) stack traceback: [string "cv.rectangle{lena_p,{5,5},{10,10},color = {30..."]:1: in main chunk [C]: at 0x7f6be51eaba0
[string "ca_l = cv.Canny{image=limg,threshold=1,thresh..."]:1: attempt to index global 'cv' (a nil value) stack traceback: [string "ca_l = cv.Canny{image=limg,threshold=1,thresh..."]:1: in main chunk [C]: at 0x7feb66429ba0
My question is this, how can I use functions in the 'cv' package to detect object contour?
REF: https://github.com/VisionLabs/torch-opencv/tree/master/cv
You are missing torch-cv. You can install it by executing the following command in your terminal:
luarocks install cv