Python to Matlab scipy.ndimage.sum
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Call Python from MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!