Hi
I trying to use dlib python library for face landmark points, i wanna get them in to table dat
this code i take from Barracuda earlier he make post about open CV
[code]from imutils import face_utils
import imutils
import dlib
import cv2
import numpy as np
import matplotlib
mult = 1/255
width = 1/op(‘image’).width
height = 1/op(‘image’).height
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor(r"C:\Program Files\Derivative\TouchDesigner099\bin\Lib\site-packages\dlib-19.16.0-py3.5.egg-info\shape_predictor_68_face_landmarks.dat")
pointsTable = op(‘LandMarkPoints’)
def onCook(changeOp):
image = ((op(‘image’).numpyArray()[…,0])*255).astype(np.uint8)
rects = detector(image, 0)
for rect in rects:
shape = predictor(image, rect)
shape = face_utils.shape_to_np(shape)
pointsTable.appendCol(shape[...,0] * width)
pointsTable.appendCol(1-(shape[...,1] * height))
[/code]
i have issue with this line: image = ((op(‘image’).numpyArray()[…,0])*255).astype(np.uint8)
its says that ‘td.nullTOP’ object has no attribute ‘numpyArray’
i wanna know what i can do next to get that data inside my table, just any help with directions what to learn or see to understand what i need to do with that
Best regards