使用opencv后 runtime error! R6025-pure virtual function call 的解决方法

简介: 今天写了一段用到opencv的代码,最后主函数(main)返回时产生了runtime error! R6025-pure virtual function call 的错误提示。

今天写了一段用到opencv的代码,最后主函数(main)返回时产生了runtime error! R6025-pure virtual function call 的错误提示。程序前面的所有代码都没有问题,就到最后return 0;的时候报错了。 看了opencv说明文档后知道在显示了一张图片后要将显示该图片的窗口给 destroy 。原来部分代码是这样的

if (bol)

{    

       PaintInterestingPoint(im1,map_point);

       cvSaveImage("immapped.ppm",im1);

       cvShowImage("painted mapped image",im1);

       cvWaitKey(0);

}

cvReleaseImage(&im1);

cvReleaseImage(&im2);

return 0;



 后来加入了窗口清除语句,错误解决。代码如下:

if (bol)

{

    PaintInterestingPoint(im1,map_point);  

    cvSaveImage("immapped.ppm",im1);

    cvShowImage("painted mapped image",im1);

    cvWaitKey(0);

}

cvReleaseImage(&im1); 

cvReleaseImage(&im2);

cvDestroyWindow("painted origin image");

cvDestroyWindou("painted mapped image");

return 0;














目录
相关文章
|
数据采集 自然语言处理 Devops
ToolLearning Eval:CodeFuse发布首个中文Function Call的大语言模型评测基准!🚀
CodeFuse发布了首个面向ToolLearning领域的中文评测基准ToolLearning-Eval,以帮助开发者跟踪ToolLearning领域大模型的进展,并了解各个ToolLearning领域大模型的优势与不足。ToolLearning-Eval按照Function Call流程进行划分,包含工具选择、工具调用、工具执行结果总结这三个过程,方便通用模型可以对各个过程进行评测分析。
1846 0
|
API C++
【Azure 环境】VS Code登录China Azure(Function)报错 An error occurred while signing in: invalid_request - AADSTS65002
An error occurred while signing in: invalid_request - AADSTS65002: Consent between first party application 'c27c220f-ce2f-4904-927d-333864217eeb' and first party resource '797f4846-ba00-4fd7-ba43-dac1f8f63013' must be configured via preauthorization - applications owned and operated by Microsoft mus
665 13
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
379 0
|
Java Windows
【Azure Function】部署Java Function失败:报错deploy [ERROR] Status code 401和警告 'China North 3' may not be a valid region
1:deploy [ERROR] Status code 401, (empty body). 2: China North 3 may not be a valid region,please refer to https://aka.ms/maven_function_configuration#supported-regions for values. 3:  <azure.functions.maven.plugin.version>1.36.0</azure.functions.maven.plugin.version>
682 11
|
Python
【Azure 应用服务】Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误
【Azure 应用服务】Python Function App重新部署后,出现 Azure Functions runtime is unreachable 错误
254 2
|
文字识别 Linux Swift
多图理解,更懂中文,支持function call的Phi-3.5来了!
微软继今年4月推出Phi-3系列小型语言模型后,又一鼓作气三连发布并开源其「小而美」系列 Phi-3.5模型!
|
前端开发
Error in created hook: “TypeError: _test.default is not a function
Error in created hook: “TypeError: _test.default is not a function
|
Python
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
【Azure 应用服务】Azure Function HTTP Trigger 遇见奇妙的500 Internal Server Error: Failed to forward request to http://169.254.130.x
465 0
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
【Azure 应用服务】Azure Function 启用 Managed Identity后, Powershell Funciton出现 ERROR: ManagedIdentityCredential authentication failed
508 0

热门文章

最新文章