Hi Frank,
Thanks for responding, yeah your speculation is correct. How do one go about computing the center of the mass though?
In essence, one need to multiply the indices with the pixel value and then take mean of it all. But I can’t think of a differentiable way of obtaining indices.
Thanks,
Shubham