An improved optical cantilever technique using image processing for measuring in situ stress in thin films