Advanced example 2: tracing image intensity