Point cloud visualization functions and apps perform poorly on Mac platforms when using the rotate, pan, and zoom interactions

14 views (last 30 days)
In MATLAB R2023a, when I am using one of the point cloud visualizations listed on a Mac-based platform, I am unable to smoothly rotate, pan, or zoom the point cloud in the viewer.
  • pcshow
  • pcshowpair
  • pcplayer
  • GroundTruth Labeler
  • Lidar Labeler
  • Lidar Camera Calibrator

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Sep 2023
Edited: MathWorks Support Team on 13 Sep 2023
There are known performance issues with point cloud visualizations used on Mac-based platforms due to the rendering library that is used by default. These performance issues were introduced in the R2023a release of MATLAB and are experienced when using one of these specific Mac configurations:
  • Mac machine with AMD graphics card
  • Mac machine with M1 or M2 chip CPU
For the visualization functions, the performance issue is experienced only when the current 'figure' is created as a 'uifigure' object. Each of the workarounds provided must be executed with no figure windows or apps open in MATLAB (such as pcshow, pcshowpair, pcplayer, and apps that display point clouds). This enables the correct graphics library to be used on Mac-based platforms, after executing the commands.
Workaround for pcshow:
You can use one of these workarounds:\n
  1. Use the pcviewer function instead of the pcshow function
  2. Create a figure object instead of a uifigure object as the parent to the axes.
  3. If you want to use a uifigure object as the parent to the axes, and your machine is equipped with an AMD graphics card, then use the workaround for apps that is explained in the Workaround for apps section.
Workaround for pcshowpair and pcplayer:
You can use one of these workarounds:\n
  1. Create a figure object instead of a uifigure object as the parent to the axes.
  2. If you want to use a uifigure object as the parent to the axes, and your machine is equipped with an AMD graphics card, then use the workaround for apps that is explained in the Workaround for apps section.
Workaround for apps (Available only for Mac machines equipped with AMD graphics card):
To fix this issue for apps, configure MATLAB to use a Mac-based graphics library by running these commands.
>> wm = matlab.internal.webwindowmanager.instance;
>> wm.setStartupOptions("ExtProcess", "--use-angle=metal");
NOTE
  • You only need to execute the commands once per MATLAB session.
  • Close all open MATLAB figure windows and apps before running the commands.
  • The internal commands to execute are valid for R2023a or earlier, and may change in a future release. Because these commands are internal, they are not documented.
To revert back to the old graphics library, execute these commands:
>> wm = matlab.internal.webwindowmanager.instance;
>> wm.setStartupOptions('ExtProcess', '');
For all functions and apps: To turn off the warning message received, execute these commands:
>> warning("off", "vision:pointcloud:HGMACIssue")

More Answers (0)

Categories

Find more on Develop uifigure-Based Apps 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!