Amplitude distribution of calcium sparks in confocal images: Theory and studies with an automatic detection method