...
 
Commits (4)
    https://gitcode.net/kl222/FaceRecognizer/-/commit/96193f7ffbbaf37c62643eb66c2e2d8649a70717 Modify icon 2023-06-29T11:00:20+08:00 Kang Lin kl222@126.com https://gitcode.net/kl222/FaceRecognizer/-/commit/cc75685c321d2ca94a006817ff717394987e44d4 Fix typo 2023-06-29T11:00:27+08:00 Kang Lin kl222@126.com https://gitcode.net/kl222/FaceRecognizer/-/commit/1afabf18d6820cb89317d23b47d69f20e5881eec Support Qt6 2023-06-30T13:42:38+08:00 Kang Lin kl222@126.com https://gitcode.net/kl222/FaceRecognizer/-/commit/4a4249376203b2e67b1121ca8d44621184862af3 Modify CI 2023-06-30T14:06:42+08:00 Kang Lin kl222@126.com
...@@ -104,7 +104,6 @@ jobs: ...@@ -104,7 +104,6 @@ jobs:
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false
- name: run-vcpkg - name: run-vcpkg
if: false
uses: lukka/run-vcpkg@v7.4 uses: lukka/run-vcpkg@v7.4
with: with:
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. # Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port.
...@@ -117,7 +116,7 @@ jobs: ...@@ -117,7 +116,7 @@ jobs:
appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}} appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
additionalCachedPaths: $VCPKG_ROOT/installed additionalCachedPaths: $VCPKG_ROOT/installed
vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}' vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}'
vcpkgArguments: 'openssl ' vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv'
- name: git clone RabbitCommon - name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}} working-directory: ${{env.SOURCE_DIR}}
......
...@@ -20,6 +20,9 @@ jobs: ...@@ -20,6 +20,9 @@ jobs:
macos: macos:
uses: ./.github/workflows/macos.yml uses: ./.github/workflows/macos.yml
android:
uses: ./.github/workflows/android.yml
deploy: deploy:
if: ${{ startsWith(github.ref, 'refs/tags/') }} if: ${{ startsWith(github.ref, 'refs/tags/') }}
......
...@@ -18,5 +18,5 @@ jobs: ...@@ -18,5 +18,5 @@ jobs:
with: with:
check_filenames: true check_filenames: true
path: ${{github.workspace}} path: ${{github.workspace}}
skip: "*.lua,codespell.yml" skip: "*.lua,codespell.yml,*.ts,qt-installer.sh"
ignore_words_list: "doubleclick,msdos,rabits,eArch" ignore_words_list: "nD,rabits"
...@@ -7,6 +7,7 @@ env: ...@@ -7,6 +7,7 @@ env:
jobs: jobs:
build: build:
if: false
strategy: strategy:
matrix: matrix:
os: [Ubuntu-20.04] os: [Ubuntu-20.04]
......
...@@ -16,13 +16,14 @@ jobs: ...@@ -16,13 +16,14 @@ jobs:
matrix: matrix:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: [Release, Debug] BUILD_TYPE: [Release, Debug]
qt_version: [5.15.2, 5.12.12] qt_version: [6.5.1, 5.15.2, 5.12.12]
include: include:
# - qt_version: 6.4.2 - qt_version: 6.5.1
# qt_modules: qtscxml qtpositioning qt5compat qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtwebsockets
- qt_version: 5.15.2 - qt_version: 5.15.2
qt_modules: "" qt_modules: ""
- qt_version: 5.12.12 - qt_version: 5.12.12
qt_modules: "" qt_modules: ""
...@@ -74,9 +75,9 @@ jobs: ...@@ -74,9 +75,9 @@ jobs:
vcpkgDirectory: ${{runner.workspace}}/vcpkg/ vcpkgDirectory: ${{runner.workspace}}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's # Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key. # compute its hash and append this to the computed cache's key.
appendedCacheKey: cache-vcpkg-msvc-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}} appendedCacheKey: vcpkg-macos-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}' vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv' # dlib ncnn' vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv' # dlib ncnn
- name: Cache Qt - name: Cache Qt
id: cache-qt id: cache-qt
...@@ -137,26 +138,23 @@ jobs: ...@@ -137,26 +138,23 @@ jobs:
working-directory: ${{github.workspace}}/build working-directory: ${{github.workspace}}/build
env: env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
SeetaFace_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaNet_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceDetector_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceLandmarker_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceRecognizer_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaFaceTracker_DIR: ${{env.INSTALL_DIR}}/lib/cmake
SeetaQualityAssessor_DIR: ${{env.INSTALL_DIR}}/lib/cmake
facedetection_DIR: ${{env.INSTALL_DIR}}/lib/cmake/facedetection
run: | run: |
cmake ${{github.workspace}} \ cmake ${{github.workspace}} \
-DCMARK_SHARED=OFF \ -DCMARK_SHARED=OFF \
-DCMARK_TESTS=OFF \ -DCMARK_TESTS=OFF \
-DCMARK_STATIC=ON \ -DCMARK_STATIC=ON \
-Dcmark-gfm_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \ -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \ -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" \ -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake -DSeetaFace_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaNet_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaFaceDetector_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaFaceLandmarker_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaFaceRecognizer_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaFaceTracker_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-DSeetaQualityAssessor_DIR=${{env.INSTALL_DIR}}/lib/cmake \
-Dfacedetection_DIR=${{env.INSTALL_DIR}}/lib/cmake/facedetection
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target package
7z a FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos_qt${{matrix.qt_version}}.zip ./install/* 7z a FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos_qt${{matrix.qt_version}}.zip ./install/*
- name: Update artifact - name: Update artifact
......
...@@ -13,14 +13,14 @@ jobs: ...@@ -13,14 +13,14 @@ jobs:
strategy: strategy:
matrix: matrix:
BUILD_TYPE: [Release, Debug] BUILD_TYPE: [Release, Debug]
qt_version: [5.15.2, 5.12.12] qt_version: [6.5.1, 5.15.2, 5.12.12]
include: include:
# - qt_version: 6.5.1 - qt_version: 6.5.1
# triplet: x64-windows triplet: x64-windows
# VCPKG_PLATFORM_TOOLSET: v142 VCPKG_PLATFORM_TOOLSET: v142
# qt_arch: win64_msvc2019_64 qt_arch: win64_msvc2019_64
# CMAKE_GENERATOR_PLATFORM: x64 CMAKE_GENERATOR_PLATFORM: x64
# qt_modules: qtscxml qtpositioning qtwebchannel qtwebsockets qtwebview qt_modules: qtscxml qtpositioning qtwebchannel qtwebsockets qtwebview
- qt_version: 5.15.2 - qt_version: 5.15.2
qt_arch: win64_msvc2019_64 qt_arch: win64_msvc2019_64
...@@ -159,7 +159,6 @@ jobs: ...@@ -159,7 +159,6 @@ jobs:
-DCMARK_STATIC=ON ^ -DCMARK_STATIC=ON ^
-DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^ -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} ^
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install ^ -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install ^
-DBUILD_QUIWidget=OFF ^
-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^ -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake ^
-DSeetaFace_DIR=${{env.INSTALL_DIR}}/lib/cmake ^ -DSeetaFace_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
-DSeetaNet_DIR=${{env.INSTALL_DIR}}/lib/cmake ^ -DSeetaNet_DIR=${{env.INSTALL_DIR}}/lib/cmake ^
......
...@@ -115,3 +115,5 @@ else() ...@@ -115,3 +115,5 @@ else()
DESTINATION etc DESTINATION etc
COMPONENT Runtime) COMPONENT Runtime)
endif() endif()
INSTALL_ICON_THEME(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Resource/icons)
...@@ -9,11 +9,7 @@ ...@@ -9,11 +9,7 @@
#include <QPainter> #include <QPainter>
CFrmDisplay::CFrmDisplay(QWidget *parent) : CFrmDisplay::CFrmDisplay(QWidget *parent) :
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QWidget(parent), QWidget(parent),
#else
QVideoWidget(parent),
#endif
ui(new Ui::CFrmDisplay), ui(new Ui::CFrmDisplay),
m_bAspectRation(true) m_bAspectRation(true)
{ {
...@@ -22,6 +18,7 @@ CFrmDisplay::CFrmDisplay(QWidget *parent) : ...@@ -22,6 +18,7 @@ CFrmDisplay::CFrmDisplay(QWidget *parent) :
CFrmDisplay::~CFrmDisplay() CFrmDisplay::~CFrmDisplay()
{ {
qDebug() << "CFrmDisplay::~CFrmDisplay()";
delete ui; delete ui;
} }
......
...@@ -10,20 +10,13 @@ ...@@ -10,20 +10,13 @@
#include <QImage> #include <QImage>
#include <QVideoFrame> #include <QVideoFrame>
#include <QMetaClassInfo> #include <QMetaClassInfo>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <QVideoWidget>
#endif
namespace Ui { namespace Ui {
class CFrmDisplay; class CFrmDisplay;
} }
class CFrmDisplay class CFrmDisplay
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
: public QWidget : public QWidget
#else
: public QVideoWidget
#endif
{ {
Q_OBJECT Q_OBJECT
Q_CLASSINFO("Author", "Kang Lin <kl222@126.com>") Q_CLASSINFO("Author", "Kang Lin <kl222@126.com>")
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <QStandardItem> #include <QStandardItem>
#include <QHeaderView> #include <QHeaderView>
#include <QRegExp>
CFrmPara::CFrmPara(QWidget *parent) : CFrmPara::CFrmPara(QWidget *parent) :
QWidget(parent), QWidget(parent),
ui(new Ui::CFrmPara) ui(new Ui::CFrmPara)
......
/** /**
@brief: The form is use set paramter @brief: The form is use set parameter
@author: Kang Lin<kl222@126.com> @author: Kang Lin<kl222@126.com>
*/ */
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Set paramters</string> <string>Set parameters</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="Resource/Resource.qrc"> <iconset>
<normaloff>:/image/Option</normaloff>:/image/Option</iconset> <normaloff>:/image/Option</normaloff>:/image/Option</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<resources> <resources/>
<include location="Resource/Resource.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <QStandardItem> #include <QStandardItem>
#include <QPen> #include <QPen>
#include <stdexcept> #include <stdexcept>
#include <QDebug>
CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) : CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) :
QWidget(parent), QWidget(parent),
...@@ -20,7 +21,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) : ...@@ -20,7 +21,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) :
ui->setupUi(this); ui->setupUi(this);
QStandardItemModel *model = new QStandardItemModel(this); QStandardItemModel *model = new QStandardItemModel(this);
if(!model) if(!model)
throw std::runtime_error("CFrmRecognizerImage consturct allocte memory fail"); throw std::runtime_error("CFrmRecognizerImage construct allocate memory fail");
ui->tvInformation->setModel(model); ui->tvInformation->setModel(model);
ui->tvInformation->setSelectionMode(QAbstractItemView::SingleSelection); ui->tvInformation->setSelectionMode(QAbstractItemView::SingleSelection);
ui->tvInformation->setSelectionBehavior(QAbstractItemView::SelectRows); ui->tvInformation->setSelectionBehavior(QAbstractItemView::SelectRows);
...@@ -39,7 +40,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) : ...@@ -39,7 +40,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) :
m_pFace = CFactoryFace::Instance(); m_pFace = CFactoryFace::Instance();
if(!m_pFace) if(!m_pFace)
throw std::runtime_error("CFrmRecognizerImage consturct allocte memory fail"); throw std::runtime_error("CFrmRecognizerImage construct allocate memory fail");
ShowUI(false); ShowUI(false);
SetStatusInformation(tr("Please select image")); SetStatusInformation(tr("Please select image"));
...@@ -47,6 +48,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) : ...@@ -47,6 +48,7 @@ CFrmRecognizerImage::CFrmRecognizerImage(QWidget *parent) :
CFrmRecognizerImage::~CFrmRecognizerImage() CFrmRecognizerImage::~CFrmRecognizerImage()
{ {
qDebug() << "CFrmRecognizerImage::~CFrmRecognizerImage()";
delete ui; delete ui;
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Brower</string> <string>Browser</string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -25,7 +25,7 @@ CFrmRecognizerVideo::CFrmRecognizerVideo(QWidget *parent) : ...@@ -25,7 +25,7 @@ CFrmRecognizerVideo::CFrmRecognizerVideo(QWidget *parent) :
m_pFace = CFactoryFace::Instance(); m_pFace = CFactoryFace::Instance();
if(!m_pFace) if(!m_pFace)
{ {
throw std::runtime_error("CFrmRegisterVideo consturct allocte memory fail"); throw std::runtime_error("CFrmRegisterVideo construct allocate memory fail");
} }
} }
...@@ -114,7 +114,7 @@ void CFrmRecognizerVideo::slotDisplay(const QImage &image) ...@@ -114,7 +114,7 @@ void CFrmRecognizerVideo::slotDisplay(const QImage &image)
SetStatusInformation(tr("Please only a person before the camera")); SetStatusInformation(tr("Please only a person before the camera"));
return; return;
} else if(faces.size() == 0) { } else if(faces.size() == 0) {
SetStatusInformation(tr("Please face befor camera")); SetStatusInformation(tr("Please face before camera"));
return; return;
} }
......
...@@ -22,7 +22,7 @@ CFrmRegisterImage::CFrmRegisterImage(QWidget *parent) : ...@@ -22,7 +22,7 @@ CFrmRegisterImage::CFrmRegisterImage(QWidget *parent) :
ShowReplaceUI(false); ShowReplaceUI(false);
m_pFace = CFactoryFace::Instance(); m_pFace = CFactoryFace::Instance();
if(!m_pFace) if(!m_pFace)
throw std::runtime_error("CFrmRegisterImage consturct allocte memory fail"); throw std::runtime_error("CFrmRegisterImage construct allocate memory fail");
ui->lbID->setText(""); ui->lbID->setText("");
SetStatusInformation(tr("Please select image")); SetStatusInformation(tr("Please select image"));
...@@ -30,6 +30,7 @@ CFrmRegisterImage::CFrmRegisterImage(QWidget *parent) : ...@@ -30,6 +30,7 @@ CFrmRegisterImage::CFrmRegisterImage(QWidget *parent) :
CFrmRegisterImage::~CFrmRegisterImage() CFrmRegisterImage::~CFrmRegisterImage()
{ {
qDebug() << "CFrmRegisterImage::~CFrmRegisterImage()";
if(m_bRegister && m_pFace && m_pFace->GetRecognizer()) if(m_bRegister && m_pFace && m_pFace->GetRecognizer())
m_pFace->GetRecognizer()->Save(); m_pFace->GetRecognizer()->Save();
delete ui; delete ui;
...@@ -44,7 +45,7 @@ void CFrmRegisterImage::slotParameter(const CParameterRegisterImage &para) ...@@ -44,7 +45,7 @@ void CFrmRegisterImage::slotParameter(const CParameterRegisterImage &para)
ui->lbImage->setVisible(false); ui->lbImage->setVisible(false);
ui->leFile->setVisible(false); ui->leFile->setVisible(false);
ui->pbBrower->setVisible(false); ui->pbBrowser->setVisible(false);
} }
int CFrmRegisterImage::ProcessImage(const QImage &image) int CFrmRegisterImage::ProcessImage(const QImage &image)
...@@ -61,7 +62,7 @@ int CFrmRegisterImage::ProcessImage(const QImage &image) ...@@ -61,7 +62,7 @@ int CFrmRegisterImage::ProcessImage(const QImage &image)
return 0; return 0;
} }
void CFrmRegisterImage::on_pbBrower_clicked() void CFrmRegisterImage::on_pbBrowser_clicked()
{ {
QString szFile = RabbitCommon::CDir::GetOpenFileName(this, QString szFile = RabbitCommon::CDir::GetOpenFileName(this,
tr("Select image"), tr("Select image"),
...@@ -176,7 +177,7 @@ void CFrmRegisterImage::on_pbRegister_clicked() ...@@ -176,7 +177,7 @@ void CFrmRegisterImage::on_pbRegister_clicked()
szMsg = "Write database fail."; szMsg = "Write database fail.";
SetStatusInformation(szMsg, -1, ERROR); SetStatusInformation(szMsg, -1, ERROR);
} else { } else {
szMsg = tr("Regist success. index:"); szMsg = tr("Register success. index:");
szMsg += QString::number(data.getIdx()) + "; "; szMsg += QString::number(data.getIdx()) + "; ";
szMsg += tr("no:") + QString::number(data.getNo()) + "; "; szMsg += tr("no:") + QString::number(data.getNo()) + "; ";
szMsg += tr("name:") + data.getName(); szMsg += tr("name:") + data.getName();
...@@ -247,7 +248,7 @@ void CFrmRegisterImage::on_pbReplace_clicked() ...@@ -247,7 +248,7 @@ void CFrmRegisterImage::on_pbReplace_clicked()
szMsg = tr("Write database fail. The no is exists?"); szMsg = tr("Write database fail. The no is exists?");
SetStatusInformation(szMsg, -1, ERROR); SetStatusInformation(szMsg, -1, ERROR);
} else { } else {
szMsg = tr("Regist success. index:"); szMsg = tr("Register success. index:");
szMsg += QString::number(data.getIdx()) + "; "; szMsg += QString::number(data.getIdx()) + "; ";
szMsg += tr("NO:") + QString::number(data.getNo()) + "; "; szMsg += tr("NO:") + QString::number(data.getNo()) + "; ";
szMsg += tr("name:") + data.getName(); szMsg += tr("name:") + data.getName();
......
...@@ -29,7 +29,7 @@ public slots: ...@@ -29,7 +29,7 @@ public slots:
void slotParameter(const CParameterRegisterImage &para); void slotParameter(const CParameterRegisterImage &para);
private slots: private slots:
void on_pbBrower_clicked(); void on_pbBrowser_clicked();
void on_pbRegister_clicked(); void on_pbRegister_clicked();
void on_pbCancel_clicked(); void on_pbCancel_clicked();
void on_pbReplace_clicked(); void on_pbReplace_clicked();
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pbBrower"> <widget class="QPushButton" name="pbBrowser">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>Brower</string> <string>Browser</string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <QPainter> #include <QPainter>
#include <FactoryFace.h> #include <FactoryFace.h>
#include <stdexcept> #include <stdexcept>
#include <QDebug>
CFrmRegisterVideo::CFrmRegisterVideo(QWidget *parent) : CFrmRegisterVideo::CFrmRegisterVideo(QWidget *parent) :
QWidget(parent), QWidget(parent),
...@@ -21,12 +22,13 @@ CFrmRegisterVideo::CFrmRegisterVideo(QWidget *parent) : ...@@ -21,12 +22,13 @@ CFrmRegisterVideo::CFrmRegisterVideo(QWidget *parent) :
m_pFace = CFactoryFace::Instance(); m_pFace = CFactoryFace::Instance();
if(!m_pFace) if(!m_pFace)
{ {
throw std::runtime_error("CFrmRegisterVideo consturct allocte memory fail"); throw std::runtime_error("CFrmRegisterVideo construct allocate memory fail");
} }
} }
CFrmRegisterVideo::~CFrmRegisterVideo() CFrmRegisterVideo::~CFrmRegisterVideo()
{ {
qDebug() << "CFrmRegisterVideo::~CFrmRegisterVideo()";
delete ui; delete ui;
} }
...@@ -139,7 +141,7 @@ void CFrmRegisterVideo::slotDisplay(const QImage &image) ...@@ -139,7 +141,7 @@ void CFrmRegisterVideo::slotDisplay(const QImage &image)
PERFORMANCE(CFrmRegisterVideo) PERFORMANCE(CFrmRegisterVideo)
m_Faces.clear(); m_Faces.clear();
m_pFace->GetDector()->Detect(image, m_Faces); m_pFace->GetDector()->Detect(image, m_Faces);
PERFORMANCE_ADD_TIME(CFrmRegisterVideo, "Dectect") PERFORMANCE_ADD_TIME(CFrmRegisterVideo, "Detect")
MarkFace(painter, m_Faces); MarkFace(painter, m_Faces);
PERFORMANCE_ADD_TIME(CFrmRegisterVideo, "MarkFace") PERFORMANCE_ADD_TIME(CFrmRegisterVideo, "MarkFace")
if(m_Faces.size() > 1) if(m_Faces.size() > 1)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Registe from Video</string> <string>Register from Video</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="1" column="0"> <item row="1" column="0">
......
...@@ -21,7 +21,11 @@ ...@@ -21,7 +21,11 @@
#include "FactoryFace.h" #include "FactoryFace.h"
#include <QIcon> #include <QIcon>
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
#include <QMediaDevices>
#else
#include <QCameraInfo> #include <QCameraInfo>
#endif
#include <QGuiApplication> #include <QGuiApplication>
#include <QScreen> #include <QScreen>
#include <QFileDialog> #include <QFileDialog>
...@@ -42,6 +46,7 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -42,6 +46,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
m_pCamera(nullptr) m_pCamera(nullptr)
{ {
bool check = false;
ui->setupUi(this); ui->setupUi(this);
//Init menu //Init menu
...@@ -67,12 +72,34 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -67,12 +72,34 @@ MainWindow::MainWindow(QWidget *parent) :
ui->menuTools->addMenu(RabbitCommon::CTools::GetLogMenu(this)); ui->menuTools->addMenu(RabbitCommon::CTools::GetLogMenu(this));
// File // File
bool check = connect(&m_Player, SIGNAL(error(QMediaPlayer::Error)), #if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
m_CaptureSession.setVideoSink(&m_CaptureFrame);
m_Player.setVideoSink(&m_CaptureFrame);
check = connect(&m_Player, SIGNAL(errorOccurred(QMediaPlayer::Error, const QString&)),
this, SLOT(slotPlayError(QMediaPlayer::Error, const QString&)));
Q_ASSERT(check);
check = connect(&m_Player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)),
this, SLOT(slotMediaStatusChanged(QMediaPlayer::MediaStatus)));
Q_ASSERT(check);
check = connect(&m_Player, SIGNAL(playbackStateChanged(QMediaPlayer::PlaybackState)),
this, SLOT(slotPlaybackStateChanged(QMediaPlayer::PlaybackState)));
Q_ASSERT(check);
check = connect(&m_Player, SIGNAL(positionChanged(qint64)),
this, SLOT(slotPositionChanged(qint64)));
Q_ASSERT(check);
#else
m_Player.setVideoOutput(&m_CaptureFrame);
check = connect(&m_Player, SIGNAL(error(QMediaPlayer::Error)),
this, SLOT(slotPlayError(QMediaPlayer::Error))); this, SLOT(slotPlayError(QMediaPlayer::Error)));
Q_ASSERT(check); Q_ASSERT(check);
#endif
// Camera // Camera
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
if(!QMediaDevices::videoInputs().isEmpty())
#else
if(!QCameraInfo::availableCameras().isEmpty()) if(!QCameraInfo::availableCameras().isEmpty())
#endif
{ {
QComboBox *cmbCameras = new QComboBox(ui->toolBar); QComboBox *cmbCameras = new QComboBox(ui->toolBar);
if(cmbCameras) if(cmbCameras)
...@@ -81,8 +108,13 @@ MainWindow::MainWindow(QWidget *parent) : ...@@ -81,8 +108,13 @@ MainWindow::MainWindow(QWidget *parent) :
cmbCameras->setToolTip(tr("Select camera")); cmbCameras->setToolTip(tr("Select camera"));
cmbCameras->setStatusTip(tr("Select camera")); cmbCameras->setStatusTip(tr("Select camera"));
ui->toolBar->addWidget(cmbCameras); ui->toolBar->addWidget(cmbCameras);
QList<QCameraInfo> cameras = QCameraInfo::availableCameras(); auto cameras =
foreach (const QCameraInfo &cameraInfo, cameras) { #if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QMediaDevices::videoInputs();
#else
QCameraInfo::availableCameras();
#endif
foreach (auto cameraInfo, cameras) {
//qDebug(log) << "Camer name:" << cameraInfo.deviceName(); //qDebug(log) << "Camer name:" << cameraInfo.deviceName();
cmbCameras->addItem(cameraInfo.description()); cmbCameras->addItem(cameraInfo.description());
} }
...@@ -151,7 +183,14 @@ void MainWindow::on_actionStyle_triggered() ...@@ -151,7 +183,14 @@ void MainWindow::on_actionStyle_triggered()
void MainWindow::slotCameraChanged(int index) void MainWindow::slotCameraChanged(int index)
{ {
if(!(QCameraInfo::availableCameras().size() > 0 && index >= 0)) auto camers =
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QMediaDevices::videoInputs();
#else
QCameraInfo::availableCameras();
#endif
if(!(camers.size() > 0 && index >= 0))
{ {
QMessageBox::warning(nullptr, tr("Warning"), tr("The devices is not camera")); QMessageBox::warning(nullptr, tr("Warning"), tr("The devices is not camera"));
return; return;
...@@ -159,11 +198,13 @@ void MainWindow::slotCameraChanged(int index) ...@@ -159,11 +198,13 @@ void MainWindow::slotCameraChanged(int index)
if(m_pCamera) if(m_pCamera)
{ {
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
m_pCamera->unload(); m_pCamera->unload();
#endif
delete m_pCamera; delete m_pCamera;
} }
m_pCamera = new QCamera(QCameraInfo::availableCameras().at(index)); m_pCamera = new QCamera(camers.at(index));
if(nullptr == m_pCamera) return; if(nullptr == m_pCamera) return;
/* /*
QCameraViewfinderSettings viewfinderSettings = m_pCamera->viewfinderSettings(); QCameraViewfinderSettings viewfinderSettings = m_pCamera->viewfinderSettings();
...@@ -177,7 +218,7 @@ void MainWindow::slotCameraChanged(int index) ...@@ -177,7 +218,7 @@ void MainWindow::slotCameraChanged(int index)
{ {
qInfo(log) << "Frame rate range:" << rang.maximumFrameRate << rang.maximumFrameRate; qInfo(log) << "Frame rate range:" << rang.maximumFrameRate << rang.maximumFrameRate;
} }
qInfo(log) << "Pixel formate:" << m_pCamera->supportedViewfinderPixelFormats(m_pCamera->viewfinderSettings()); qInfo(log) << "Pixel format:" << m_pCamera->supportedViewfinderPixelFormats(m_pCamera->viewfinderSettings());
// viewfinderSettings.setResolution(640, 480); // viewfinderSettings.setResolution(640, 480);
// viewfinderSettings.setMinimumFrameRate(10.0); // viewfinderSettings.setMinimumFrameRate(10.0);
...@@ -188,14 +229,17 @@ void MainWindow::slotCameraChanged(int index) ...@@ -188,14 +229,17 @@ void MainWindow::slotCameraChanged(int index)
qInfo(log) << "Current:"; qInfo(log) << "Current:";
qInfo(log) << "Resolutions:" << viewfinderSettings.resolution(); qInfo(log) << "Resolutions:" << viewfinderSettings.resolution();
qInfo(log) << "Frame rate:" << viewfinderSettings.minimumFrameRate() << viewfinderSettings.maximumFrameRate(); qInfo(log) << "Frame rate:" << viewfinderSettings.minimumFrameRate() << viewfinderSettings.maximumFrameRate();
qInfo(log) << "Pixel formate:" << viewfinderSettings.pixelFormat(); qInfo(log) << "Pixel format:" << viewfinderSettings.pixelFormat();
qInfo(log) << "" << viewfinderSettings.pixelAspectRatio(); qInfo(log) << "" << viewfinderSettings.pixelAspectRatio();
//*/ //*/
m_CaptureFrame.SetCameraAngle(CamerOrientation(index)); m_CaptureFrame.SetCameraAngle(CamerOrientation(index));
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
m_CaptureSession.setCamera(m_pCamera);
#else
m_pCamera->setViewfinder(&m_CaptureFrame); m_pCamera->setViewfinder(&m_CaptureFrame);
QCameraFocus* focus = m_pCamera->focus(); QCameraFocus* focus = m_pCamera->focus();
if(focus) if(focus)
{ {
...@@ -225,7 +269,8 @@ void MainWindow::slotCameraChanged(int index) ...@@ -225,7 +269,8 @@ void MainWindow::slotCameraChanged(int index)
// } // }
} }
#endif
#ifdef RABBITCOMMON #ifdef RABBITCOMMON
QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(),
QSettings::IniFormat); QSettings::IniFormat);
...@@ -308,14 +353,40 @@ void MainWindow::on_actionFile_triggered() ...@@ -308,14 +353,40 @@ void MainWindow::on_actionFile_triggered()
#endif #endif
} }
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
void MainWindow::slotPlayError(QMediaPlayer::Error error, const QString &errorString)
#else
void MainWindow::slotPlayError(QMediaPlayer::Error error) void MainWindow::slotPlayError(QMediaPlayer::Error error)
#endif
{ {
qCritical(log) << "Play error:" << error qCritical(log) << "Play error:" << error
<< "Url:" << m_Player.media().canonicalUrl().toString(); << "Url:" <<
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
m_Player.source().toString();
#else
m_Player.media().canonicalUrl().toString();
#endif
ui->actionStart->trigger(); ui->actionStart->trigger();
} }
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
void MainWindow::slotMediaStatusChanged(QMediaPlayer::MediaStatus status)
{
qDebug() << "Media status changed:" << status;
}
void MainWindow::slotPlaybackStateChanged(QMediaPlayer::PlaybackState state)
{
qDebug() << "Play status changed:" << state;
}
void MainWindow::slotPositionChanged(qint64 position)
{
//qDebug() << "Play position changed:" << position;
}
#endif
void MainWindow::on_actionStart_triggered() void MainWindow::on_actionStart_triggered()
{ {
if(ui->actionStart->isChecked()) if(ui->actionStart->isChecked())
...@@ -327,24 +398,22 @@ void MainWindow::on_actionStart_triggered() ...@@ -327,24 +398,22 @@ void MainWindow::on_actionStart_triggered()
m_pCamera->start(); m_pCamera->start();
} else { } else {
m_Player.stop(); m_Player.stop();
QString szFile; QString szFile;
QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(),
QSettings::IniFormat); QSettings::IniFormat);
szFile = set.value("SourceFile").toString(); szFile = set.value("SourceFile").toString();
qDebug(log) << "Open file:" << szFile;
QUrl url = QUrl::fromLocalFile(szFile); QUrl url = QUrl::fromLocalFile(szFile);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
m_Player.setMedia(url);
m_Player.setVideoOutput(&m_CaptureFrame);
#else
m_Player.setSource(url); m_Player.setSource(url);
#else
m_Player.setMedia(url);
#endif #endif
m_Player.play(); m_Player.play();
} }
ui->actionStart->setText(tr("Stop")); ui->actionStart->setText(tr("Stop"));
ui->actionStart->setToolTip(tr("Stop")); ui->actionStart->setToolTip(tr("Stop"));
ui->actionStart->setStatusTip(tr("Stop")); ui->actionStart->setStatusTip(tr("Stop"));
...@@ -354,7 +423,7 @@ void MainWindow::on_actionStart_triggered() ...@@ -354,7 +423,7 @@ void MainWindow::on_actionStart_triggered()
m_pCamera->stop(); m_pCamera->stop();
else else
m_Player.stop(); m_Player.stop();
ui->actionStart->setIcon(QIcon::fromTheme("media-playback-start")); ui->actionStart->setIcon(QIcon::fromTheme("media-playback-start"));
ui->actionStart->setText(tr("Start")); ui->actionStart->setText(tr("Start"));
ui->actionStart->setToolTip(tr("Start")); ui->actionStart->setToolTip(tr("Start"));
...@@ -364,11 +433,18 @@ void MainWindow::on_actionStart_triggered() ...@@ -364,11 +433,18 @@ void MainWindow::on_actionStart_triggered()
int MainWindow::CamerOrientation(int index) int MainWindow::CamerOrientation(int index)
{ {
if(index < 0 || index >= QCameraInfo::availableCameras().length()) int rotation = 0;
auto camers =
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QMediaDevices::videoInputs();
#else
QCameraInfo::availableCameras();
#endif
if(index < 0 || index >= camers.length())
return -1; return -1;
QCameraInfo cameraInfo = QCameraInfo::availableCameras().at(index); auto cameraInfo = camers.at(index);
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
// Get the current display orientation // Get the current display orientation
QScreen *screen = QGuiApplication::primaryScreen(); QScreen *screen = QGuiApplication::primaryScreen();
screen->setOrientationUpdateMask(Qt::LandscapeOrientation screen->setOrientationUpdateMask(Qt::LandscapeOrientation
...@@ -389,7 +465,7 @@ int MainWindow::CamerOrientation(int index) ...@@ -389,7 +465,7 @@ int MainWindow::CamerOrientation(int index)
#endif #endif
qDebug(log) << "screenAngle:" << screenAngle qDebug(log) << "screenAngle:" << screenAngle
<< "camer orientation:" << cameraInfo.orientation(); << "camer orientation:" << cameraInfo.orientation();
int rotation;
if (cameraInfo.position() == QCamera::BackFace) { if (cameraInfo.position() == QCamera::BackFace) {
rotation = (cameraInfo.orientation() - screenAngle) % 360; rotation = (cameraInfo.orientation() - screenAngle) % 360;
} else { } else {
...@@ -399,6 +475,7 @@ int MainWindow::CamerOrientation(int index) ...@@ -399,6 +475,7 @@ int MainWindow::CamerOrientation(int index)
int a = cameraInfo.orientation(); int a = cameraInfo.orientation();
qDebug(log) << "Camer angle:" << a << rotation; qDebug(log) << "Camer angle:" << a << rotation;
qDebug(log) << "orientation1:" << a << rotation; qDebug(log) << "orientation1:" << a << rotation;
#endif
return rotation; return rotation;
} }
...@@ -415,12 +492,12 @@ void MainWindow::slotScreenOrientationChanged(Qt::ScreenOrientation orientation) ...@@ -415,12 +492,12 @@ void MainWindow::slotScreenOrientationChanged(Qt::ScreenOrientation orientation)
void MainWindow::on_actionSet_model_path_triggered() void MainWindow::on_actionSet_model_path_triggered()
{ {
#ifdef RABBITCOMMON #ifdef RABBITCOMMON
QString szPath = RabbitCommon::CDir::GetOpenDirectory(this, QString szPath = RabbitCommon::CDir::GetOpenDirectory(this,
tr("Open model file path")); tr("Open model file path"));
QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(), QSettings set(RabbitCommon::CDir::Instance()->GetFileUserConfigure(),
QSettings::IniFormat); QSettings::IniFormat);
set.setValue("ModuleDir", szPath); set.setValue("ModuleDir", szPath);
setModelPath(szPath); setModelPath(szPath);
#endif #endif
} }
...@@ -434,7 +511,6 @@ int MainWindow::setModelPath(const QString &szPath) ...@@ -434,7 +511,6 @@ int MainWindow::setModelPath(const QString &szPath)
void MainWindow::on_actionRegisterImage_triggered() void MainWindow::on_actionRegisterImage_triggered()
{ {
m_CaptureFrame.disconnect();
CFrmRegisterImage* pImage = new CFrmRegisterImage(this); CFrmRegisterImage* pImage = new CFrmRegisterImage(this);
setCentralWidget(pImage); setCentralWidget(pImage);
} }
...@@ -445,9 +521,8 @@ void MainWindow::on_actionRegisterImage_directory_triggered() ...@@ -445,9 +521,8 @@ void MainWindow::on_actionRegisterImage_directory_triggered()
void MainWindow::on_actionRegisterVideo_triggered() void MainWindow::on_actionRegisterVideo_triggered()
{ {
CManageRegisterVideo *pManage = new CManageRegisterVideo(this); CManageRegisterVideo *pManage = new CManageRegisterVideo(this);
m_CaptureFrame.disconnect(); bool check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage&)),
bool check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage &)), pManage, SIGNAL(sigCaptureFrame(const QImage&)));
pManage, SIGNAL(sigCaptureFrame(const QImage &)));
Q_ASSERT(check); Q_ASSERT(check);
setCentralWidget(pManage); setCentralWidget(pManage);
} }
...@@ -455,14 +530,12 @@ void MainWindow::on_actionRegisterVideo_triggered() ...@@ -455,14 +530,12 @@ void MainWindow::on_actionRegisterVideo_triggered()
void MainWindow::on_actionRecognizerImage_triggered() void MainWindow::on_actionRecognizerImage_triggered()
{ {
CFrmRecognizerImage* pImage = new CFrmRecognizerImage(this); CFrmRecognizerImage* pImage = new CFrmRecognizerImage(this);
m_CaptureFrame.disconnect();
setCentralWidget(pImage); setCentralWidget(pImage);
} }
void MainWindow::on_actionRecognizerVideo_triggered() void MainWindow::on_actionRecognizerVideo_triggered()
{ {
CManageRecognizerVideo *pManage = new CManageRecognizerVideo(); CManageRecognizerVideo *pManage = new CManageRecognizerVideo();
m_CaptureFrame.disconnect();
bool check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage&)), bool check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage&)),
pManage, SIGNAL(sigCaptureFrame(const QImage&))); pManage, SIGNAL(sigCaptureFrame(const QImage&)));
Q_ASSERT(check); Q_ASSERT(check);
...@@ -478,8 +551,7 @@ void MainWindow::on_actionDisplay_triggered() ...@@ -478,8 +551,7 @@ void MainWindow::on_actionDisplay_triggered()
bool check = connect(ui->actionKeep_display_aspect_ratio, SIGNAL(triggered(bool)), bool check = connect(ui->actionKeep_display_aspect_ratio, SIGNAL(triggered(bool)),
pDisplay, SLOT(slotSetAspectRatio(bool))); pDisplay, SLOT(slotSetAspectRatio(bool)));
Q_ASSERT(check); Q_ASSERT(check);
m_CaptureFrame.disconnect();
check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage &)), check = connect(&m_CaptureFrame, SIGNAL(sigCaptureFrame(const QImage &)),
pDisplay, SLOT(slotDisplay(const QImage &))); pDisplay, SLOT(slotDisplay(const QImage &)));
Q_ASSERT(check); Q_ASSERT(check);
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
#include <QMainWindow> #include <QMainWindow>
#include <QCamera> #include <QCamera>
#include <QMediaPlayer> #include <QMediaPlayer>
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
#include <QMediaCaptureSession>
#endif
#include "CameraQtCaptureVideoFrame.h" #include "CameraQtCaptureVideoFrame.h"
#include "FrmPara.h" #include "FrmPara.h"
...@@ -22,8 +24,8 @@ class MainWindow : public QMainWindow ...@@ -22,8 +24,8 @@ class MainWindow : public QMainWindow
public: public:
explicit MainWindow(QWidget *parent = nullptr); explicit MainWindow(QWidget *parent = nullptr);
~MainWindow(); virtual ~MainWindow();
private slots: private slots:
void slotCameraChanged(int index); void slotCameraChanged(int index);
void slotCameraOrientation(QAction* pAction); void slotCameraOrientation(QAction* pAction);
...@@ -33,7 +35,7 @@ private slots: ...@@ -33,7 +35,7 @@ private slots:
void on_actionRegisterImage_directory_triggered(); void on_actionRegisterImage_directory_triggered();
void on_actionRecognizerImage_triggered(); void on_actionRecognizerImage_triggered();
void on_actionRecognizerVideo_triggered(); void on_actionRecognizerVideo_triggered();
void on_actionSet_model_path_triggered(); void on_actionSet_model_path_triggered();
void on_actionAbout_A_triggered(); void on_actionAbout_A_triggered();
void on_actionUpdate_U_triggered(); void on_actionUpdate_U_triggered();
void on_actionDisplay_triggered(); void on_actionDisplay_triggered();
...@@ -44,8 +46,14 @@ private slots: ...@@ -44,8 +46,14 @@ private slots:
void slotParaDock_triggered(bool checked); void slotParaDock_triggered(bool checked);
void slotScreenOrientationChanged(Qt::ScreenOrientation orientation); void slotScreenOrientationChanged(Qt::ScreenOrientation orientation);
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
void slotPlayError(QMediaPlayer::Error error, const QString &errorString);
void slotMediaStatusChanged(QMediaPlayer::MediaStatus status);
void slotPlaybackStateChanged(QMediaPlayer::PlaybackState state);
void slotPositionChanged(qint64 position);
#else
void slotPlayError(QMediaPlayer::Error error); void slotPlayError(QMediaPlayer::Error error);
#endif
private: private:
int CamerOrientation(int index); int CamerOrientation(int index);
...@@ -55,8 +63,11 @@ private: ...@@ -55,8 +63,11 @@ private:
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
CCameraQtCaptureVideoFrame m_CaptureFrame; CCameraQtCaptureVideoFrame m_CaptureFrame;
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QMediaCaptureSession m_CaptureSession;
#endif
QCamera* m_pCamera; QCamera* m_pCamera;
QMediaPlayer m_Player; QMediaPlayer m_Player;
QSharedPointer<CFrmPara> m_Paramter; QSharedPointer<CFrmPara> m_Paramter;
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<string>Face recognizer</string> <string>Face recognizer</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="face-recognizer">
<normaloff>:/image/FaceRecognizer</normaloff>:/image/FaceRecognizer</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<widget class="QWidget" name="centralwidget"/> <widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>600</width> <width>600</width>
<height>21</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuOperate"> <widget class="QMenu" name="menuOperate">
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<string>Register</string> <string>Register</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="register">
<normaloff>:/image/Register</normaloff>:/image/Register</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<addaction name="actionRegisterImage"/> <addaction name="actionRegisterImage"/>
<addaction name="actionRegisterImage_directory"/> <addaction name="actionRegisterImage_directory"/>
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
<string>Recognizer</string> <string>Recognizer</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="face-recognizer">
<normaloff>:/image/FaceRecognizer</normaloff>:/image/FaceRecognizer</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<addaction name="actionRecognizerImage"/> <addaction name="actionRecognizerImage"/>
<addaction name="actionRecognizerVideo"/> <addaction name="actionRecognizerVideo"/>
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
<string>AI libraries</string> <string>AI libraries</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="tools">
<normaloff>:/image/Tools</normaloff>:/image/Tools</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
</widget> </widget>
<addaction name="actionStart"/> <addaction name="actionStart"/>
...@@ -142,7 +142,8 @@ ...@@ -142,7 +142,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="media-playback-start"/> <iconset theme="media-playback-start">
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Start</string> <string>Start</string>
...@@ -175,8 +176,8 @@ ...@@ -175,8 +176,8 @@
</action> </action>
<action name="actionSet_model_path"> <action name="actionSet_model_path">
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="folder">
<normaloff>:/image/Folder</normaloff>:/image/Folder</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Set model path</string> <string>Set model path</string>
...@@ -187,8 +188,8 @@ ...@@ -187,8 +188,8 @@
</action> </action>
<action name="actionAbout_A"> <action name="actionAbout_A">
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="face-recognizer">
<normaloff>:/image/FaceRecognizer</normaloff>:/image/FaceRecognizer</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>About(&amp;A)</string> <string>About(&amp;A)</string>
...@@ -225,8 +226,8 @@ ...@@ -225,8 +226,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="video-display">
<normaloff>:/image/VideoFile</normaloff>:/image/VideoFile</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Display</string> <string>Display</string>
...@@ -246,7 +247,8 @@ ...@@ -246,7 +247,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="camera-video"/> <iconset theme="camera-video">
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Camera</string> <string>Camera</string>
...@@ -257,8 +259,8 @@ ...@@ -257,8 +259,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="video-file">
<normaloff>:/image/VideoFile</normaloff>:/image/VideoFile</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>File</string> <string>File</string>
...@@ -269,8 +271,8 @@ ...@@ -269,8 +271,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="image">
<normaloff>:/image/Image</normaloff>:/image/Image</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Image</string> <string>Image</string>
...@@ -293,8 +295,8 @@ ...@@ -293,8 +295,8 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="folder">
<normaloff>:/image/Folder</normaloff>:/image/Folder</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Image directory</string> <string>Image directory</string>
...@@ -314,8 +316,8 @@ ...@@ -314,8 +316,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="video-display">
<normaloff>:/image/VideoFile</normaloff>:/image/VideoFile</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Video</string> <string>Video</string>
...@@ -335,8 +337,8 @@ ...@@ -335,8 +337,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="image">
<normaloff>:/image/Image</normaloff>:/image/Image</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Image</string> <string>Image</string>
...@@ -356,8 +358,8 @@ ...@@ -356,8 +358,8 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="video-display">
<normaloff>:/image/VideoFile</normaloff>:/image/VideoFile</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Video</string> <string>Video</string>
...@@ -377,7 +379,8 @@ ...@@ -377,7 +379,8 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset theme="applications-system"/> <iconset theme="applications-system">
<normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Options(&amp;O)</string> <string>Options(&amp;O)</string>
...@@ -417,8 +420,8 @@ ...@@ -417,8 +420,8 @@
</action> </action>
<action name="actionExit"> <action name="actionExit">
<property name="icon"> <property name="icon">
<iconset resource="Resource/Resource.qrc"> <iconset theme="application-exit">
<normaloff>:/image/Exit</normaloff>:/image/Exit</iconset> <normaloff>.</normaloff>.</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Exit</string> <string>Exit</string>
...@@ -466,8 +469,6 @@ ...@@ -466,8 +469,6 @@
</property> </property>
</action> </action>
</widget> </widget>
<resources> <resources/>
<include location="Resource/Resource.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>
...@@ -16,7 +16,7 @@ CManageRecognizerVideo::CManageRecognizerVideo(QWidget *parent) : ...@@ -16,7 +16,7 @@ CManageRecognizerVideo::CManageRecognizerVideo(QWidget *parent) :
m_pFrmRecognizerVideo = new CFrmRecognizerVideo(this); //delete it when delete this m_pFrmRecognizerVideo = new CFrmRecognizerVideo(this); //delete it when delete this
if(!m_pFrmRecognizerVideo) if(!m_pFrmRecognizerVideo)
throw std::runtime_error("alloc memery fail"); throw std::runtime_error("alloc memory fail");
bool check = connect(this, SIGNAL(sigCaptureFrame(const QImage&)), bool check = connect(this, SIGNAL(sigCaptureFrame(const QImage&)),
m_pFrmRecognizerVideo, SLOT(slotDisplay(const QImage&))); m_pFrmRecognizerVideo, SLOT(slotDisplay(const QImage&)));
Q_ASSERT(check); Q_ASSERT(check);
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "ManageRegisterVideo.h" #include "ManageRegisterVideo.h"
#include <stdexcept> #include <stdexcept>
#include <QDebug>
CManageRegisterVideo::CManageRegisterVideo(QWidget *parent) : QWidget(parent) CManageRegisterVideo::CManageRegisterVideo(QWidget *parent) : QWidget(parent)
{ {
...@@ -12,7 +13,7 @@ CManageRegisterVideo::CManageRegisterVideo(QWidget *parent) : QWidget(parent) ...@@ -12,7 +13,7 @@ CManageRegisterVideo::CManageRegisterVideo(QWidget *parent) : QWidget(parent)
m_RegisterVideo = QSharedPointer<CFrmRegisterVideo>(new CFrmRegisterVideo(this)); m_RegisterVideo = QSharedPointer<CFrmRegisterVideo>(new CFrmRegisterVideo(this));
m_RegisterImage = QSharedPointer<CFrmRegisterImage>(new CFrmRegisterImage(this)); m_RegisterImage = QSharedPointer<CFrmRegisterImage>(new CFrmRegisterImage(this));
if(!(m_RegisterImage && m_RegisterVideo)) if(!(m_RegisterImage && m_RegisterVideo))
throw std::runtime_error("alloce memery fail"); throw std::runtime_error("alloce memory fail");
m_RegisterVideo->move(0, 0); m_RegisterVideo->move(0, 0);
m_RegisterImage->move(0, 0); m_RegisterImage->move(0, 0);
......
...@@ -18,7 +18,7 @@ class CParameterRegisterImage : public QObject ...@@ -18,7 +18,7 @@ class CParameterRegisterImage : public QObject
public: public:
explicit CParameterRegisterImage(QObject *parent = nullptr); explicit CParameterRegisterImage(QObject *parent = nullptr);
CParameterRegisterImage(const CParameterRegisterImage &othe); CParameterRegisterImage(const CParameterRegisterImage &other);
int SetNo(qint64 no); int SetNo(qint64 no);
qint64 GetNo(); qint64 GetNo();
......
<RCC> <RCC>
<qresource prefix="/image"> <qresource prefix="/image">
<file alias="FaceRecognizer">image/FaceRecognizer.png</file> <file alias="FaceRecognizer">image/FaceRecognizer.png</file>
<file alias="Start">image/Start.png</file>
<file alias="Stop">image/Stop.png</file>
<file alias="Register">image/Register.png</file>
<file alias="VideoFile">image/VideoFile.png</file>
<file alias="Video">image/Video.png</file>
<file alias="Camera">image/Camera.png</file>
<file alias="VideoFolder">image/Videofolder.png</file>
<file alias="Folder">image/Folder.png</file>
<file alias="Image">image/Image.png</file>
<file alias="Exit">image/exit.png</file>
<file alias="Log">image/log.png</file>
<file alias="Delete">image/delete.png</file>
<file alias="Option">image/option.png</file>
<file alias="Tools">image/Tools.png</file>
<file alias="Wait">image/wait.png</file>
</qresource> </qresource>
</RCC> </RCC>
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M42.666667 217.6c-12.8 0-21.333333-8.533333-21.333334-21.333333V87.466667C21.333333 51.2 51.2 21.333333 87.466667 21.333333H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333334s-10.666667 21.333333-21.333334 21.333333H87.466667C74.666667 64 64 74.666667 64 87.466667v108.8c0 12.8-8.533333 21.333333-21.333333 21.333333zM149.333333 1002.666667H87.466667C51.2 1002.666667 21.333333 972.8 21.333333 936.533333v-98.133333c0-12.8 8.533333-21.333333 21.333334-21.333333s21.333333 8.533333 21.333333 21.333333v98.133333c0 12.8 10.666667 23.466667 23.466667 23.466667H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333333s-10.666667 21.333333-21.333334 21.333334zM936.533333 1002.666667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333334s8.533333-21.333333 21.333334-21.333333h61.866666c12.8 0 23.466667-10.666667 23.466667-23.466667v-98.133333c0-12.8 8.533333-21.333333 21.333333-21.333333s21.333333 8.533333 21.333334 21.333333v98.133333c0 36.266667-29.866667 66.133333-66.133334 66.133334zM981.333333 217.6c-12.8 0-21.333333-8.533333-21.333333-21.333333V87.466667c0-12.8-10.666667-23.466667-23.466667-23.466667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333333s8.533333-21.333333 21.333334-21.333334h61.866666C972.8 21.333333 1002.666667 51.2 1002.666667 87.466667v108.8c0 12.8-8.533333 21.333333-21.333334 21.333333zM512 537.6c-106.666667 0-192-87.466667-192-192 0-106.666667 87.466667-192 192-192s192 87.466667 192 192c0 106.666667-87.466667 192-192 192z m0-341.333333c-83.2 0-149.333333 68.266667-149.333333 149.333333s68.266667 149.333333 149.333333 149.333333c83.2 0 149.333333-68.266667 149.333333-149.333333s-68.266667-149.333333-149.333333-149.333333zM759.466667 832H262.4c-21.333333 0-40.533333-10.666667-51.2-27.733333-12.8-17.066667-12.8-40.533333-6.4-59.733334C245.333333 650.666667 362.666667 554.666667 512 554.666667s266.666667 96 305.066667 189.866666c8.533333 19.2 6.4 42.666667-6.4 59.733334-10.666667 17.066667-29.866667 27.733333-51.2 27.733333zM512 597.333333c-128 0-232.533333 85.333333-266.666667 164.266667-2.133333 6.4-2.133333 12.8 2.133334 19.2 2.133333 6.4 8.533333 8.533333 14.933333 8.533333h497.066667c6.4 0 12.8-2.133333 17.066666-8.533333 4.266667-6.4 4.266667-12.8 2.133334-19.2C744.533333 682.666667 640 597.333333 512 597.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32z m-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792z m0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456c48.6 0 88-39.4 88-88s-39.4-88-88-88-88 39.4-88 88 39.4 88 88 88z m0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M752.779277 614.774544c22.772498 0 41.198849-18.466262 41.198849-41.195779 0-13.119284-6.122673-24.787464-15.663319-32.329517l0.212856-0.25993c-31.702207-24.541861-66.94621-44.657755-105.004413-59.222002 48.439015-41.559066 79.256028-103.114295 79.256028-171.951647 0-125.12133-101.463639-226.585993-226.585993-226.585993-125.123377 0-226.587016 101.464663-226.587016 226.585993 0 68.837352 30.818036 130.392581 79.257051 171.951647-154.571154 59.301823-264.565398 208.763415-264.646242 384.297793l0 0.079821c0.080844 22.689607 18.507195 41.118004 41.198849 41.118004 22.770451 0 41.116981-18.428398 41.196802-41.118004 0-181.727662 147.894851-329.58158 329.58158-329.58158 74.497474 0 143.081036 25.128238 198.294595 66.945187C731.868244 610.484682 741.817205 614.774544 752.779277 614.774544zM526.193284 454.008059c-79.498561 0-144.190342-64.692805-144.190342-144.192389 0-79.498561 64.693828-144.191366 144.190342-144.191366 79.498561 0 144.191366 64.692805 144.191366 144.191366S605.691845 454.008059 526.193284 454.008059zM909.926191 752.851423 848.129453 752.851423l0-61.798785c0.001023-17.057115-13.839719-30.897857-30.897857-30.897857-17.099073 0-30.897857 13.840742-30.897857 30.897857l0 61.798785-61.796738 0c-17.097026 0-30.896834 13.838695-30.896834 30.897857 0 17.057115 13.799808 30.897857 30.896834 30.897857l61.796738 0 0 61.796738c0 17.059162 13.798785 30.895811 30.897857 30.895811 17.058139 0 30.897857-13.836649 30.897857-30.895811l0-61.796738 61.796738 0c17.058139 0 30.897857-13.840742 30.897857-30.897857C940.824049 766.691142 926.985353 752.851423 909.926191 752.851423z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M597.333333 85.333333l256 256v512a85.333333 85.333333 0 0 1-85.333333 85.333334H256a85.333333 85.333333 0 0 1-85.333333-85.333334V170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334h341.333333m170.666667 768V384h-213.333333V170.666667H256v682.666666h512m-85.333333-85.333333l-106.666667-72.533333V768H341.333333v-213.333333h234.666667v72.533333L682.666667 554.666667v213.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="M853.333333 956.586667H170.666667c-66.030933 0-102.4-36.369067-102.4-102.4V256c0-60.1088 30.122667-95.6416 85.333333-101.5296V85.333333a17.066667 17.066667 0 0 1 17.066667-17.066666h682.666666a17.066667 17.066667 0 0 1 17.066667 17.066666v152.746667h68.266667a17.066667 17.066667 0 0 1 17.066666 17.066667v599.04c0 66.030933-36.369067 102.4-102.4 102.4zM170.666667 187.733333c-47.223467 0-68.266667 21.0432-68.266667 68.266667v598.186667c0 47.223467 21.0432 68.266667 68.266667 68.266666h682.666666c47.223467 0 68.266667-21.0432 68.266667-68.266666v-581.973334H512a17.066667 17.066667 0 0 1-17.066667-17.066666V187.733333H170.666667z m358.4 50.346667h307.2V102.4H187.733333v51.2h324.266667a17.066667 17.066667 0 0 1 17.066667 17.066667v67.413333zM341.333333 768V426.666667h341.333334v341.333333H341.333333z m103.253334-256v170.666667L597.333333 597.333333l-152.746666-85.333333zM682.666667 785.066667H341.333333a17.066667 17.066667 0 0 1-17.066666-17.066667V426.666667a17.066667 17.066667 0 0 1 17.066666-17.066667h341.333334a17.066667 17.066667 0 0 1 17.066666 17.066667v341.333333a17.066667 17.066667 0 0 1-17.066666 17.066667z m-324.266667-34.133334h307.2V443.733333H358.4v307.2z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#00ff00" d="M42.666667 217.6c-12.8 0-21.333333-8.533333-21.333334-21.333333V87.466667C21.333333 51.2 51.2 21.333333 87.466667 21.333333H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333334s-10.666667 21.333333-21.333334 21.333333H87.466667C74.666667 64 64 74.666667 64 87.466667v108.8c0 12.8-8.533333 21.333333-21.333333 21.333333zM149.333333 1002.666667H87.466667C51.2 1002.666667 21.333333 972.8 21.333333 936.533333v-98.133333c0-12.8 8.533333-21.333333 21.333334-21.333333s21.333333 8.533333 21.333333 21.333333v98.133333c0 12.8 10.666667 23.466667 23.466667 23.466667H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333333s-10.666667 21.333333-21.333334 21.333334zM936.533333 1002.666667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333334s8.533333-21.333333 21.333334-21.333333h61.866666c12.8 0 23.466667-10.666667 23.466667-23.466667v-98.133333c0-12.8 8.533333-21.333333 21.333333-21.333333s21.333333 8.533333 21.333334 21.333333v98.133333c0 36.266667-29.866667 66.133333-66.133334 66.133334zM981.333333 217.6c-12.8 0-21.333333-8.533333-21.333333-21.333333V87.466667c0-12.8-10.666667-23.466667-23.466667-23.466667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333333s8.533333-21.333333 21.333334-21.333334h61.866666C972.8 21.333333 1002.666667 51.2 1002.666667 87.466667v108.8c0 12.8-8.533333 21.333333-21.333334 21.333333zM512 537.6c-106.666667 0-192-87.466667-192-192 0-106.666667 87.466667-192 192-192s192 87.466667 192 192c0 106.666667-87.466667 192-192 192z m0-341.333333c-83.2 0-149.333333 68.266667-149.333333 149.333333s68.266667 149.333333 149.333333 149.333333c83.2 0 149.333333-68.266667 149.333333-149.333333s-68.266667-149.333333-149.333333-149.333333zM759.466667 832H262.4c-21.333333 0-40.533333-10.666667-51.2-27.733333-12.8-17.066667-12.8-40.533333-6.4-59.733334C245.333333 650.666667 362.666667 554.666667 512 554.666667s266.666667 96 305.066667 189.866666c8.533333 19.2 6.4 42.666667-6.4 59.733334-10.666667 17.066667-29.866667 27.733333-51.2 27.733333zM512 597.333333c-128 0-232.533333 85.333333-266.666667 164.266667-2.133333 6.4-2.133333 12.8 2.133334 19.2 2.133333 6.4 8.533333 8.533333 14.933333 8.533333h497.066667c6.4 0 12.8-2.133333 17.066666-8.533333 4.266667-6.4 4.266667-12.8 2.133334-19.2C744.533333 682.666667 640 597.333333 512 597.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#00ff00" d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32z m-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792z m0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456c48.6 0 88-39.4 88-88s-39.4-88-88-88-88 39.4-88 88 39.4 88 88 88z m0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#00ff00" d="M752.779277 614.774544c22.772498 0 41.198849-18.466262 41.198849-41.195779 0-13.119284-6.122673-24.787464-15.663319-32.329517l0.212856-0.25993c-31.702207-24.541861-66.94621-44.657755-105.004413-59.222002 48.439015-41.559066 79.256028-103.114295 79.256028-171.951647 0-125.12133-101.463639-226.585993-226.585993-226.585993-125.123377 0-226.587016 101.464663-226.587016 226.585993 0 68.837352 30.818036 130.392581 79.257051 171.951647-154.571154 59.301823-264.565398 208.763415-264.646242 384.297793l0 0.079821c0.080844 22.689607 18.507195 41.118004 41.198849 41.118004 22.770451 0 41.116981-18.428398 41.196802-41.118004 0-181.727662 147.894851-329.58158 329.58158-329.58158 74.497474 0 143.081036 25.128238 198.294595 66.945187C731.868244 610.484682 741.817205 614.774544 752.779277 614.774544zM526.193284 454.008059c-79.498561 0-144.190342-64.692805-144.190342-144.192389 0-79.498561 64.693828-144.191366 144.190342-144.191366 79.498561 0 144.191366 64.692805 144.191366 144.191366S605.691845 454.008059 526.193284 454.008059zM909.926191 752.851423 848.129453 752.851423l0-61.798785c0.001023-17.057115-13.839719-30.897857-30.897857-30.897857-17.099073 0-30.897857 13.840742-30.897857 30.897857l0 61.798785-61.796738 0c-17.097026 0-30.896834 13.838695-30.896834 30.897857 0 17.057115 13.799808 30.897857 30.896834 30.897857l61.796738 0 0 61.796738c0 17.059162 13.798785 30.895811 30.897857 30.895811 17.058139 0 30.897857-13.836649 30.897857-30.895811l0-61.796738 61.796738 0c17.058139 0 30.897857-13.840742 30.897857-30.897857C940.824049 766.691142 926.985353 752.851423 909.926191 752.851423z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff0000" d="M42.666667 217.6c-12.8 0-21.333333-8.533333-21.333334-21.333333V87.466667C21.333333 51.2 51.2 21.333333 87.466667 21.333333H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333334s-10.666667 21.333333-21.333334 21.333333H87.466667C74.666667 64 64 74.666667 64 87.466667v108.8c0 12.8-8.533333 21.333333-21.333333 21.333333zM149.333333 1002.666667H87.466667C51.2 1002.666667 21.333333 972.8 21.333333 936.533333v-98.133333c0-12.8 8.533333-21.333333 21.333334-21.333333s21.333333 8.533333 21.333333 21.333333v98.133333c0 12.8 10.666667 23.466667 23.466667 23.466667H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333333s-10.666667 21.333333-21.333334 21.333334zM936.533333 1002.666667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333334s8.533333-21.333333 21.333334-21.333333h61.866666c12.8 0 23.466667-10.666667 23.466667-23.466667v-98.133333c0-12.8 8.533333-21.333333 21.333333-21.333333s21.333333 8.533333 21.333334 21.333333v98.133333c0 36.266667-29.866667 66.133333-66.133334 66.133334zM981.333333 217.6c-12.8 0-21.333333-8.533333-21.333333-21.333333V87.466667c0-12.8-10.666667-23.466667-23.466667-23.466667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333333s8.533333-21.333333 21.333334-21.333334h61.866666C972.8 21.333333 1002.666667 51.2 1002.666667 87.466667v108.8c0 12.8-8.533333 21.333333-21.333334 21.333333zM512 537.6c-106.666667 0-192-87.466667-192-192 0-106.666667 87.466667-192 192-192s192 87.466667 192 192c0 106.666667-87.466667 192-192 192z m0-341.333333c-83.2 0-149.333333 68.266667-149.333333 149.333333s68.266667 149.333333 149.333333 149.333333c83.2 0 149.333333-68.266667 149.333333-149.333333s-68.266667-149.333333-149.333333-149.333333zM759.466667 832H262.4c-21.333333 0-40.533333-10.666667-51.2-27.733333-12.8-17.066667-12.8-40.533333-6.4-59.733334C245.333333 650.666667 362.666667 554.666667 512 554.666667s266.666667 96 305.066667 189.866666c8.533333 19.2 6.4 42.666667-6.4 59.733334-10.666667 17.066667-29.866667 27.733333-51.2 27.733333zM512 597.333333c-128 0-232.533333 85.333333-266.666667 164.266667-2.133333 6.4-2.133333 12.8 2.133334 19.2 2.133333 6.4 8.533333 8.533333 14.933333 8.533333h497.066667c6.4 0 12.8-2.133333 17.066666-8.533333 4.266667-6.4 4.266667-12.8 2.133334-19.2C744.533333 682.666667 640 597.333333 512 597.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff0000" d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32z m-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792z m0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456c48.6 0 88-39.4 88-88s-39.4-88-88-88-88 39.4-88 88 39.4 88 88 88z m0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff0000" d="M752.779277 614.774544c22.772498 0 41.198849-18.466262 41.198849-41.195779 0-13.119284-6.122673-24.787464-15.663319-32.329517l0.212856-0.25993c-31.702207-24.541861-66.94621-44.657755-105.004413-59.222002 48.439015-41.559066 79.256028-103.114295 79.256028-171.951647 0-125.12133-101.463639-226.585993-226.585993-226.585993-125.123377 0-226.587016 101.464663-226.587016 226.585993 0 68.837352 30.818036 130.392581 79.257051 171.951647-154.571154 59.301823-264.565398 208.763415-264.646242 384.297793l0 0.079821c0.080844 22.689607 18.507195 41.118004 41.198849 41.118004 22.770451 0 41.116981-18.428398 41.196802-41.118004 0-181.727662 147.894851-329.58158 329.58158-329.58158 74.497474 0 143.081036 25.128238 198.294595 66.945187C731.868244 610.484682 741.817205 614.774544 752.779277 614.774544zM526.193284 454.008059c-79.498561 0-144.190342-64.692805-144.190342-144.192389 0-79.498561 64.693828-144.191366 144.190342-144.191366 79.498561 0 144.191366 64.692805 144.191366 144.191366S605.691845 454.008059 526.193284 454.008059zM909.926191 752.851423 848.129453 752.851423l0-61.798785c0.001023-17.057115-13.839719-30.897857-30.897857-30.897857-17.099073 0-30.897857 13.840742-30.897857 30.897857l0 61.798785-61.796738 0c-17.097026 0-30.896834 13.838695-30.896834 30.897857 0 17.057115 13.799808 30.897857 30.896834 30.897857l61.796738 0 0 61.796738c0 17.059162 13.798785 30.895811 30.897857 30.895811 17.058139 0 30.897857-13.836649 30.897857-30.895811l0-61.796738 61.796738 0c17.058139 0 30.897857-13.840742 30.897857-30.897857C940.824049 766.691142 926.985353 752.851423 909.926191 752.851423z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff0000" d="M597.333333 85.333333l256 256v512a85.333333 85.333333 0 0 1-85.333333 85.333334H256a85.333333 85.333333 0 0 1-85.333333-85.333334V170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334h341.333333m170.666667 768V384h-213.333333V170.666667H256v682.666666h512m-85.333333-85.333333l-106.666667-72.533333V768H341.333333v-213.333333h234.666667v72.533333L682.666667 554.666667v213.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ff0000" d="M853.333333 956.586667H170.666667c-66.030933 0-102.4-36.369067-102.4-102.4V256c0-60.1088 30.122667-95.6416 85.333333-101.5296V85.333333a17.066667 17.066667 0 0 1 17.066667-17.066666h682.666666a17.066667 17.066667 0 0 1 17.066667 17.066666v152.746667h68.266667a17.066667 17.066667 0 0 1 17.066666 17.066667v599.04c0 66.030933-36.369067 102.4-102.4 102.4zM170.666667 187.733333c-47.223467 0-68.266667 21.0432-68.266667 68.266667v598.186667c0 47.223467 21.0432 68.266667 68.266667 68.266666h682.666666c47.223467 0 68.266667-21.0432 68.266667-68.266666v-581.973334H512a17.066667 17.066667 0 0 1-17.066667-17.066666V187.733333H170.666667z m358.4 50.346667h307.2V102.4H187.733333v51.2h324.266667a17.066667 17.066667 0 0 1 17.066667 17.066667v67.413333zM341.333333 768V426.666667h341.333334v341.333333H341.333333z m103.253334-256v170.666667L597.333333 597.333333l-152.746666-85.333333zM682.666667 785.066667H341.333333a17.066667 17.066667 0 0 1-17.066666-17.066667V426.666667a17.066667 17.066667 0 0 1 17.066666-17.066667h341.333334a17.066667 17.066667 0 0 1 17.066666 17.066667v341.333333a17.066667 17.066667 0 0 1-17.066666 17.066667z m-324.266667-34.133334h307.2V443.733333H358.4v307.2z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M42.666667 217.6c-12.8 0-21.333333-8.533333-21.333334-21.333333V87.466667C21.333333 51.2 51.2 21.333333 87.466667 21.333333H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333334s-10.666667 21.333333-21.333334 21.333333H87.466667C74.666667 64 64 74.666667 64 87.466667v108.8c0 12.8-8.533333 21.333333-21.333333 21.333333zM149.333333 1002.666667H87.466667C51.2 1002.666667 21.333333 972.8 21.333333 936.533333v-98.133333c0-12.8 8.533333-21.333333 21.333334-21.333333s21.333333 8.533333 21.333333 21.333333v98.133333c0 12.8 10.666667 23.466667 23.466667 23.466667H149.333333c12.8 0 21.333333 8.533333 21.333334 21.333333s-10.666667 21.333333-21.333334 21.333334zM936.533333 1002.666667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333334s8.533333-21.333333 21.333334-21.333333h61.866666c12.8 0 23.466667-10.666667 23.466667-23.466667v-98.133333c0-12.8 8.533333-21.333333 21.333333-21.333333s21.333333 8.533333 21.333334 21.333333v98.133333c0 36.266667-29.866667 66.133333-66.133334 66.133334zM981.333333 217.6c-12.8 0-21.333333-8.533333-21.333333-21.333333V87.466667c0-12.8-10.666667-23.466667-23.466667-23.466667H874.666667c-12.8 0-21.333333-8.533333-21.333334-21.333333s8.533333-21.333333 21.333334-21.333334h61.866666C972.8 21.333333 1002.666667 51.2 1002.666667 87.466667v108.8c0 12.8-8.533333 21.333333-21.333334 21.333333zM512 537.6c-106.666667 0-192-87.466667-192-192 0-106.666667 87.466667-192 192-192s192 87.466667 192 192c0 106.666667-87.466667 192-192 192z m0-341.333333c-83.2 0-149.333333 68.266667-149.333333 149.333333s68.266667 149.333333 149.333333 149.333333c83.2 0 149.333333-68.266667 149.333333-149.333333s-68.266667-149.333333-149.333333-149.333333zM759.466667 832H262.4c-21.333333 0-40.533333-10.666667-51.2-27.733333-12.8-17.066667-12.8-40.533333-6.4-59.733334C245.333333 650.666667 362.666667 554.666667 512 554.666667s266.666667 96 305.066667 189.866666c8.533333 19.2 6.4 42.666667-6.4 59.733334-10.666667 17.066667-29.866667 27.733333-51.2 27.733333zM512 597.333333c-128 0-232.533333 85.333333-266.666667 164.266667-2.133333 6.4-2.133333 12.8 2.133334 19.2 2.133333 6.4 8.533333 8.533333 14.933333 8.533333h497.066667c6.4 0 12.8-2.133333 17.066666-8.533333 4.266667-6.4 4.266667-12.8 2.133334-19.2C744.533333 682.666667 640 597.333333 512 597.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32z m-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792z m0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2zM304 456c48.6 0 88-39.4 88-88s-39.4-88-88-88-88 39.4-88 88 39.4 88 88 88z m0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M752.779277 614.774544c22.772498 0 41.198849-18.466262 41.198849-41.195779 0-13.119284-6.122673-24.787464-15.663319-32.329517l0.212856-0.25993c-31.702207-24.541861-66.94621-44.657755-105.004413-59.222002 48.439015-41.559066 79.256028-103.114295 79.256028-171.951647 0-125.12133-101.463639-226.585993-226.585993-226.585993-125.123377 0-226.587016 101.464663-226.587016 226.585993 0 68.837352 30.818036 130.392581 79.257051 171.951647-154.571154 59.301823-264.565398 208.763415-264.646242 384.297793l0 0.079821c0.080844 22.689607 18.507195 41.118004 41.198849 41.118004 22.770451 0 41.116981-18.428398 41.196802-41.118004 0-181.727662 147.894851-329.58158 329.58158-329.58158 74.497474 0 143.081036 25.128238 198.294595 66.945187C731.868244 610.484682 741.817205 614.774544 752.779277 614.774544zM526.193284 454.008059c-79.498561 0-144.190342-64.692805-144.190342-144.192389 0-79.498561 64.693828-144.191366 144.190342-144.191366 79.498561 0 144.191366 64.692805 144.191366 144.191366S605.691845 454.008059 526.193284 454.008059zM909.926191 752.851423 848.129453 752.851423l0-61.798785c0.001023-17.057115-13.839719-30.897857-30.897857-30.897857-17.099073 0-30.897857 13.840742-30.897857 30.897857l0 61.798785-61.796738 0c-17.097026 0-30.896834 13.838695-30.896834 30.897857 0 17.057115 13.799808 30.897857 30.896834 30.897857l61.796738 0 0 61.796738c0 17.059162 13.798785 30.895811 30.897857 30.895811 17.058139 0 30.897857-13.836649 30.897857-30.895811l0-61.796738 61.796738 0c17.058139 0 30.897857-13.840742 30.897857-30.897857C940.824049 766.691142 926.985353 752.851423 909.926191 752.851423z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M597.333333 85.333333l256 256v512a85.333333 85.333333 0 0 1-85.333333 85.333334H256a85.333333 85.333333 0 0 1-85.333333-85.333334V170.666667a85.333333 85.333333 0 0 1 85.333333-85.333334h341.333333m170.666667 768V384h-213.333333V170.666667H256v682.666666h512m-85.333333-85.333333l-106.666667-72.533333V768H341.333333v-213.333333h234.666667v72.533333L682.666667 554.666667v213.333333z" /></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#ffffff" d="M853.333333 956.586667H170.666667c-66.030933 0-102.4-36.369067-102.4-102.4V256c0-60.1088 30.122667-95.6416 85.333333-101.5296V85.333333a17.066667 17.066667 0 0 1 17.066667-17.066666h682.666666a17.066667 17.066667 0 0 1 17.066667 17.066666v152.746667h68.266667a17.066667 17.066667 0 0 1 17.066666 17.066667v599.04c0 66.030933-36.369067 102.4-102.4 102.4zM170.666667 187.733333c-47.223467 0-68.266667 21.0432-68.266667 68.266667v598.186667c0 47.223467 21.0432 68.266667 68.266667 68.266666h682.666666c47.223467 0 68.266667-21.0432 68.266667-68.266666v-581.973334H512a17.066667 17.066667 0 0 1-17.066667-17.066666V187.733333H170.666667z m358.4 50.346667h307.2V102.4H187.733333v51.2h324.266667a17.066667 17.066667 0 0 1 17.066667 17.066667v67.413333zM341.333333 768V426.666667h341.333334v341.333333H341.333333z m103.253334-256v170.666667L597.333333 597.333333l-152.746666-85.333333zM682.666667 785.066667H341.333333a17.066667 17.066667 0 0 1-17.066666-17.066667V426.666667a17.066667 17.066667 0 0 1 17.066666-17.066667h341.333334a17.066667 17.066667 0 0 1 17.066666 17.066667v341.333333a17.066667 17.066667 0 0 1-17.066666 17.066667z m-324.266667-34.133334h307.2V443.733333H358.4v307.2z" /></svg>
\ No newline at end of file
...@@ -19,7 +19,7 @@ if("Debug" STREQUAL CMAKE_BUILD_TYPE) ...@@ -19,7 +19,7 @@ if("Debug" STREQUAL CMAKE_BUILD_TYPE)
add_definitions(-D_DEBUG) add_definitions(-D_DEBUG)
endif() endif()
OPTION(ENABLE_DOWNLOAD_MODUEL "Enable automation download moduel files" OFF) OPTION(ENABLE_DOWNLOAD_MODULE "Enable automation download module files" OFF)
#需要的QT组件 #需要的QT组件
if(CMAKE_VERSION VERSION_LESS "3.7.0") if(CMAKE_VERSION VERSION_LESS "3.7.0")
...@@ -33,7 +33,7 @@ if(NOT DEFINED QT_VERSION_MAJOR) ...@@ -33,7 +33,7 @@ if(NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core) find_package(QT NAMES Qt6 Qt5 COMPONENTS Core)
endif() endif()
if(QT_VERSION_MAJOR GREATER_EQUAL 6) if(QT_VERSION_MAJOR GREATER_EQUAL 6)
LIST(APPEND QT_COMPONENTS multimediawidgets) LIST(APPEND QT_COMPONENTS MultimediaWidgets Core5Compat)
endif() endif()
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${QT_COMPONENTS}) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${QT_COMPONENTS})
message("QT_VERSION:${Qt${QT_VERSION_MAJOR}_VERSION}") message("QT_VERSION:${Qt${QT_VERSION_MAJOR}_VERSION}")
...@@ -212,5 +212,5 @@ endif() ...@@ -212,5 +212,5 @@ endif()
message(STATUS "== Build shared library: ${BUILD_SHARED_LIBS}") message(STATUS "== Build shared library: ${BUILD_SHARED_LIBS}")
message(STATUS "== Build arch: ${BUILD_ARCH}") message(STATUS "== Build arch: ${BUILD_ARCH}")
message(STATUS "== Build applcation: ${BUILD_APP}") message(STATUS "== Build application: ${BUILD_APP}")
message(STATUS "== Build automation download: ${ENABLE_DOWNLOAD_MODUEL}") message(STATUS "== Build automation download: ${ENABLE_DOWNLOAD_MODULE}")
...@@ -82,7 +82,7 @@ Function InstallVC ...@@ -82,7 +82,7 @@ Function InstallVC
ClearErrors ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"
; check regist ; check register
IfErrors 0 VSRedistInstalled IfErrors 0 VSRedistInstalled
Exec "$INSTDIR\bin\vcredist_x86.exe /q /norestart" Exec "$INSTDIR\bin\vcredist_x86.exe /q /norestart"
StrCpy $R0 "-1" StrCpy $R0 "-1"
...@@ -98,7 +98,7 @@ Function InstallVC64 ...@@ -98,7 +98,7 @@ Function InstallVC64
ClearErrors ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"
; check regist ; check register
IfErrors 0 VSRedistInstalled IfErrors 0 VSRedistInstalled
Exec "$INSTDIR\bin\vcredist_x64.exe /q /norestart" Exec "$INSTDIR\bin\vcredist_x64.exe /q /norestart"
StrCpy $R0 "-1" StrCpy $R0 "-1"
......
...@@ -14,7 +14,7 @@ case "$1" in ...@@ -14,7 +14,7 @@ case "$1" in
install|*) install|*)
echo "install ..." echo "install ..."
# Install destop # Install desktop
if [ -f /usr/share/applications/FaceRecognizer.desktop ]; then if [ -f /usr/share/applications/FaceRecognizer.desktop ]; then
rm /usr/share/applications/FaceRecognizer.desktop rm /usr/share/applications/FaceRecognizer.desktop
fi fi
......
...@@ -5,20 +5,30 @@ ...@@ -5,20 +5,30 @@
#include <QThread> #include <QThread>
#include <QTime> #include <QTime>
#include <QVideoFrame> #include <QVideoFrame>
#include <QVideoSurfaceFormat>
#include <QImage> #include <QImage>
#include <QDebug> #include <QDebug>
CCameraQtCaptureVideoFrame::CCameraQtCaptureVideoFrame(QObject *parent) : CCameraQtCaptureVideoFrame::CCameraQtCaptureVideoFrame(QObject *parent) :
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QVideoSink(parent)
#else
QAbstractVideoSurface(parent) QAbstractVideoSurface(parent)
#endif
{ {
m_Angle = 0; m_Angle = 0;
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
bool check = connect(this, SIGNAL(videoFrameChanged(const QVideoFrame&)),
this, SLOT(present(const QVideoFrame&)));
Q_ASSERT(check);
#endif
} }
CCameraQtCaptureVideoFrame::~CCameraQtCaptureVideoFrame() CCameraQtCaptureVideoFrame::~CCameraQtCaptureVideoFrame()
{ {
qDebug() << "CCameraQtCaptureVideoFrame::~CCameraQtCaptureVideoFrame()";
} }
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
//选择需要捕获视频帧的格式 //选择需要捕获视频帧的格式
QList<QVideoFrame::PixelFormat> QList<QVideoFrame::PixelFormat>
CCameraQtCaptureVideoFrame::supportedPixelFormats( CCameraQtCaptureVideoFrame::supportedPixelFormats(
...@@ -60,28 +70,25 @@ CCameraQtCaptureVideoFrame::supportedPixelFormats( ...@@ -60,28 +70,25 @@ CCameraQtCaptureVideoFrame::supportedPixelFormats(
return QList<QVideoFrame::PixelFormat>(); return QList<QVideoFrame::PixelFormat>();
} }
} }
/* #endif //#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
bool CCameraQtCaptureVideoFrame::isFormatSupported(const QVideoSurfaceFormat &format) const
{
const QImage::Format imageFormat = QVideoFrame::imageFormatFromPixelFormat(format.pixelFormat());
const QSize size = format.frameSize();
qDebug() << "format:" << format.pixelFormat();
return imageFormat != QImage::Format_Invalid
&& !size.isEmpty()
&& format.handleType() == QAbstractVideoBuffer::NoHandle;
}//*/
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
void CCameraQtCaptureVideoFrame::present(const QVideoFrame &frame)
#else
bool CCameraQtCaptureVideoFrame::present(const QVideoFrame &frame) bool CCameraQtCaptureVideoFrame::present(const QVideoFrame &frame)
#endif
{ {
emit sigCaptureFrame(frame); emit sigCaptureFrame(frame);
PERFORMANCE(present) PERFORMANCE(present)
QImage img = CImageTool::Instance()->ConverFormatToRGB888(frame); QImage img = CImageTool::Instance()->ConverFormatToRGB888(frame);
PERFORMANCE_ADD_TIME(present, PERFORMANCE_ADD_TIME(present,
"conver format to RBG888, rotation:" + QString::number(m_Angle)) "convert format to RBG888, rotation:" + QString::number(m_Angle))
if(m_Angle) if(m_Angle)
img = img.transformed(QTransform().rotate(-1 * m_Angle)); img = img.transformed(QTransform().rotate(-1 * m_Angle));
emit sigCaptureFrame(img); emit sigCaptureFrame(img);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
return true; return true;
#endif
} }
int CCameraQtCaptureVideoFrame::SetCameraAngle(int angle) int CCameraQtCaptureVideoFrame::SetCameraAngle(int angle)
......
/* /*
* 作者:康林(msn、email: kl222@126.com) * 作者:康林 (Email: kl222@126.com)
* *
* 从摄像头(QCarmera)或者(Player)中捕获视频帧。 * 从摄像头(QCarmera)或者(Player)中捕获视频帧。
* 注意:android后景摄像头捕获的视频翻转-90度,前景摄像头翻转90度。 * 注意:android后景摄像头捕获的视频翻转-90度,前景摄像头翻转90度。
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
#define CAPTUREVIDEOFRAME_H #define CAPTUREVIDEOFRAME_H
#include <QtGlobal> #include <QtGlobal>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
#include <QVideoSink>
#else
#include <QAbstractVideoSurface> #include <QAbstractVideoSurface>
#endif #endif
#ifdef ANDROID #ifdef ANDROID
...@@ -58,7 +60,11 @@ ...@@ -58,7 +60,11 @@
* @ingroup RABBITIM_IMPLEMENT_CAMERA_QT * @ingroup RABBITIM_IMPLEMENT_CAMERA_QT
*/ */
class FACERECOGNIZER_EXPORT CCameraQtCaptureVideoFrame class FACERECOGNIZER_EXPORT CCameraQtCaptureVideoFrame
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
: public QVideoSink
#else
: public QAbstractVideoSurface : public QAbstractVideoSurface
#endif
{ {
Q_OBJECT Q_OBJECT
Q_CLASSINFO("Author", "Kang Lin <kl222@126.com>") Q_CLASSINFO("Author", "Kang Lin <kl222@126.com>")
...@@ -67,16 +73,21 @@ public: ...@@ -67,16 +73,21 @@ public:
explicit CCameraQtCaptureVideoFrame(QObject *parent = nullptr); explicit CCameraQtCaptureVideoFrame(QObject *parent = nullptr);
virtual ~CCameraQtCaptureVideoFrame(); virtual ~CCameraQtCaptureVideoFrame();
//设置支持的捕获格式 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
//设置支持的捕获格式
virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats( virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const;
//bool isFormatSupported(const QVideoSurfaceFormat &format) const;
int SetCameraAngle(int angle);
virtual bool present(const QVideoFrame &frame); virtual bool present(const QVideoFrame &frame);
#else
public Q_SLOTS:
void present(const QVideoFrame &frame);
#endif
int SetCameraAngle(int angle);
signals: signals:
//从摄像头捕获的原始帧 //从摄像头捕获的原始帧
void sigCaptureFrame(const QVideoFrame &frame); void sigCaptureFrame(const QVideoFrame &frame);
void sigCaptureFrame(const QImage &frame); void sigCaptureFrame(const QImage &frame);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "facerecognizer_export.h" #include "facerecognizer_export.h"
/** /**
* @brief The CConverFormat class. It is conver format of image, * @brief The CConverFormat class. It is convert format of image,
* implemented by plugin * implemented by plugin
*/ */
class FACERECOGNIZER_EXPORT CConverFormat : public QObject class FACERECOGNIZER_EXPORT CConverFormat : public QObject
......
...@@ -17,7 +17,7 @@ class CFace; ...@@ -17,7 +17,7 @@ class CFace;
class FACERECOGNIZER_EXPORT CDetector : public CFaceBase class FACERECOGNIZER_EXPORT CDetector : public CFaceBase
{ {
Q_OBJECT Q_OBJECT
Q_CLASSINFO("Description", "Dectector interface") Q_CLASSINFO("Description", "Detector interface")
public: public:
CDetector(CFace* pFace = nullptr, QObject *parent = nullptr); CDetector(CFace* pFace = nullptr, QObject *parent = nullptr);
......
...@@ -58,7 +58,15 @@ CImageTool* CImageTool::Instance() ...@@ -58,7 +58,15 @@ CImageTool* CImageTool::Instance()
// https://blog.csdn.net/byhook/article/details/84037338 // https://blog.csdn.net/byhook/article/details/84037338
// https://blog.csdn.net/cgwang_1580/article/details/79595958 // https://blog.csdn.net/cgwang_1580/article/details/79595958
QImage CImageTool::ConverFormatToRGB888(const QVideoFrame &frame) QImage CImageTool::ConverFormatToRGB888(const QVideoFrame &frame)
{ {
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
QImage img = frame.toImage();
if(QImage::Format_RGB888 != img.format())
{
img = img.convertToFormat(QImage::Format_RGB888);
}
return img;
#else
switch(frame.pixelFormat()) switch(frame.pixelFormat())
{ {
case QVideoFrame::Format_YUV420P: case QVideoFrame::Format_YUV420P:
...@@ -120,13 +128,14 @@ QImage CImageTool::ConverFormatToRGB888(const QVideoFrame &frame) ...@@ -120,13 +128,14 @@ QImage CImageTool::ConverFormatToRGB888(const QVideoFrame &frame)
videoFrame.width(), videoFrame.height()); videoFrame.width(), videoFrame.height());
break; break;
default: default:
qCritical(logImageTool) << "Don't implement conver format:" qCritical(logImageTool) << "Don't implement convert format:"
<< videoFrame.pixelFormat(); << videoFrame.pixelFormat();
} }
} }
}while(0); }while(0);
videoFrame.unmap(); videoFrame.unmap();
return img; return img;
#endif
} }
#if HAVE_LIBYUV #if HAVE_LIBYUV
...@@ -225,7 +234,7 @@ QImage CImageTool::LibyuvConverFormatToRGB888(const QVideoFrame &frame) ...@@ -225,7 +234,7 @@ QImage CImageTool::LibyuvConverFormatToRGB888(const QVideoFrame &frame)
} }
break; break;
default: default:
qWarning(logImageTool) << "LibyuvConverFormatToRGB888 Don't implement conver format:" qWarning(logImageTool) << "LibyuvConverFormatToRGB888 Don't implement convert format:"
<< videoFrame.pixelFormat(); << videoFrame.pixelFormat();
} }
...@@ -318,7 +327,7 @@ int CImageTool::FindPlugins(QDir dir, QStringList filters) ...@@ -318,7 +327,7 @@ int CImageTool::FindPlugins(QDir dir, QStringList filters)
m_pConverFormat = qobject_cast<CConverFormat*>(plugin); m_pConverFormat = qobject_cast<CConverFormat*>(plugin);
if(m_pConverFormat) if(m_pConverFormat)
{ {
qInfo(logImageTool) << "Load conver format plugin:" qInfo(logImageTool) << "Load convert format plugin:"
<< m_pConverFormat->getName(); << m_pConverFormat->getName();
return 0; return 0;
} }
......
...@@ -47,7 +47,7 @@ AVPixelFormat CConverFormatFFmpeg::QVideoFrameFormatToFFMpegPixFormat( ...@@ -47,7 +47,7 @@ AVPixelFormat CConverFormatFFmpeg::QVideoFrameFormatToFFMpegPixFormat(
return AV_PIX_FMT_YUV420P; return AV_PIX_FMT_YUV420P;
case QVideoFrame::Format_YV12: case QVideoFrame::Format_YV12:
default: default:
qCritical(logFFMPGE, "Don't conver format: %d", format); qCritical(logFFMPGE, "Don't convert format: %d", format);
return AV_PIX_FMT_NONE; return AV_PIX_FMT_NONE;
} }
} }
......
...@@ -53,7 +53,7 @@ int CDetectorLibfacedetection::Detect(const QImage &image, QVector<QRect> &faces ...@@ -53,7 +53,7 @@ int CDetectorLibfacedetection::Detect(const QImage &image, QVector<QRect> &faces
faces.push_back(r); faces.push_back(r);
} }
PERFORMANCE_ADD_TIME(Libfacedetection, "copy reture value") PERFORMANCE_ADD_TIME(Libfacedetection, "copy return value")
if(pBuffer) free(pBuffer); if(pBuffer) free(pBuffer);
return 0; return 0;
} }
...@@ -103,7 +103,7 @@ QImage CConverFormatOpenCV::onConverFormatToRGB888(const QVideoFrame &frame) ...@@ -103,7 +103,7 @@ QImage CConverFormatOpenCV::onConverFormatToRGB888(const QVideoFrame &frame)
default: default:
qWarning(logOpenCV) << "OpenCVConverFormatToRGB888 Don't conver format:" qWarning(logOpenCV) << "OpenCVConverFormatToRGB888 Don't convert format:"
<< videoFrame.pixelFormat(); << videoFrame.pixelFormat();
} }
......
...@@ -56,7 +56,7 @@ int CDetectorOpenCV::Detect(const QImage &image, QVector<QRect> &faces) ...@@ -56,7 +56,7 @@ int CDetectorOpenCV::Detect(const QImage &image, QVector<QRect> &faces)
PERFORMANCE_START(OpencvDectect) PERFORMANCE_START(OpencvDectect)
img = img.convertToFormat(QImage::Format_Grayscale8); img = img.convertToFormat(QImage::Format_Grayscale8);
PERFORMANCE_ADD_TIME(OpencvDectect, PERFORMANCE_ADD_TIME(OpencvDectect,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -35,7 +35,7 @@ int CDetectorOpenCVDNN::Detect(const QImage &image, QVector<QRect> &faces) ...@@ -35,7 +35,7 @@ int CDetectorOpenCVDNN::Detect(const QImage &image, QVector<QRect> &faces)
PERFORMANCE_START(OpencvDnnDectect) PERFORMANCE_START(OpencvDnnDectect)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(OpencvDnnDectect, PERFORMANCE_ADD_TIME(OpencvDnnDectect,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -51,7 +51,7 @@ int CLandmarkerOpenCV::Mark(const QImage &image, const QRect &face, QVector<QPoi ...@@ -51,7 +51,7 @@ int CLandmarkerOpenCV::Mark(const QImage &image, const QRect &face, QVector<QPoi
PERFORMANCE_START(OpenCVMark) PERFORMANCE_START(OpenCVMark)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(OpenCVMark, PERFORMANCE_ADD_TIME(OpenCVMark,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
...@@ -100,7 +100,7 @@ int CLandmarkerOpenCV::Mark(const QImage &image, ...@@ -100,7 +100,7 @@ int CLandmarkerOpenCV::Mark(const QImage &image,
PERFORMANCE_START(OpenCVMark) PERFORMANCE_START(OpenCVMark)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(OpenCVMark, PERFORMANCE_ADD_TIME(OpenCVMark,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -31,7 +31,7 @@ endif() ...@@ -31,7 +31,7 @@ endif()
# Install model files # Install model files
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Opencv") if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Opencv")
if(ENABLE_DOWNLOAD_MODUEL) if(ENABLE_DOWNLOAD_MODULE)
DOWNLOAD(FILENAME "deploy.prototxt" DOWNLOAD(FILENAME "deploy.prototxt"
HASH 6e1471d86330a9e7f9f5738318ede387 HASH 6e1471d86330a9e7f9f5738318ede387
URL "https://github.com/opencv/opencv/raw/master/samples/dnn/face_detector/" URL "https://github.com/opencv/opencv/raw/master/samples/dnn/face_detector/"
...@@ -53,11 +53,11 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Opencv") ...@@ -53,11 +53,11 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Opencv")
DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/Opencv" DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/Opencv"
STATUS RETVAL RELATIVE_URL) STATUS RETVAL RELATIVE_URL)
else() else()
message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODUEL to ON " message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODULE to ON "
" to automation download, or manual download Opencv from" " to automation download, or manual download Opencv from"
" https://github.com/opencv/opencv , then download model files from" " https://github.com/opencv/opencv , then download model files from"
" [opencv source directory]/samples/dnn/face_detector " " [opencv source directory]/samples/dnn/face_detector "
" execute download_weights.py to downlaod model files and copy" " execute download_weights.py to download model files and copy"
" there to ${CMAKE_SOURCE_DIR}/model/Opencv") " there to ${CMAKE_SOURCE_DIR}/model/Opencv")
endif() endif()
endif() endif()
......
...@@ -51,7 +51,7 @@ qint64 CRecognizerOpenCV::Register(const QImage &image, const QRect &face) ...@@ -51,7 +51,7 @@ qint64 CRecognizerOpenCV::Register(const QImage &image, const QRect &face)
PERFORMANCE_START(RecognizerOpenCV) PERFORMANCE_START(RecognizerOpenCV)
img = img.convertToFormat(QImage::Format_Grayscale8); img = img.convertToFormat(QImage::Format_Grayscale8);
PERFORMANCE_ADD_TIME(RecognizerOpenCV, PERFORMANCE_ADD_TIME(RecognizerOpenCV,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -33,7 +33,7 @@ set(HEADER_FILES ...@@ -33,7 +33,7 @@ set(HEADER_FILES
# Install model files # Install model files
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta") if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta")
if(ENABLE_DOWNLOAD_MODUEL) if(ENABLE_DOWNLOAD_MODULE)
DOWNLOAD(FILENAME "fd_2_00.dat" DOWNLOAD(FILENAME "fd_2_00.dat"
HASH e88669e5f1301ca56162de8aef1fd5d5 HASH e88669e5f1301ca56162de8aef1fd5d5
URL "https://github.com/KangLin/SeetaFace2/releases/download/model/" URL "https://github.com/KangLin/SeetaFace2/releases/download/model/"
...@@ -54,12 +54,12 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta") ...@@ -54,12 +54,12 @@ if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta")
URL "https://github.com/KangLin/SeetaFace2/releases/download/model/" URL "https://github.com/KangLin/SeetaFace2/releases/download/model/"
DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/Seeta" DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/Seeta"
STATUS retval RELATIVE_URL) STATUS retval RELATIVE_URL)
else(ENABLE_DOWNLOAD_MODUEL) else(ENABLE_DOWNLOAD_MODULE)
message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODUEL to ON " message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODULE to ON "
" to automation download, or manual download Seeta model files from" " to automation download, or manual download Seeta model files from"
" https://github.com/KangLin/SeetaFace2/releases/tag/model" " https://github.com/KangLin/SeetaFace2/releases/tag/model"
" to ${CMAKE_SOURCE_DIR}/model/Seeta") " to ${CMAKE_SOURCE_DIR}/model/Seeta")
endif(ENABLE_DOWNLOAD_MODUEL) endif(ENABLE_DOWNLOAD_MODULE)
endif() endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta") if(EXISTS "${CMAKE_SOURCE_DIR}/model/Seeta")
......
...@@ -28,7 +28,7 @@ int CDetectorSeeta::Detect(const QImage &image, QVector<QRect> &faces) ...@@ -28,7 +28,7 @@ int CDetectorSeeta::Detect(const QImage &image, QVector<QRect> &faces)
PERFORMANCE_START(SeetaDectect) PERFORMANCE_START(SeetaDectect)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(SeetaDectect, PERFORMANCE_ADD_TIME(SeetaDectect,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
...@@ -56,7 +56,7 @@ int CDetectorSeeta::Detect(const QImage &image, QVector<QRect> &faces) ...@@ -56,7 +56,7 @@ int CDetectorSeeta::Detect(const QImage &image, QVector<QRect> &faces)
f.data[i].pos.height); f.data[i].pos.height);
faces.push_back(rect); faces.push_back(rect);
} }
PERFORMANCE_ADD_TIME(SeetaDectect, "copy reture value") PERFORMANCE_ADD_TIME(SeetaDectect, "copy return value")
return 0; return 0;
} }
......
...@@ -36,7 +36,7 @@ float CFaceToolsSeeta::EvaluateQuality(const QImage &image, const QRect &face) ...@@ -36,7 +36,7 @@ float CFaceToolsSeeta::EvaluateQuality(const QImage &image, const QRect &face)
PERFORMANCE_START(CFaceToolsSeeta) PERFORMANCE_START(CFaceToolsSeeta)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(CFaceToolsSeeta, PERFORMANCE_ADD_TIME(CFaceToolsSeeta,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -64,7 +64,7 @@ int CTrackerSeeta::Track(const QImage &image, QVector<strFace> &faces) ...@@ -64,7 +64,7 @@ int CTrackerSeeta::Track(const QImage &image, QVector<strFace> &faces)
PERFORMANCE_START(CTrackerSeeta) PERFORMANCE_START(CTrackerSeeta)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(CTrackerSeeta, PERFORMANCE_ADD_TIME(CTrackerSeeta,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -38,18 +38,18 @@ ADD_PLUGIN_TARGET(NAME ${PROJECT_NAME} ...@@ -38,18 +38,18 @@ ADD_PLUGIN_TARGET(NAME ${PROJECT_NAME}
# Install model files # Install model files
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/ncnn") if(NOT EXISTS "${CMAKE_SOURCE_DIR}/model/ncnn")
if(ENABLE_DOWNLOAD_MODUEL) if(ENABLE_DOWNLOAD_MODULE)
DOWNLOAD(FILENAME "model_ncnn.tar.gz" DOWNLOAD(FILENAME "model_ncnn.tar.gz"
HASH fd4a88dcf16c29fdeadc852eb9776ffb HASH fd4a88dcf16c29fdeadc852eb9776ffb
URL "https://github.com/KangLin/ncnn_example/releases/download/model/model_ncnn.tar.gz" URL "https://github.com/KangLin/ncnn_example/releases/download/model/model_ncnn.tar.gz"
DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/ncnn" DESTINATION_DIR "${CMAKE_SOURCE_DIR}/model/ncnn"
STATUS retval UNPACK) STATUS retval UNPACK)
else(ENABLE_DOWNLOAD_MODUEL) else(ENABLE_DOWNLOAD_MODULE)
message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODUEL to ON " message(AUTHOR_WARNING "Please set ENABLE_DOWNLOAD_MODULE to ON "
" to automation download, or manual download ncnn model files from" " to automation download, or manual download ncnn model files from"
" https://github.com/KangLin/ncnn_example/releases/download/model/model_ncnn.tar.gz" " https://github.com/KangLin/ncnn_example/releases/download/model/model_ncnn.tar.gz"
" to ${CMAKE_SOURCE_DIR}/model/ncnn and tar xzvf model_ncnn.tar.gz") " to ${CMAKE_SOURCE_DIR}/model/ncnn and tar xzvf model_ncnn.tar.gz")
endif(ENABLE_DOWNLOAD_MODUEL) endif(ENABLE_DOWNLOAD_MODULE)
endif() endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/model/ncnn") if(EXISTS "${CMAKE_SOURCE_DIR}/model/ncnn")
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/model/ncnn INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/model/ncnn
......
...@@ -127,7 +127,7 @@ int CDetectorNcnnRetina::Detect(const QImage &image, QVector<QRect> &faces) ...@@ -127,7 +127,7 @@ int CDetectorNcnnRetina::Detect(const QImage &image, QVector<QRect> &faces)
PERFORMANCE_START(NcnnRetina) PERFORMANCE_START(NcnnRetina)
img = img.convertToFormat(QImage::Format_RGB888); img = img.convertToFormat(QImage::Format_RGB888);
PERFORMANCE_ADD_TIME(NcnnRetina, PERFORMANCE_ADD_TIME(NcnnRetina,
"conver format, image width:" "convert format, image width:"
+ QString::number(image.width()) + QString::number(image.width())
+ ";Height:" + ";Height:"
+ QString::number(image.height())) + QString::number(image.height()))
......
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
virtual int Delete(const qint64 &index) = 0; virtual int Delete(const qint64 &index) = 0;
/** /**
* @brief Query registed face * @brief Query registered face
* @param image: query face image * @param image: query face image
* @return find index. other return -1 * @return find index. other return -1
*/ */
......
...@@ -361,7 +361,7 @@ int yuv_to_rgb24(YUV_TYPE type, unsigned char* yuvbuffer,unsigned char* rgbbuffe ...@@ -361,7 +361,7 @@ int yuv_to_rgb24(YUV_TYPE type, unsigned char* yuvbuffer,unsigned char* rgbbuffe
yuv422sp_to_rgb24(yuvbuffer, rgbbuffer, width, height); yuv422sp_to_rgb24(yuvbuffer, rgbbuffer, width, height);
break; break;
default: default:
printf("unsupport yuv type!\n"); printf("unsupported yuv type!\n");
ret = -1; ret = -1;
break; break;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function help() function help()
{ {
echo "Please set enviroment value ANDROID_NDK" echo "Please set environment value ANDROID_NDK"
echo "$0 QT_ROOT ThirdLibs_DIR RabbitCommon_DIR ENABLE_DOWNLOAD" echo "$0 QT_ROOT ThirdLibs_DIR RabbitCommon_DIR ENABLE_DOWNLOAD"
exit -1 exit -1
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function help() function help()
{ {
echo "Useg: $0 QT_ROOT ThirdLibs_DIR RabbitCommon_DIR ENABLE_DOWNLOAD_MODUEL" echo "Usage: $0 QT_ROOT ThirdLibs_DIR RabbitCommon_DIR ENABLE_DOWNLOAD_MODULE"
echo "Error message: $1" echo "Error message: $1"
exit -1 exit -1
} }
...@@ -37,10 +37,10 @@ if [ ! -d "$RabbitCommon_DIR" ]; then ...@@ -37,10 +37,10 @@ if [ ! -d "$RabbitCommon_DIR" ]; then
fi fi
if [ -n "$4" ]; then if [ -n "$4" ]; then
export ENABLE_DOWNLOAD_MODUEL=$4 export ENABLE_DOWNLOAD_MODULE=$4
fi fi
if [ -z "$ENABLE_DOWNLOAD_MODUEL" ]; then if [ -z "$ENABLE_DOWNLOAD_MODULE" ]; then
export ENABLE_DOWNLOAD_MODUEL=OFF export ENABLE_DOWNLOAD_MODULE=OFF
fi fi
export RabbitCommon_DIR=$RabbitCommon_DIR export RabbitCommon_DIR=$RabbitCommon_DIR
......
...@@ -47,13 +47,13 @@ case $BUILD_ARCH in ...@@ -47,13 +47,13 @@ case $BUILD_ARCH in
SELECTEDPACKAGES=android_x86_64 SELECTEDPACKAGES=android_x86_64
;; ;;
*) *)
echo "Aach[$BUILD_ARCH] don't suppoert" echo "Aach[$BUILD_ARCH] don't support"
;; ;;
esac esac
fi fi
;; ;;
*) *)
echo "Aach[$BUILD_ARCH] don't suppoert" echo "Aach[$BUILD_ARCH] don't support"
;; ;;
esac esac
......
...@@ -36,7 +36,7 @@ set(DOWNLOAD_LOG "${CMAKE_BINARY_DIR}/CMakeDownloadLog.txt") ...@@ -36,7 +36,7 @@ set(DOWNLOAD_LOG "${CMAKE_BINARY_DIR}/CMakeDownloadLog.txt")
set(DOWNLOAD_WITH_CURL "${CMAKE_BINARY_DIR}/download_with_curl.sh") set(DOWNLOAD_WITH_CURL "${CMAKE_BINARY_DIR}/download_with_curl.sh")
set(DOWNLOAD_WITH_WGET "${CMAKE_BINARY_DIR}/download_with_wget.sh") set(DOWNLOAD_WITH_WGET "${CMAKE_BINARY_DIR}/download_with_wget.sh")
set(DOWNLOAD_TRIES_LIST 1 CACHE STRING "List of download tries") # a list set(DOWNLOAD_TRIES_LIST 1 CACHE STRING "List of download tries") # a list
set(DOWNLOAD_PARAMS INACTIVITY_TIMEOUT 60 TIMEOUT 600 CACHE STRING "Download parameters to be passed to file(DOWNLAOD ...)") set(DOWNLOAD_PARAMS INACTIVITY_TIMEOUT 60 TIMEOUT 600 CACHE STRING "Download parameters to be passed to file(DOWNLOAD ...)")
mark_as_advanced(DOWNLOAD_TRIES_LIST DOWNLOAD_PARAMS) mark_as_advanced(DOWNLOAD_TRIES_LIST DOWNLOAD_PARAMS)
# Init download cache directory and log file and helper scripts # Init download cache directory and log file and helper scripts
......
...@@ -36,6 +36,6 @@ if(LIBYUV_FOUND) ...@@ -36,6 +36,6 @@ if(LIBYUV_FOUND)
set(LIBYUV_INCLUDE_DIRS ${LIBYUV_INCLUDE_DIR}) set(LIBYUV_INCLUDE_DIRS ${LIBYUV_INCLUDE_DIR})
set(LIBYUV_LIBRARIES ${LIBYUV_LIBRARY}) set(LIBYUV_LIBRARIES ${LIBYUV_LIBRARY})
else() else()
message("Don't fonud libyuv. please set -DLIBYUV_DIR=") message("Don't found libyuv. please set -DLIBYUV_DIR=")
endif() endif()
...@@ -58,7 +58,7 @@ endif ...@@ -58,7 +58,7 @@ endif
# dh_make generated override targets # dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 ) # This is example for Cmake (See https://bugs.debian.org/641051 )
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/FaceRecognizer -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5 -DRabbitCommon_DIR=${RabbitCommon_DIR} -DENABLE_DOWNLOAD_MODUEL=${ENABLE_DOWNLOAD_MODUEL} ${PARAS} dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/FaceRecognizer -DQt5_DIR=${QT_ROOT}/lib/cmake/Qt5 -DRabbitCommon_DIR=${RabbitCommon_DIR} -DENABLE_DOWNLOAD_MODUEL=${ENABLE_DOWNLOAD_MODULE} ${PARAS}
override_dh_auto_build: override_dh_auto_build:
dh_auto_build -- $(if "`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`" = "0",, -j`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`) dh_auto_build -- $(if "`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`" = "0",, -j`cat /proc/cpuinfo |grep 'cpu cores' |wc -l`)
......
...@@ -9,7 +9,7 @@ if [ -n "$1" ]; then ...@@ -9,7 +9,7 @@ if [ -n "$1" ]; then
VERSION=` git rev-parse HEAD` VERSION=` git rev-parse HEAD`
fi fi
echo "Current verion: $VERSION, The version to will be set: $1" echo "Current version: $VERSION, The version to will be set: $1"
echo "Please check the follow list:" echo "Please check the follow list:"
echo " - Test is ok ?" echo " - Test is ok ?"
echo " - Translation is ok ?" echo " - Translation is ok ?"
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
- [必选] RabbitCommon_DIR: RabbitCommon 源码位置 - [必选] RabbitCommon_DIR: RabbitCommon 源码位置
- [可选] CMAKE_BUILD_TYPE: 编译类型 - [可选] CMAKE_BUILD_TYPE: 编译类型
- [可选] BUILD_PERFORMANCE: 比较测试框架,默认 OFF - [可选] BUILD_PERFORMANCE: 比较测试框架,默认 OFF
- [可选] ENABLE_DOWNLOAD_MODUEL: 自动下载模型,默认 OFF - [可选] ENABLE_DOWNLOAD_MODULE: 自动下载模型,默认 OFF
- [可选] BUILD_APP: 编译应用程序,默认 ON - [可选] BUILD_APP: 编译应用程序,默认 ON
- [可选] CMAKE_INSTALL_PREFIX: 安装前缀 - [可选] CMAKE_INSTALL_PREFIX: 安装前缀
- [可选] USE_OPENCV: 使用 OpenCV - [可选] USE_OPENCV: 使用 OpenCV
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
- 安装 - 安装
+ 安装库和程序 + 安装库和程序
cmake --build . --config Release --target install # --target install/strip stip 目标 cmake --build . --config Release --target install # --target install/strip strip 目标
+ 仅安装程序 + 仅安装程序
......