-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WINDOWS平台上的问题 #7
Comments
@dhdljd,你好,关于运行时间,你可以设置输入320x240(如果应用场景视场较小,人脸较大),甚至160x140,或许会快很多。另外关于windows下编译,我建议你自己配置一个vs2019工程直接跑,如果非要用cmake 请显式的指定opencv include 和lib,不要find_package(OpenCV REQUIRED),实际运行的时候请在exe所在目录加入MNN.dll和opencv_worldXXX.dll. |
谢谢。关于转换工具在windows下的编译,很奇怪。我按照你博客的步骤进行,就是不行,一定要把libprotobuf的运行时在vs里面修改成MD才行,另外修改完了以后,到99%最后链接的时候还是进行不下去。。。能提供一些建议吗?:) |
你好,这个转换我这边是没问题,不知道具体你是什么问题,建议你按照详细步骤进行,有一点不对都会出错的。 |
好的,多谢。我再试试。 |
您好,您的源码可以在树莓派上正常编译和运行,不过,推理的时间较长,需要2s多;
如果我想在windows上测试,该如何修改?我修改了cmakelists文件如下:能够编译,但是运行的时候,报错:缺少MNN.dll和opencv_world410d.dll,请教正确的cmakelists文件该如何修改?
另外,我看到您的博客,讲如何在windows平台上编译转换工具,非常详细,但是我按照步骤进行下来报错:
一开始报运行时版本不匹配,我在vs里面修改了运行时以后,编译到99%的时候链接失败。。。
#1.cmake verson
cmake_minimum_required(VERSION 2.8)
#2.project name
project(test C CXX)
#opencv
set(OpenCV_DIR C:/Users/YuKai/Downloads/opencv/opencv/build)
#set(OpenCV_DIR env{OpenCV_DIR})
find_package(OpenCV REQUIRED)
#3.set environment variable
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#4.mnn include
include_directories(${CMAKE_CURRENT_LIST_DIR}/MNN/include)
mnn lib
add_library( MNN SHARED IMPORTED )
set_target_properties(
MNN
PROPERTIES IMPORTED_IMPLIB
${CMAKE_CURRENT_LIST_DIR}/MNN/lib/MNN.lib
)
#6.source directory
file(GLOB TEST_SRC ${CMAKE_CURRENT_LIST_DIR}/src/.h
${CMAKE_CURRENT_LIST_DIR}/src/.cpp)
set(TEST_COMPILE_CODE ${TEST_SRC})
add_executable(test ${TEST_COMPILE_CODE})
target_link_libraries(test
MNN
${OpenCV_LIBS}
)
The text was updated successfully, but these errors were encountered: