使用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;














目录
相关文章
|
3月前
|
数据采集 自然语言处理 Devops
ToolLearning Eval:CodeFuse发布首个中文Function Call的大语言模型评测基准!🚀
CodeFuse发布了首个面向ToolLearning领域的中文评测基准ToolLearning-Eval,以帮助开发者跟踪ToolLearning领域大模型的进展,并了解各个ToolLearning领域大模型的优势与不足。ToolLearning-Eval按照Function Call流程进行划分,包含工具选择、工具调用、工具执行结果总结这三个过程,方便通用模型可以对各个过程进行评测分析。
269 0
|
5月前
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
35 0
|
4月前
|
Python
Python(二十九)pycharm连接调试器失败 Interrupted function call accept failed~
Pycharm在使用调试器模式时报错: Interrupted function call: accept failed
82 0
|
PHP Windows
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
125 0
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
|
8月前
|
监控 Linux Apache
访问zabbix安装页面报错500,apache报错Call to undefined function mb_detect_encoding()
访问zabbix安装页面报错500,apache报错Call to undefined function mb_detect_encoding()
140 0
|
9月前
|
PHP
PHP报错Call to undefined function utf8_decode()的解决方案
PHP报错Call to undefined function utf8_decode()的解决方案
|
10月前
|
搜索推荐 Java API
基于OpenAI Function Call 结合Lucene实现本地化的知识搜索
这是一个OpenAI Function 接入的Demo,通过Lucene+OpenAI实现个人知识库,但是目前只有服务端,没有页面之类的东西,并且实现的非常简单,所以只能当做一个Demo使用。
339 0
基于OpenAI Function Call 结合Lucene实现本地化的知识搜索
|
11月前
|
计算机视觉
cv2.error: OpenCV(4.5.2) : -1 : error: (-5:Bad argument) in function ‘rectangle‘
cv2.error: OpenCV(4.5.2) : -1 : error: (-5:Bad argument) in function ‘rectangle‘
194 0
|
消息中间件 PHP
laravel6 使用rabbitmq报错:Call to a member function make() on null at Queue\\Jobs\\Job.php:215
laravel6 使用rabbitmq报错:Call to a member function make() on null at Queue\\Jobs\\Job.php:215
131 0