Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autonomous_Vehicles_with_embedded_intelligence
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kpp55
Autonomous_Vehicles_with_embedded_intelligence
Commits
ce00f3a9
Commit
ce00f3a9
authored
6 years ago
by
kpp55
Browse files
Options
Downloads
Patches
Plain Diff
Remove code for streaming. It did not work
parent
c8fdcd50
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ImageServer/DetectServer.py
+0
-41
0 additions, 41 deletions
ImageServer/DetectServer.py
ImageServer/ImageClient.py
+0
-18
0 additions, 18 deletions
ImageServer/ImageClient.py
with
0 additions
and
59 deletions
ImageServer/DetectServer.py
deleted
100644 → 0
+
0
−
41
View file @
c8fdcd50
import
socket
import
sys
import
cv2
import
pickle
import
numpy
as
np
import
struct
## new
HOST
=
socket
.
gethostbyname
(
socket
.
getfqdn
())
print
(
HOST
)
HOST
=
'
129.25.56.91
'
PORT
=
8080
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
print
(
'
Socket created
'
)
s
.
bind
((
HOST
,
PORT
))
print
(
'
Socket bind complete
'
)
s
.
listen
(
10
)
print
(
'
Socket now listening
'
)
conn
,
addr
=
s
.
accept
()
### new
data
=
""
payload_size
=
struct
.
calcsize
(
"
H
"
)
while
True
:
print
(
'
Got image
'
)
while
len
(
data
)
<
payload_size
:
data
+=
conn
.
recv
(
4096
)
packed_msg_size
=
data
[:
payload_size
]
data
=
data
[
payload_size
:]
msg_size
=
struct
.
unpack
(
"
H
"
,
packed_msg_size
)[
0
]
while
len
(
data
)
<
msg_size
:
data
+=
conn
.
recv
(
4096
)
frame_data
=
data
[:
msg_size
]
data
=
data
[
msg_size
:]
###
frame
=
pickle
.
loads
(
frame_data
)
print
frame
cv2
.
imshow
(
'
frame
'
,
frame
)
This diff is collapsed.
Click to expand it.
ImageServer/ImageClient.py
deleted
100644 → 0
+
0
−
18
View file @
c8fdcd50
# Import socket module
import
socket
# Create a socket object
s
=
socket
.
socket
()
# Define the port on which you want to connect
port
=
12345
# connect to the server on local computer
s
.
connect
((
'
127.0.1.1
'
,
port
))
print
(
"
I am here
"
)
# receive data from the server
print
(
s
.
recv
(
1024
))
# close the connection
s
.
close
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment