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
0
Merge Requests
0
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
11315a99
Commit
11315a99
authored
May 16, 2024
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that both OPC UA server and CV2 process
can run together.
parent
112f37b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
oi-sensor/oi-sensor.py
oi-sensor/oi-sensor.py
+6
-0
No files found.
oi-sensor/oi-sensor.py
View file @
11315a99
...
...
@@ -17,6 +17,8 @@ import asyncio
import
logging
from
asyncua
import
Server
SLEEP_DURATION
=
10e-3
# 10 milliseconds
def
nothing
(
x
):
# any operation
pass
...
...
@@ -52,6 +54,10 @@ async def main():
async
with
server
:
while
True
:
# script runs concurrently OPC UA server and openCV optical shape
# recognition. Thus give (roughly) some CPU time so both can work together.
await
asyncio
.
sleep
(
SLEEP_DURATION
)
# read and process camera
_
,
frame
=
cap
.
read
()
hsv
=
cv2
.
cvtColor
(
frame
,
cv2
.
COLOR_BGR2HSV
)
...
...
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