Extract image from lidar Map without showing figure
Show older comments
Hello lads
I am pretty new in Matlab and I am studying about lidar Maps.
I have been thru the example: Build Map from 2-D Lidar Scans Using SLAM - MATLAB & Simulink - MathWorks United Kingdom.
It worked fine and the lidarMap is shown in a new figure screen.
However, I would like to get the image created from that map and display it to a App GUI Image component rather than opening a new pop-up window.
I've been trying to create image from axes using getimage() function but, it did not work.
Can anyone please help me with that? I know it could be a silly question for Matlab experts but, any example I went thru so far did not work.
Any help is much appreciated.
Thanks
Kleber
5 Comments
Umar
on 16 Jul 2024
Hi Kleber,
Please try it by using the getframe function to capture the image. Afterwards, you should be able to display it in the App GUI. For more information on this function, please refer to https://www.mathworks.com/help/matlab/ref/getframe.html Please let me know if you have any further questions.
DGM
on 16 Jul 2024
I don't have the Lidar Toolbox, but you should be able to specify the parent axes/uiaxes when you call lidarscanmap.show().
You can't add a scan map to a uiimage object, since (afaik) it's not a raster image.
Umar
on 16 Jul 2024
Hi @DGM,
I know you mentioned that you cannot directly add a scan map to a UIImage object in its raw form but correct me if I am wrong you can still incorporate the information from the scan map into your image processing workflow. Taking your comment by illustrating an example like creating a lidarScan object from scan map data. Then, specify the parent axes or UIAxes where to display the lidar scan map using the `lidarscanmap.show()` function. Then, by providing the parent axes as an input parameter, you can visualize the lidar scan map within your image processing workflow.
Kleber
on 16 Jul 2024
Umar
on 16 Jul 2024
No problem Kleber, glad to help out. Please let us know if you have any further questions.
Answers (0)
Categories
Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!