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
1ff8fce1
Commit
1ff8fce1
authored
Oct 08, 2020
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch for more shapes.
parent
b69ceff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
eggs/osie_plc/osie_ocr.py
eggs/osie_plc/osie_ocr.py
+6
-0
No files found.
eggs/osie_plc/osie_ocr.py
View file @
1ff8fce1
...
@@ -11,7 +11,9 @@ from time import sleep
...
@@ -11,7 +11,9 @@ from time import sleep
UNIT
=
0x1
UNIT
=
0x1
OSIE_PLC_ADDRESS
=
"localhost"
# "192.168.0.48" for real machine
OSIE_PLC_ADDRESS
=
"localhost"
# "192.168.0.48" for real machine
#OSIE_PLC_ADDRESS = "192.168.0.48"
OSIE_PLC_PORT
=
502
OSIE_PLC_PORT
=
502
def
nothing
(
x
):
def
nothing
(
x
):
# any operation
# any operation
pass
pass
...
@@ -76,8 +78,12 @@ while True:
...
@@ -76,8 +78,12 @@ while True:
if
len
(
approx
)
==
3
:
if
len
(
approx
)
==
3
:
cv2
.
putText
(
frame
,
"Triangle"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
cv2
.
putText
(
frame
,
"Triangle"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
sendModbusCommand
()
elif
len
(
approx
)
==
4
:
elif
len
(
approx
)
==
4
:
cv2
.
putText
(
frame
,
"Rectangle"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
cv2
.
putText
(
frame
,
"Rectangle"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
sendModbusCommand
()
elif
10
<
len
(
approx
)
<
20
:
elif
10
<
len
(
approx
)
<
20
:
cv2
.
putText
(
frame
,
"Circle-fire!"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
cv2
.
putText
(
frame
,
"Circle-fire!"
,
(
x
,
y
),
font
,
1
,
(
0
,
0
,
0
))
sendModbusCommand
()
sendModbusCommand
()
...
...
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