Modulo operation for Mat type (Feature #2484)
Description
Every other operations (or so) are implemented ..
Is there a reason this one is not ?
As usual, there could be Mat % Scalar or Mat % Mat.
I suppose it could be done for integer type matrices and floating point as well (the operation is well defined even for negative numbers).
Associated revisions
Merge pull request #2484 from berak:mat_doc_24
History
Updated by Vadim Pisarevsky over 12 years ago
Well, probably because you are the first to submit such feature request (when the divisor is a power of two, it can be done with bitwise_and). Could you say where such operation is used?
- Assignee set to Vadim Pisarevsky
- Category set to core
- Priority changed from Normal to Low
Updated by nicolas martin about 12 years ago
For example, I had a map of angles and I needed to get values mod 2PI.
A simple (mat % M_2_PI) would have been nice.
Updated by Kirill Kornyakov about 12 years ago
Actually you can work on implementation and submit it as a pull request on the GitHub. But in order to increase the probability of integration you could provide some more examples where such function is needed. OpenCV API is not going to grow much, because it results in high maintenance cost. So, if some code is not "must have", it should stay outside of the main OpenCV modules.
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4443