コード例 #1
0
	def run(self, ips, snap, img, para = None):
		cimg = feature.corner_shi_tomasi(img, sigma=para['sigma'])
		pts = feature.corner_peaks(cimg, min_distance=1)
		ips.roi = ROI([Points(pts[:,::-1])])
コード例 #2
0
 def UpdateData(self):
     names = self.app.manager('roi').gets('name')
     objs = self.app.manager('roi').gets('obj')
     types = [ROI(mark2shp(i)).roitype for i in objs]
     self.lst_rois.SetValue(list(zip(names, types)))
コード例 #3
0
	def run(self, ips, snap, img, para = None):
		cimg = feature.corner_kitchen_rosenfeld(img, mode='constant', cval=para['cval'])
		pts = feature.corner_peaks(cimg, min_distance=1)
		ips.roi = ROI([Points(pts[:,::-1])])
コード例 #4
0
	def run(self, ips, snap, img, para = None):
		cimg = feature.corner_moravec(img, window_size=para['size'])
		pts = feature.corner_peaks(cimg, min_distance=1)
		ips.roi = ROI([Points(pts[:,::-1])])
コード例 #5
0
 def run(self, ips, imgs, para = None):
     a,b,c,d = ips.roi.to_geom().bounds
     ips.roi = ROI(Rectangle([a,b,c-a,d-b]))
コード例 #6
0
 def run(self, ips, imgs, para=None):
     geom = ips.roi.to_geom().buffer(para['r'])
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
コード例 #7
0
 def run(self, ips, imgs, para = None):
     obj = mark2shp(self.app.manager('roi').get(name=para['name'])).to_geom()
     roi = geom_flatten(ips.roi.to_geom())
     ips.roi = ROI(geom2shp(geom_flatten(roi.symmetric_difference(obj))))
コード例 #8
0
 def run(self, ips, imgs, para = None):
     geom = ips.roi.to_geom().convex_hull
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
コード例 #9
0
 def run(self, ips, imgs, para = None):
     obj = mark2shp(self.app.manager('roi').get(name=para['name'])).to_geom()
     roi = geom_flatten(ips.roi.to_geom())
     ips.roi = ROI(geom2shp(geom_flatten(roi.intersection(obj))))
コード例 #10
0
 def run(self, ips, imgs, para = None):
     with open(para['path']) as f:
         ips.roi = ROI(mark2shp(json.loads(f.read())))
コード例 #11
0
 def run(self, ips, imgs, para = None):
     rect = Rectangle([0, 0, ips.shape[1], ips.shape[0]])
     geom = rect.to_geom().difference(geom_flatten(ips.roi.to_geom()))
     ips.roi = ROI(geom2shp(geom_flatten(geom)))
コード例 #12
0
 def run(self, ips, imgs, para = None):
     ips.roi = ROI(Rectangle([0, 0, ips.shape[1], ips.shape[0]]))
コード例 #13
0
 def run(self, ips, snap, img, para=None):
     pts = find_maximum(self.ips.img, para['tol'], False)
     ips.roi = ROI([Points(pts[:, ::-1])])
     ips.update()