GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoWebScanVisionSampleTask.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanVisionSampleTask.h
3 * @brief Declares a GoWebScanVisionSampleTask object.
4 *
5 * @internal
6 * Copyright (C) 2017-2018 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_SAMPLE_TASK_H
12 #define GO_WEB_SCAN_VISION_SAMPLE_TASK_H
13 
18 
19 kBeginHeader()
20 
21 /**
22  * @class GoWebScanVisionSampleTask
23  * @extends kObject
24  * @ingroup GoWebScanSdk-Control
25  * @brief Represents a task for resampling raw vision data to generate vision tiles for a single camera.
26  * The task uses vision input data and terrain tiles, which are profile tiles that are sampled at
27  * a resolution appropriate for use by the vision sampler, and which has all of its null values
28  * filled in with best-guess values. The task accepts GoWebScanVisionInputMsg objects and
29  * GoWebScanProfileTileMsg objects (for presence data) and produces GoWebScanVisionTileMsg
30  * objects.
31  *
32  * When vision input or profile tile messages are received, they are passed immediately to the
33  * vision combiner, which retains messages until sufficient profile data is available cover the
34  * maximum potential Y-extent of the next vision message. When the vision combiner produces a
35  * frame, which includes a single vision input message and corresponding terrain tiles, the
36  * vision input is processed and then passed to the vision resampler. The vision resampler emits
37  * completed rows as they become available, and those rows are added to an output tile.
38  *
39  * Tiles emitted by the VisionSampleTask can contain null pixels. These occur when the field of
40  * view of the camera is insufficient to cover the tile, when the speed of the system is too
41  * great, resulting in Y-gaps between images, or when input images have been dropped. The x
42  * field of the kRbg structure contains a zero value to indicate a null pixel, or a non-zero
43  * value to indicate a valid pixel.
44  *
45  * Processing steps:
46  * -# Vision input and profile tile messages passed to vision combiner.
47  * -# Vision combiner matches vision input to a set of profile tiles.
48  * -# Vision input is reoriented to standard system orientation.
49  * -# Gains from system calibration are applied to the vision input channels.
50  * -# Vision input is demosaiced to form an RGB image.
51  * -# Vision input is added to the GoWebScanVisionResampler algorithm.
52  * -# Resampled row is assembled into emitted GoWebScanVisionTileMsg.
53  * @see GoWebScanVisionCombiner, GoWebScanVisionResampler, GoWebScanVisionTileMsg
54 */
56 
57 // Forward declaration
59 
60 /**
61 * Constructs a GoWebScanVisionSampleTask object.
62 *
63 * @public @memberof GoWebScanVisionSampleTask
64 * @param task Receives the constructed GoWebScanVisionSampleTask object.
65 * @param process Associated GoWebScanProcess object.
66 * @param configNode Node configuration.
67 * @param allocator Memory allocator (or kNULL for default).
68 * @return Operation status.
69 */
70 GoWebScanFx(kStatus) GoWebScanVisionSampleTask_Construct(GoWebScanVisionSampleTask* task, GoWebScanProcess process, GoWebScanConfigNode configNode, kAlloc allocator);
71 
72 /**
73 * Sets the handler for receiving resampled vision tiles.
74 *
75 * @public @memberof GoWebScanVisionSampleTask
76 * @param task GoWebScanVisionSampleTask object.
77 * @param send Callback function
78 * @param context Receiver argument for callback.
79 * @return Operation status.
80 */
81 GoWebScanFx(kStatus) GoWebScanVisionSampleTask_SetReceiver(GoWebScanVisionSampleTask task, GoWebScanPipeSendFx send, kPointer context);
82 
83 /**
84 * Dispatches a processing job (task + message) to the pipe. Sends the message to a task's
85 * message queue. The task will submit the message to the pipe for processing if no other job is
86 * pending.
87 *
88 * @public @memberof GoWebScanVisionSampleTask
89 * @param task GoWebScanVisionSampleTask object.
90 * @param msg Message to dispatch.
91 * @return Operation status.
92 */
93 GoWebScanFx(kStatus) GoWebScanVisionSampleTask_Dispatch(GoWebScanVisionSampleTask task, GoWebScanPipeMsg msg);
94 
95 /**
96 * Adds a message to the processing queue. Dequeues a message at the end of the queue to submit
97 * to the pipe for scheduling if no other job is currently pending.
98 *
99 * @public @memberof GoWebScanVisionSampleTask
100 * @param task GoWebScanVisionSampleTask object.
101 * @param msg Vision input message to enqueue.
102 * @return Operation status.
103 */
104 GoWebScanFx(kStatus) GoWebScanVisionSampleTask_Send(GoWebScanVisionSampleTask task, GoWebScanPipeMsg msg);
105 
106 /**
107 * Clears the vision combiner and vision resampler algorithms and resets internal variables.
108 *
109 * @public @memberof GoWebScanVisionSampleTask
110 * @param task GoWebScanVisionSampleTask object.
111 * @return Operation status.
112 */
113 GoWebScanFx(kStatus) GoWebScanVisionSampleTask_Clear(GoWebScanVisionSampleTask task);
114 
115 /**
116 * Gets the node configuration for the node associated with this task.
117 *
118 * @public @memberof GoWebScanVisionSampleTask
119 * @param task GoWebScanVisionSampleTask object.
120 * @return Node configuration.
121 */
122 GoWebScanFx(GoWebScanConfigNode) GoWebScanVisionSampleTask_ConfigNode(GoWebScanVisionSampleTask task);
123 
124 kEndHeader()
125 #include <GoWebScanSdk/GoWebScanVisionSampleTask.x.h>
126 
127 #endif
Declares the GoWebScanPipeTask class.
Represents a task for processing raw sensor data to produce system web tiles (Web mode) or detected o...
Represents a container for node-level parameters which are translated from user parameters set in GoW...
Declares a GoWebScanPipe object.
kStatus(kCall * GoWebScanPipeSendFx)(kPointer context, GoWebScanPipeMsg msg)
Defines the signature of the handler used by tasks to receive a message from the pipe.
Definition: GoWebScanPipe.h:35
Essential GoWebScan declarations.
kStatus GoWebScanVisionSampleTask_Construct(GoWebScanVisionSampleTask *task, GoWebScanProcess process, GoWebScanConfigNode configNode, kAlloc allocator)
Constructs a GoWebScanVisionSampleTask object.
GoWebScanConfigNode GoWebScanVisionSampleTask_ConfigNode(GoWebScanVisionSampleTask task)
Gets the node configuration for the node associated with this task.
kStatus GoWebScanVisionSampleTask_Dispatch(GoWebScanVisionSampleTask task, GoWebScanPipeMsg msg)
Dispatches a processing job (task + message) to the pipe.
Represents a task for resampling raw vision data to generate vision tiles for a single camera...
kStatus GoWebScanVisionSampleTask_SetReceiver(GoWebScanVisionSampleTask task, GoWebScanPipeSendFx send, kPointer context)
Sets the handler for receiving resampled vision tiles.
kStatus GoWebScanVisionSampleTask_Clear(GoWebScanVisionSampleTask task)
Clears the vision combiner and vision resampler algorithms and resets internal variables.
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...
kStatus GoWebScanVisionSampleTask_Send(GoWebScanVisionSampleTask task, GoWebScanPipeMsg msg)
Adds a message to the processing queue.
Declares a GoWebScanConfig object.