This commit is contained in:
gac-S_Changer
2018-08-10 17:02:30 +02:00
parent 9ef973fa49
commit 1709e91d0d
23 changed files with 392 additions and 52 deletions

View File

@@ -0,0 +1,31 @@
number_frames = 5
number_backgrounds = 5
minimum_size = 78 # r = 5 # 150
maximum_size = 750 # r = 15 #1500
min_circ = 0.2
threshold_method = "MaxEntropy"
threshold_method,threshold_range = "Manual", (0, 215)
exclude_edges = True
led_latency = 0.5 #0.1
set_led_state(False)
time.sleep(led_latency)
img.waitNext(2000)
background = average_frames(number_backgrounds)
#background = integrate_frames(number_backgrounds)
set_led_state(True)
time.sleep(led_latency)
img.waitNext(2000)
image = average_frames(number_frames)
#image = integrate_frames(number_frames)
set_led_state(False)
op_image(image, background, "subtract", float_result=True, in_place=True)
image=grayscale(image)
show_panel(image.getBufferedImage())

View File

@@ -0,0 +1,8 @@
index = 1
while(True):
for pos in ['A', 'B', 'C', 'D', 'E', 'F']:
hexiposi.move(pos)
visual_check_hexiposi(pos)
print "Ok: " + pos
print index
index = index + 1

View File

@@ -0,0 +1,24 @@
import ch.psi.pshell.imaging.RendererMode as RendererMode
import ch.psi.pshell.imaging.Calibration as Calibration
from ch.psi.pshell.imaging.Overlays import *
import ch.psi.utils.swing.SwingUtils as SwingUtils
import javax.swing.SwingUtilities as SwingUtilities
from swingutils.threads.swing import callSwing
p = show_panel(img)
dlg = SwingUtilities.getWindowAncestor(p)
dlg.setSize(800,800)
frm=SwingUtils.getFrame(p)
dlg.setLocationRelativeTo(frm)
def update_frame(frm):
SwingUtilities.updateComponentTreeUI(frm)
frm.validate()
frm.repaint()
#$callSwing(update_frame, frm)
x=0
for i in range(0,10000000):
x=x+1