Python to Matlab scipy.ndimage.sum

5 visualizaciones (últimos 30 días)
ABDEL MOUMEN
ABDEL MOUMEN el 7 de Nov. de 2020
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)

Respuestas (0)

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by