1

我目前正在使用带有 gitbash 的 windows 计算机通过板载摄像头 ssh 进入 nvidia jetson tx2:

ssh nvidia@'my ip address"

然后我使用以下命令激活 jetson tx2 上的摄像头:

gst-launch-1.0 -ev nvcamerasrc ! nvoverlaysink

我准备好了一个 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()

当我直接在我的 jetson tx2 python 发行版上运行这个脚本时,我已经安装了这个脚本来显示相机源。

我的问题是,我怎样才能让这个脚本在我用来 ssh 到 jetson tx2 的机器上工作?

我相信这与这条线有关:

cap=cv2.VideoCapture('/dev/video0')

当我进入jetson时如何调用相机?

4

1 回答 1

0

您需要 X11 转发显示。现在它不知道如何处理输出,因为没有连接显示器。如果您在 Windows 上运行,则需要下载xming。运行它(只需双击桌面快捷方式),然后:

ssh -X nvidia@ip_address

请记住,X 转发受带宽限制,因此它可能会减慢您的进程,无论最终结果如何。

于 2018-05-09T02:58:34.090 回答