15 lines
447 B
Python
15 lines
447 B
Python
|
|
def integrate_roi(source, x,y, w, h):
|
|
if source.data is None:
|
|
source.update()
|
|
rect = Rectangle(x,y, w, h)
|
|
roi = source.data.getRoi(rect)
|
|
|
|
outliers_mask = get_outliers_mask()
|
|
if outliers_mask is not None:
|
|
mask = outliers_mask.getRoi(rect)
|
|
roi.mult(mask)
|
|
|
|
outliers_threshold = get_outliers_threshold()
|
|
if outliers_threshold>0:
|
|
roi.threshold(outliers_threshold, False, 0.0) |