GoWebScan API
GoWebScanVisionCombiner.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanVisionCombiner.h
3 * @brief Declares a GoWebScanVisionCombiner 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_VISION_COMBINER_H
12 #define GO_WEB_SCAN_VISION_COMBINER_H
13 
19 #include <kApi/Data/kArrayList.h>
20 
21 /**
22  * @class GoWebScanVisionCombiner
23  * @extends kObject
24  * @ingroup GoWebScanSdk-Algorithms
25  * @brief Represents an algorithm to retain vision and terrain messages until a matching set in Y is
26  * available. The combiner emits a frame when it has one vision image and all of the profiles
27  * that potentially overlap in Y with that vision image.
28  *
29  * Algorithm steps:
30  * -# Vision and terrain tiles are enqueued as they arrive.
31  * -# The min and max Y-extents of the demosaiced image are determined (after applying
32  * Y-offsets from system calibration).
33  * -# Based on the Y-extents, any vision tiles completely overlapping with other vision
34  * tiles are discarded.
35  * -# Based on the Y position min and max limits per vision tile, profile tiles are matched.
36  */
38 
39 /**
40 * @struct GoWebScanVisionCombinerParams
41 * @extends kValue
42 * @ingroup GoWebScanSdk-Algorithms
43 * @brief Represents parameters of the vision combiner algorithm.
44 */
46 {
47  k64s minimumTileYExtent; ///< Expected minimum Y extent of each vision tile
48  k64s coherencyDistance; ///< Lane is disabled if the distance between the first undelivered tile and last undelivered tile exceed this threshold (mils).
49  k64s coherencyTime; ///< Lane is disabled if the time between the first undelivered tile and the last undelivered tile exceed this threshold (microseconds).
51 
52 /** Defines the signature for the handler for accepting the output matched vision and profile tiles. */
53 typedef kStatus(kCall *GoWebScanVisionCombinerDataFx)(kPointer context, GoWebScanVisionInputMsg visionInput, k64s profileTileStart,
54  GoWebScanProfileTileMsg* profileTiles, kSSize profileTileCount);
55 
56 /** Defines the signature for the handler to compute the min and max Y-extents for a vision tile. */
57 typedef kStatus(kCall *GoWebScanVisionCombinerPositionFx)(kPointer context, GoWebScanVisionInputMsg visionInput, k64s* firstTile, k64s* lastTile);
58 
59 /**
60  * Constructs a GoWebScanVisionCombiner object.
61  *
62  * @public @memberof GoWebScanVisionCombiner
63  * @param combiner Receives the constructed GoWebScanVisionCombiner object.
64  * @param args Algorithm parameters.
65  * @param allocator Memory allocator (or kNULL for default).
66  * @return Operation status.
67  */
69 
70 /**
71 * Sets the handler for accepting the output data from the algorithm. Typically the
72 * matched vision and profile tiles would be passed to the vision resampler algorithm.
73 *
74 * @public @memberof GoWebScanVisionCombiner
75 * @param combiner GoWebScanVisionCombiner object.
76 * @param data Callback function
77 * @param context Receiver argument for callback.
78 * @return Operation status.
79 */
81 
82 /**
83  * Sets the handler for determining the min and max Y-extents of the vision tile.
84  *
85  * @public @memberof GoWebScanVisionCombiner
86  * @param combiner GoWebScanVisionCombiner object.
87  * @param data Callback function
88  * @param context Receiver argument for callback.
89  * @return Operation status.
90  */
92 
93 /**
94  * Adds a vision or profile tile message to the algorithm processing queue.
95  *
96  * @public @memberof GoWebScanVisionCombiner
97  * @param combiner GoWebScanVisionCombiner object.
98  * @param msg Tile message to add. Message type ID should be
99  * GO_WEB_SCAN_MSG_TYPE_VISION_INPUT or GO_WEB_SCAN_MSG_TYPE_PROFILE_TILE.
100  * @return Operation status.
101  */
103 
104 /**
105 * Clears and relinquishes all lane tile queues.
106 *
107 * @public @memberof GoWebScanVisionCombiner
108 * @param combiner GoWebScanVisionCombiner object.
109 * @return Operation status.
110 */
112 
113 #include <GoWebScanSdk/GoWebScanVisionCombiner.x.h>
114 
115 #endif
kStatus GoWebScanVisionCombiner_SetDataHandler(GoWebScanVisionCombiner combiner, GoWebScanVisionCombinerDataFx data, kPointer context)
Sets the handler for accepting the output data from the algorithm.
kStatus GoWebScanVisionCombiner_Add(GoWebScanVisionCombiner combiner, GoWebScanPipeMsg msg)
Adds a vision or profile tile message to the algorithm processing queue.
kStatus GoWebScanVisionCombiner_SetPositionHandler(GoWebScanVisionCombiner combiner, GoWebScanVisionCombinerPositionFx data, kPointer context)
Sets the handler for determining the min and max Y-extents of the vision tile.
Represents parameters of the vision combiner algorithm.
Definition: GoWebScanVisionCombiner.h:45
kStatus(kCall * GoWebScanVisionCombinerDataFx)(kPointer context, GoWebScanVisionInputMsg visionInput, k64s profileTileStart, GoWebScanProfileTileMsg *profileTiles, kSSize profileTileCount)
Defines the signature for the handler for accepting the output matched vision and profile tiles...
Definition: GoWebScanVisionCombiner.h:53
k64s coherencyDistance
Lane is disabled if the distance between the first undelivered tile and last undelivered tile exceed ...
Definition: GoWebScanVisionCombiner.h:48
k64s coherencyTime
Lane is disabled if the time between the first undelivered tile and the last undelivered tile exceed ...
Definition: GoWebScanVisionCombiner.h:49
Declares the GoWebScanPipeMsg class.
kStatus(kCall * GoWebScanVisionCombinerPositionFx)(kPointer context, GoWebScanVisionInputMsg visionInput, k64s *firstTile, k64s *lastTile)
Defines the signature for the handler to compute the min and max Y-extents for a vision tile...
Definition: GoWebScanVisionCombiner.h:57
Essential GoWebScan declarations.
kStatus GoWebScanVisionCombiner_Construct(GoWebScanVisionCombiner *combiner, const GoWebScanVisionCombinerParams *args, kAlloc allocator)
Constructs a GoWebScanVisionCombiner object.
Represents a message containing a raw vision message from a sensor.
Represents a message containing a tile of X and Y resampled profile Z data. This message can be used ...
kStatus GoWebScanVisionCombiner_Clear(GoWebScanVisionCombiner combiner)
Clears and relinquishes all lane tile queues.
k64s minimumTileYExtent
Expected minimum Y extent of each vision tile.
Definition: GoWebScanVisionCombiner.h:47
Defines GoWebScan utility functions.
Declares a GoWebScanProfileTileMsg object.
Represents an algorithm to retain vision and terrain messages until a matching set in Y is available...
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...
Declares a GoWebScanVisionInputMsg object.