Let's consider that we have some random field z(s) defined on some space, and

in our example let's just assume that it's a two dimensional space.

And so here we have the random field, and then on the left we see sort

of a heat map of the random field, and on the right, we see a mesh plot of it.

So basically, every spot in the two dimensional lattice,

we have some statistic value that follows a random field.

So when we work with random field theory,

we have to define something called the Euler Characteristic.

The Euler Characteristic is the property of a random field of an image

after it's been thresholded.

So basically what the Euler Characteristic does, in layman's terms,

is it counts the number of blobs.

The number of coherent areas minus the number of holes.

And at the high threshold it just counts the number of blobs.

So what does this mean?

Number of blobs, the number of holes?

Well let's look at the random field that we have here to the left and

let's say that we threshold it at the value u equal to .5.

That means that any value that's above .5 was set equal to one and

anything below .5 is set equal to zero.

Then we get the map on the right top here,

which is just a lot of white within the black there.

So here the Euler characteristic is going to be 27 because

28 coherent islands of activation here, which I'm calling blobs.

And there's one hole, you see in the bottom.

There's a slight hole in one of the blobs.

And so it's going to be 27 different blobs minus holes,

so that's the Euler characteristic in that case.

If we go to the middle one here, we're thresholding at 2.75.

In this case, we only get two blobs and no holes, so the Euler characteristic is two.

Finally, if we go to u = 3.5, we get a single blob, and

the Euler characteristic is 1.

So the Euler characteristic is a property of this image after we've thresholded it.