zoukankan      html  css  js  c++  java
  • OpenCV Error:This Eigenfaces model is not computed yet

    开始使用的opencv3.2版本,并完成了分类器训练,之后切换到了3.3版本,

    在人脸识别时一直报错:

    D:opencv3.2sourcessamplescppexample_cmakeface-recfacerec>facerec.exe
    begin
    frame.empty() 0
    OpenCV Error: Unspecified error (This Eigenfaces model is not computed yet. Did
    you call Eigenfaces::train?) in predict, file D:opencv3.3sourcesmodulesopenc
    v_contribmodulesfacesrceigen_faces.cpp, line 117
    terminate called after throwing an instance of 'cv::Exception'
    what(): D:opencv3.3sourcesmodulesopencv_contribmodulesfacesrceigen_fa
    ces.cpp:117: error: (-2) This Eigenfaces model is not computed yet. Did you call
    Eigenfaces::train? in function predict


    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

    经过排查终于查明原因:(版本兼容性问题,api发生了变化)

    不能使用3.3版本中不能使用3.2版本生成的训练模型,需重新训练

    opencv3.2版本使用是save和load方法

    opencv3.3版本使用是write和read方法

    岁月留痕
  • 相关阅读:
    利用css实现鼠标经过元素,下划线由中间向两边展开
    盒模型的auto值
    CSS选择器
    CSS类名命名规则
    leetcode 移除元素
    leetcode 有效的括号
    leetcode 罗马数字转整数
    leetcode 回文数
    leetcode 合并两个有序数组
    leetcode 最长公共前缀
  • 原文地址:https://www.cnblogs.com/navigate/p/7635678.html
Copyright © 2011-2022 走看看