Ask Your Question
0

How to install extra modules ( eg : face ) of opencv 3.1.1 on ubuntu

asked 2016-01-29 09:23:36 -0600

mano gravatar image

Please provide the details . I am new to opencv I got an error when i tried recog = cv.createFisherfaceRecognizer()

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-01-29 09:31:08 -0600

berak gravatar image

updated 2016-01-29 09:33:15 -0600

you will have to get opencv_contrib, add it to your main cmake settings and recompile opencv.

then, there is a new namespace / submodule:

# it's cv2, not cv, for starters, 
# and case matters, too (check your post) !
>>> recog = cv2.face.createFisherFaceRecognizer()
>>> help(recog)

Help on face_BasicFaceRecognizer object:

class face_BasicFaceRecognizer(face_FaceRecognizer)
 |  Method resolution order:
 |      face_BasicFaceRecognizer
 |      face_FaceRecognizer
 |      Algorithm
 |      __builtin__.object
 |
 |  Methods defined here:
 |
 |  __repr__(...)
 |      x.__repr__() <==> repr(x)
 |
 |  getEigenValues(...)
 |      getEigenValues() -> retval
 |
 |  getEigenVectors(...)
 |      getEigenVectors() -> retval
 |
 |  getLabels(...)
 |      getLabels() -> retval
 |
 |  getMean(...)
 |      getMean() -> retval
 |
 |  getNumComponents(...)
 |      getNumComponents() -> retval
 |
 |  getProjections(...)
 |      getProjections() -> retval
 |
 |  getThreshold(...)
 |      getThreshold() -> retval
 |
 |  setNumComponents(...)
 |      setNumComponents(val) -> None
 |
 |  setThreshold(...)
 |      setThreshold(val) -> None
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __new__ = <built-in method __new__ of type object>
 |      T.__new__(S, ...) -> a new object with type S, a subtype of T
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from face_FaceRecognizer:
 |
 |  getLabelInfo(...)
 |      getLabelInfo(label) -> retval
 |
 |  getLabelsByString(...)
 |      getLabelsByString(str) -> retval
 |
 |  load(...)
 |      load(filename) -> None
 |
 |  predict(...)
 |      predict(src) -> retval  or  predict(src) -> label, confidence  or  predi
ct(src, collector[, state]) -> None
 |
 |  save(...)
 |      save(filename) -> None
 |
 |  setLabelInfo(...)
 |      setLabelInfo(label, strInfo) -> None
 |
 |  train(...)
 |      train(src, labels) -> None
 |
 |  update(...)
 |      update(src, labels) -> None
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Algorithm:
 |
 |  clear(...)
 |      clear() -> None
 |
 |  getDefaultName(...)
 |      getDefaultName() -> retval
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-01-29 09:21:46 -0600

Seen: 2,553 times

Last updated: Jan 29 '16