66 </crown >
77 <crown name =" CSK_MultiImageFilter" >
88 <trait >released</trait >
9- <desc >Please fill in information regarding: What is the idea of this module and its features? +
10- How to use this module in general.... like: +
11- {empty} +
12- Typically the features of this module are used like this (check also main script of this module): +
13- {empty} +
14- **1) Setup** +
15- ToDo +
16- {empty} +
17- **2) Something else....** +
18- </desc >
9+ <desc >Module to provide image filter processing functionality. Multiple instances can be created and will run in multiple threads on the device. +
10+ This module provides a UI for all relevant features. +
11+ {empty} +
12+ Typically to configure this module to work with other modules you should do this: +
13+ {empty} +
14+ 1) If multiple instances are needed, these can be added via 'addInstance()' (not needed if you only use 1 single instace). +
15+ 2) Select the instance you want to configur via setInstance(). +
16+ 3) Set the image filter type via 'setFilterType' and optionally set according filter values if necessary. +
17+ 4) Set the event providing the images to be processed e.g. via setRegisterEvent('CSK_ImagePlayer.OnNewImage'). +
18+ 5) Other modules can register on the 'CSK_MultiImageFilter.OnNewImage[NUM]' event to receive the filtred image for further processing. +
19+ {empty} +
20+ INFO: It is possible to combine multiple filters / instances by adding instances and to register to the related preprocessed image like described in step 5). +</desc >
21+ <enum name =" ImageFilter" trait =" released" >
22+ <desc >Available image filter.</desc >
23+ <item desc =" Convert RGB image to gray image." name =" Gray" >Gray</item >
24+ <item desc =" Canny filter." name =" Canny" >Canny</item >
25+ <item desc =" Blur filter." name =" Blur" >Blur</item >
26+ <item desc =" Crop image." name =" Crop" >Crop</item >
27+ <item desc =" Transform image." name =" Transform" >Transform</item >
28+ </enum >
29+ <enum name =" TransformationSource" trait =" released" >
30+ <desc >Source for transformation data.</desc >
31+ <item desc =" Manually set config to transform image." name =" MANUAL" >MANUAL</item >
32+ <item desc =" Receive config to transform image from external source via event." name =" EXTERNAL" >EXTERNAL</item >
33+ </enum >
1934 <serves >
2035 <event name =" OnNewStatusLoadParameterOnReboot" >
2136 <desc >Notify status if parameters should be loaded on app/device boot up.</desc >
3449 <param desc =" Number of the instance to receive the parameter." multiplicity =" 1" name =" objectNo" type =" int" />
3550 <param desc =" Name of the parameter." multiplicity =" 1" name =" parameter" type =" string" />
3651 <param desc =" Value of the parameter." multiplicity =" 1" name =" value" type =" auto" />
37- <param desc =" If parameter is for specifici internal used object, its number." multiplicity =" ?" name =" internalObjectNo" type =" int" />
52+ <param desc =" If parameter is for specific internal used object, its number." multiplicity =" ?" name =" internalObjectNo" type =" int" />
3853 </event >
3954 <event name =" OnNewSelectedInstance" >
4055 <desc >Notify if new instance is selected.</desc >
@@ -43,11 +58,11 @@ ToDo +
4358 <event name =" OnDataLoadedOnReboot" >
4459 <desc >Event to call if module tried to load parameters and should be ready.</desc >
4560 </event >
46- <event name =" OnNewResultNUM " >
47- <desc >Example of dynamically created event to provide result of instance. +
48- NUM will be replaced by the number of instance (e.g. "OnNewResult1 "). +
61+ <event name =" OnNewImageNUM " >
62+ <desc >Example of dynamically created event to provide result image of instance. +
63+ NUM will be replaced by the number of instance (e.g. "OnNewImage1 "). +
4964INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.</desc >
50- <param desc =" Result" multiplicity =" 1 " name =" result " type =" bool " />
65+ <param alias = " Image " desc =" Result image. " multiplicity =" ? " name =" resultImage " type =" object " />
5166 </event >
5267 <event name =" OnNewParameterName" >
5368 <desc >Notify name of persistent data parameter.</desc >
@@ -87,6 +102,74 @@ NUM will be replaced by the number of instance (e.g. "OnNewResult1"). +</desc>
87102 <desc >Generic event to notify results. E.g. to forward results from single instances.</desc >
88103 <param desc =" Result" multiplicity =" 1" name =" result" type =" bool" />
89104 </event >
105+ <event name =" OnNewStatusImageFilterType" >
106+ <desc >Notify selected image filter type.</desc >
107+ <param desc =" Filter type." multiplicity =" 1" name =" filterType" type =" string" />
108+ </event >
109+ <event name =" OnNewViewerID" >
110+ <desc >Notify currently used viewerID (e.g. to show correct viewer in UI).</desc >
111+ <param desc =" viewerID" multiplicity =" 1" name =" viewerID" type =" string" />
112+ </event >
113+ <event name =" OnNewStatusRegisteredEvent" >
114+ <desc >Notify event instance is registered to receive new image to process.</desc >
115+ <param desc =" Name of event." multiplicity =" 1" name =" eventname" type =" string" />
116+ </event >
117+ <event name =" OnNewStatusShowImage" >
118+ <desc >Notify if image should be showed in UI.</desc >
119+ <param desc =" Status" multiplicity =" 1" name =" status" type =" bool" />
120+ </event >
121+ <event name =" OnNewStatusBlurKernelSizePix" >
122+ <desc >Notify kernel size of blur filter.</desc >
123+ <param desc =" Size of the kernel." multiplicity =" 1" name =" size" type =" int" />
124+ </event >
125+ <event name =" OnNewStatusCannyThresholds" >
126+ <desc >Notify threshold values of canny filter.</desc >
127+ <param desc =" Threshold values." multiplicity =" +" name =" threshold" type =" float" />
128+ </event >
129+ <event name =" OnNewStatusCropPosX" >
130+ <desc >Notify x position to crop image.</desc >
131+ <param desc =" The x position of the top-left corner of the cropped image in the source image." multiplicity =" 1" name =" posX" type =" int" />
132+ </event >
133+ <event name =" OnNewStatusCropPosY" >
134+ <desc >Notify y position to crop image.</desc >
135+ <param desc =" The y position of the top-left corner of the cropped image in the source image." multiplicity =" 1" name =" poxY" type =" int" />
136+ </event >
137+ <event name =" OnNewStatusCropWidth" >
138+ <desc >Notify width of cropped image.</desc >
139+ <param desc =" The width of the cropped image." multiplicity =" 1" name =" width" type =" int" />
140+ </event >
141+ <event name =" OnNewStatusCropHeight" >
142+ <desc >Notify height of cropped image.</desc >
143+ <param desc =" The height of the cropped image." multiplicity =" 1" name =" height" type =" int" />
144+ </event >
145+ <event name =" OnNewStatusRegisteredTransformationEvent" >
146+ <desc >Notify event to receive transformation data to align image.</desc >
147+ <param desc =" Name of event." multiplicity =" 1" name =" eventName" type =" string" />
148+ </event >
149+ <event name =" OnNewStatusTransformationSource" >
150+ <desc >Notify source for transformation data.</desc >
151+ <param desc =" Mode" multiplicity =" 1" name =" mode" type =" string" />
152+ </event >
153+ <event name =" OnNewStatusTransformationX" >
154+ <desc >Notify manual transformation in x direction.</desc >
155+ <param desc =" Transformation in x direction." multiplicity =" 1" name =" xTrans" type =" int" />
156+ </event >
157+ <event name =" OnNewStatusTransformationY" >
158+ <desc >Notify manual transformation in y direction.</desc >
159+ <param desc =" Transformation in y direction." multiplicity =" 1" name =" yTrans" type =" int" />
160+ </event >
161+ <event name =" OnNewStatusTransformationAngle" >
162+ <desc >Notify manual transformation angle.</desc >
163+ <param desc =" Transformation angle." multiplicity =" 1" name =" angle" type =" int" />
164+ </event >
165+ <event name =" OnNewStatusTransformationAngleOriginX" >
166+ <desc >Notify transformation angle origin x position.</desc >
167+ <param desc =" x position" multiplicity =" 1" name =" xPos" type =" int" />
168+ </event >
169+ <event name =" OnNewStatusTransformationAngleOriginY" >
170+ <desc >Notify transformation angle origin y position.</desc >
171+ <param desc =" y position" multiplicity =" 1" name =" yPos" type =" int" />
172+ </event >
90173 <function name =" setParameterName" >
91174 <desc >Function to set the name of the parameters if saved/loaded via the CSK_PersistentData module.</desc >
92175 <param desc =" Name of the parameter" multiplicity =" 1" name =" name" type =" string" />
@@ -124,6 +207,7 @@ NUM will be replaced by the number of instance (e.g. "processInstance1"). +
124207INFO: Other modules can check via "Script.isServedAsFunction" if function of sepecific instance exists. +
125208Needs then to be called via "Script.callFunction".</desc >
126209 <param alias =" Alias" desc =" Transferred object (optional)" multiplicity =" ?" name =" object" type =" object" />
210+ <param alias =" Container" desc =" Optional transformation data (xTrans, yTrans)" multiplicity =" ?" name =" translation" type =" object" />
127211 <return desc =" Processing result (optional)." multiplicity =" ?" name =" result" type =" bool" />
128212 </function >
129213 <function name =" addInstance" >
@@ -133,15 +217,75 @@ Needs then to be called via "Script.callFunction".</desc>
133217 <desc >Function to reset instances to one single instance. +
134218IMPORTANT: As instances start their own threads, the module needs to be restarted if new instances are needed... (see AppEngine docu for "Script.startScript").</desc >
135219 </function >
220+ <function name =" setFilterType" >
221+ <desc >Function to set filter type.</desc >
222+ <param desc =" Filter type." multiplicity =" 1" name =" filterType" ref =" CSK_MultiImageFilter.ImageFilter" type =" enum" />
223+ </function >
224+ <function name =" setShowImage" >
225+ <desc >Function to select if image should be shown on UI.</desc >
226+ <param desc =" Status" multiplicity =" 1" name =" status" type =" bool" />
227+ </function >
228+ <function name =" setBlurKernelSizePix" >
229+ <desc >Function to set kernel size of blur filter.</desc >
230+ <param desc =" Size of the kernel. Must be positive." multiplicity =" 1" name =" kernelSize" type =" int" />
231+ </function >
232+ <function name =" setCannyThreshold" >
233+ <desc >Function to set threshold range of canny filter.</desc >
234+ <param desc =" Threshold" multiplicity =" +" name =" range" type =" float" />
235+ </function >
236+ <function name =" setCropPosX" >
237+ <desc >Function to set x position to crop image.</desc >
238+ <param desc =" The x position of the top-left corner of the cropped image in the source image." multiplicity =" 1" name =" posX" type =" int" />
239+ </function >
240+ <function name =" setCropPosY" >
241+ <desc >Function to set y position to crop image.</desc >
242+ <param desc =" The y position of the top-left corner of the cropped image in the source image." multiplicity =" 1" name =" posY" type =" int" />
243+ </function >
244+ <function name =" setCropWidth" >
245+ <desc >Function to set widht of cropped image.</desc >
246+ <param desc =" The width of the cropped image." multiplicity =" 1" name =" width" type =" int" />
247+ </function >
248+ <function name =" setCropHeight" >
249+ <desc >Function to set height of cropped image.</desc >
250+ <param desc =" The height of the cropped image." multiplicity =" 1" name =" height" type =" int" />
251+ </function >
252+ <function name =" setRegisterTransformationEvent" >
253+ <desc >Function to set event to receive transformation data to align image.</desc >
254+ <param desc =" Event (needs to provide translation data as 'Transform' object)." multiplicity =" 1" name =" event" type =" string" />
255+ </function >
256+ <function name =" setTransformationSource" >
257+ <desc >Function to set source of transformation data.</desc >
258+ <param desc =" Source" multiplicity =" 1" name =" source" ref =" CSK_MultiImageFilter.TransformationSource" type =" enum" />
259+ </function >
260+ <function name =" setTransformationX" >
261+ <desc >Functin to set manual transformation in x direction.</desc >
262+ <param desc =" Translation in x direction." multiplicity =" 1" name =" x" type =" int" />
263+ </function >
264+ <function name =" setTransformationY" >
265+ <desc >Functin to set manual transformation in y direction.</desc >
266+ <param desc =" Translation in y direction." multiplicity =" 1" name =" y" type =" int" />
267+ </function >
268+ <function name =" setTransformationAngle" >
269+ <desc >Functin to set manual transformation angle.</desc >
270+ <param desc =" Transformation angle in degree between -180 and +180." multiplicity =" 1" name =" angle" type =" int" />
271+ </function >
272+ <function name =" setTransformationAngleOriginX" >
273+ <desc >Function to set xPos of origin for manual angle transformation.</desc >
274+ <param desc =" x position" multiplicity =" 1" name =" xPos" type =" int" />
275+ </function >
276+ <function name =" setTransformationAngleOriginY" >
277+ <desc >Function to set yPos of origin for manual angle transformation.</desc >
278+ <param desc =" y position" multiplicity =" 1" name =" yPos" type =" int" />
279+ </function >
136280 </serves >
137281 </crown >
138282 <meta key =" author" >SICK AG</meta >
139- <meta key =" version" >0.1 .0</meta >
283+ <meta key =" version" >1.0 .0</meta >
140284 <meta key =" priority" >low</meta >
141285 <meta key =" copy-protected" >false</meta >
142286 <meta key =" read-protected" >false</meta >
143287 <meta key =" crown2-flow-engine" >false</meta >
144- <meta key =" LuaLoadAllEngineAPI" >true </meta >
288+ <meta key =" LuaLoadAllEngineAPI" >false </meta >
145289 <entry default =" CSK_Module_MultiImageFilter.lua" path =" scripts" />
146290 </application >
147291</manifest >
0 commit comments