openbr的安装遇到的问题

[复制链接]
查看11 | 回复4 | 2021-1-27 05:15:51 | 显示全部楼层 |阅读模式
Windows7-VisualStudioExpressEdition2012-x64
DownloadVisualStudio2012ExpressEditionforWindowsDesktopandinstall.
ConsiderthefreeopensourceprogramWinCDEmuifyouneedaprogramtomountISOimages.
YouwillhavetoregisterwithMicrosoftafterinstallation,butit'sfree.
GrabanyavailableVisualStudioUpdates.
DownloadandinstallWindows8SDK.
DownloadandInstallCMake2.8.11.2
Duringinstallationsetupselect"addCMaketoPATH".
DownloadOpenCV2.4.6.1
Considerthefreeopensourceprogram7-Zipifyouneedaprogramtounarchivetarballs.
Movethe"opencv-2.4.6.1"folderto"C:\".
Open"VS2012x64CrossToolsCommandPrompt"(fromtheStartMenu,select"AllPrograms"->"MicrosoftVisualStudio2012"->"VisualStudioTools"->"VS2012x64CrossToolsCommandPrompt")andenter:
$cdC:\opencv-2.4.6.1
$mkdirbuild-msvc2012
$cdbuild-msvc2012
$cmake-G"NMakeMakefiles"-DBUILD_PERF_TESTS=OFF-DBUILD_TESTS=OFF-DWITH_FFMPEG=OFF-DCMAKE_BUILD_TYPE=Debug..
$nmake
$nmakeinstall
$cmake-DCMAKE_BUILD_TYPE=Release..
$nmake
$nmakeinstall
$nmakeclean
DownloadandInstallQt5.1.1
CreateaGitHubaccountandfollowtheirinstructionsforsettingupGit.
Launch"GitBash"fromtheDesktopandcloneOpenBR:
$cd/c
$gitclonehttps://github.com/biometrics/openbr.git
$cdopenbr
$gitsubmoduleinit
$gitsubmoduleupdate
BuildOpenBR!
FromtheVS2012x64CrossToolsCommandPrompt:
$cdC:\openbr
$mkdirbuild-msvc2012
$cdbuild-msvc2012
$cmake-G"CodeBlocks-NMakeMakefiles"-DCMAKE_PREFIX_PATH="C:/opencv-2.4.6.1/build-msvc2012/install;C:/Qt/Qt5.1.1/5.1.1/msvc2012_64"-DCMAKE_INSTALL_PREFIX="./install"-DBR_INSTALL_DEPENDENCIES=ON-DCMAKE_BUILD_TYPE=Release..
$nmake
$nmakeinstall
Checkoutthe"install"folder.
HackOpenBR!
FromtheVS2012x64CrossToolsCommandPrompt:
$C:\Qt\Qt5.1.1\Tools\QtCreator\bin\qtcreator.exe
FromtheQtCreator"Tools"menuselect"Options..."
Under"Kits"select"Desktop(default)"
For"Compiler:"select"MicrosoftVisualC++Compiler11.0(x86_amd64)"andclick"OK"
FromtheQtCreator"File"menuselect"OpenFileorProject...".
Select"C:\openbr\CMakeLists.txt"then"Open".
IfpromptedforthelocationofCMake,enter"C:\ProgramFiles(x86)\CMake2.8\bin\cmake.exe".
Browsetoyourpre-existingbuilddirectory"C:\openbr\build-msvc2012"thenselect"Next".
Select"RunCMake"then"Finish".
You'reallset!YoucanfindmoreinformationonQtCreatorhereifyouneed.
(Optional)PackageOpenBR!
FromtheVS2012x64CrossToolsCommandPrompt:
$cdC:\openbr\build-msvc2012
$cpack-GZIP

--------------------------------------------------------------------------------


遇到的问题
安装完成之后,在测试程序中
#include
staticvoidprintTemplate(constbr::Template&t)
{
constQPointfirstEye=t.file.get("Affine_0");
constQPointsecondEye=t.file.get("Affine_1");
printf("%seyes:(%d,%d)(%d,%d)\n",qPrintable(t.file.fileName()),firstEye.x(),firstEye.y(),secondEye.x(),secondEye.y());
}
intmain(intargc,char*argv[])
{
br::Context::initialize(argc,argv);
//RetrieveclassesforenrollingandcomparingtemplatesusingtheFaceRecognitionalgorithm
QSharedPointer
transform=br::Transform::fromAlgorithm("FaceRecognition");
QSharedPointer
distance=br::Distance::fromAlgorithm("FaceRecognition");
//Initializetemplates
br::TemplatequeryA("../data/MEDS/img/S354-01-t10_01.jpg");
br::TemplatequeryB("../data/MEDS/img/S382-08-t10_01.jpg");
br::Templatetarget("../data/MEDS/img/S354-02-t10_01.jpg");
//Enrolltemplates
queryA>>*transform;
queryB>>*transform;
target>>*transform;
printTemplate(queryA);
printTemplate(queryB);
printTemplate(target);
//Comparetemplates
floatcomparisonA=distance->compare(target,queryA);
floatcomparisonB=distance->compare(target,queryB);
//Scoresrangefrom0to1andrepresentmatchprobability
printf("Genuinematchscore:%.3f\n",comparisonA);
printf("Impostormatchscore:%.3f\n",comparisonB);
br::Context::finalize();
return0;
}

在运行到
br::Context::initialize(argc,argv);
时不知道为什么程序就没法往下走了,不知道哪位朋友做过openbr,能否给些提示呢?

分 -->
回复

使用道具 举报

千问 | 2021-1-27 05:15:51 | 显示全部楼层
你安装遇到问题了么?我用的vs2013,一直有问题
回复

使用道具 举报

千问 | 2021-1-27 05:15:51 | 显示全部楼层
朋友,你的问题解决了么??
回复

使用道具 举报

千问 | 2021-1-27 05:15:51 | 显示全部楼层
br::Context::initialize(argc,argv,sdkPath);
回复

使用道具 举报

千问 | 2021-1-27 05:15:51 | 显示全部楼层
朋友你问题解决了吗,这么久,我也遇见一样的问题,触发一个断点,没法往下走了,请教下你是怎么解决的;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行