-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
106 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ rm models/ -r | |
mkdir logs | ||
mkdir models | ||
touch models/.trackfolder | ||
touch logs/.trackfolder | ||
touch logs/.trackfolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
__author__ = 'cnheider' | ||
__author__ = "cnheider" | ||
|
||
|
||
def main(): | ||
import imageio | ||
import streamserver | ||
|
||
|
||
reader = imageio.get_reader('<video0>') | ||
reader = imageio.get_reader("<video0>") | ||
|
||
try: | ||
with streamserver.StreamServer(JPEG_quality=75, host='localhost', port=5000) as ss: | ||
with streamserver.StreamServer( | ||
JPEG_quality=75, host="localhost", port=5000 | ||
) as ss: | ||
for im in reader: | ||
ss.set_frame(im) | ||
except KeyboardInterrupt: | ||
pass | ||
|
||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
<html> <head> <script>var url='{URL}'; var timer; var timerrunning=false; disconnected=function(){document.getElementById('status').innerText='Disconnected'; document.getElementById('status').style='color:red'; if (timerrunning==false){timerrunning=true; timer=setInterval(connect,250);}}; connected=function(){clearInterval(timer); timerrunning=false; document.getElementById('image').src=url; document.getElementById('status').innerText='Connected'; document.getElementById('status').style='color:green';}; var xhr=new XMLHttpRequest(); xhr.onreadystatechange=function (){var rst=xhr.readyState; if (rst==2){connected();}else if (rst==4){disconnected();}}; connect=function(){xhr.open('GET',url+'?q=ping',true); xhr.send();}; </script> </head> <body style="background-color: #FFFFFF; background-image:radial-gradient(closest-side at 60% 55%, #FFF, #f2f2f2);" onload="connect(); timerrunning=true; timer=setInterval(connect,200);"> <div style='text-align: center;'> <span style='font-family: monospace; font-weight: bold;'> <span id='status' style='color:yellow;'>Initializing</span> </span><br><img id='image' src=''> </div></body></html> | ||
<html> | ||
<head> | ||
<script>var url = '{URL}'; | ||
var timer; | ||
var timerrunning = false; | ||
disconnected = function () { | ||
document.getElementById('status').innerText = 'Disconnected'; | ||
document.getElementById('status').style = 'color:red'; | ||
if (timerrunning == false) { | ||
timerrunning = true; | ||
timer = setInterval(connect, 250); | ||
} | ||
}; | ||
connected = function () { | ||
clearInterval(timer); | ||
timerrunning = false; | ||
document.getElementById('image').src = url; | ||
document.getElementById('status').innerText = 'Connected'; | ||
document.getElementById('status').style = 'color:green'; | ||
}; | ||
var xhr = new XMLHttpRequest(); | ||
xhr.onreadystatechange = function () { | ||
var rst = xhr.readyState; | ||
if (rst == 2) { | ||
connected(); | ||
} else if (rst == 4) { | ||
disconnected(); | ||
} | ||
}; | ||
connect = function () { | ||
xhr.open('GET', url + '?q=ping', true); | ||
xhr.send(); | ||
}; </script> | ||
</head> | ||
<body | ||
style="background-color: #FFFFFF; background-image:radial-gradient(closest-side at 60% 55%, #FFF, #f2f2f2);" | ||
onload="connect(); timerrunning=true; timer=setInterval(connect,200);"> | ||
<div style='text-align: center;'><span style='font-family: monospace; font-weight: bold;'> <span | ||
id='status' style='color:yellow;'>Initializing</span> </span><br><img id='image' src=''></div> | ||
</body> | ||
</html> |