How to process live stream from "3D Simulation Camera" UAV toolbox?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Remo Pillat
2021년 6월 22일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!