Commit 287b6a2e91229c0881f0aaacacfa530bc3ae1b4b
Merge branch 'master' of https://github.com/biometrics/openbr
Showing
11 changed files
with
59 additions
and
116 deletions
CMakeLists.txt
| @@ -69,7 +69,7 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) | @@ -69,7 +69,7 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) | ||
| 69 | 69 | ||
| 70 | # Find OpenCV | 70 | # Find OpenCV |
| 71 | find_package(OpenCV REQUIRED) | 71 | find_package(OpenCV REQUIRED) |
| 72 | -set(OPENCV_DEPENDENCIES opencv_core opencv_features2d opencv_flann opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo) | 72 | +set(OPENCV_DEPENDENCIES opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo) |
| 73 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OpenCV_LIBS}) | 73 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OpenCV_LIBS}) |
| 74 | 74 | ||
| 75 | # Find Alphanum | 75 | # Find Alphanum |
openbr/core/bee.cpp
| @@ -107,8 +107,6 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign | @@ -107,8 +107,6 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign | ||
| 107 | template <typename T> | 107 | template <typename T> |
| 108 | Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *querySigset = NULL) | 108 | Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *querySigset = NULL) |
| 109 | { | 109 | { |
| 110 | - qDebug() << matrix; | ||
| 111 | - | ||
| 112 | // Special case matrix construction | 110 | // Special case matrix construction |
| 113 | if (matrix == "Identity") { | 111 | if (matrix == "Identity") { |
| 114 | int rows = matrix.get<int>("rows", -1); | 112 | int rows = matrix.get<int>("rows", -1); |
| @@ -163,9 +161,6 @@ Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *qu | @@ -163,9 +161,6 @@ Mat readMatrix(const br::File &matrix, QString *targetSigset = NULL, QString *qu | ||
| 163 | int rows = words[1].toInt(); | 161 | int rows = words[1].toInt(); |
| 164 | int cols = words[2].toInt(); | 162 | int cols = words[2].toInt(); |
| 165 | 163 | ||
| 166 | - qDebug() << rows; | ||
| 167 | - qDebug() << cols; | ||
| 168 | - | ||
| 169 | // Get matrix data | 164 | // Get matrix data |
| 170 | qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T); | 165 | qint64 bytesExpected = (qint64)rows*(qint64)cols*(qint64)sizeof(T); |
| 171 | Mat m(rows, cols, OpenCVType<T,1>::make()); | 166 | Mat m(rows, cols, OpenCVType<T,1>::make()); |
openbr/openbr_export.cpp
| @@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
| 28 | * | 28 | * |
| 29 | * \section get_started Get Started | 29 | * \section get_started Get Started |
| 30 | * - \ref installation - \copybrief installation | 30 | * - \ref installation - \copybrief installation |
| 31 | + * - \ref qmake_integration - \copybrief qmake_integration | ||
| 31 | * | 32 | * |
| 32 | * \section learn_more Learn More | 33 | * \section learn_more Learn More |
| 33 | * - \ref cli - \copybrief cli | 34 | * - \ref cli - \copybrief cli |
| @@ -57,7 +58,7 @@ | @@ -57,7 +58,7 @@ | ||
| 57 | $ cd bin | 58 | $ cd bin |
| 58 | $ export LD_LIBRARY_PATH=../lib:${LD_LIBRARY_PATH} | 59 | $ export LD_LIBRARY_PATH=../lib:${LD_LIBRARY_PATH} |
| 59 | $ sudo ldconfig | 60 | $ sudo ldconfig |
| 60 | -$ sudo cp ../share/70-yubikey.rules /etc/udev/rules.d # Only needed if you were given a license dongle. | 61 | +$ sudo cp ../share/openbr/70-yubikey.rules /etc/udev/rules.d # Only needed if you were given a license dongle. |
| 61 | \endverbatim | 62 | \endverbatim |
| 62 | * \par OS X | 63 | * \par OS X |
| 63 | \verbatim | 64 | \verbatim |
| @@ -89,7 +90,7 @@ $ br -help | @@ -89,7 +90,7 @@ $ br -help | ||
| 89 | * -# Download and install <a href="http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx">Windows 8 SDK</a>. | 90 | * -# Download and install <a href="http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx">Windows 8 SDK</a>. |
| 90 | * -# <a href="http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe">Download and Install CMake 2.8.10.2</a> | 91 | * -# <a href="http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe">Download and Install CMake 2.8.10.2</a> |
| 91 | * -# During installation setup select "add CMake to PATH". | 92 | * -# During installation setup select "add CMake to PATH". |
| 92 | - * -# <a href="http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/opencv-2.4.5.tar.gz">Download OpenCV 2.4.5</a>. | 93 | + * -# <a href="http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/opencv-2.4.5.tar.gz">Download OpenCV 2.4.5</a> |
| 93 | * -# Consider the free open source program <a href="http://www.7-zip.org/">7-Zip</a> if you need a program to unarchive tarballs. | 94 | * -# Consider the free open source program <a href="http://www.7-zip.org/">7-Zip</a> if you need a program to unarchive tarballs. |
| 94 | * -# Move the "opencv-2.4.5" folder to "C:\". | 95 | * -# Move the "opencv-2.4.5" folder to "C:\". |
| 95 | * -# Open "VS2012 x64 Cross Tools Command Prompt" (from the Start Menu, select "All Programs" -> "Microsoft Visual Studio 2012" -> "Visual Studio Tools" -> "VS2012 x64 Cross Tools Command Prompt") and enter: | 96 | * -# Open "VS2012 x64 Cross Tools Command Prompt" (from the Start Menu, select "All Programs" -> "Microsoft Visual Studio 2012" -> "Visual Studio Tools" -> "VS2012 x64 Cross Tools Command Prompt") and enter: |
| @@ -150,20 +151,20 @@ $ br -help | @@ -150,20 +151,20 @@ $ br -help | ||
| 150 | 151 | ||
| 151 | /*! | 152 | /*! |
| 152 | * \page windows_mingw Windows 7 - MinGW-w64 2.0 - x64 | 153 | * \page windows_mingw Windows 7 - MinGW-w64 2.0 - x64 |
| 153 | - * -# <a href="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.7-release/x86_64-w64-mingw32-gcc-4.7.2-release-win64_rubenvb.7z/download">Download MinGW-w64 GCC 4.7.2</a> and unarchive. | 154 | + * -# <a href="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.7-release/x86_64-w64-mingw32-gcc-4.7.2-release-win64_rubenvb.7z/download">Download and Unarchive MinGW-w64 GCC 4.7.2</a> |
| 154 | * -# Use the free open source program <a href="http://www.7-zip.org/">7-Zip</a> to unarchive. | 155 | * -# Use the free open source program <a href="http://www.7-zip.org/">7-Zip</a> to unarchive. |
| 155 | * -# Move "x86_64-w64-mingw32-gcc-4.7.2-release-win64_rubenvb\mingw64" to "C:\". | 156 | * -# Move "x86_64-w64-mingw32-gcc-4.7.2-release-win64_rubenvb\mingw64" to "C:\". |
| 156 | - * -# <a href="http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe">Download CMake 2.8.10.2</a> and install. | 157 | + * -# <a href="http://www.cmake.org/files/v2.8/cmake-2.8.10.2-win32-x86.exe">Download and Install CMake 2.8.10.2</a> |
| 157 | * -# During installation setup select "add CMake to PATH". | 158 | * -# During installation setup select "add CMake to PATH". |
| 158 | - * -# <a href="http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.4/OpenCV-2.4.4.tar.bz2">Download OpenCV 2.4.4</a>. | 159 | + * -# <a href="http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.5/opencv-2.4.5.tar.gz">Download OpenCV 2.4.5</a> |
| 159 | * -# Consider the free open source program <a href="http://www.7-zip.org/">7-Zip</a> if you need a program to unarchive tarballs. | 160 | * -# Consider the free open source program <a href="http://www.7-zip.org/">7-Zip</a> if you need a program to unarchive tarballs. |
| 160 | - * -# Move the "OpenCV-2.4.4" folder to "C:\". | 161 | + * -# Move the "opencv-2.4.5" folder to "C:\". |
| 161 | * -# From the MinGW-w64 Command Prompt (double-click "C:\mingw64\mingw64env.cmd"): | 162 | * -# From the MinGW-w64 Command Prompt (double-click "C:\mingw64\mingw64env.cmd"): |
| 162 | * \code | 163 | * \code |
| 163 | - * $ cd C:\OpenCV-2.4.4 | 164 | + * $ cd C:\opencv-2.4.5 |
| 164 | * $ mkdir build-mingw64 | 165 | * $ mkdir build-mingw64 |
| 165 | * $ cd build-mingw64 | 166 | * $ cd build-mingw64 |
| 166 | - * $ cmake -G "MinGW Makefiles" -DBUILD_opencv_java=OFF -DBUILD_opencv_world=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_FFMPEG=OFF -DCMAKE_BUILD_TYPE=Debug .. | 167 | + * $ cmake -G "MinGW Makefiles" -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_FFMPEG=OFF -DCMAKE_BUILD_TYPE=Debug .. |
| 167 | * $ mingw32-make | 168 | * $ mingw32-make |
| 168 | * $ mingw32-make install | 169 | * $ mingw32-make install |
| 169 | * $ cmake -DCMAKE_BUILD_TYPE=Release .. | 170 | * $ cmake -DCMAKE_BUILD_TYPE=Release .. |
| @@ -171,17 +172,17 @@ $ br -help | @@ -171,17 +172,17 @@ $ br -help | ||
| 171 | * $ mingw32-make install | 172 | * $ mingw32-make install |
| 172 | * $ mingw32-make clean | 173 | * $ mingw32-make clean |
| 173 | * \endcode | 174 | * \endcode |
| 174 | - * -# <a href="http://releases.qt-project.org/qt5/5.0.1/single/qt-everywhere-opensource-src-5.0.1.zip">Download Qt 5.0.1</a> and unzip. | 175 | + * -# <a href="http://download.qt-project.org/official_releases/qt/5.0/5.0.2/single/qt-everywhere-opensource-src-5.0.2.zip">Download and Unzip Qt 5.0.2</a> |
| 175 | * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "README". Make sure they are added to "path" when given the option during installation. | 176 | * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "README". Make sure they are added to "path" when given the option during installation. |
| 176 | - * -# <a href="http://www.microsoft.com/en-us/download/confirmation.aspx?id=6812">Download Direct X Software Developement Kit</a> and install. You may also need to install the latest OpenGL drivers from your graphics card manufacturer. | 177 | + * -# <a href="http://www.microsoft.com/en-us/download/confirmation.aspx?id=6812">Download and Install Direct X Software Developement Kit</a>, you may also need to install the latest OpenGL drivers from your graphics card manufacturer. |
| 177 | * -# From the MinGW-w64 Command Prompt: | 178 | * -# From the MinGW-w64 Command Prompt: |
| 178 | * \code | 179 | * \code |
| 179 | - * $ cd qt-everywhere-opensource-src-5.0.1 | ||
| 180 | - * $ configure -prefix C:\Qt\5.0.1\mingw64 -opensource -confirm-license -nomake examples -nomake tests -opengl desktop | 180 | + * $ cd qt-everywhere-opensource-src-5.0.2 |
| 181 | + * $ configure -prefix C:\Qt\Qt5.0.2\5.0.2\mingw64 -opensource -confirm-license -nomake examples -nomake tests -opengl desktop | ||
| 181 | * $ mingw32-make | 182 | * $ mingw32-make |
| 182 | * $ mingw32-make install | 183 | * $ mingw32-make install |
| 183 | * $ cd .. | 184 | * $ cd .. |
| 184 | - * $ rmdir /Q /S qt-everywhere-opensource-src-5.0.1 | 185 | + * $ rmdir /Q /S qt-everywhere-opensource-src-5.0.2 |
| 185 | * \endcode | 186 | * \endcode |
| 186 | * -# mingw32-make will take several hours to finish. | 187 | * -# mingw32-make will take several hours to finish. |
| 187 | * -# Create a <a href="github.com">GitHub</a> account and follow their instructions for <a href="https://help.github.com/articles/set-up-git">setting up Git</a>. | 188 | * -# Create a <a href="github.com">GitHub</a> account and follow their instructions for <a href="https://help.github.com/articles/set-up-git">setting up Git</a>. |
| @@ -199,31 +200,30 @@ $ br -help | @@ -199,31 +200,30 @@ $ br -help | ||
| 199 | * $ cd C:\openbr | 200 | * $ cd C:\openbr |
| 200 | * $ mkdir build-mingw64 | 201 | * $ mkdir build-mingw64 |
| 201 | * $ cd build-mingw64 | 202 | * $ cd build-mingw64 |
| 202 | - * $ cmake -G "CodeBlocks - MinGW Makefiles" -DCMAKE_RC_COMPILER="C:/mingw64/bin/windres.exe" -DCMAKE_PREFIX_PATH="C:/OpenCV-2.4.4/build-mingw64/install;C:/Qt/5.0.1/mingw64" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release .. | 203 | + * $ cmake -G "CodeBlocks - MinGW Makefiles" -DCMAKE_RC_COMPILER="C:/mingw64/bin/windres.exe" -DCMAKE_PREFIX_PATH="C:/opencv-2.4.5/build-mingw64/install;C:/Qt/Qt5.0.2/5.0.2/mingw64" -DCMAKE_INSTALL_PREFIX="./install" -DBR_INSTALL_DEPENDENCIES=ON -DCMAKE_BUILD_TYPE=Release .. |
| 203 | * $ mingw32-make | 204 | * $ mingw32-make |
| 204 | * $ mingw32-make install | 205 | * $ mingw32-make install |
| 205 | * \endcode | 206 | * \endcode |
| 206 | * -# Check out the "install" folder. | 207 | * -# Check out the "install" folder. |
| 207 | * -# Hack OpenBR! | 208 | * -# Hack OpenBR! |
| 208 | - * -# <a href="http://releases.qt-project.org/qtcreator/2.6.2/qt-creator-windows-opensource-2.6.2.exe">Download Qt Creator</a> IDE and install. | ||
| 209 | * -# From the MinGW-w64 Command Prompt: | 209 | * -# From the MinGW-w64 Command Prompt: |
| 210 | * \code | 210 | * \code |
| 211 | - * $ "C:\Qt\qtcreator-2.6.2\bin\qtcreator.exe" | 211 | + * $ C:\Qt\Qt5.0.2\Tools\QtCreator\bin\qtcreator.exe |
| 212 | * \endcode | 212 | * \endcode |
| 213 | * -# From the Qt Creator "Tools" menu select "Options..." | 213 | * -# From the Qt Creator "Tools" menu select "Options..." |
| 214 | * -# Under "Kits" select "Desktop (default)" | 214 | * -# Under "Kits" select "Desktop (default)" |
| 215 | - * -# For "Compiler:" select "MinGW (x86 64bit)" and click "OK" | 215 | + * -# For "Compiler:" select "MinGW (x86 64bit in C:\mingw64\bin)" and click "OK" |
| 216 | * -# From the Qt Creator "File" menu select "Open File or Project...". | 216 | * -# From the Qt Creator "File" menu select "Open File or Project...". |
| 217 | * -# Select "C:\openbr\CMakeLists.txt" then "Open". | 217 | * -# Select "C:\openbr\CMakeLists.txt" then "Open". |
| 218 | + * -# If prompted for the location of CMake, enter "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe". | ||
| 218 | * -# Browse to your pre-existing build directory "C:\openbr\build-mingw64" then select "Next". | 219 | * -# Browse to your pre-existing build directory "C:\openbr\build-mingw64" then select "Next". |
| 219 | * -# Clear any text in the "arguments" box then select "Run CMake" then "Finish". | 220 | * -# Clear any text in the "arguments" box then select "Run CMake" then "Finish". |
| 220 | - * -# You're all set! You can find more information on Qt Creator <a href="http://qt-project.org/doc/qtcreator-2.6/">here</a> if you need. | 221 | + * -# You're all set! You can find more information on Qt Creator <a href="http://qt-project.org/doc/qtcreator">here</a> if you need. |
| 221 | * -# (Optional) Package OpenBR! | 222 | * -# (Optional) Package OpenBR! |
| 222 | - * -# <a href="http://sourceforge.net/projects/nsis/files/NSIS%202/2.46/nsis-2.46-setup.exe/download?use_mirror=iweb&download=">Download NSIS 2.46</a> and install. | ||
| 223 | * -# From the MinGW-w64 Command Prompt: | 223 | * -# From the MinGW-w64 Command Prompt: |
| 224 | * \code | 224 | * \code |
| 225 | * $ cd C:\openbr\build-mingw64 | 225 | * $ cd C:\openbr\build-mingw64 |
| 226 | - * $ mingw32-make package | 226 | + * $ cpack -G ZIP |
| 227 | * \endcode | 227 | * \endcode |
| 228 | */ | 228 | */ |
| 229 | 229 | ||
| @@ -392,6 +392,15 @@ $ br -help | @@ -392,6 +392,15 @@ $ br -help | ||
| 392 | */ | 392 | */ |
| 393 | 393 | ||
| 394 | /*! | 394 | /*! |
| 395 | + * \page qmake_integration QMake Integration | ||
| 396 | + * \brief Add OpenBR to your Qt <tt>.pro</tt> project. | ||
| 397 | + * | ||
| 398 | + * After completing the \ref installation instructions, try launching Qt Creator and opening <tt>\<path_to_openbr_installation\>/share/openbr/qmake_tutorial/hello.pro</tt>. | ||
| 399 | + * | ||
| 400 | + * Happy hacking! | ||
| 401 | + */ | ||
| 402 | + | ||
| 403 | +/*! | ||
| 395 | * \page bee Biometric Evaluation Environment | 404 | * \page bee Biometric Evaluation Environment |
| 396 | * \brief The <i>Biometric Evaluation Environment</i> (BEE) is a <a href="http://www.nist.gov/index.html">NIST</a> standard for evaluating biometric algorithms. | 405 | * \brief The <i>Biometric Evaluation Environment</i> (BEE) is a <a href="http://www.nist.gov/index.html">NIST</a> standard for evaluating biometric algorithms. |
| 397 | * | 406 | * |
openbr/plugins/eigen3.cmake
| @@ -3,5 +3,5 @@ set(BR_WITH_EIGEN3 ON CACHE BOOL "Build Eigen3 plugins") | @@ -3,5 +3,5 @@ set(BR_WITH_EIGEN3 ON CACHE BOOL "Build Eigen3 plugins") | ||
| 3 | if(${BR_WITH_EIGEN3}) | 3 | if(${BR_WITH_EIGEN3}) |
| 4 | find_package(Eigen3 REQUIRED) | 4 | find_package(Eigen3 REQUIRED) |
| 5 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/eigen3.cpp) | 5 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/eigen3.cpp) |
| 6 | - install(FILES ${EIGEN3_LICENSE} RENAME Eigen3.license DESTINATION .) | 6 | + install(FILES ${EIGEN3_LICENSE} RENAME Eigen3 DESTINATION share/openbr/licenses) |
| 7 | endif() | 7 | endif() |
openbr/plugins/mongoose.cmake
| @@ -2,5 +2,5 @@ set(BR_WITH_MONGOOSE OFF CACHE BOOL "Build with Mongoose") | @@ -2,5 +2,5 @@ set(BR_WITH_MONGOOSE OFF CACHE BOOL "Build with Mongoose") | ||
| 2 | if(${BR_WITH_MONGOOSE}) | 2 | if(${BR_WITH_MONGOOSE}) |
| 3 | find_package(Mongoose) | 3 | find_package(Mongoose) |
| 4 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/mongoose.cpp ${MONGOOSE_SRC}) | 4 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/mongoose.cpp ${MONGOOSE_SRC}) |
| 5 | - install(FILES ${MONGOOSE_LICENSE} RENAME mongoose.license DESTINATION .) | 5 | + install(FILES ${MONGOOSE_LICENSE} RENAME mongoose DESTINATION share/openbr/licenses) |
| 6 | endif() | 6 | endif() |
openbr/plugins/qtnetwork.cmake
| @@ -4,5 +4,5 @@ if(${BR_WITH_QTNETWORK}) | @@ -4,5 +4,5 @@ if(${BR_WITH_QTNETWORK}) | ||
| 4 | find_package(HttpParser) | 4 | find_package(HttpParser) |
| 5 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Network) | 5 | set(QT_DEPENDENCIES ${QT_DEPENDENCIES} Network) |
| 6 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/qtnetwork.cpp ${HTTPPARSER_SRC}) | 6 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/qtnetwork.cpp ${HTTPPARSER_SRC}) |
| 7 | - install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser.license DESTINATION .) | 7 | + install(FILES ${HTTPPARSER_LICENSE} RENAME http-parser DESTINATION share/openbr/license) |
| 8 | endif() | 8 | endif() |
openbr/plugins/yubico.cmake
| @@ -4,9 +4,9 @@ if(${BR_WITH_YUBICO}) | @@ -4,9 +4,9 @@ if(${BR_WITH_YUBICO}) | ||
| 4 | find_package(YubiKey REQUIRED) # For decrypting YubiKeys | 4 | find_package(YubiKey REQUIRED) # For decrypting YubiKeys |
| 5 | find_package(YKPers REQUIRED) # For reading YubiKeys | 5 | find_package(YKPers REQUIRED) # For reading YubiKeys |
| 6 | 6 | ||
| 7 | - install(FILES ${YUBIKEY_LICENSE} DESTINATION doc RENAME YubiKey.license) | ||
| 8 | - install(FILES ${YKPERS_LICENSE} DESTINATION doc RENAME YKPers.license) | ||
| 9 | - install(FILES ${YKPERS_RULES} DESTINATION share) | 7 | + install(FILES ${YUBIKEY_LICENSE} RENAME YubiKey DESTINATION share/openbr/licenses) |
| 8 | + install(FILES ${YKPERS_LICENSE} RENAME YKPers DESTINATION share/openbr/licenses) | ||
| 9 | + install(FILES ${YKPERS_RULES} DESTINATION share/openbr) | ||
| 10 | 10 | ||
| 11 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${YUBIKEY_SRC} ${YKPERS_SRC} plugins/yubico.cpp) | 11 | set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} ${YUBIKEY_SRC} ${YKPERS_SRC} plugins/yubico.cpp) |
| 12 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${YKPERS_LIBS}) | 12 | set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${YKPERS_LIBS}) |
share/openbr/matlab/loadBin.m deleted
| 1 | -function [x2] = loadBin(filename,reverse) | ||
| 2 | -% [x2] = loadBin(filename,reverse) | ||
| 3 | - | ||
| 4 | - if nargin < 2, | ||
| 5 | - reverse = false; | ||
| 6 | - end | ||
| 7 | - | ||
| 8 | - z = fopen(filename,'r'); | ||
| 9 | - if z == -1, | ||
| 10 | - fprintf('Error opening file %s\n',filename); | ||
| 11 | - x2 = 0; | ||
| 12 | - return | ||
| 13 | - end | ||
| 14 | - | ||
| 15 | - x = fread(z,1,'int32'); | ||
| 16 | - x1 = fread(z,1,'int32'); | ||
| 17 | - x2 = fread(z,[x1 x],'float32'); | ||
| 18 | - x2 = x2'; | ||
| 19 | - fclose(z); | ||
| 20 | - | ||
| 21 | - if reverse, | ||
| 22 | - sz = size(x2); | ||
| 23 | - x2 = x2'; | ||
| 24 | - x2 = reshape(x2,sz); | ||
| 25 | - end |
share/openbr/matlab/loadMtx.m deleted
| 1 | -function [x2] = loadMtx(filename,isRowMajor) | ||
| 2 | -% [x2] = loadMtx(filename,reverse) | ||
| 3 | -% | ||
| 4 | -% Loads a *.mtx file into a Matlab matrix. | ||
| 5 | -% 'filename' - the name of the mtx file | ||
| 6 | -% 'isRowMajor' - determines whether the | ||
| 7 | -% matrix is read in row major or | ||
| 8 | -% column major order (optional, default is false) | ||
| 9 | -% | ||
| 10 | -% This file can likely be improved in terms of effeciency. | ||
| 11 | - | ||
| 12 | - | ||
| 13 | - if nargin < 2, | ||
| 14 | - reverse = false; | ||
| 15 | - end | ||
| 16 | - | ||
| 17 | - z = fopen(filename,'r'); | ||
| 18 | - if z == -1, | ||
| 19 | - fprintf('Error opening file %s\n',filename); | ||
| 20 | - x2 = 0; | ||
| 21 | - return | ||
| 22 | - end | ||
| 23 | - | ||
| 24 | - buf = zeros(100,1); | ||
| 25 | - str_list = cell(4,1); | ||
| 26 | - for i = 1:4, | ||
| 27 | - cnt = 0; | ||
| 28 | - while true | ||
| 29 | - cnt = cnt + 1; | ||
| 30 | - [a ] = fread(z,1,'uchar'); | ||
| 31 | - if a == 10 | ||
| 32 | - break; | ||
| 33 | - end | ||
| 34 | - buf(cnt) = a; | ||
| 35 | - end | ||
| 36 | - str_list{i} = char(buf(1:cnt-1)'); | ||
| 37 | - end | ||
| 38 | - | ||
| 39 | - s = strsplit(' ',str_list{4}); | ||
| 40 | - x = str2num(s{2}); | ||
| 41 | - x1 = str2num(s{3}); | ||
| 42 | - typ = s{1}(2); | ||
| 43 | - | ||
| 44 | - %x2 = fread(z,[x1 x],'float32'); | ||
| 45 | - if strcmp(typ,'F') | ||
| 46 | - x2 = fread(z,[x1 x],'single'); | ||
| 47 | - elseif strcmp(typ,'B') | ||
| 48 | - x2 = fread(z,[x1 x],'int8'); | ||
| 49 | - else | ||
| 50 | - assert(0); | ||
| 51 | - end | ||
| 52 | - x2 = x2'; | ||
| 53 | - fclose(z); | ||
| 54 | - | ||
| 55 | - if reverse, | ||
| 56 | - sz = size(x2); | ||
| 57 | - x2 = x2'; | ||
| 58 | - x2 = reshape(x2,sz); | ||
| 59 | - end | ||
| 60 | \ No newline at end of file | 0 | \ No newline at end of file |
share/openbr/qmake_tutorial/hello.pro
0 → 100644
share/openbr/qmake_tutorial/main.cpp
0 → 100644
| 1 | +#include <QApplication> | ||
| 2 | +#include <QLabel> | ||
| 3 | +#include <openbr/openbr.h> | ||
| 4 | + | ||
| 5 | +int main(int argc, char *argv[]) | ||
| 6 | +{ | ||
| 7 | + QApplication app(argc, argv); | ||
| 8 | + br_initialize(argc, argv); | ||
| 9 | + | ||
| 10 | + QLabel label; | ||
| 11 | + label.setText("Hello OpenBR!"); | ||
| 12 | + label.show(); | ||
| 13 | + | ||
| 14 | + int result = app.exec(); | ||
| 15 | + br_finalize(); | ||
| 16 | + return result; | ||
| 17 | +} |