I'm new to Matlab so this should be an easy question. I have an image with a few specific pixels that I need to get the red RGB components from, sum them, and store the result into a variable. By default, these values are of type uint8, so the sum can't exceed 255. I've tried using every combination of double() to convert the R value to a double, but nothing seems to be working. Here's exactly what's happening, copied from the terminal: (All pixels have R values above 200)
img = imread('img.png');
r = img(64,64,1)
r =
224
r = r + double(img(64,65,1))
r =
255
r = r + double(img(64,66,1))
r =
255
What am I doing wrong? Am I not able to convert these values to double?
r = double(img(64,64,1))? - beakersum(img(64,64:66,1))- beaker