This is more complicated than it first seems. My solution would be train a network for this task. If you want to segment the mouse, you have to collect a few hundreds of pictures from different contexts. Maybe 100 could give you a satisfying result already. I would use transfer learning (this means using a network already trained with some other data). Using the following repository it's not so complicated: https://github.com/qubvel/segmentation_models
For data augmentation I would use imgaug:
https://imgaug.readthedocs.io/en/latest/
With a solution not using deep you could use texture analysis. I would use Gabor decomposition for this, you could probably see the difference between the texture of the background and the mouse. However a neural seems simpler and a more trendy technology to learn.
You should also consider to buy a new imaging device and/or an IR light projector, if that's why you have such a low contrast. Only the IR camera of a Raspberry PI you would get incredible images compared with those and your detection might work without any change.