I have a series of JPG images being returned from a camera and I want to be able to focus on a certain spot.
I need a C Function/program that will take the JPG image, and a X,Y coordinate, and tell me weather I need to move the lens forward or backward in order to focus on the point selected at X,Y on the JPG.
This function will repeat until point X,Y on the image is in focus. Each time a new JPG will be supplied to the C function, and it will return if I should move the lens forward or backward to achieve focus.
I already have program that can send commands over USB to move the camera lens forward or backward, I just need your program to tell me which way to move it in order to focus on a particular point in the image.
The program or function cannot be big because its running on embedded linux, so not a lot of memory space.
Here are some open source project you can look at if you want…
[login to view URL]
[login to view URL]
[login to view URL]
Hello my friend, I have done this before on FPGA to control a camera sensor. I can easily implement it for you in C. Please feel free to contact me if you have any question.