Use example of CameraControl_MatlabToolbox. This program allow to take HDR photographs