Navigation

Related Articles

Back to Latest Articles

Intensity Level Slicing With C# – Explore Image Processing


Andraz Krzisnik
Intensity Level Slicing With C# –...

In this tutorial we will be talking about intensity level slicing in image processing.

What is Intensity Level Slicing

It’s a process that highlights pixels in an arbitrary range of intensities. I created an example project that demonstrates this functionality.

There are two different themes this process can be applied. We could highlight our desired range of intensities and set those pixels to white and everything else to black. This way we would produce a binary image.

Another option is we highlight our range of intensities and leave everything else unchanged.

Intensity Level Slicing

Graph above shows intensities, horizontal axis show for input and vertical for output.

Left graph shows the first method we described, where we produce a binary image. As for the right graph we can see that only a certain range of intensities is changed in the output, while other intensity levels stay unchanged.

“a” and “b” represent the lowest and the highest intensity levels to be highlighted. Or in other words, they define the position and width of the intensity level band to be highlighted. We also need to define the highlighting intensity, to which our pixels will be changed to.

This process is applied in various different fields, such as satellite imagery and x-ray imagery.


Intensity Level Slicing Function

There are some things we need to provide for our function to work. We need to set intensity range by providing the lowest and the highest intensity to be highlighted. And lastly we need to set the highlighting intensity.

This code works for colored images too. Intensities are highlighted across all channels. Project also includes a function to convert color images into grayscale.

Entire project is available for download

Download Project

If you liked this project, let me know in the comments.

Is there anything you might add?

I’m always open for your suggestions.

 

Show Comments (0)

Comments

Related Articles

C# Basics

C# Basics – Comments – Part 3

How To Write Comments in C# Programming Language Writing comments into your code has proven to be very useful while investigating and identifying what each part of the code does....

Posted on by Andraz Krzisnik
C# Tutorial

C# Tutorial: How To Use Log Transformation on Images

What is Log Transformation Anyway? Log transformation in image processing is a part of gray level transformations. It works by transforming each pixel individually. It is usually...

Posted on by Andraz Krzisnik