This project is gPhoto2 connection to OpenCV prove of concept. It's simple implementation of autofocus based of edges detection. It was tested only with Nikon DSLR. (Nikon D90). But shall work on all Nikon DSLRs, and with little effort with other devices.
- For OpenCV extension go to my OpenCV fork on github: OpenCV with extension
- For detailed gPhoto2 information go to: gPhoto2 project
The evaluation function is really easy (fraction of edges in frame). But it is good enough for this purpose. I've tested this function with 6 different scenes.
TODO: now, only in comments in source code, go to method
int correctFocus(bool, FocusState&, double)
here.
TODO:
- Focusing area (mask). ** Simple - shapes ** Objects, (click on the screen to select one?)
- Continuous focusing. ** Follow objects.