GoWebScan API
 All Classes Files Functions Variables Typedefs Macros Modules Pages
GoWebScanDetectionTask.h
Go to the documentation of this file.
1 /**
2 * @file GoWebScanDetectionTask.h
3 * @brief Declares a GoWebScanDetectionTask object.
4 *
5 *
6 * @internal
7 * Copyright (C) 2017-2018 by LMI Technologies Inc.
8 * Licensed under the MIT License.
9 * Redistributed files must retain the above copyright notice.
10 */
11 
12 #ifndef GO_WEB_SCAN_DETECTION_TASK_H
13 #define GO_WEB_SCAN_DETECTION_TASK_H
14 
19 
20 kBeginHeader()
21 
22 /**
23 * @class GoWebScanDetectionTask
24 * @extends kObject
25 * @ingroup GoWebScanSdk-Control
26 * @brief Represents a task for identifying discrete objects within presence data, aggregating
27 * web tiles into complete objects, performing optional post-processing, and emitting the
28 * results. GoWebScanDetectionTask is only used in Detection Mode, and is the final stage
29 * before results are delivered back to the GoWebScanProcess object.
30 *
31 * Upon arrival, web messages are immediately added to a GoWebScanDetector object, which
32 * identifies groups of tiles forming a complete object. When the GoWebScanDetector finds
33 * a complete object, a detector frame is passed back to GoWebScanDetectionTask for
34 * processing. Individual web tiles are appended to form object-sized images (one image
35 * per top/bottom group and per profile/vision/tracheid type), which are then (optionally)
36 * post-processed. The final results are combined into a single GoWebScanSystemMsg and
37 * emitted from GoWebScanDetectionTask.
38 *
39 * Processing steps:
40 * -# GoWebScanSystemMsg objects from GoWebScanWebTask are added to the GoWebScanDetector
41 * algorithm.
42 * -# After the detector has found a complete object, the task combines the web tiles
43 * containing the object.
44 * -# If the edge filter option is enabled, edge spikes and disconnected regions are
45 * filtered.
46 * -# If the background filter is enabled, the background of tracheid and vision data is
47 * removed.
48 * -# The final GoWebScanSystemMsg is emitted.
49 * @see GoWebScanDetector, GoWebScanWebTask, GoWebScanSystemMsg, GoWebScanEdgeFilter
50 */
52 
53 // Forward declaration
55 
56 /**
57  * Constructs a GoWebScanDetectionTask object.
58  *
59  * @public @memberof GoWebScanDetectionTask
60  * @param task Receives the constructed GoWebScanDetectionTask object.
61  * @param process Associated GoWebScanProcess object which will receive the detected result.
62  * @param config System configuration.
63  * @param allocator Memory allocator (or kNULL for default).
64  * @return Operation status.
65  */
66 GoWebScanFx(kStatus) GoWebScanDetectionTask_Construct(GoWebScanDetectionTask* task, GoWebScanProcess process, GoWebScanConfig config, kAlloc allocator);
67 
68 /**
69 * Sets the handler for receiving emitted detected boards.
70 *
71 * @public @memberof GoWebScanDetectionTask
72 * @param task GoWebScanDetectionTask object.
73 * @param send Callback function
74 * @param context Receiver argument for callback.
75 * @return Operation status.
76 */
77 GoWebScanFx(kStatus) GoWebScanDetectionTask_SetReceiver(GoWebScanDetectionTask task, GoWebScanPipeSendFx send, kPointer context);
78 
79 /**
80  * Adds a message to the processing queue. Dequeues a message at the end of the queue to submit
81  * to the pipe for scheduling if no other job is currently pending.
82  *
83  * @public @memberof GoWebScanDetectionTask
84  * @param task GoWebScanDetectionTask object.
85  * @param msg Message to enqueue.
86  * @return Operation status.
87  */
88 GoWebScanFx(kStatus) GoWebScanDetectionTask_Send(GoWebScanDetectionTask task, GoWebScanPipeMsg msg);
89 
90 /**
91  * Clears detector algorithm and resets internal variables.
92  *
93  * @public @memberof GoWebScanDetectionTask
94  * @param task GoWebScanDetectionTask object.
95  * @return Operation status.
96  */
97 GoWebScanFx(kStatus) GoWebScanDetectionTask_Clear(GoWebScanDetectionTask task);
98 
99 kEndHeader()
100 #include <GoWebScanSdk/GoWebScanDetectionTask.x.h>
101 
102 #endif
Declares the GoWebScanPipeTask class.
Represents a task for processing raw sensor data to produce system web tiles (Web mode) or detected o...
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
kStatus GoWebScanDetectionTask_SetReceiver(GoWebScanDetectionTask task, GoWebScanPipeSendFx send, kPointer context)
Sets the handler for receiving emitted detected boards.
Essential GoWebScan declarations.
Represents a task for identifying discrete objects within presence data, aggregating web tiles into c...
kStatus GoWebScanDetectionTask_Send(GoWebScanDetectionTask task, GoWebScanPipeMsg msg)
Adds a message to the processing queue.
kStatus GoWebScanDetectionTask_Clear(GoWebScanDetectionTask task)
Clears detector algorithm and resets internal variables.
kStatus GoWebScanDetectionTask_Construct(GoWebScanDetectionTask *task, GoWebScanProcess process, GoWebScanConfig config, kAlloc allocator)
Constructs a GoWebScanDetectionTask object.
Base class for a msg that can be processed with a GoWebScanPipeTask and submitted to the GoWebScanPip...
Represents a container for system-level parameters which are translated from user parameters set in G...
Declares a GoWebScanConfig object.