How do get and set a landscape heighmap in c++ / editor?

Hello,

I am working on a project and I am trying to dynamically edit a heightmap using OpenCV and want to know how I can get and set the heightmap. The code will be run only within the editor. I have a refrence to my landscape but don’t know how to get its’ heightmap.

Thank you