dobrypd / autofocus

Elementary autofocus implementation (tested with Nikon), prove of concept of gPhoto2 library connection to OpenCV.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

autofocus

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.

Evaluating function

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.

Evaluation function: FunctionEvaluation

Focusing strategy

TODO: now, only in comments in source code, go to method int correctFocus(bool, FocusState&, double) here.

Future

TODO:

  • Focusing area (mask). ** Simple - shapes ** Objects, (click on the screen to select one?)
  • Continuous focusing. ** Follow objects.

About

Elementary autofocus implementation (tested with Nikon), prove of concept of gPhoto2 library connection to OpenCV.


Languages

Language:C++ 78.4%Language:CMake 10.0%Language:Shell 7.9%Language:Gnuplot 3.7%