Computer Vision is an interdisciplinary field that deals with how computers can be made for gaining high-level understanding from digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human visual system can do.
Copy user@workstation:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/Tasks$ gst-launch-1.0 -v v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000
user@workstation:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/Tasks$ gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! xvimagesink sync=0
Copy import cv2
cap = cv2.VideoCapture(0)
framerate = 25.0
#out = cv2.VideoWriter('appsrc ! videoconvert ! '
# 'x264enc noise-reduction=10000 speed-preset=ultrafast tune=zerolatency ! '
# 'rtph264pay config-interval=1 pt=96 !'
# 'tcpserversink host=192.168.1.27 port=5000 sync=false',
# 0, framerate, (640, 480))
out = cv2.VideoWriter('appsrc ! videoconvert ! video/x-raw,format=YUY2,width=640,height=480 ! jpegenc ! rtpjpegpay ! '
'udpsink host=172.17.0.1 port=5000',
0, framerate, (640, 480))
while cap.isOpened():
ret, frame = cap.read()
if ret:
out.write(frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
# Release everything if job is finished
cap.release()
out.release()
root@c12f27a31092:/Xiaomin#
[2] 0:docker*Z