I want to sum all the pixel values in a image. I was thinking of using the Add Array Elements VI. Is their an easy way to convert an U8 or an I16 bit image into a numeric array? Thank you in advance.
Is this a BW image? (If the image is paletted or color, a summing operation is poorly defined! ;)) Just convert your image data to a 2D boolean array using unflatten pixmap, then feed the 1bit pixmap to "boolean to 0..1" followed by the SUM operation (in case it overflows, you might want to convert it to a better representation before summing, e.g. DBL. "boolean to 0,1" generates I16).
Altenbach example is good if you are dealing with a pure black and white image. However, I have a feeling that you might be referring to a grayscale image, so in that case I attached an example of how to get the numeric image array of such an image and at the same time summing the pixel values.