Python to Matlab scipy.ndimage.sum
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello, i'am trying to convert a Python code to Matlab:
# Find connected components
label_image , N = label( object_pixels, connectivity=1, return_num=True )
# Integrate 1 over regions
size_array = scipy.ndimage.sum( 1, label_image, index=range(0, N+1) )
size_array = np.uint16(size_array)
# Integrate intensity over regions
total_light_array = scipy.ndimage.sum( original_image, label_image , index=range(0, N+1) )
total_light_array = np.float6
For labeling i used
[label_image,N] = bwlabeln(object_pixels_uint8);
but i cant realy see what scipy.ndimage.sum do mainly when the input=1, neither its Matlab equivalent.
Thank you
4(total_light_array)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!