问题
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?
- Changing my programming language and library is so difficult for me, according to some reasons.
- My program must be real-time.
- If there is another system(not controllers and ...) which it costs doesn't much and can run opencv programs, it can be used by me.
If you need anymore details just tell me.
回答1:
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.
回答2:
The answer is not a microcontroller. That's one class too low. Get an ARM SoC (System On Chip) that comes with a DSP (Digital Signal Processor). They're quite common. For instance, the BCM2835 which is used in the Raspberry Pi. According to Broadcom, it should handle 220 Megapixels/second.
来源:https://stackoverflow.com/questions/10556772/how-to-run-opencv-on-on-a-microcontroller