TODO Fluxus ARToolKitPlus module.
Returns void
Initializes the AR single marker tracker with the camera resolution and camera parameter file. The forth optional paremeter sets the type of markers to be detected. The marker mode can be 'template, 'id or 'bch. Template markers are the classic marker type used in ARToolKit. Id-based markers directly encode the marker id in the image. Simple markers use 3-times redundancy to increase robustness, while BCH markers use an advanced CRC algorithm to detect and repair marker damages. The default mode is 'id.
Example
(define cam (camera-init 0 320 240)) (ar-init (camera-width cam) (camera-height cam) "data/camera-para.dat")
Returns void
Sets the threshold value that is used for black/white conversion.
Example
(ar-set-threshold 150)
Returns threshold-number
Returns the current threshold value.
Example
(ar-get-threshold)
Returns void
Enables or disables automatic threshold calculation.
Example
(ar-auto-threshold #t)
Returns void
Example
(ar-set-pattern-width 40)
Returns void
Activates the compensation of brightness falloff in the corners of the camera image.
Example
(ar-activate-vignetting-compensation #t)
Returns number
Detects the markers in the image. Returns the number of detected markers.
Example
TODO
Returns projection-matrix-vector
Returns the projection matrix acquired from the camera parameter file.
Example
(set-projection-transform (ar-get-projection-matrix)) (set-camera-transform (mident))
Returns modelview-matrix-vector
Returns the modelview matrix of the marker with the given index or #f if no marker is detected. The number of detected markers are returned by (ar-detect). The index can go from 0 to the number of detected markers - 1.
Example
(let ([marker-count (ar-detect (camera-imgptr cam))]) (for ([i (in-range marker-count)]) (let ([m (ar-get-modelview-matrix i)] [id (ar-get-marker-id)]) (printf "marker index:~a id:~a matrix:~a~n" i id m))))
Returns marker-id-number
Returns the ID of the marker with the given index or #f if the id could not be determined. The number of detected markers are returned by (ar-detect). The index can go from 0 to the number of detected markers - 1.
Example
(let ([marker-count (ar-detect (camera-imgptr cam))]) (for ([i (in-range marker-count)]) (let ([m (ar-get-modelview-matrix i)] [id (ar-get-id i)]) (printf "marker index:~a id:~a matrix:~a~n" i id m))))
Returns confidence-number
Returns the confidence value of the marker with the given index. The number of detected markers are returned by (ar-detect). The index can go from 0 to the number of detected markers - 1.
Example
(let ([marker-count (ar-detect (camera-imgptr cam))]) (for ([i (in-range marker-count)]) (let ([conf (ar-get-confidence i)]) (printf "marker index:~a confidence:~a matrix:~a~n" i id m))))
Returns id-number
Adds a pattern to the tracker, returns the pattern id.
Example
(define hiro (ar-load-pattern "hiro.patt"))