Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gamera_videos_no_ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liusq
gamera_videos_no_ui
Commits
e2bbbbe3
Commit
e2bbbbe3
authored
Sep 11, 2024
by
“liusq”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人形检测关闭算法
parent
b86676af
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
7 deletions
+23
-7
CameraHandle.cpp
+4
-0
HttpService.cpp
+4
-1
VidesData.h
+8
-0
mainwindow.cpp
+6
-5
mainwindow.h
+1
-1
moc_predefs.h
+0
-0
No files found.
CameraHandle.cpp
View file @
e2bbbbe3
...
@@ -599,6 +599,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
...
@@ -599,6 +599,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
int
uniforms
=
0x00
;
int
uniforms
=
0x00
;
std
::
map
<
int
,
int
>
resMap
;
std
::
map
<
int
,
int
>
resMap
;
if
((
algorithmPermissions
&
0x01
<<
3
)
!=
0
)
{
//穿工服算法
//穿工服算法
if
((
algorithmPermissions
&
0x01
<<
2
)
!=
0
)
{
if
((
algorithmPermissions
&
0x01
<<
2
)
!=
0
)
{
uniforms
=
algorithmTaskManage
.
executeFindHuManCar
(
frame
,
0x02
,
currentPlates
,
resMap
,
sSn
,
heightReference
);
uniforms
=
algorithmTaskManage
.
executeFindHuManCar
(
frame
,
0x02
,
currentPlates
,
resMap
,
sSn
,
heightReference
);
...
@@ -712,6 +713,9 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
...
@@ -712,6 +713,9 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
}
}
}
}
}
else
{
qInfo
()
<<
"人形识别算法关闭,只有车牌算法了"
;
}
//关闭车牌识别
//关闭车牌识别
if
((
algorithmPermissions
&
0x01
)
==
0
)
{
if
((
algorithmPermissions
&
0x01
)
==
0
)
{
return
;
return
;
...
...
HttpService.cpp
View file @
e2bbbbe3
...
@@ -538,7 +538,10 @@ vides_data::response *HttpService::httpDeviceConfig(const QString &serialNumber,
...
@@ -538,7 +538,10 @@ vides_data::response *HttpService::httpDeviceConfig(const QString &serialNumber,
config
.
uniformConfig
.
humanDetectionLen
=
uniformConfigObj
[
"humanDetectionLen"
].
toInt
();
config
.
uniformConfig
.
humanDetectionLen
=
uniformConfigObj
[
"humanDetectionLen"
].
toInt
();
config
.
uniformConfig
.
updateAt
=
uniformConfigObj
[
"updateAt"
].
toVariant
().
toULongLong
();
config
.
uniformConfig
.
updateAt
=
uniformConfigObj
[
"updateAt"
].
toVariant
().
toULongLong
();
config
.
uniformConfig
.
carShapeConfidence
=
uniformConfigObj
[
"carShapeConfidence"
].
toVariant
().
toFloat
();
config
.
uniformConfig
.
carShapeConfidence
=
uniformConfigObj
[
"carShapeConfidence"
].
toVariant
().
toFloat
();
//解析 humanConfig
QJsonObject
humanConfigObj
=
dataObj
[
"humanConfig"
].
toObject
();
config
.
humanConfig
.
isOn
=
humanConfigObj
[
"isOn"
].
toBool
();
config
.
humanConfig
.
updateAt
=
humanConfigObj
[
"updateAt"
].
toVariant
().
toULongLong
();
// 解析 devicesConfig
// 解析 devicesConfig
QJsonObject
devicesConfigObj
=
dataObj
[
"camera"
].
toObject
();
QJsonObject
devicesConfigObj
=
dataObj
[
"camera"
].
toObject
();
...
...
VidesData.h
View file @
e2bbbbe3
...
@@ -279,6 +279,12 @@ struct UniformConfig {
...
@@ -279,6 +279,12 @@ struct UniformConfig {
quint64
updateAt
;
quint64
updateAt
;
};
};
struct
HumanConfig
{
bool
isOn
;
int
humanDetectionLen
;
quint64
updateAt
;
};
struct
MqttConfig
{
struct
MqttConfig
{
QString
address
;
QString
address
;
QString
clientId
;
QString
clientId
;
...
@@ -299,6 +305,8 @@ struct responseConfig {
...
@@ -299,6 +305,8 @@ struct responseConfig {
UniformConfig
uniformConfig
;
UniformConfig
uniformConfig
;
Camera
camera
;
Camera
camera
;
MqttConfig
mqttConfig
;
MqttConfig
mqttConfig
;
HumanConfig
humanConfig
;
};
};
struct
responseMqttData
{
struct
responseMqttData
{
...
...
mainwindow.cpp
View file @
e2bbbbe3
...
@@ -170,7 +170,7 @@ void MainWindow::divParameterUpdate(vides_data::responseConfig &cloudConfig,QStr
...
@@ -170,7 +170,7 @@ void MainWindow::divParameterUpdate(vides_data::responseConfig &cloudConfig,QStr
cloudConfig
.
mqttConfig
.
topic
=
config
.
mqttConfig
.
topic
;
cloudConfig
.
mqttConfig
.
topic
=
config
.
mqttConfig
.
topic
;
runOrRebootMqtt
(
cloudConfig
.
mqttConfig
,
httpUrl
,
serialNumber
);
runOrRebootMqtt
(
cloudConfig
.
mqttConfig
,
httpUrl
,
serialNumber
);
}
}
__uint8_t
alg
=
this
->
intToUint8t
(
faceAlgorithm
,
licensePlateAlgorithm
,
uniformAlgorithm
)
;
__uint8_t
alg
=
this
->
intToUint8t
(
faceAlgorithm
,
licensePlateAlgorithm
,
uniformAlgorithm
,
false
)
;
vides_data
::
DetectionParams
params
;
vides_data
::
DetectionParams
params
;
...
@@ -556,7 +556,7 @@ void MainWindow::startCamera(const QString &httpurl){
...
@@ -556,7 +556,7 @@ void MainWindow::startCamera(const QString &httpurl){
reStatus
.
camera_info_list
.
push_front
(
camera_info
);
reStatus
.
camera_info_list
.
push_front
(
camera_info
);
__uint8_t
new_algorithm
=
intToUint8t
(
devConfig
.
faceConfig
.
isOn
,
devConfig
.
licensePlateConfig
.
isOn
,
devConfig
.
uniformConfig
.
isOn
);
__uint8_t
new_algorithm
=
intToUint8t
(
devConfig
.
faceConfig
.
isOn
,
devConfig
.
licensePlateConfig
.
isOn
,
devConfig
.
uniformConfig
.
isOn
,
devConfig
.
humanConfig
.
isOn
);
offlineCameraHandle
->
cameraParameterUpdate
(
devConfig
);
offlineCameraHandle
->
cameraParameterUpdate
(
devConfig
);
offlineCameraHandle
->
initAlgorithmPermissions
(
new_algorithm
);
offlineCameraHandle
->
initAlgorithmPermissions
(
new_algorithm
);
...
@@ -961,9 +961,10 @@ void MainWindow::initRecordingToString(QString &recorJson){
...
@@ -961,9 +961,10 @@ void MainWindow::initRecordingToString(QString &recorJson){
recorJson
=
QString
::
fromUtf8
(
jsonDocument
.
toJson
());
recorJson
=
QString
::
fromUtf8
(
jsonDocument
.
toJson
());
}
}
__uint8_t
MainWindow
::
intToUint8t
(
bool
faceAlgorithm
,
bool
licensePlateAlgorithm
,
bool
uniformAlgorithm
)
{
__uint8_t
MainWindow
::
intToUint8t
(
bool
faceAlgorithm
,
bool
licensePlateAlgorithm
,
bool
uniformAlgorithm
,
bool
humanAlgorithm
)
{
__uint8_t
result
=
0
;
__uint8_t
result
=
0
;
//人形识别对应最高高位(第3位)
result
|=
(
humanAlgorithm
?
1
:
0
)
<<
3
;
// 工服识别对应最高位(第2位)
// 工服识别对应最高位(第2位)
result
|=
(
uniformAlgorithm
?
1
:
0
)
<<
2
;
result
|=
(
uniformAlgorithm
?
1
:
0
)
<<
2
;
...
@@ -1013,7 +1014,7 @@ void MainWindow::initCameras(vides_data::cameraParameters ¶meter,vides_data:
...
@@ -1013,7 +1014,7 @@ void MainWindow::initCameras(vides_data::cameraParameters ¶meter,vides_data:
cameraHandle
->
findFirmwareVersion
(
camera_info
.
firmware_version
);
cameraHandle
->
findFirmwareVersion
(
camera_info
.
firmware_version
);
camera_info_list
.
push_front
(
camera_info
);
camera_info_list
.
push_front
(
camera_info
);
__uint8_t
new_algorithm
=
intToUint8t
(
devConfig
.
faceConfig
.
isOn
,
devConfig
.
licensePlateConfig
.
isOn
,
devConfig
.
uniformConfig
.
isOn
);
__uint8_t
new_algorithm
=
intToUint8t
(
devConfig
.
faceConfig
.
isOn
,
devConfig
.
licensePlateConfig
.
isOn
,
devConfig
.
uniformConfig
.
isOn
,
devConfig
.
humanConfig
.
isOn
);
cameraHandle
->
initAlgorithmPermissions
(
new_algorithm
);
cameraHandle
->
initAlgorithmPermissions
(
new_algorithm
);
cameraHandle
->
initParkingSpaceInfo
(
areas
);
cameraHandle
->
initParkingSpaceInfo
(
areas
);
...
...
mainwindow.h
View file @
e2bbbbe3
...
@@ -44,7 +44,7 @@ public:
...
@@ -44,7 +44,7 @@ public:
void
initCameras
(
vides_data
::
cameraParameters
&
parameter
,
vides_data
::
responseConfig
&
devConfig
,
const
std
::
list
<
vides_data
::
responseArea
>&
areas
,
std
::
list
<
vides_data
::
requestCameraInfo
>&
camera_info_list
);
void
initCameras
(
vides_data
::
cameraParameters
&
parameter
,
vides_data
::
responseConfig
&
devConfig
,
const
std
::
list
<
vides_data
::
responseArea
>&
areas
,
std
::
list
<
vides_data
::
requestCameraInfo
>&
camera_info_list
);
__uint8_t
intToUint8t
(
bool
faceAlgorithm
,
bool
licensePlateAlgorithm
,
bool
uniformAlgorithm
);
__uint8_t
intToUint8t
(
bool
faceAlgorithm
,
bool
licensePlateAlgorithm
,
bool
uniformAlgorithm
,
bool
humanAlgorithm
);
//盒子参数更新
//盒子参数更新
void
divParameterUpdate
(
vides_data
::
responseConfig
&
cloudConfig
,
QString
&
httpUrl
,
QString
&
serialNumber
);
void
divParameterUpdate
(
vides_data
::
responseConfig
&
cloudConfig
,
QString
&
httpUrl
,
QString
&
serialNumber
);
...
...
moc_predefs.h
100644 → 100755
View file @
e2bbbbe3
File mode changed from 100644 to 100755
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment