Adding camera capture function