Ticket 789: Erroneous usage of gain/offset when processing data != UCHAR/CHAR andersFeatureBranch master jenkins-bRopo-68
authorAnders Henja <anders@baltrad.eu>
Fri, 16 Aug 2019 13:04:05 +0000 (15:04 +0200)
committerAnders Henja <anders@baltrad.eu>
Fri, 16 Aug 2019 13:04:05 +0000 (15:04 +0200)
pyropo/ropo_realtime.py

index a2a02c9..cd98bb6 100644 (file)
@@ -149,7 +149,7 @@ def process_scan(scan, options, quality_control_mode=QUALITY_CONTROL_MODE_ANALYZ
     param = newscan.getParameter(options.params)
     rg = _ropogenerator.new(image)
     if options.threshold:
-        raw_thresh = int((options.threshold - param.offset) / param.gain)
+        raw_thresh = int((options.threshold - image.offset) / image.gain)
         rg.threshold(raw_thresh)
     if options.speck:
         a, b = options.speck