A non-transitory computer readable storage medium storing computer executable instructions, wherein the instructions, when executed by a processor, cause the processor to perform a method for setting exposure of a structured light 3D camera, the method comprising:
- receiving one or more images captured from the structured light 3D camera;
- obtaining at least one exposure threshold value of the structured light 3D camera;
- calculating at least one exposure time of the 3D camera from the one or more images based on the at least one exposure threshold value;
- and
- determining one or more exposure time of the structured light 3D camera based on the at least one exposure time from the one or more images and the at least one exposure threshold value,
- wherein calculating the at least one exposure time includes:
- calculating a pixel slope for each pixel included in at least one of the one or more images based on an exposure time;
- adjusting a pixel value of each pixel included in the one or more images based on the pixel slope;
- determining whether a maximum value and a minimum value among the adjusted pixel value of each pixel correspond to a slope set based on overexposed and underexposed threshold values;
- and
- calculating the at least one exposure time based on a determination result.