Qt 在ubuntu 18.04上正确安装openbr
我一直在尝试在ubuntu 18.04 digitalocean droplet上安装openbr 以下是我最新的流程:Qt 在ubuntu 18.04上正确安装openbr,qt,opencv,ubuntu,openbr,Qt,Opencv,Ubuntu,Openbr,我一直在尝试在ubuntu 18.04 digitalocean droplet上安装openbr 以下是我最新的流程: # --opencv install and build-- # installs opencv 2.4 sudo apt-get update sudo apt install -y \ build-essential \ cmake \ git \
# --opencv install and build--
# installs opencv 2.4
sudo apt-get update
sudo apt install -y \
build-essential \
cmake \
git \
pkg-config \
libgtk-3-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libv4l-dev \
libxvidcore-dev \
libx264-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
gfortran \
openexr \
libatlas-base-dev \
python3-dev \
python3-numpy \
libtbb2 \
libtbb-dev \
libdc1394-22-dev
mkdir ~/opencv_build && cd ~/opencv_build
git clone --single-branch --branch 2.4 https://github.com/opencv/opencv.git
cd ~/opencv_build/opencv
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D BUILD_EXAMPLES=ON ..
make -j6
sudo make install
# --qt install--
sudo apt-get update
# Installs qt version 5.9.5 as of 1 Apr 2020
sudo apt-get install -y qt5-default libqt5svg5-dev qtcreator
# --openbr install and build--
# download & prep openbr
git clone https://github.com/biometrics/openbr.git
cd openbr
git checkout v1.1.0
git submodule init
git submodule update
# build openbr
mkdir build # from the OpenBR root directory
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j6
sudo make install
这将使我能够测试openbr的示例:
$br-算法人脸识别-比较me.jpg you.jpg
我在使用任何图像运行上述行时收到此错误:
Set algorithm to FaceRecognition
Loading /usr/local/share/openbr/models/algorithms/FaceRecognition
Fatal: Failed to set br::Transform* br::IndependentTransform::transform to:
SDK Path: /usr/local
File:
Function:
Line: 0
据我所知,这是因为我的qt版本错误。Openbr需要5.4.1,但我最早安装的是5.9.5
更正确的说法是,我的问题是如何安装qt5.4.1。最后,我所追求的是一种可靠且可重复的方法,使openbr在ubuntu 18.04上运行。在ubuntu 18上运行openbr时遇到了同样的问题。您的诊断是正确的,这是QT版本问题。修复程序已合并到OpenBR主机中,但不在2.4分支上。如果您将该编辑应用于2.4上的内容并重新运行构建步骤,则它在我的框中起作用。步骤如下:
independent.set(“transform”,qVariantFromValue(transform))代码>
independent.set(“transform”,QVariant::fromValue(transform))代码>
希望能奏效。谢谢。你说:据我所知,这是因为我的qt版本不对。Openbr需要5.4.1,但我最早安装的是5.9.5,你为什么要指出这一点?显然,openbr是使用系统编译的,QT是openbr的依赖项之一,他们在文档中指定使用Qt5.4.1。他们的github上还有一个问题:这涉及到我使用openbr无法使用的Qt版本连接到的问题。据我所知,Qt贬低了openbr支持的所有版本。我无法安装qt5.9.5之前的版本。