Does the MOSSE legacy tracker support 16-bit greyscale?

According to the documentation (see below link) the cv::legacy::TrackerMOSSE class will convert bgr colour imagery to greyscale but there is no information relating to supported bit-depth. Can anyone advise me on whether 16-bit greyscale imagery will be natively processed or whether it such imagery would be converted to 8-bit?

(OpenCV: cv::legacy::TrackerMOSSE Class Reference)

Many thanks for the advice.

no, not so.

though the code is intended for 8bit, if you give it a single channel image, it will use it as is,
at some point, it’ll convert to float, but there is no internal scaling of the values.

however, the code is full of dft’s mulspectrum’s and whatnot, it might just ‘blow up’, producing a lot of NaNs or infs

tl;dr: noone has tried before, gl :wink:

1 Like

you can always take the code from samples/python/MOSSE.py and adapt it to your needs.

this example came first. later, legacy::TrackerMOSSE was added. I don’t think anyone uses the tracker API. last time I checked, it was not flexible enough to support the use cases I had.

I would recommend prototyping in Python, not in C++.

I don’t think there’s much value in the additional 8 bits. if you only use a tiny range of your 16 bits range, map that sensibly to 8 bit and now you’re back to your initial assumption.

1 Like