ZNSSD_limit = 0.4 subpixel_method = 'fagn' POIs_done = True #POIs_done = False reader = dic.image_folder_loader(image_folder, suffix='tif') output_frame_list = np.arange(1, end_index + 1, dtype=np.int64) if not os.path.exists(result_folder): os.mkdir(result_folder) if not POIs_done: plt.figure() dic.plot_img_click(reader[start_index]) else: POIs = dic.gene_POIs([[21.59277987148556, 20.35036466664849], [20.898693164872725, 488.16480492367754], [486.63087330206326, 485.3884580972263], [485.93678659545037, 20.35036466664849]], 20, round_int=True) plt.figure() dic.plot_img_points(reader[0], POIs, size=1.2) t1 = time.time() result_graph, POI_graph_list = dic.bisection_search( reader, start_index, end_index, POIs, output_frame_list) t2 = time.time() print('calculation time {:.2f}s'.format(t2 - t1)) for frame_index in output_frame_list: plt.figure() dic.plot_img_points(reader[frame_index], result_graph.nodes[frame_index]['POIs'],
if not POIs_done: plt.figure() dic.plot_img_click(reader[start_index]) else: POIs = dic.gene_POIs([ [62.44543441277847, 385.8817330204143], [63.85594786563178, 716.8822232899854], [336.08504426631583, 720.1734213466431], [333.7341885115604, 384.00104841660993] ], step = step, list_interiors_vertex = [np.array( [ [192.2126720752807, 487.90887277680196], [213.84054501903108, 492.1404131353618], [230.2965353023194, 502.0140073053348], [242.5209852270479, 521.7611956452808], [246.28235443465667, 547.6206089475911], [237.34910256658583, 573.9501934008524], [217.13174307568875, 589.9360125331897], [192.2126720752807, 596.988579797456], [164.00240301821503, 589.4658413822385], [147.07624158397562, 570.6589953441948], [139.08333201780698, 544.3294108909334], [142.84470122541575, 517.999826437672], [160.24103381060627, 496.3719534939217] ] )], round_int = True) plt.figure() dic.plot_img_points(reader[0], POIs, size = 1.2) t1 = time.time()
POIs_done = True #POIs_done = False reader = dic.image_folder_loader(image_folder, suffix = 'tif') if not os.path.exists(result_folder): os.mkdir(result_folder) if not POIs_done: plt.figure() dic.plot_img_click(reader[start_index]) else: POIs1 = dic.gene_POIs([ [421.37349185261496, 18.445964265379644], [425.14758831982203, 54.29988070384729], [617.6265081473848, 54.29988070384729], [617.6265081473848, 18.445964265379644] ], step = step, round_int = True) num_POIs1 = len(POIs1) POIs2 = dic.gene_POIs([ [436.4698777214435, 1282.768280779763], [440.24397418865055, 1320.5092454518342], [591.2078328769351, 1320.5092454518342], [594.9819293441421, 1267.6718949109345] ], step = step, round_int = True) POIs = np.concatenate((POIs1, POIs2)) plt.figure() dic.plot_img_points(reader[start_index], POIs, size = 1.2) t1 = time.time()
reader = dic.image_folder_loader(image_folder, suffix='tif') output_frame_list = np.arange(1, end_index + 1, dtype=np.int64) if not os.path.exists(result_folder): os.mkdir(result_folder) if not POIs_done: plt.figure() dic.plot_img_click(reader[start_index]) else: POIs = dic.gene_POIs([[191.153607352981, 239.23060759699592], [430.80873302063264, 239.23060759699592], [623.2876528481954, 254.32699346582444], [898.796694954315, 276.9715722690671], [910.1189843559362, 324.147778109156], [906.3448878887291, 678.9128460266247], [898.796694954315, 710.9926659978852], [896.9096467207112, 731.7501965675243], [910.1189843559362, 744.9595342027493], [904.4578396551253, 1073.3059268497682], [176.05722148415248, 1077.0800233169753], [176.05722148415248, 682.6869424938319], [174.17017325054894, 590.2215790472576]], step=step, round_int=True) plt.figure() dic.plot_img_points(reader[0], POIs, size=1.2) t1 = time.time() result_graph, POI_graph_list = dic.bisection_search(reader, start_index, end_index, POIs,
true_displacement[:, 0] = np.arange(start_index, end_index, dtype=floattype) * 0.1 true_displacement[:, 1] = np.arange(start_index, end_index, dtype=floattype) * 0.1 reader = dic.image_folder_loader(image_folder, suffix='tif') output_frame_list = np.arange(1, end_index + 1, dtype=np.int64) if not os.path.exists(result_folder): os.mkdir(result_folder) if not POIs_done: plt.figure() dic.plot_img_click(reader[start_index]) else: POIs = dic.gene_POIs([[20.322966507177114, 19.09808612440179], [24.522556390977513, 485.2525632262474], [489.27717019822273, 489.4521531100478], [485.7775119617223, 16.99829118250159]], 20, round_int=True) plt.figure() dic.plot_img_points(reader[0], POIs, size=1.2) t1 = time.time() result_graph, POI_graph_list = dic.bisection_search( reader, start_index, end_index, POIs, output_frame_list) t2 = time.time() print('calculation time {:.2f}s'.format(t2 - t1)) bias_list = [] std_list = [] for frame_index in output_frame_list: plt.figure()