IvLabs/person_following_bot

stereo labs zed 2 camera or any logitech monocular camera

dineshrboson opened this issue · 5 comments

Hi guys currently I don;t have realsense camera. can you let me know how to customize code for zed 2 camera or logitech monocular camera.

You can use zed2 camera which gives depth info. You need to find the code snippet of intel realsense library used and replace with zed2 camera's image acquisition code.
Incase you do this and successfully run the code, feel free to create a pull request for the same. This will increase versatility of repo.🙂

Yes I did the same that you have told just now and I am getting pipeline error as the realsense and zed having differences in setting up the pipeline by importing pyzed library.
import pyzed.sl as sl

Setup Realsense pipeline

pipe = sl.pipeline()
configure = sl.config()
width = 640; height = 480;
configure.enable_stream(sl.stream.depth, width, height, sl.format.z16, 30)
configure.enable_stream(sl.stream.color, width, height, sl.format.rgb8, 30)
dec_filter = sl.decimation_filter ()   # Decimation - reduces depth frame density
spat_filter = sl.spatial_filter()      # Spatial    - edge-preserving spatial smoothing
temp_filter = sl.temporal_filter()    # Temporal   - reduces temporal noise
pipe.start(configure)
align_to = sl.stream.color
align = sl.align(align_to)

I changed the variable in realsense.py rl to sl and imported pyzed lib.
I'm getting errors though. I will try to do it and make a pull request.

Hi, Can you confirm if all of the methods we call are defined in the pyzed module? Also, posting a screenshot of the errors you run into will be helpful.

Yeah Yeah You will be amazed with the zed modules and the codes that they have given for every detection
https://github.com/stereolabs/zed-examples
https://github.com/stereolabs/zed-examples/tree/master/depth%20sensing
https://www.stereolabs.com/docs/tutorials/image-capture/
https://www.stereolabs.com/docs/opencv/python/
https://github.com/stereolabs/zed-opencv/tree/master/python

I installed zed api in my jetson nano once I run the program again I will follow up the error issue here