That is normal: merge creates a multi-channels image from multiple images. (see the doc here). The inRange function creates a binary mask, and I assume, according to your title, that is what you want to do. The inRange function does not exist (yet) in GPU, therefore, you have two options:
- Implement the GPU version of inRange (make a pull request and make the OpenCV community happy). Here is some info if you want to contribute to OpenCV.
- Download the merged image and to the inRange on CPU, eventually upload the result to GPU if you still need to process the image after that. This option is not suitable if you have to do some other process to the GPU after, as it could be slower than doing everything on CPU.