Posted by
lechristophe on
May 18, 2009; 1:42pm
URL: http://imagej.273.s1.nabble.com/Counting-overall-pixel-change-tp3692482p3692483.html
I don't really know what is "black" and "white" for an 8-bit images (is it 0
to 255 or jsut the intensity value changes fromlike 22 to 168 ?)
Anyway it's pretty straightforward, just duplicate your stack, remove the
first slices of the duplicate, and make the difference image beetween the
Nth slice of the original and duplicate stacks (Process > Image Calculator).
Loop from N=0 to N=nSlices-2 and store all results in a new, (N-1) slices
stack. Then you can just use "measure" to find how many pixels are different
from zero (that is, are different btween two consecutive slices).
Christophe
On Mon, May 18, 2009 at 3:16 PM, martenszeus <
[hidden email]> wrote:
> Can anyone suggest a way to compare two images (in a stack from an original
> video) and find out how many pixels are different in the second, relative
> to
> the first? Each image is 8-bit B/W, so what I'd like to count is the sum of
> exactly how many black pixels become white and vice versa from one slice to
> the next. I'm dealing with stacks of approximately 500 images, and would
> like to generate an integer string from these comparisons.
> Thanks much for any help!
> --
> View this message in context:
>
http://n2.nabble.com/Counting-overall-pixel-change-tp2932920p2932920.html> Sent from the ImageJ mailing list archive at Nabble.com.
>