Image Preprocessing with ImageJ

ImageJ is a public domain Java image processing program inspired by NIH Image for the
Macintosh. It runs, either as an online applet or as a downloadable application, on any
computer with a Java 1.1 or later virtual machine. Downloadable distributions are available
for Windows, Mac OS, Mac OS X and Linux.

It can display, edit, analyze, process, save and print 8-bit, 16-bit and 32-bit images. It
can read many image formats including TIFF, GIF, JPEG, BMP, DICOM, FITS and “raw”.
It supports “stacks”, a series of images that share a single window. It is multithreaded, so
time-consuming operations such as image file reading can be performed in parallel with other
operations.

Today, I will show here some of the features of ImageJ that is widely used in preprocessing for Image Processing.

1. Color Image to GrayScale Image

Open Color Image (File > Open > Select any colorful image then hit Open)

See the Image Below

Sample Color Image
Sample Color Image

To Convert to GrayScale
Image > type > 8 bit

See the Image Below

Sample Grayscale Image
Sample Grayscale Image

2. Change the Image to Binary
Process > Binary > Make Binary

Sample Binary Image
Sample Binary Image

Now to remove the noise I use Median filter, radius set at 10.0 pixel.
Process > Filters > Median
I set here radius to 10 that removes the most of the noise for my image.
See the image Below

Noise Reduced Image
Noise Reduced Image

Most of the Noise are reduced.

Now further cropping of the image can be done by the use of various cropping techniques.

We conclude our work here, we just saw how ImageJ can be used to analysis various techniques for image processing quicky and see the results that best suit to us.

Rather than converting image directly to Binary Image we could have used the appropriate thresholding value to get the suitable threshold value that suit to our image processing need, which can be done by

Image > Adjust > Threshold

(Scroll the horizontal scroller to the appropriate settings)

Hope you got some basic idea on using ImageJ for Image Analysis.