very promissing fiducial detection
This commit is contained in:
25
swissmx.py
25
swissmx.py
@@ -496,6 +496,10 @@ class WndSwissMx(QMainWindow, Ui_MainWindow):
|
||||
action.triggered.connect(self.cb_autofocus)
|
||||
self.toolBar.addAction(action)
|
||||
|
||||
action = QAction(icon, "Find\nFiducial", self)
|
||||
action.triggered.connect(self.cb_find_fiducial)
|
||||
self.toolBar.addAction(action)
|
||||
|
||||
action = QAction(icon, "Test\nCode", self)
|
||||
action.triggered.connect(self.cb_testcode)
|
||||
self.toolBar.addAction(action)
|
||||
@@ -1593,7 +1597,17 @@ Author Thierry Zamofing (thierry.zamofing@psi.ch)
|
||||
#geo.autofocus(app._camera, self.tweakers['base_z'],rng=(-1, 1), n=30,saveImg=True)
|
||||
geo.autofocus(app._camera, self.tweakers['base_z'],rng=(-1, 1), n=10)
|
||||
|
||||
def cb_find_fiducial(self):
|
||||
app=QApplication.instance()
|
||||
geo=app._geometry
|
||||
#geo.autofocus(app._camera, self.tweakers['base_z'],rng=(-1, 1), n=30,saveImg=True)
|
||||
pos,corr=geo.find_fiducial(app._camera, sz=(210,210),brd=(20,20))
|
||||
pass
|
||||
|
||||
def cb_testcode(self):
|
||||
app=QApplication.instance()
|
||||
cfg=app._cfg
|
||||
geo=app._geometry
|
||||
try:
|
||||
tc=self._testCode
|
||||
tc['idx']+=1
|
||||
@@ -1608,13 +1622,14 @@ Author Thierry Zamofing (thierry.zamofing@psi.ch)
|
||||
plt.stem(x, y)
|
||||
plt.show(block=False)
|
||||
|
||||
step=5
|
||||
step=6
|
||||
if step==0:
|
||||
vb=self.vb
|
||||
vb.autoRange(items=(self._goImg,))
|
||||
elif step==1:
|
||||
testMatplotlib()
|
||||
elif step==2:
|
||||
vb=self.vb
|
||||
grp=pg.ItemGroup()
|
||||
vb.addItem(grp)
|
||||
obj=UsrGO.Marker((100, 100), (100, 100), mode=1)
|
||||
@@ -1634,15 +1649,11 @@ Author Thierry Zamofing (thierry.zamofing@psi.ch)
|
||||
0, 0, 1)
|
||||
grp.setTransform(tr)
|
||||
elif step==4:
|
||||
app=QApplication.instance()
|
||||
cfg=app._cfg
|
||||
geo=app._geometry
|
||||
geo.autofocus(app._camera, self.tweakers['base_z'],rng=(-1, 1), n=30,saveImg=True)
|
||||
elif step==5:
|
||||
app=QApplication.instance()
|
||||
cfg=app._cfg
|
||||
geo=app._geometry
|
||||
geo.autofocus(app._camera, self.tweakers['base_z'],rng=(-1, 1), n=10)
|
||||
elif step==6:
|
||||
geo.find_fiducial(app._camera)
|
||||
#print(vb.childGroup.childItems())
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user