Focus.c needs updating with one line of code ;-)

Issue #2912 new
Garry George created an issue

The current focus.c does not handle the near DoF correctly when focus is at infinity. The current code around line 191 is:

lens_info.dof_near = fl + (fdH-fl2)/(H+fd-2fl); // in mm relative to the sensor plane

Needs replacing with:

if (fd>=655000) { lens_info.dof_near = H/2; // in mm relative to the sensor plane } else { lens_info.dof_near = fl + (fdH-fl2)/(H+fd-2fl); // in mm relative to the sensor plane }

I'm sorry I can't take this further myself at the moment.

Comments (1)

  1. Log in to comment