<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div>(defun create-trackbar-example (&optional (camera-index 0) (width *default-width*)<br> (height *default-height*))<br> "Creates a trackbar and attaches it to the specified window.<br> Move the slider to adjust the brightess of the camera output"<br> (with-capture (capture (create-camera-capture camera-index))<br> (let ((window-name "CREATE-TRACKBAR Example")<br> (contrast (cffi:foreign-alloc :int :initial-contents '(50))))<br> (set-capture-property capture +cap-prop-frame-width+ width)<br> (set-capture-property capture +cap-prop-frame-height+ height)<br> (named-window
window-name)<br> (move-window window-name 600 175)<br> (do* ((frame (query-frame capture) (query-frame capture))<br> (dest (clone-image frame))<br> (scalar 0))<br> ((plusp (wait-key *millis-per-frame*)) nil)<br> (format t "Trackbar level: ~a~%~%" (cffi:mem-ref contrast :int))<br> (create-trackbar "Brightness" window-name contrast 100 (change-contrast contrast window-name frame dest))<br> (setf scalar (scalar (- (cffi:mem-ref contrast :int 50)) <br> (- (cffi:mem-ref contrast :int) 50) <br> (- (cffi:mem-ref contrast
:int) 50)))<br> (add-s frame scalar dest)<br> (show-image window-name dest))<br> (destroy-window window-name))))<br><br><br><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier
New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style:
normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">(defun create-trackbar-example (&optional (camera-index 0) (width *default-width*)<br> (height *default-height*))<br> "Creates a trackbar and attaches it to the specified window.<br> Move the slider to adjust the brightess of the camera output"<br> (with-capture (capture (create-camera-capture camera-index))<br> (let ((window-name "CREATE-TRACKBAR Example")<br> (contrast (cffi:foreign-alloc :int :initial-contents '(50))))<br> (set-capture-property capture +cap-prop-frame-width+ width)<br> (set-capture-property capture +cap-prop-frame-height+
height)<br> (named-window window-name)<br> (move-window window-name 600 175)<br> (do* ((frame (query-frame capture) (query-frame capture))<br> (dest (clone-image frame))<br> (scalar 0))<br> ((plusp (wait-key *millis-per-frame*)) nil)<br> (format t "Trackbar level: ~a~%~%" (cffi:mem-ref contrast :int))<br> (create-trackbar "Brightness" window-name contrast 100 (change-contrast contrast window-name frame dest))<br> (setf scalar (scalar (- (cffi:mem-ref contrast :int 50)) <br> (- (cffi:mem-ref contrast :int) 50) <br>
(- (cffi:mem-ref contrast :int) 50)))<br> (add-s frame scalar dest)<br> (show-image window-name dest))<br> (destroy-window window-name))))<br><br><br><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style:
normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier
New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">(defun create-trackbar-example (&optional (camera-index 0) (width *default-width*)<br> (height *default-height*))<br> "Creates a trackbar and attaches it to the specified window.<br> Move the slider to adjust the brightess of the camera output"<br> (with-capture (capture (create-camera-capture camera-index))<br> (let ((window-name "CREATE-TRACKBAR Example")<br> (contrast
(cffi:foreign-alloc :int :initial-contents '(50))))<br> (set-capture-property capture +cap-prop-frame-width+ width)<br> (set-capture-property capture +cap-prop-frame-height+ height)<br> (named-window window-name)<br> (move-window window-name 600 175)<br> (do* ((frame (query-frame capture) (query-frame capture))<br> (dest (clone-image frame))<br> (scalar 0))<br> ((plusp (wait-key *millis-per-frame*)) nil)<br> (format t "Trackbar level: ~a~%~%" (cffi:mem-ref contrast :int))<br> (create-trackbar "Brightness" window-name contrast 100 (change-contrast contrast window-name frame dest))<br>
(setf scalar (scalar (- (cffi:mem-ref contrast :int 50)) <br> (- (cffi:mem-ref contrast :int) 50) <br> (- (cffi:mem-ref contrast :int) 50)))<br> (add-s frame scalar dest)<br> (show-image window-name dest))<br> (destroy-window window-name))))<br><br><br><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif;
background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0);
font-size: 16px; font-family: Courier New,courier,monaco,monospace,sans-serif; background-color: transparent; font-style: normal;">(defun create-trackbar-example (&optional (camera-index 0) (width *default-width*)<br> (height *default-height*))<br> "Creates a trackbar and attaches it to the specified window.<br> Move the slider to adjust the brightess of the camera output"<br> (with-capture (capture (create-camera-capture camera-index))<br> (let ((window-name "CREATE-TRACKBAR Example")<br> (contrast (cffi:foreign-alloc :int :initial-contents '(50))))<br> (set-capture-property capture +cap-prop-frame-width+ width)<br> (set-capture-property capture +cap-prop-frame-height+ height)<br> (named-window
window-name)<br> (move-window window-name 600 175)<br> (do* ((frame (query-frame capture) (query-frame capture))<br> (dest (clone-image frame))<br> (scalar 0))<br> ((plusp (wait-key *millis-per-frame*)) nil)<br> (format t "Trackbar level: ~a~%~%" (cffi:mem-ref contrast :int))<br> (create-trackbar "Brightness" window-name contrast 100 (change-contrast contrast window-name frame dest))<br> (setf scalar (scalar (- (cffi:mem-ref contrast :int 50)) <br> (- (cffi:mem-ref contrast :int) 50) <br> (- (cffi:mem-ref contrast
:int) 50)))<br> (add-s frame scalar dest)<br> (show-image window-name dest))<br> (destroy-window window-name))))<br><br><br><br></div></div></body></html>