jeeliz/jeelizWeboji

running a function if face detected

canvasandcode opened this issue · 4 comments

Hi, how can I run a function if a face is detected/ not detected? I can't seem to find any existing functions in the source file controlling the detection. Is there anything I should be targeting?

You have to check detectState.detected value and compare it to a threshold (typically if <0.5 it is not a face, otherwise it is a face).

I get a 'detectState is not defined', I've even searched all files from the demo/source file for 'detect' / 'detectState' but it finds nothing

I close the issue since I think a proper answer was given. Feel free to re-open it if it does not work.