This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
###################################################################################################
|
||||
# Procedure to detect the puck light spots.
|
||||
###################################################################################################
|
||||
assert_imaging_enabled()
|
||||
|
||||
|
||||
COVER_PRESENT = True
|
||||
ROOM_TEMP = is_room_temp()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user