MATLAB Answers

0

Unable to get the camera frame and at the same time perform serial communication with the bot without excessive delay.

Asked by Ahad Maqsood on 12 Sep 2019
Latest activity Edited by Ahad Maqsood on 16 Sep 2019
Hi,
I needed to perform a task where using the frames from the intel camera, I need to navigate the robot to perform collision avoidance. However, my code is unable to perform the task simultaneously. Both the .m files for serial communication of the bot (bot_serial.m) and for acquiring camera frames (values1.m) are attached.
I tried creating a function too for the camera frames and then called it in the bot_serial files but with this logic I am getting a single frame each time a condition is triggered in the bot_serial files and thus the camera cannot stream continuously and neither is the bot able to run continuously.
Please, help me with any possibility to continuously stream the camera and also run the bot at the same time. The values v1,v2 and v3 in values1.m file should be continuously updated and fed to the bot for it navigate accordingly.
Thanks.

  8 Comments

Well, as I said in 100 ms, the maximum you could transmit at that rate would be a 24x24 image. That's really small, downright useless for any image recognition. Your 720x1280 would take 2 and half minutes to transfer.
Serial is not suitable at all for transmitting images in real time. You need a different way to connect to your camera.
What can be the other way to connect to it and perform the operation?
I have downsized the image to 72x148 pixels. Greater pixels doesn't really matter as it is a threshold image. The frames can now be obtained much faster. The only think I need to do now is to use the values v1, v2 and v3 obtained from the frame in the other function i.e. bot_serial where I am performing serial communication.

Sign in to comment.

0 Answers