GoWebScan API
GoWebScanCalDetector.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanCalDetector.h
3 * @brief Declares a GoWebScanCalDetector object.
4 *
5 * @internal
6 * Copyright (C) 2017-2026 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 
11 #ifndef GO_WEB_SCAN_CAL_DETECTOR_H
12 #define GO_WEB_SCAN_CAL_DETECTOR_H
13 
17 
18 /**
19 * @struct GoWebScanCalDetectorState
20 * @extends kValue
21 * @ingroup GoWebScanSdk-Calibration
22 * @brief Represents states of calibration bar detection state machine.
23 *
24 * The following enumerators are defined:
25 * - #GO_WEB_SCAN_CAL_DETECTOR_STATE_SEARCHING
26 * - #GO_WEB_SCAN_CAL_DETECTOR_STATE_SCANNING
27 * - #GO_WEB_SCAN_CAL_DETECTOR_STATE_ENDING
28 */
30 /** @name GoWebScanCalDetectorState
31 *@{*/
32 #define GO_WEB_SCAN_CAL_DETECTOR_STATE_SEARCHING (0) ///< Detector is searching for the start of the object.
33 #define GO_WEB_SCAN_CAL_DETECTOR_STATE_SCANNING (1) ///< Detector has found the object and is scanning.
34 #define GO_WEB_SCAN_CAL_DETECTOR_STATE_ENDING (2) ///< Detector has found the end of the object.
35 /**@}*/
36 
37 /**
38 * @struct GoWebScanCalDetectorParams
39 * @extends kValue
40 * @ingroup GoWebScanSdk-Calibration
41 * @brief Represents parameters of the calibration detector algorithm.
42 */
44 {
45  k32s minTiles; ///< Minimum count of tiles needed for detection of the calibration bar.
46  k32s maxTiles; ///< Maximum count of tiles needed for detection of the calibration bar.
47  k32s leadMarginTiles; ///< Leading edge data capture margin in Y for calibration (mils).
48  k32s trailMarginTiles; ///< Trailing edge data capture margin in Y for calibration (mils).
49  k32s minGapTiles; ///< Minimum Y-axis gap between successive objects for calibration object detection (mils).
50  k64f detectionThreshold; ///< Minimum number of non-null profile spots for system calibration bar detection.
52 
53 /**
54 * @class GoWebScanCalDetector
55 * @extends kObject
56 * @ingroup GoWebScanSdk-Calibration
57 * @brief Represents an algorithm for detecting a calibration bar in Y-matched system tiles of raw sensor
58 * messages. This algorithm is similar to GoWebScanDetector but is designed to run with raw sensor
59 * messages. A simple state machine is used to determine when to emit objects. The detection method
60 * for the calibration bar is global; the number of non-null profile points must exceed the
61 * detection threshold, but no condition of contiguity is imposed.
62 */
64 
65 /** Defines the signature for the handler for accepting the output dataset. */
66 typedef kStatus (kCall *GoWebScanCalDetectorDataFunction)(kPointer context, k64s startTile, GoWebScanCalInputTileSet* tilesSets, kSize count);
67 
68 /**
69  * Constructs a GoWebScanCalDetector object.
70  *
71  * @public @memberof GoWebScanCalDetector
72  * @param detector Receives the constructed GoWebScanCalDetector object.
73  * @param args Algorithm parameters.
74  * @param allocator Memory allocator (or kNULL for default).
75  * @return Operation status.
76  */
78 
79 /**
80 * Sets the handler for accepting the output data from the algorithm.
81 *
82 * @public @memberof GoWebScanCalDetector
83 * @param detector GoWebScanCalDetector object.
84 * @param data Callback function
85 * @param context Receiver argument for callback.
86 * @return Operation status.
87 */
89 
90 /**
91  * Adds a set of input tiles to the detector. Each tiles contains Y-matched raw sensor messages.
92  *
93  * @public @memberof GoWebScanCalDetector
94  * @param detector GoWebScanCalDetector object.
95  * @param tileSet Pointer to input tile sets.
96  * @return Operation status.
97  */
99 
100 /**
101  * Gets the current state of the detector.
102  *
103  * @public @memberof GoWebScanCalDetector
104  * @param detector GoWebScanCalDetector object.
105  * @return Detector state.
106  */
108 
109 /**
110  * Clear all data from the detector.
111  *
112  * @public @memberof GoWebScanCalDetector
113  * @param detector GoWebScanCalDetector object.
114  * @return Operation status.
115  */
117 
118 #include <GoWebScanSdk/GoWebScanCalDetector.x.h>
119 
120 #endif
Represents states of calibration bar detection state machine.
k32s minTiles
Minimum count of tiles needed for detection of the calibration bar.
Definition: GoWebScanCalDetector.h:45
k64f detectionThreshold
Minimum number of non-null profile spots for system calibration bar detection.
Definition: GoWebScanCalDetector.h:50
k32s trailMarginTiles
Trailing edge data capture margin in Y for calibration (mils).
Definition: GoWebScanCalDetector.h:48
kStatus GoWebScanCalDetector_Clear(GoWebScanCalDetector detector)
Clear all data from the detector.
k32s leadMarginTiles
Leading edge data capture margin in Y for calibration (mils).
Definition: GoWebScanCalDetector.h:47
Essential GoWebScan declarations.
k32s minGapTiles
Minimum Y-axis gap between successive objects for calibration object detection (mils).
Definition: GoWebScanCalDetector.h:49
Represents an algorithm for detecting a calibration bar in Y-matched system tiles of raw sensor messa...
kStatus GoWebScanCalDetector_SetDataHandler(GoWebScanCalDetector detector, GoWebScanCalDetectorDataFunction data, kPointer context)
Sets the handler for accepting the output data from the algorithm.
Represents a Y-matched tile spanning a system plane for a particular data type. These tile sets are p...
Represents parameters of the calibration detector algorithm.
Definition: GoWebScanCalDetector.h:43
k32s maxTiles
Maximum count of tiles needed for detection of the calibration bar.
Definition: GoWebScanCalDetector.h:46
kStatus GoWebScanCalDetector_Construct(GoWebScanCalDetector *detector, const GoWebScanCalDetectorParams *args, kAlloc allocator)
Constructs a GoWebScanCalDetector object.
kStatus GoWebScanCalDetector_AddTileSet(GoWebScanCalDetector detector, GoWebScanCalInputTileSet *tileSet)
Adds a set of input tiles to the detector.
Declares a GoWebScanCalInputTileSet object.
GoWebScanCalDetectorState GoWebScanCalDetector_GetState(GoWebScanCalDetector detector)
Gets the current state of the detector.
kStatus(kCall * GoWebScanCalDetectorDataFunction)(kPointer context, k64s startTile, GoWebScanCalInputTileSet *tilesSets, kSize count)
Defines the signature for the handler for accepting the output dataset.
Definition: GoWebScanCalDetector.h:66
Declares a GoWebScanConfig object.