Finally, the Pi 2:
Code: Select all
Pi 2 Single Thread
AVG -> AQU: 0.024807, IRG: 0.004034, MSK: 0.062391, DCT: 0.120350, DEC: 0.009744, TTL: 0.210951, SPF: 0.511227
MAX -> AQU: 0.531965, IRG: 0.009787, MSK: 0.095889, DCT: 0.168232, DEC: 0.034217, TTL: 0.530957, SPF: 1.062964
MIN -> AQU: 0.010046, IRG: 0.003695, MSK: 0.058993, DCT: 0.059665, DEC: 0.004077, TTL: 0.144755, SPF: 0.188589
Pi 2 Multi Thread
AVG -> AQU: 0.017908, IRG: 0.003730, MSK: 0.061656, DCT: 0.075101, DEC: 0.007501, TTL: 0.089679, SPF: 0.431032
MAX -> AQU: 0.613057, IRG: 0.010669, MSK: 0.108700, DCT: 0.126946, DEC: 0.022022, TTL: 0.619609, SPF: 1.386138
MIN -> AQU: 0.010028, IRG: 0.003486, MSK: 0.059037, DCT: 0.057723, DEC: 0.000000, TTL: 0.071066, SPF: 0.081818
As expected, the multi threaded implementation is faster, because two cores are in use. The single threaded implementation is also slightly faster than the B+. The figures are a definite improvement, about a 25% improvement when comparing the B+ single threaded case with the Pi 2 multi threaded case. However, it's not as dramatic a gain as one might have expected. I suspect that this is because the Pi shares the same GPU as the older Pis and the GPU is handling a lot of the camera load.
On the plus side, I noted that the cpu load, as shown by htop, is much reduced. This is also visible in the above figures; TTL is the time to process the image, excluding acquisition time. It is over 300ms on the B+ and less than 90ms on the Pi 2. That's a pretty dramatic difference. We therefore have additional resources at our disposal. In PiTeRs case, he needs to run the detect and match steps multiple times to differentiate between the symbols. This could now be done on multiple threads with each match result reaching the decision deadline that much faster.
My conclusion is therefore that your robot will definitely benefit from switching to a Pi 2. If you are tracking coloured objects as opposed to doing full symbol or face recognition, the difference will be less noticeable, but faster is always better.
Guzunty: A fully programmable peripheral you build yourself! https://github.com/Guzunty/Pi/wiki