@@ -398,7 +398,7 @@ def simplify_classes(Ilabeled, minpatchsize, nodata=0, unique_neighbor=True, max
398
398
399
399
# Get all the blobs of the unique value
400
400
props = ['coords' ,'area' ]
401
- rp , _ = iu . regionprops (Iu , props , connectivity = 2 )
401
+ rp , _ = ru . _regionprops (Iu , props , connectivity = 2 )
402
402
403
403
# Only investigate blobs that are below the threshold
404
404
smallblobs = [i for i , x in enumerate (rp ['area' ]) if x <= minpatchsize ]
@@ -453,7 +453,7 @@ def simplify_hpus(Ihpu, Iclasses, target_hpu_size, min_hpu_size, nodata):
453
453
"""
454
454
455
455
# Find all the too-small HPUs
456
- rp , Ilabeled = iu . regionprops (Ihpu , props = ['area' , 'label' , 'coords' ])
456
+ rp , Ilabeled = ru . _regionprops (Ihpu , props = ['area' , 'label' , 'coords' ])
457
457
458
458
do_idcs = np .where (rp ['area' ]< (target_hpu_size / 2 ))[0 ]
459
459
@@ -1067,7 +1067,7 @@ def create_hpus_from_classes(Iclasses, target_n_pix):
1067
1067
1068
1068
"""
1069
1069
1070
- rp , Ilabeled = iu . regionprops (Iclasses , props = ['coords' , 'area' ])
1070
+ rp , Ilabeled = ru . _regionprops (Iclasses , props = ['coords' , 'area' ])
1071
1071
Iregions = np .ones (Iclasses .shape , dtype = int ) * - 1
1072
1072
reg_label = 1
1073
1073
for area , coords in zip (rp ['area' ], rp ['coords' ]):
0 commit comments