@@ -110,6 +110,7 @@ typedef enum {
110110typedef enum {
111111 // values written to the CMOS register
112112 FREENECT_AUTO_EXPOSURE = 1 << 14 ,
113+ FREENECT_AUTO_FLICKER = 1 << 7 ,
113114 FREENECT_AUTO_WHITE_BALANCE = 1 << 1 ,
114115 FREENECT_RAW_COLOR = 1 << 4 ,
115116 // arbitrary bitfields to support flag combination
@@ -670,6 +671,34 @@ FREENECTAPI int freenect_set_depth_mode(freenect_device* dev, const freenect_fra
670671 */
671672FREENECTAPI int freenect_set_flag (freenect_device * dev , freenect_flag flag , freenect_flag_value value );
672673
674+ /**
675+ * Get the current exposure in microseconds
676+ *
677+ * @param dev Device to set exposure
678+ * @param time_us exposure time in microseconds
679+ *
680+ * @return 0 on success, < 0 if error
681+ */
682+ FREENECTAPI int freenect_get_exposure (freenect_device * dev , int * time_us );
683+
684+ /**
685+ * Sets a static exposure time in microseconds
686+ * note: you must turn off auto-exposure before calling this function
687+ *
688+ * Sample usage with 33.333ms exposure:
689+ *
690+ * freenect_set_flag(fn_dev, FREENECT_AUTO_EXPOSURE, FREENECT_OFF);
691+ * freenect_set_flag(fn_dev, FREENECT_AUTO_FLICKER, FREENECT_OFF);
692+ * freenect_set_flag(fn_dev, FREENECT_AUTO_WHITE_BALANCE, FREENECT_OFF);
693+ * freenect_set_exposure(fn_dev, 33333);
694+ *
695+ * @param dev Device to set exposure
696+ * @param time_us exposure time in microseconds
697+ *
698+ * @return 0 on success, < 0 if error
699+ */
700+ FREENECTAPI int freenect_set_exposure (freenect_device * dev , int time_us );
701+
673702/**
674703 * Returns the brightness of the IR sensor.
675704 *
0 commit comments