OpenCV isn't portable to microcontroller systems. Current MCUs have similar architecture and computing power as ARM CPUs, but as long as your system can't handle the minimum software requirements, it won't work.
However OpenVx might be the thing you are looking for. It is a computer vision library for embedded devices. Several vision-oriented microcontrollers are compatible with OpenVx. (I don't know the STM32F4, but STMicroelectronics makes OpenVX compatible MCUs).
Otherwise you'll have to implement the algorithms yourself, as @Eduardo said. Writing a specific application for a target architecture will be much-much more efficient than using 3rd party libraries.
[UPDATE] There is also a Python library adapted to MCUs called MicroPython. This can simplify the memory management and array operations compared to C++. MicroPython can even have image processing libraries for certain boards e.g. OpenMV.
that's a microcontroller, not a computer ?
Yes, I want solution for Micro controller only if possible
not an expert, but your chances seem low. (even a simple malloc() requires an os of some kind)
Hey Berak!! Thanks for your opinion... May i have minimum resources details if you have worked on OpenCV? After lot of googling, i came to certain things like require high processing capable CPU, huge RAM, multiple FPs, but don't find exact minimum number of that resources..It would be helpful for me if i have that numbers.
I just want to know the exact reasons why OpenCV is not possible to port in MCU?
again, i cannot answer your question, but maybe have a look here .
I have no experience with microcontrollers but in my opinion it depends also of the type of architecture of the microcontroller (with ARM microcontrollers, maybe it is feasible). If the task is really specific (finger detection), I would implement myself the few necessary functions (color space conversion, image thresholding, contour detection, etc.) instead of trying to compile / port OpenCV on another architecture.