Light compensation matlab source code