GoWebScan API
GoWebScanDetector.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanDetector.h
3 * @brief Declares a GoWebScanDetector 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_DETECTOR_H
12 #define GO_WEB_SCAN_DETECTOR_H
13 
19 #include <kApi/Data/kArrayList.h>
20 
21 /**
22 * @struct GoWebScanDetectorParams
23 * @extends kValue
24 * @ingroup GoWebScanSdk-Algorithms
25 * @brief Represents parameters of the detection algorithm.
26 */
28 {
29  kSSize tileColumns; ///< Expected width of input web tiles
30  kSSize tileRows; ///< Expected length of input web tiles
31  GoWebScanDetectionStyle detectionStyle; ///< Method for triggering start of board
32  k32s detectionColumns; ///< Threshold for minimum number of non-null columns to trigger start of board
33  kSSize minRows; ///< Minimum number of rows of detected board
34  kSSize maxRows; ///< Maximum number of rows of detected board
35  kSSize minGapRows; ///< Minimum number of rows between consecutive detected boards
36  kSSize marginRows; ///< Size of top and bottom margin added to detected board output
38 
39 /**
40 * @class GoWebScanDetector
41 * @extends kObject
42 * @ingroup GoWebScanSdk-Algorithms
43 * @brief Represents an algorithm for detecting discrete objects (typically boards) within web tiles.
44 * The algorithm maintains an internal queue of web messages (tiles), and examines presence
45 * data one row at a time to determine if an object is currently detected. A simple state
46 * machine is used to determine when to emit objects.
47 *
48 * The start of a board is triggered by a minimum number of non-null profiles. The detection
49 * style can either be global, meaning the non-null profiles can be disconnected, or local,
50 * which imposes the condition than the non-null profiles are contiguous.
51 */
53 
54 /** Defines the signature for the handler for accepting the completed board. */
55 typedef kStatus(kCall *GoWebScanDetectorDataFx)(kPointer context, k64s tileIndex, GoWebScanSystemMsg* tiles, kSSize tileCount);
56 
57 /**
58 * Constructs a GoWebScanDetector object.
59 *
60 * @public @memberof GoWebScanDetector
61 * @param detector Receives the constructed GoWebScanDetector object.
62 * @param args Detector algorithm parameters.
63 * @param allocator Memory allocator (or kNULL for default).
64 * @return Operation status.
65 */
66 GoWebScanFx(kStatus) GoWebScanDetector_Construct(GoWebScanDetector* detector, const GoWebScanDetectorParams* args, kAlloc allocator);
67 
68 /**
69 * Sets the handler for accepting the completed board.
70 *
71 * @public @memberof GoWebScanDetector
72 * @param detector GoWebScanDetector object.
73 * @param data Callback function
74 * @param context Receiver argument for callback.
75 * @return Operation status.
76 */
78 
79 /**
80 * Adds an input web tile to processing queue.
81 *
82 * @public @memberof GoWebScanDetector
83 * @param detector GoWebScanDetector object.
84 * @param msg Tile message to add.
85 * @return Operation status.
86 */
88 
89 /**
90 * Clears and relinquishes input tile queue.
91 *
92 * @public @memberof GoWebScanDetector
93 * @param detector GoWebScanDetector object.
94 * @return Operation status.
95 */
97 
98 #include <GoWebScanSdk/GoWebScanDetector.x.h>
99 
100 #endif
Represents a style of triggering the start of an object when in detection mode. The start of an objec...
kStatus(kCall * GoWebScanDetectorDataFx)(kPointer context, k64s tileIndex, GoWebScanSystemMsg *tiles, kSSize tileCount)
Defines the signature for the handler for accepting the completed board.
Definition: GoWebScanDetector.h:55
kStatus GoWebScanDetector_Construct(GoWebScanDetector *detector, const GoWebScanDetectorParams *args, kAlloc allocator)
Constructs a GoWebScanDetector object.
Declares the GoWebScanPipeMsg class.
kStatus GoWebScanDetector_SetDataHandler(GoWebScanDetector detector, GoWebScanDetectorDataFx data, kPointer context)
Sets the handler for accepting the completed board.
Essential GoWebScan declarations.
GoWebScanDetectionStyle detectionStyle
Method for triggering start of board.
Definition: GoWebScanDetector.h:31
Represents an algorithm for detecting discrete objects (typically boards) within web tiles...
Represents a container of GoWebScanPipeMsg tile messages of each tile type (profile, tracheid, and vision) and each system plane (top and bottom). This message is used to contain the X and Y-axis matched tile output of merging, and also of board detection (where the tiles represent a detected board).
Declares a GoWebScanSystemMsg object.
k32s detectionColumns
Threshold for minimum number of non-null columns to trigger start of board.
Definition: GoWebScanDetector.h:32
kSSize minRows
Minimum number of rows of detected board.
Definition: GoWebScanDetector.h:33
kSSize tileRows
Expected length of input web tiles.
Definition: GoWebScanDetector.h:30
Defines GoWebScan utility functions.
kSSize minGapRows
Minimum number of rows between consecutive detected boards.
Definition: GoWebScanDetector.h:35
Declares a GoWebScanProfileTileMsg object.
kStatus GoWebScanDetector_Clear(GoWebScanDetector detector)
Clears and relinquishes input tile queue.
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...
kStatus GoWebScanDetector_AddTile(GoWebScanDetector detector, GoWebScanPipeMsg msg)
Adds an input web tile to processing queue.
Represents parameters of the detection algorithm.
Definition: GoWebScanDetector.h:27
kSSize tileColumns
Expected width of input web tiles.
Definition: GoWebScanDetector.h:29
kSSize maxRows
Maximum number of rows of detected board.
Definition: GoWebScanDetector.h:34
kSSize marginRows
Size of top and bottom margin added to detected board output.
Definition: GoWebScanDetector.h:36