# Revision history [back]

### Android java convertTo

Hi!

I'm trying to use watershed in android. To do so I need a mask of 32f. I have an image with the zones that I want for the watershed, but it is in RGB. I have tried convertTo but it doesn't work. I have done the following test to try the conversion:

Mat maskColor = new Mat( mBitmapPintar.getHeight(), mBitmapPintar.getWidth(), CvType.CV_8UC3);

Imgproc.cvtColor( maskColor, maskgris, Imgproc.COLOR_BGR2GRAY);