Python to Matlab scipy.ndimage.sum
2 次查看(过去 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!