I am trying to do a marker-controlled watershed segmentation. lidR package is updated and mcwatershed() has been removed in the latest release. How can I apply marker-controlled segmentation? Do you have any recommendations?


1 Answer 1


mcwatershed() relied on the imager package that is an orphaned package on CRAN. This generated troublesshooting on CRAN thus the dependency to imager has been removed. It used the function watershed() from imager. You can start there.

The source code has only been commented so you can still read the original sources to help you.

  • Also, imager::watershed()'s been called from ForestTools::mcws() for some time, though I don't think this was documented until April 2021.
    – Todd West
    Commented Sep 20, 2023 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.