Im doing the Deep Learning Institute Getting Started with Jetson course.
In the course with the Jetson Xavier NX you use
This course primarily uses the Jetson 2GB Nano with Jetpack 4.5.1
But im using the Jetson Xavier NX to do it.
here’s the docker command i ran to get the course running…
sudo docker run --runtime nvidia -it --rm --network host --volume ~/org/nvdli-data:/nvdli-nano/data --device /dev/video0 nvcr.io/nvidia/dli/dli-nano-ai:v2.0.1-r32.5.0
but in the usb_camera.ipynb notebook im only getting black and white changes when i move the camera around so its seeing something but just black and white.
Heres the code that DOES NOT work
This code runnning from jupyter notebook only produces black and white color no video just color changes when i put something in front of the camera
from jetcam.usb_camera import USBCamera
camera = USBCamera(width=224, height=224, capture_width=640, capture_height=480, capture_device=0)
image = camera.read()
print(image.shape)
print(camera.value.shape)
import ipywidgets
from IPython.display import display
from jetcam.utils import bgr8_to_jpeg
image_widget = ipywidgets.Image(format=‘jpeg’)
image_widget.value = bgr8_to_jpeg(image)
display(image_widget)
here is code that DOES works .
import cv2
cam = cv2.VideoCapture(0)
ret, frame = cam.read()
cv2.imwrite(“test.png”, frame)
here is the page ive been led me to believe its ok to buy a jetson Xavier to do your course.
“*Any Jetson can be used to complete the course (except Jetson TK1).”
I tried both the c270 logitech camera and the C920Pro logitech. both same results.
i tried to use the Jetson Nano instead of the Xavier NX and it works fine, same jetpack 4.5.1 and the c270.
its just the Xavier NX having problem with the jupyter notebook.
here is listing of the video devices on the Jetson 2GB
ls -la -ltrh /dev/video*
crw-rw----+ 1 root video 81, 0 Apr 10 09:51 /dev/video0
on the Xavier NX it DOES NOT have the plus sign.
i read somewhere that the plus sign means there are some ACLs for the file
here are the ACL on the jetson nano.
via man page ‘ls’
“If the file or directory has extended security information, the permissions field printed by the -l option is followed by a ‘+’ character.”
This generally means the file is encumbered with access restrictions outside of the traditional Unix permissions - likely Access Control List (ACL).
so i did a getfacl on the nano…
getfacl /dev/video0
getfacl: Removing leading ‘/’ from absolute path names
file: dev/video0
owner: root
group: video
user::rw-
user:gdm:rw-
group::rw-
mask::rw-
other::—
reinstalling my xavier to compare…