comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » face detection (via Python bridge)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: face detection (via Python bridge) [message #93878 is a reply to message #93875] Mon, 14 November 2016 15:45 Go to previous messageGo to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
On Monday, 14 November 2016 11:21:14 UTC-8, superchromix wrote:
> Thanks for the suggestion, but it's not working yet. It this fails at the Python.Run statement, because the faceCascade object is not defined on the Python side. When I tried to add
>
> Python.faceCasecade = faceCascade
>
> it still didn't work.
>
> % PYTHON_RUN: Exception: name 'faceCascade' is not defined.

Sorry, Mark, I haven't actually installed the library and tried this, I'm tossing ideas off the top of my head…

Hmm, if that line is a direct quote, then it may be a typo (you have an extra "e" in the middle). That might fix it, or perhaps:

Python.gray = gray
Python.scaleFactor = 1.1
Python.minNeighbors = 5
Python.minSize = [30,30]
Python.flags = cv2.cv.CV_HAAR_SCALE_IMAGE

void = Python.Run('faces = cv2.CascadeClassifier.detectMultiScale(gray,scaleFactor=scal eFactor, minNeighbors=minNeighbors,minSize=minSize, flags=flags)')

faces = Python.faces

Of course, to try it more simply for now, how about:

Python.gray = gray

void = Python.Run('faces = cv2.CascadeClassifier.detectMultiScale(gray,scaleFactor=1.1, minNeighbors=5, minSize=[30,30], flags=cv2.cv.CV_HAAR_SCALE_IMAGE)')

faces = Python.faces

Is that any better?

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl save
Next Topic: plot solid circle on image

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:43:26 PDT 2025

Total time taken to generate the page: 0.02238 seconds