|
Dear colleagues,
I've got a 5000x512 (WxH) 8-bit grey image, and I want to generate a new image of the same size (5000x512) that each generated pixel value is the result of the subtracting average pixels value of the same row in the first n columns(lines) from the original pixel value.
To be exact, for each pixel at (w,h), value_new(w,h)=value(w,h)-mean(value(1,h),value(2,h),value(3,h)....value(n,h))
Does anyone can help me with this?Thanks a lot.
regards,
Monica
|