Python to Matlab scipy.ndimage.sum

4 ビュー (過去 30 日間)
ABDEL MOUMEN
ABDEL MOUMEN 2020 年 11 月 7 日
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 件)

カテゴリ

Help Center および File ExchangeCall Python from MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by