I try use that code to segment an image, and it work in visual studio, but I need to translate to Java in Android Studio (OpenCV image segmentation in C++ using Watershed).<