Automated focus stack hardware/software