Included Memory Shift

This commit is contained in:
gac-x11ma
2022-11-09 15:03:09 +01:00
parent d6803e82ba
commit 2ff79ee1c5
71 changed files with 1530 additions and 177 deletions

View File

@@ -110,9 +110,9 @@ def update_roi_pos(cur_data, former_data):
roi=get_focus_scan_roi()
calc_roi = Roi(roi.x,roi.y,roi.width, roi.height)
try:
xoff, yoff, error, diffphase = calculate_shift(former_data,cur_data, calc_roi)
xoff, yoff, error, diffphase, _ = calculate_shift(former_data,cur_data, calc_roi)
print "Calculated shift: ", xoff, yoff, error, diffphase
if (0<abs(xoff) < MAX_SHIFT) and (0<abs(yoff) < MAX_SHIFT):
if (abs(xoff) <= MAX_SHIFT) and (abs(yoff) <= MAX_SHIFT):
x,y=int(roi.x - xoff), int(roi.y - yoff)
print "Updating ROI location to ", x, y
x,y=max(x,0), max(y,0)