Skip to content

Commit 48e13c7

Browse files
committed
Add intensity_offset parameters
1 parent 486baef commit 48e13c7

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

tools/spot_detection_2d/spot_detection_2d.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<param name="min_scale" type="float" value="1.0" min="0.1" label="Minimum scale" />
88
<param name="max_scale" type="float" value="2.0" min="0.1" label="Maximum scale" />
99
</xml>
10+
<token name="@INTENSITY_OFFSET_HELP@">The offset of the coordinates where the intensities of the detections are sampled. An offset of 0 corresponds to the location of the detection.</token>
1011
</macros>
1112
<creator>
1213
<expand macro="creators/bmcv"/>
@@ -48,7 +49,10 @@
4849
#if str($method.type) == "local_max":
4950
5051
"sigma": 1.0,
51-
"intensity_offset": [-1, -1]
52+
"intensity_offset": [
53+
$method.intensity_offset_y,
54+
$method.intensity_offset_x
55+
]
5256
5357
#else:
5458
@@ -88,7 +92,10 @@
8892
<when value="DoH">
8993
<expand macro="param/multiscale"/>
9094
</when>
91-
<when value="local_max"/>
95+
<when value="local_max">
96+
<param name="intensity_offset_x" type="integer" value="0" label="Intensity coordinate x-offset (in pixels)" help="@INTENSITY_OFFSET_HELP@"/>
97+
<param name="intensity_offset_y" type="integer" value="0" label="Intensity coordinate y-offset (in pixels)" help="@INTENSITY_OFFSET_HELP@"/>
98+
</when>
9299
</conditional>
93100
<param name="abs_threshold" type="float" value=".25" min="0" label="Minimum filter response (absolute)" help="Filter responses below this threshold will be ignored. Only filter responses above this thresholding will be considered as blobs. This threshold is ignored if the relative threshold (below) corresponds to a higher response." />
94101
<param name="rel_threshold" type="float" value="0" min="0" max="1" label="Minimum filter response (relative)" help="Same as the absolute threshold (above), but as a fraction of the overall maximum filter response of an image. This threshold is ignored if it corresponds to a response below the absolute threshold." />
@@ -148,6 +155,8 @@
148155
<param name="frame_end" value="0"/>
149156
<conditional name="method">
150157
<param name="type" value="local_max"/>
158+
<param name="intensity_offset_x" value="-1"/>
159+
<param name="intensity_offset_y" value="-1"/>
151160
</conditional>
152161
<param name="abs_threshold" value="0"/>
153162
<param name="rel_threshold" value="0.1"/>

0 commit comments

Comments
 (0)