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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
7 deletions
+19
-7
CameraHandle.cpp
+0
-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
This diff is collapsed.
Click to expand it.
HttpService.cpp
View file @
e2bbbbe3
...
...
@@ -538,7 +538,10 @@ vides_data::response *HttpService::httpDeviceConfig(const QString &serialNumber,
config
.
uniformConfig
.
humanDetectionLen
=
uniformConfigObj
[
"humanDetectionLen"
].
toInt
();
config
.
uniformConfig
.
updateAt
=
uniformConfigObj
[
"updateAt"
].
toVariant
().
toULongLong
();
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
QJsonObject
devicesConfigObj
=
dataObj
[
"camera"
].
toObject
();
...
...
VidesData.h
View file @
e2bbbbe3
...
...
@@ -279,6 +279,12 @@ struct UniformConfig {
quint64
updateAt
;
};
struct
HumanConfig
{
bool
isOn
;
int
humanDetectionLen
;
quint64
updateAt
;
};
struct
MqttConfig
{
QString
address
;
QString
clientId
;
...
...
@@ -299,6 +305,8 @@ struct responseConfig {
UniformConfig
uniformConfig
;
Camera
camera
;
MqttConfig
mqttConfig
;
HumanConfig
humanConfig
;
};
struct
responseMqttData
{
...
...
mainwindow.cpp
View file @
e2bbbbe3
...
...
@@ -170,7 +170,7 @@ void MainWindow::divParameterUpdate(vides_data::responseConfig &cloudConfig,QStr
cloudConfig
.
mqttConfig
.
topic
=
config
.
mqttConfig
.
topic
;
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
;
...
...
@@ -556,7 +556,7 @@ void MainWindow::startCamera(const QString &httpurl){
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
->
initAlgorithmPermissions
(
new_algorithm
);
...
...
@@ -961,9 +961,10 @@ void MainWindow::initRecordingToString(QString &recorJson){
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
;
//人形识别对应最高高位(第3位)
result
|=
(
humanAlgorithm
?
1
:
0
)
<<
3
;
// 工服识别对应最高位(第2位)
result
|=
(
uniformAlgorithm
?
1
:
0
)
<<
2
;
...
...
@@ -1013,7 +1014,7 @@ void MainWindow::initCameras(vides_data::cameraParameters ¶meter,vides_data:
cameraHandle
->
findFirmwareVersion
(
camera_info
.
firmware_version
);
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
->
initParkingSpaceInfo
(
areas
);
...
...
mainwindow.h
View file @
e2bbbbe3
...
...
@@ -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
);
__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
);
...
...
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