Calculate mode in OpenCV
Hi guys, Do you know how is the best and simply way to calculate the mode of a matrix?? For example in this matrix: [1 1 2 2 3 3 3 3] The mode is 3... How can I calculate it? THANKS!!!!
Asked: 2015-01-21 07:30:21 -0600
Seen: 587 times
Last updated: Jan 21 '15
Do you know the maximum value? Then you could build a histogram. The index having the most values is the mode.