Closedown
This commit is contained in:
@@ -11,15 +11,11 @@ from ch.psi.pshell.imaging.Overlays import *
|
||||
import ch.psi.pshell.imaging.Pen as Pen
|
||||
|
||||
|
||||
roi_center = (800, 600)
|
||||
roi_radius = 600
|
||||
integration_count = 10
|
||||
integration_continuous = False
|
||||
integration_partial = False
|
||||
frames = []
|
||||
|
||||
roi = (roi_center[0] - roi_radius, roi_center[1] - roi_radius, 2* roi_radius, 2*roi_radius)
|
||||
|
||||
|
||||
color_roi = Color(0, 128, 0)
|
||||
|
||||
@@ -32,21 +28,11 @@ ov_roi_center = Crosshairs(Pen(color_roi, 0), java.awt.Point(roi_center[0],roi_
|
||||
renderer.addOverlays([ov_roi_shape, ov_roi_bound,ov_roi_center])
|
||||
|
||||
|
||||
def in_roi(x,y):
|
||||
return math.hypot(x-roi_radius, y-roi_radius) < roi_radius
|
||||
|
||||
|
||||
def integrate (ips):
|
||||
for i in range(len(ips)):
|
||||
if i==0:
|
||||
aux = new_image(roi[2], roi[3], image_type="float", title = "sum", fill_color = None)
|
||||
op_image(aux, ips[i], "add", float_result=True, in_place=True)
|
||||
op_const(aux, "divide", len(ips), in_place=True)
|
||||
return aux
|
||||
|
||||
|
||||
last_ret = (None, None)
|
||||
def detect_led(ip):
|
||||
roi = get_roi
|
||||
global roi_center, roi_radius, integration_count, integration_continuous, integration_partial, frames
|
||||
global count , last_ret
|
||||
aux = sub_image(ip, roi[0], roi[1], roi[2], roi[3])
|
||||
|
||||
Reference in New Issue
Block a user