Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aart_ppe_detection
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rahul
aart_ppe_detection
Commits
5b7729b4
Commit
5b7729b4
authored
Jan 16, 2023
by
Sikhin VC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added video recording format
parent
8e4fecfd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
10 deletions
+13
-10
output/recorded_video_list.txt
output/recorded_video_list.txt
+0
-0
scripts/ppe.py
scripts/ppe.py
+13
-10
No files found.
output/recorded_video_list.txt
0 → 100644
View file @
5b7729b4
scripts/ppe.py
View file @
5b7729b4
...
...
@@ -350,15 +350,18 @@ class Ppe(ModelWrapper):
size
=
(
frame_width
,
frame_height
)
working_dir
=
"output"
file_name
=
str
(
unique_id
)
+
".
mp4
"
file_name
=
str
(
unique_id
)
+
".
avi
"
file_name
=
os
.
path
.
join
(
working_dir
,
file_name
)
# Below VideoWriter object will create
# a frame of above defined The output
# is stored in 'filename.avi' file.
fourcc
=
cv2
.
VideoWriter_fourcc
(
*
'h264'
)
result
=
cv2
.
VideoWriter
(
file_name
,
fourcc
,
cv2
.
VideoWriter_fourcc
(
*
'MJPG'
)
,
10
,
size
)
# fourcc = cv2.VideoWriter_fourcc(*'h264')
# result = cv2.VideoWriter(file_name,
# fourcc,
# 10, size)
# fourcc = cv2.VideoWriter_fourcc(*'vp80')
# result = cv2.VideoWriter(file_name, fourcc, 20, (640, 480))
return
result
...
...
@@ -446,7 +449,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
@@ -530,7 +533,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
@@ -555,7 +558,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
@@ -639,7 +642,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
@@ -662,7 +665,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
@@ -748,7 +751,7 @@ class Ppe(ModelWrapper):
for
v
in
temp_v_list
:
self
.
send_payload
(
frame
=
resize_to_64_64
(
frame
),
message
=
temp_v_list
,
event
=
v
,
frame_id
=
rec_inf
[
2
])
with
open
(
"
output/
recorded_video_list.txt"
,
"a"
)
as
f
:
with
open
(
"recorded_video_list.txt"
,
"a"
)
as
f
:
f
.
write
(
rec_inf
[
2
]
+
".avi"
)
f
.
write
(
"
\n
"
)
del
self
.
active_rec
[
object_id
]
...
...
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