Hi. I am wanting to find the sum of all the positons xi, yi of an image IM. I thought the following would do it – but it doesn't.
sum(im (xi,yi));
Also, If I want to take this a step further and find the sum of all pixels at locations xi, yi but this time include the surrounding 8 pixels (so its a 3×3 centred on xi,yi), how do I do that?
thanks
Best Answer