Extract image from lidar Map without showing figure

Hello lads
I am pretty new in Matlab and I am studying about lidar Maps.
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

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.
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.
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.
Thanks @Umar
Using getframe() function along with frame2im() function worked fine.
Thanks
No problem Kleber, glad to help out. Please let us know if you have any further questions.

Sign in to comment.

Answers (0)

Categories

Asked:

on 15 Jul 2024

Commented:

on 16 Jul 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!