CUMSUM does not work for data that isn't single or double. You can write your own function to do this, or cast the data to single before passing to CUMSUM. Note however, that you will have to figure out what to do with overflow! The cumulative sum in uint8 may easily go over 255.
intmax('uint8')
You could also convert your image to have a datatype which has a larger range...
Best Answer