Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
osie
Commits
a5ce8c7f
Commit
a5ce8c7f
authored
Jul 17, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop iteration if key pressed ONLY in a non headless mode
parent
9cd47af7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
oi-sensor/oi-sensor.py
oi-sensor/oi-sensor.py
+4
-4
No files found.
oi-sensor/oi-sensor.py
View file @
a5ce8c7f
...
@@ -185,10 +185,10 @@ async def main():
...
@@ -185,10 +185,10 @@ async def main():
if
not
headless
:
if
not
headless
:
cv2
.
imshow
(
"Frame"
,
frame
)
cv2
.
imshow
(
"Frame"
,
frame
)
cv2
.
imshow
(
"Mask"
,
mask
)
cv2
.
imshow
(
"Mask"
,
mask
)
# stop iteration if key pressed in a non headless mode
key
=
cv2
.
waitKey
(
1
)
key
=
cv2
.
waitKey
(
1
)
if
key
==
27
:
if
key
==
27
:
break
break
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
logging
.
basicConfig
(
level
=
logging
.
ERROR
)
logging
.
basicConfig
(
level
=
logging
.
ERROR
)
...
...
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