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(
39
39
if verbose :
40
40
ns = fix_spots .shape [0 ]
41
41
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 ))])
42
48
43
49
if mov_spots is None :
44
50
mov_spots = features .blob_detection (
@@ -52,7 +58,11 @@ def ransac_affine(
52
58
if verbose :
53
59
ns = mov_spots .shape [0 ]
54
60
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
+
56
66
# sort
57
67
sort_idx = np .argsort (fix_spots [:, 3 ])[::- 1 ]
58
68
fix_spots = fix_spots [sort_idx , :3 ][:nspots ]
You can’t perform that action at this time.
0 commit comments