• 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方法

    岁月留痕
  • 相关阅读:
    Unity Shader 之 渲染流水线
    C# 如何快速取到enum中的枚举数量
    Unity NGUI ScrollView 苹果式滑动
    多元线性回归~ML
    梯度下降~ML
    代价函数~ML
    ML~线性代数~python
    unity 大游戏使用什么框架
    C# Activator.CreateInstance()方法使用
    VSync Count 垂直同步
  • 原文地址:https://www.cnblogs.com/navigate/p/7635678.html
Copyright © 2020-2023  润新知