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
38d74e8b
Commit
38d74e8b
authored
Apr 17, 2024
by
“liusq”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印日志新增sn
parent
b31cf23d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
CameraHandle.cpp
+12
-6
gamera_videos.pro
+1
-1
mainwindow.cpp
+1
-1
No files found.
CameraHandle.cpp
View file @
38d74e8b
...
...
@@ -20,7 +20,8 @@ CameraHandle::CameraHandle(QString &url, QString &httpUrl, QString &sSn, int &ch
connect
(
this
,
SIGNAL
(
afterDownloadFile
(
int
,
int
,
QString
)),
this
,
SLOT
(
pushRecordToCloud
(
int
,
int
,
QString
)),
Qt
::
QueuedConnection
);
detector
=
TCV_CreateHumanDetector
();
// 设置检测得分阈值 默认0.5
TCV_HumanDetectorSetScoreThreshold
(
detector
,
0.8
f
);
TCV_HumanDetectorSetHumanThreshold
(
detector
,
0.5
f
);
TCV_HumanDetectorSetCarThreshold
(
detector
,
0.2
f
);
HLPR_ContextConfiguration
configuration
=
{
0
};
QByteArray
&&
by_mpath
=
modelPaths
.
toUtf8
();
...
...
@@ -557,9 +558,9 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
std
::
map
<
int
,
RecognizedInfo
>
exitMoMap
;
vides_data
::
requestLicensePlate
newPlate
;
newPlate
.
sn
=
sSn
;
qDebug
()
<<
QString
(
"
识别的车牌号是:%1"
).
arg
(
lpNumber
);
qDebug
()
<<
QString
(
"
sn==>%1,识别的车牌号是:%2"
).
arg
(
sSn
).
arg
(
lpNumber
);
std
::
list
<
vides_data
::
LicensePlate
>
ps
=
plate
.
plates
;
int
res
=-
1
;
int
res
=-
1
;
this
->
matToBase64
(
frame
,
imgs
);
if
(
ps
.
size
()
==
0
){
for
(
auto
it
=
parkMap
.
begin
();
it
!=
parkMap
.
end
();
++
it
)
{
...
...
@@ -597,13 +598,13 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
vides_data
::
LicensePlate
recognition
=
indexToLicensePlate
.
at
(
key
);
RecognizedInfo
recognizedInfo
;
if
(
recognition
.
new_color
==
"蓝牌"
&&
recognition
.
new_plate
.
length
()
!=
7
)
{
qDebug
()
<<
"
蓝牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
qDebug
()
<<
sSn
<<
"==>
蓝牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
continue
;
}
else
if
(
recognition
.
new_color
==
"绿牌新能源"
&&
recognition
.
new_plate
.
length
()
!=
8
)
{
qDebug
()
<<
"
绿牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
qDebug
()
<<
sSn
<<
"==>
绿牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
continue
;
}
else
if
(
recognition
.
new_plate
.
length
()
<
7
)
{
qDebug
()
<<
"
非绿牌蓝牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
qDebug
()
<<
sSn
<<
"==>
非绿牌蓝牌车牌号:"
<<
recognition
.
new_plate
<<
"===>recognition.new_plate.length():"
<<
recognition
.
new_plate
.
length
();
continue
;
}
if
(
recognition
.
text_confidence
>=
instace
.
getCarConfidenceMax
()){
...
...
@@ -619,7 +620,11 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
this
->
checkAndUpdateCurrentPlate
(
value
,
frame
,
recognizedInfo
,
res
,
exitMoMap
);
}
}
qDebug
()
<<
sSn
<<
"==>识别的车牌置信度"
<<
recognition
.
text_confidence
;
qDebug
()
<<
sSn
<<
"==>最小车牌置信度"
<<
instace
.
getCarConfidenceMin
();
if
(
recognition
.
text_confidence
<=
instace
.
getCarConfidenceMin
()){
qDebug
()
<<
sSn
<<
"==>recognition.text_confidence<=instace.getCarConfidenceMin"
<<
instace
.
getCarConfidenceMin
();
continue
;
}
if
(
recognition
.
text_confidence
>
instace
.
getCarConfidenceMin
()
...
...
@@ -633,6 +638,7 @@ void CameraHandle::updateImage(const cv::Mat & frame,qint64 currentTime){
recognizedInfo
=
std
::
move
(
info
);
this
->
checkAndUpdateCurrentPlate
(
value
,
frame
,
recognizedInfo
,
res
,
exitMoMap
);
}
if
(
res
==
Exit
||
res
==
Mobilization
)
{
recognition
.
areaLocation
=
value
->
getArea
();
recognition
.
img
=
imgs
;
...
...
gamera_videos.pro
View file @
38d74e8b
...
...
@@ -47,7 +47,7 @@ INCLUDEPATH+=/usr/local/include/human
# INCLUDEPATH+=/usr/local/include/hyperface
# INCLUDEPATH+=/usr/local/include/hyper
# INCLUDEPATH+=/usr/local/include/XNetSDK
#
#
INCLUDEPATH+=/usr/local/include/human
# INCLUDEPATH+=/usr/local/include/human
# }
#}
...
...
mainwindow.cpp
View file @
38d74e8b
...
...
@@ -779,7 +779,7 @@ void MainWindow::initCommon(){
createDirectory
(
0x01
,
"frame_images"
,
"目录创建成功"
,
"目录创建失败"
);
createDirectory
(
0x00
,
"frame_video"
,
"创建视频目录成功"
,
"视频目录创建失败"
);
createDirectory
(
0x02
,
"images"
,
"图片目录创建成功"
,
"图片目录创建失败"
);
float
carConfidenceMax
=
qSetting
->
value
(
"devices/carConfidenceMax"
).
to
Double
();
float
carConfidenceMax
=
qSetting
->
value
(
"devices/carConfidenceMax"
).
to
Float
();
float
carConfidenceMin
=
qSetting
->
value
(
"devices/carConfidenceMin"
).
toFloat
();
Common
&
instance
=
Common
::
getInstance
();
instance
.
setCarConfidenceMax
(
carConfidenceMax
);
...
...
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