You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CSK_Module_MultiImageEdgeMatcher/pages/pages/CSK_Module_MultiImageEdgeMatcher/CSK_Module_MultiImageEdgeMatcher.css
Copy file name to clipboardExpand all lines: CSK_Module_MultiImageEdgeMatcher/pages/pages/CSK_Module_MultiImageEdgeMatcher/CSK_Module_MultiImageEdgeMatcher.html
Copy file name to clipboardExpand all lines: CSK_Module_MultiImageEdgeMatcher/scripts/CSK_Module_MultiImageEdgeMatcher.lua
+3-28Lines changed: 3 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@
31
31
-- If app property "LuaLoadAllEngineAPI" is FALSE, use this to load and check for required APIs
32
32
-- This can improve performance of garbage collection
33
33
34
-
--_G.availableAPIs = require('ImageProcessing/MultiImageEdgeMatcher/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
34
+
_G.availableAPIs=require('ImageProcessing/MultiImageEdgeMatcher/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
-- Option A --> prepare an event to trigger processing via this one
71
-
--Script.serveEvent("CSK_MultiImageEdgeMatcher.OnNewTestEvent", "MultiImageEdgeMatcher_OnNewTestEvent") --> Create event to listen to and process forwarded object
72
-
--CSK_MultiImageEdgeMatcher.setRegisterEvent('CSK_MultiImageEdgeMatcher.OnNewTestEvent') --> Register processing to the event
73
-
74
-
--Script.notifyEvent('OnNewTestEvent', data)
75
-
76
-
-- Option B --> trigger processing via function call
77
-
local result = CSK_MultiImageEdgeMatcher.processSomething(data)
78
-
79
-
end
80
-
end
81
-
82
-
-- Call processing function after persistent data was loaded
Copy file name to clipboardExpand all lines: CSK_Module_MultiImageEdgeMatcher/scripts/ImageProcessing/MultiImageEdgeMatcher/MultiImageEdgeMatcher_Controller.lua
Copy file name to clipboardExpand all lines: CSK_Module_MultiImageEdgeMatcher/scripts/ImageProcessing/MultiImageEdgeMatcher/MultiImageEdgeMatcher_Model.lua
+44-44Lines changed: 44 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -31,13 +31,6 @@ function multiImageEdgeMatcher.create(multiImageEdgeMatcherInstanceNo)
31
31
self.multiImageEdgeMatcherInstanceNoString=tostring(self.multiImageEdgeMatcherInstanceNo) -- Number of this instance as string
-- Optionally check if specific API was loaded via
35
-
--[[
36
-
if _G.availableAPIs.specific then
37
-
-- ... doSomething ...
38
-
end
39
-
]]
40
-
41
34
-- Create parameters etc. for this module instance
42
35
self.activeInUI=false-- Check if this instance is currently active in UI
43
36
@@ -52,62 +45,69 @@ function multiImageEdgeMatcher.create(multiImageEdgeMatcherInstanceNo)
52
45
self.parametersName='CSK_MultiImageEdgeMatcher_Parameter' ..self.multiImageEdgeMatcherInstanceNoString-- name of parameter dataset to be used for this module
53
46
self.parameterLoadOnReboot=false-- Status if parameter dataset should be loaded on app/device reboot
54
47
55
-
--self.object = Image.create() -- Use any AppEngine CROWN
56
-
--self.counter = 1 -- Short docu of variable
57
-
--self.varA = 'value' -- Short docu of variable
48
+
self.tought=false-- Status if matcher was already tought
58
49
59
50
-- Parameters to be saved permanently if wanted
60
51
self.parameters= {}
61
-
self.parameters.registeredEvent='' -- If thread internal function should react on external event, define it here, e.g. 'CSK_OtherModule.OnNewInput'
62
-
self.parameters.processingFile='CSK_MultiImageEdgeMatcher_Processing' -- which file to use for processing (will be started in own thread)
63
-
--self.parameters.showImage = true -- Short docu of variable
64
-
--self.parameters.paramA = 'paramA' -- Short docu of variable
65
-
--self.parameters.paramB = 123 -- Short docu of variable
52
+
self.parameters.registeredEvent='' -- Event to register for new images to process, like 'CSK_ImagePlayer.OnNewImage'
53
+
self.parameters.processingFile='CSK_MultiImageEdgeMatcher_Processing' -- Which file to use for processing (will be started in own thread)
54
+
55
+
self.parameters.showImage=true-- Show image in UI viewer
66
56
67
-
self.parameters.internalObject={}--optionally
68
-
--self.parameters.selectedObject = 1 -- Which object is currently selected
self.parameters.minScore=0.8-- Minimum score to count as a found object
60
+
self.parameters.downsampleFactor=2-- EdgeMatcher downsample factor. ReTeach EdgeMatcher if setting this value.
61
+
self.parameters.maxMatches=1-- Maximum amount of matches to accept
72
62
73
-
obj.objectName = 'Object' .. tostring(i) -- name of the object
74
-
obj.active = false -- is this object active
75
-
-- ...
63
+
self.parameters.backgroundClutter='HIGH' -- Level the live images supplied to the match function are expected to contain non-object edges
64
+
self.parameters.fineSearch=true-- Status if fine sarch shuld be performed
65
+
self.parameters.minSeparation=50.0-- Minimum separation between the centers of object matches in image world units (typically millimeters) taking the image pixel size into account.
66
+
self.parameters.rotationRange=180-- Angle in degrees, the maximum deviation from the original object orientation to search for.
67
+
self.parameters.priorRotationRange=0.0-- Optional prior orientation in radians. If specified, the orientation search range is centered around this orientation
68
+
self.parameters.minScaleRange=1.0-- The smallest scale factor to search for. Lower limit is 0.8
69
+
self.parameters.maxScaleRange=1.0-- The largest scale factor to search for. Upper limit is 1.2
70
+
self.parameters.priorScale=1.0-- Optional prior scale factor. Set to the expected scale of the object to find, relative to the size of the teach object. E.g. 1.25 if the object to find is 25% larger than the teach object. Min: 0.1. Max: 10
71
+
self.parameters.tileCount=0-- Number of tile images to split into. 0 gives automatic selection. 1 disables tiling
72
+
self.parameters.timeout=5-- Abort the match call if the match time exceeds set number of seconds.
76
73
77
-
table.insert(self.parameters.internalObject, obj)
78
-
end
74
+
self.parameters.showImage=true-- Show image in UI
79
75
80
-
local internalObjectContainer = self.helperFuncs.convertTable2Container(self.parameters.internalObject)
81
-
]]
76
+
self.parameters.resultTransX=320-- Pixel to translate the found result position in x
77
+
self.parameters.resultTransY=240-- Pixel to translate the found result position in y
0 commit comments