Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gstCamera::Capture() -- an error occurred retrieving the next image buffer #1901

Open
gualua opened this issue Oct 11, 2024 · 0 comments
Open

Comments

@gualua
Copy link

gualua commented Oct 11, 2024

first question

Excuse me, I can't get img when i launch commands as follow:
import jetson.utils
import jetson.inference
input = jetson.utils.videoSource("/dev/video0") # USB摄像头
output = jetson.utils.videoOutput("display://0") # 显示输出窗口
net = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)
while output.IsStreaming():
img = input.Capture()
if img is None:
print("Failed to capture image") # 调试信息
continue # 如果捕获失败,跳过这次循环
detections = net.Detect(img)
output.Render(img)
output.SetStatus("Performance {:.0f} FPS".format(net.GetNetworkFPS()))

I will get errors as below:
File "/home/gdcx/jetson-inference/obdetection1.py", line 13, in
img = input.Capture()
Exception: jetson.utils -- videoSource failed to capture image

second question

when I launch this command: &detectnet /dev/video0
i will get this problem as follow:
[TRT] note -- when processing a single image, run 'sudo jetson_clocks' before
to disable DVFS for more accurate profiling/timing measurements

[cuda] cudaGetLastError()
[cuda] unknown error (error 999) (hex 0x3E7)
[cuda] /home/gdcx/jetson-inference/utils/cuda/cudaYUV-YV12.cu:119
[cuda] cudaI420ToRGB(input, (uchar3*)output, width, height, stream)
[cuda] unknown error (error 999) (hex 0x3E7)
[cuda] /home/gdcx/jetson-inference/utils/cuda/cudaColorspace.cpp:54
[cuda] cudaConvertColor(latestYUV, mFormatYUV, nextRGB, format, mOptions->width, mOptions->height, stream)
[cuda] unknown error (error 999) (hex 0x3E7)
[cuda] /home/gdcx/jetson-inference/utils/codec/gstBufferManager.cpp:445
[gstreamer] gstBufferManager -- unsupported image format (rgb8)
[gstreamer] supported formats are:
[gstreamer] * rgb8
[gstreamer] * rgba8
[gstreamer] * rgb32f
[gstreamer] * rgba32f
[gstreamer] gstCamera::Capture() -- an error occurred retrieving the next image buffer

End

**:How can i solve this problem ? Why can't i get img with USB camera?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant