How to process live stream from "3D Simulation Camera" UAV toolbox?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Maheedhar Korimi
le 17 Juin 2021
Modifié(e) : Maheedhar Korimi
le 22 Juin 2021
Dear Community,
I'm working on "Unreal Engine Simulation" on UAV.
As I need to perform image processing operations, How do i input live stream data into code?
for Example, we read a ".avi" video file with "vision.VideoFileReader('xxxx.avi')" and use "vision.DeployableVideoPlayer" to further carry out BlobAnalysis/Thresholding/Kalman filter for detection/motion estimation operations.
Similarily, How to input live stream from "3D Simulation Camera".
Your help would be very much appreciated.
Thank you,
Maheedhar
0 commentaires
Réponse acceptée
Remo Pillat
le 22 Juin 2021
Hi Maheedhar,
It's not entirely clear to me if you are working in MATLAB or Simulink, so let me answer your question for both:
Simulink
The "Image" output of the "Simulation 3D Camera" block returns the image from the Unreal simulation as m-by-n-by-3 matrix. This "Image" signal can be used by all image processing blocks, e.g. from Computer Vision Toolbox, so it should be straightforward for you to further process the image. For example, if you want to convert the color image to a grayscale image, you can use the Color Space Conversion block.
MATLAB
If you have image processing code in MATLAB, you can call it from your Simulink model containing the "Simulation 3D Camera" block. To call MATLAB code from Simulink, it's usually easiest to use the MATLAB Function block. Here is a good tutorial that walks you from the basic steps: Create Custom Functionality using MATLAB Function block. You can pass the "Image" signal from the camera block directly to the MATLAB Function block, process the image in MATLAB and then pass the result back into your Simulink model.
Let me know if this resolves your question or not.
Thanks,
Remo
1 commentaire
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!