[Solved] Total Number of pixels in an image [closed]
The total number of pixels is not equal to the sum of values in your image. sumOfAllPixelValues = sum(double(rgbImage(:))); numberOfPixels = numel(rgbImage); The size on disk of an image is numberOfPixels*bytesPerPixel, where bytesPerPixel depends on the bit depth of an image (uint8 would be 8 bits=1 byte, for example. To downsample the image by half, … Read more