中易网

opencv2.4.4在vs2010里调试的时候,出现Cannot find or open the PDB file

答案:2  悬赏:80  
解决时间 2021-02-02 22:00
opencv2.4.4在vs2010里调试的时候,出现Cannot find or open the PDB file,没有结果输出(读取桌面的一幅图)。但在ctrl+F5时,却提示生成成功,但是也没有输出。然后用网上的办法下载了很多的字符pdb,但是图中所示的这两项的pdb却一直下载不到,求助大神!!



最佳答案
.pdb文件仅仅涉及符号表的存储,用于debug阶段,编译/链接是不妨碍的。除非你一定要查看这两个DLL中的Symbols,否则可以不关注的
全部回答
opencv 整个项目的结构图: 编写detectfacedemo.java,代码如下: [java] view plaincopyprint? package com.njupt.zhb.test; import org.opencv.core.core; import org.opencv.core.mat; import org.opencv.core.matofrect; import org.opencv.core.point; import org.opencv.core.rect; import org.opencv.core.scalar; import org.opencv.highgui.highgui; import org.opencv.objdetect.cascadeclassifier; // // detects faces in an image, draws boxes around them, and writes the results // to "facedetection.png". // public class detectfacedemo { public void run() { system.out.println("\nrunning detectfacedemo"); system.out.println(getclass().getresource("lbpcascade_frontalface.xml").getpath()); // create a face detector from the cascade file in the resources // directory. //cascadeclassifier facedetector = new cascadeclassifier(getclass().getresource("lbpcascade_frontalface.xml").getpath()); //mat image = highgui.imread(getclass().getresource("lena.png").getpath()); //注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误 //因此,我们将第一个字符去掉 string xmlfilepath=getclass().getresource("lbpcascade_frontalface.xml").getpath().substring(1); cascadeclassifier facedetector = new cascadeclassifier(xmlfilepath); mat image = highgui.imread(getclass().getresource("we.jpg").getpath().substring(1)); // detect faces in the image. // matofrect is a special container class for rect. matofrect facedetections = new matofrect(); facedetector.detectmultiscale(image, facedetections); system.out.println(string.format("detected %s faces", facedetections.toarray().length)); // draw a bounding box around each face. for (rect rect : facedetections.toarray()) { core.rectangle(image, new point(rect.x, rect.y), new point(rect.x + rect.width, rect.y + rect.height), new scalar(0, 255, 0)); } // save the visualized detection. string filename = "facedetection.png"; system.out.println(string.format("writing %s", filename)); highgui.imwrite(filename, image); } } package com.njupt.zhb.test; import org.opencv.core.core; import org.opencv.core.mat; import org.opencv.core.matofrect; import org.opencv.core.point; import org.opencv.core.rect; import org.opencv.core.scalar; import org.opencv.highgui.highgui; import org.opencv.objdetect.cascadeclassifier; // // detects faces in an image, draws boxes around them, and writes the results // to "facedetection.png". // public class detectfacedemo { public void run() { system.out.println("\nrunning detectfacedemo"); system.out.println(getclass().getresource("lbpcascade_frontalface.xml").getpath()); // create a face detector from the cascade file in the resources // directory. //cascadeclassifier facedetector = new cascadeclassifier(getclass().getresource("lbpcascade_frontalface.xml").getpath()); //mat image = highgui.imread(getclass().getresource("lena.png").getpath()); //注意:源程序的路径会多打印一个‘/’,因此总是出现如下错误 //因此,我们将第一个字符去掉 string xmlfilepath=getclass().getresource("lbpcascade_frontalface.xml").getpath().substring(1); cascadeclassifier facedetector = new cascadeclassifier(xmlfilepath); mat image = highgui.imread(getclass().getresource("we.jpg").getpath().substring(1)); // detect faces in the image. // matofrect is a special container class for rect. matofrect facedetections = new matofrect(); facedetector.detectmultiscale(image, facedetections); system.out.println(string.format("detected %s faces", facedetections.toarray().length)); // draw a bounding box around each face. for (rect rect : facedetections.toarray()) { core.rectangle(image, new point(rect.x, rect.y), new point(rect.x + rect.width, rect.y + rect.height), new scalar(0, 255, 0)); } // save the visualized detection. string filename = "facedetection.png"; system.out.println(string.format("writing %s", filename)); highgui.imwrite(filename, image); } } 3.编写测试类: [java] view plaincopyprint? package com.njupt.zhb.test; public class testmain { public static void main(string[] args) { system.out.println("hello, opencv"); // load the native library. system.loadlibrary("opencv_java246"); new detectfacedemo().run(); } } //运行结果: //hello, opencv // //running detectfacedemo ///e:/eclipse_jee/workspace/javaopencv246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml //detected 8 faces //writing facedetection.png package com.njupt.zhb.test; public class testmain { public static void main(string[] args) { system.out.println("hello, opencv"); // load the native library. system.loadlibrary("opencv_java246"); new detectfacedemo().run(); } } //运行结果: //hello, opencv // //running detectfacedemo ///e:/eclipse_jee/workspace/javaopencv246/bin/com/njupt/zhb/test/lbpcascade_frontalface.xml //detected 8 faces //writing facedetection.png
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
东莞总站附近有没有大一点的电子厂本人女,不
请问森海塞尔HD598,我应该配个耳放还是外置
向阳岭社区我想知道这个在什么地方
智力超常者和常人的身体区别
北京燕山这里怎样办理宽带?
本人现在在2a学校读英语专业,想修第二专业然
联想一体机b31r4进不去BIOS,开机显示这个大
湖州师范学院和台州学院哪个好
如何红帽7.0中用linux命令安装dhcp服务器
阿里云邮箱怎么那么垃圾啊?
哪个频道现在在播放我是特种兵之火凤凰,几点
姬无夜怎么不想一下, 如果墨鸦真的预留了生路
合兴汽车(租赁)服务中心在哪里啊,我有事要去
盛情难却的却是什么意思
嘉兴华普口腔医院现在怎么样,水平如何
推荐资讯
兴城市汇鑫多宝鱼养殖专业合作社在哪里啊,我
息县信阳金皇腾KTV地址在哪,我要去那里
我家的一只母鸡丢失了请问在哪里可以找到它?
电视剧欢乐颂一周更新几集,在哪个台什么时候
损坏学校监控摄像头应该怎么处罚
我在深圳有上千张邮票要买出去!到哪交易呢?
中国联合网络通信有限公司项城市分公司在什么
天然放射物质的放射线包含三种成分,下面的说
汉朝的骨灰土罐带图案的值钱吗?这是盖子
boss中国区代言人是什么意思
湖州织里紫荆商务宾馆单人房价格多少?
畲家大菜怎么去啊,有知道地址的么
手机登qq时,显示手机磁盘不足,清理后重新登
刺客的套装怎么选啊?