File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ def ransac_affine(
3939 if verbose :
4040 ns = fix_spots .shape [0 ]
4141 print (f'FIXED image: found { ns } key points' )
42+ else :
43+ # Not sure what the convention should be for pixel vs. physical coordinates.
44+ # This is assuming pixels at the same resolution as `fix` and `mov`.
45+ fix_spots = features .cull_boundary_points (fix_spots , cc_radius , fix .shape )
46+ if fix_spots .shape [1 ]== 3 :
47+ fix_spots = np .hstack ([fix_spots , np .ones ((fix_spots .shape [0 ],1 ))])
4248
4349 if mov_spots is None :
4450 mov_spots = features .blob_detection (
@@ -52,7 +58,11 @@ def ransac_affine(
5258 if verbose :
5359 ns = mov_spots .shape [0 ]
5460 print (f'MOVING image: found { ns } key points' )
55-
61+ else :
62+ mov_spots = features .cull_boundary_points (mov_spots , cc_radius , mov .shape )
63+ if mov_spots .shape [1 ]== 3 :
64+ mov_spots = np .hstack ([mov_spots , np .ones ((mov_spots .shape [0 ], 1 ))])
65+
5666 # sort
5767 sort_idx = np .argsort (fix_spots [:, 3 ])[::- 1 ]
5868 fix_spots = fix_spots [sort_idx , :3 ][:nspots ]
You can’t perform that action at this time.
0 commit comments