我目前正在使用一台带有gitbash的windows计算机通过ssh连接到nvidia jetson tx2,该tx2带有内置摄像头:
ssh nvidia@'my ip address"
然后我用命令激活jetson tx2上的摄像头:
^{pr2}$我准备好了一个python脚本来查看摄影机流:
import numpy as np
import cv2
cap=cv2.VideoCapture('/dev/video0')
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
当我直接在jetsontx2python发行版上运行这个脚本时,这个脚本会显示camera提要。在
我的问题是,如何让这个脚本在我用ssh连接到jetson tx2的机器上运行?在
我相信这和台词有关:
cap=cv2.VideoCapture('/dev/video0')
当我进入杰森号的时候摄像机怎么会被叫来?在
您需要X11转发显示。现在它不知道如何处理输出,因为没有连接显示器。如果您在windows上运行,则需要下载xming。运行(双击桌面快捷方式),然后:
请记住,X转发是带宽有限的,因此它可能会减慢您的进程,无论最终会是什么。在
相关问题 更多 >
编程相关推荐