1) If live camera is a IP surveillance camera like hickvision , for take images i can use only their SDK in C++ , because this type of videocameras is not compatible with opencv functions or ffmpeg lib.
2) first 5 coollours depending on surface occupied or another criteria?
3) measure what?
You need to recognize what type of box is present in one image? For this task , using background substraction i can cut the region wich belong the box and i can do tasks 1,2,3,5 .Is OK?
I need some photos for see the quality and tests.
Thank you