I am working with opencv on android for the development of an image segmentation application, but specifically with the watershed algorithm. I'm opening the image and creating a mask with the same size as the image and passing 0 for all the rows and columns of that mask. However, in the following step, which is to add new values for certain rows and columns of this matrix, I have the error: No get method providing array access With that, I am not able to pass the new values to the matrix, can someone help me with this?
COde:
// Load the image
val srcOriginal = Imgcodecs.imread(currentPhotoPath)
// Create a blank image of zeros (same dimension as img)
val markers = Mat.zeros(srcOriginal.rows(), srcOriginal.cols(), CvType.CV_32F)
// Example assigning a new value to a matrix index
markers.put(0,0,255)
Error:
