I am connecting my jetson xavier nx to Intel Realsense and get the frame every 0.2 seconds (5Hz). I use vpi harris coners with CUDA to calculate the features on every frame i get. However it runs into segmentation fault after sometimes. This doesnt happen with cpu execution. any reasons?
Yea its a duplicate issue, so I will just produce the code here.
I connected my Jetson to Intel Realsense camera and get the frame from there.
def main():
while True:
# get frame from realsense camera
cvframe = camera.get_frame()
with vpi.Backend.CUDA:
input = vpi.asimage(cvframe, vpi.Format.BGR8).convert(vpi.Format.S16)
with vpi.Backend.CUDA:
corners, scores = input.harriscorners(strength=0.1, sensitivity=0.01, min_nms_distance=20)
time.sleep(0.2)
it will run into segmentation fault after random period.
If I remove the sleep function, it runs perfectly fine without segmentation fault
I can provide the c++ code if you need.
We modify your source to use image input and it can work well.
Could you check if the sample can also work on your side? main.py (2.4 KB)
If yes, the segmentation fault might be related to the camera rather than VPI.
Could you try to turn off the VPI algorithm and only run the loop with the camera and sleep to see if it works?