And this is done in a linear way.

So this is not changing too much the relative intensities of the image.

So once you plug these things you actually don't get to see much of it.

However, you can do a lot more than that.

You can actually define a transfer function which takes

the original intensities values, the ones that you have seen here on the x axis, and

transforms them differentially,

AKA nonlinearly into another function.

So here you are given the r code.

The r code seems quite involved but

what it really does is just defines a linear spline.

A linear spline is nothing else but a line that is broken in several places.

In this case, is broken in two places.

These places are called knots.

And they're defined on the bottom of the slide.

For example the knot values are 0.3 and 0.6,

they are defined between on a normalized scale between 0 and 1.

And also the lines in-between these knots have different slopes.

For example 1, which is the same thing as 45 degree line, 0.5 and

0.25 which essentially is what you'll see on the next slide right here.

So you have the same histogram in the bottom of

the slide, and you see the transfer function, the red spline.

So you see that there are two knots, as I was saying earlier,

so you define the knots at 0.3 and 0.6.

You see where the lines is being broken, and the slopes,

the first part of the slope, which is the 45 degree line, and then the slope is

actually getting shallower and shallower as you move through the slide.

You also have the r codes that should help you to reproduce these plots.