This commit is contained in:
gac-S_Changer
2018-08-14 14:10:09 +02:00
parent 1709e91d0d
commit 016f0508fe
15 changed files with 216 additions and 32 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
###################################################################################################
# Procedure to detect the cover orientation
###################################################################################################
assert_imaging_enabled()
#Parameters
FRAMES_INTEGRATION = 3
@@ -27,7 +29,7 @@ smooth(ip)
#bandpass_filter(ip, 30, 1000)
edges(ip)
auto_threshold(ip, method = "MaxEntropy")
#binary_erode(ip, False)
#binary_erode(ip, True)
#binary_dilate(ip, True)
ip.getProcessor().erode(1, 255)
cx,cy = int(ip.width/2), int(ip.height/2)
@@ -80,7 +82,7 @@ if angle is not None:
#Plot the correlations values agains angle
if DEBUG:
p = plot(ydata, xdata=xdata)[0]
plot(ydata, xdata=xdata)
#Output results
if DEBUG:
+2
View File
@@ -1,6 +1,8 @@
###################################################################################################
# Procedure to detect the puck light spots.
###################################################################################################
assert_imaging_enabled()
COVER_PRESENT = True
ROOM_TEMP = is_room_temp()
-2
View File
@@ -9,8 +9,6 @@ from ch.psi.pshell.imaging.Overlays import *
import ch.psi.pshell.imaging.Pen as Pen
import java.awt.Rectangle as Rectangle
def get_img_cover_pos():
[position, angle, confidence] = run("imgproc/CoverDetection")
return position