Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
E
evsuits
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
OpsTeam
evsuits
Commits
ef4edde0
提交
ef4edde0
authored
12月 18, 2019
作者:
blu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
yolo
上级
393e1e39
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
39 行增加
和
3 行删除
+39
-3
crontab
opencv-motion-detect/deployment/crontab
+2
-0
disk_test.cpp
opencv-motion-detect/disk_test.cpp
+32
-0
main.cpp
opencv-yolo/main.cpp
+5
-3
没有找到文件。
opencv-motion-detect/deployment/crontab
0 → 100644
浏览文件 @
ef4edde0
*/5 * * * * sync; echo 1 > /proc/sys/vm/drop_caches
\ No newline at end of file
opencv-motion-detect/disk_test.cpp
0 → 100644
浏览文件 @
ef4edde0
#include <sys/statvfs.h>
#include <iostream>
#include <string>
using
namespace
std
;
double
getDiskAvailPercent
(
string
path
)
{
struct
statvfs
fiData
;
if
((
statvfs
(
path
.
c_str
(),
&
fiData
))
<
0
)
{
}
else
{
double
fper
=
fiData
.
f_bavail
/
double
(
fiData
.
f_blocks
);
cout
<<
fper
<<
endl
;
return
fper
;
}
return
-
1
;
}
int
main
(
int
argc
,
char
*
argv
[]
)
{
struct
statvfs
fiData
;
if
(
argc
<
2
)
{
cout
<<
"Usage, ./size dir1 dir2 ... dirN
\n
"
;
return
(
1
);
}
//Lets loopyloop through the argvs
for
(
int
i
=
1
;
i
<
argc
;
i
++
)
{
getDiskAvailPercent
(
argv
[
i
]);
}
}
\ No newline at end of file
opencv-yolo/main.cpp
浏览文件 @
ef4edde0
...
@@ -201,7 +201,6 @@ public:
...
@@ -201,7 +201,6 @@ public:
int
process
(
string
inVideoUri
,
callback
cb
=
nullptr
,
string
outFile
=
"processed.jpg"
)
int
process
(
string
inVideoUri
,
callback
cb
=
nullptr
,
string
outFile
=
"processed.jpg"
)
{
{
if
(
inVideoUri
.
empty
())
{
if
(
inVideoUri
.
empty
())
{
inVideoUri
=
"0"
;
inVideoUri
=
"0"
;
}
}
...
@@ -230,7 +229,7 @@ public:
...
@@ -230,7 +229,7 @@ public:
spdlog
::
info
(
"{} try to process video {} to {}"
,
selfId
,
inVideoUri
,
outFile
);
spdlog
::
info
(
"{} try to process video {} to {}"
,
selfId
,
inVideoUri
,
outFile
);
long
frameCnt
=
0
;
long
frameCnt
=
0
;
long
detCnt
=
0
;
long
detCnt
=
0
,
skipCnt
=
0
;
Mat
frame
,
outFrame
;
Mat
frame
,
outFrame
;
while
(
waitKey
(
1
)
<
0
)
{
while
(
waitKey
(
1
)
<
0
)
{
// get frame from the video
// get frame from the video
...
@@ -253,7 +252,10 @@ public:
...
@@ -253,7 +252,10 @@ public:
vector
<
tuple
<
string
,
double
,
Rect
>>
ret
=
process
(
frame
,
outFrame
);
vector
<
tuple
<
string
,
double
,
Rect
>>
ret
=
process
(
frame
,
outFrame
);
if
(
ret
.
size
()
==
0
&&
bOutputIsImg
)
{
if
(
ret
.
size
()
==
0
&&
bOutputIsImg
)
{
// no detection
// no detection
spdlog
::
info
(
"{} no valid object detected skip saving image"
,
selfId
);
if
(
skipCnt
%
100
==
0
)
{
spdlog
::
info
(
"{} no valid object detected skipped frame count {}"
,
selfId
,
skipCnt
);
}
skipCnt
++
;
continue
;
continue
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论