I don't know lots of things about the electronics field and controllers. But I want to know how to combine an opencv program with a red traffic light? I know that the answer is something that is micro controller but I only know that there is a compiler AVR which can compile C to hex and then working with micro controllers.
But OpenCV (which I think I won't run on C) is high level and probably won't work with AVR.
So what should I do to combine a machine vision program (by OpenCV & C++) and the timer of a traffic red light?
If you need anymore details just tell me.
I originally reported this question as possible duplicate, but you asked some other questions that need to be addressed.
OpenCV provides a C interface as well as a C++ interface since version 2.0. So in theory, it is possible to configure and build OpenCV using a C compiler, but I don't know the difficulty behind this task since I never done it myself. Note that most of the C++ interface is coded only as a wrapper around the C interface.
About achieving real-time processing, that depends entirely on the processing power of your device and the algorithms you choose to use in your solution.
We recently had a discussion about real-time processing and OpenCV in this thread.