I need an auto focus function that inputs a JPG file and a X,Y coordinate. This coordinate tells what spot I want to focus on in the JPG image.
The function will output something like [positive value, 0, negative value] telling me which way I should change the current focus in order to achieve focus at X,Y of the JPG.
The output of a positive value means the camera needs to refocus forward by that much to achieve focus.
The output of a negative value means the camera needs to refocus backward by that amount to achieve focus.
The output of 0, means the X,Y coordinate is in focus.
The function will be called over and over many times, each time I will supply a new JPG and X,Y. The function will return those values above until it returns a 0 means stop because its now in focus.
This is the basic requirement, the function must be written in C language, and use something like libjpeg in order to process the JPG image.
I think there are several open source packages out there you can use, but it must not be too big since it will be ported to MAC and iOS (iPad, iPhone)
I'm an experienced programmer from a top university and working in a software company which is doing the content indexing for data files and images.
My source code is almost ready. So reducing the delivery date to 2 days.