OS: ubuntuAttempt to Index global 'cv' (ein Null-Wert)
Ich versuche Kanten unter Verwendung von Funktionen aus dem cv-Paket für Objekte in einem bestimmten Bild zu erfassen.
Zuerst führe ich 'qlua' in meinem 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}
schlägt jedoch fehl, es mit dem folgenden Fehler:
[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
Meine Frage ist, wie kann ich Funktionen in der ‚cv‘ Paket verwenden Objektkontur zu erkennen?
REF: https://github.com/VisionLabs/torch-opencv/tree/master/cv
ist dieser tatsächliche Code? Sie haben ** ** ** ** anstelle von ** ** ** – lejlot
Oh! Gott! mein Fehler ! Ich mache es jetzt richtig. Es sind die tatsächlichen Codes. – STONE