Category: 01. Java Digital Image Processing

  • Image Compression Technique

    An image can easily be compressed and stored through Java. Compression of image involves converting an image into jpg and storing it. In order to compress an image, we read the image and convert into BufferedImage object. Further, we get an ImageWriter from getImageWritersByFormatName() method found in the ImageIO class. From this ImageWriter, create an ImageWriteParam object. Its syntax…

  • Enhancing Image Sharpness

    In this chapter we learn to increase the sharpness of an image using Gaussian filter. First we use OpenCV function GaussianBlur. It can be found under Imgproc package. Its syntax is given below − The parameters are described briefly − Sr.No. Parameter & Description 1 sourceIt is source image. 2 destinationIt is destination image. 3 SizeIt is Gaussian kernel size.…

  • Enhancing Image Contrast

    In this chapter learn how to enhance the contrast of an image using histogram equalization. We use the OpenCV function equalizeHist() method. It can be found under Imgproc package. Its syntax is given below − The parameters are described below − Sr.No. Parameter & Description 1 SourceIt is 8-bit single channel source image. 2 DestinationIt is the destination image. Apart from…

  • GrayScale Conversion

    In order to convert a color image to Grayscale image, you need to read pixels or data of the image using File and ImageIO objects, and store the image in BufferedImage object. Its syntax is given below − Further, get the pixel value using method getRGB() and perform GrayScale() method on it. The method getRGB() takes row and column index as parameter. Apart…

  • Image Pixels

    An image contains a two dimensional array of pixels. It is actually the value of those pixels that make up an image. Usually an image could be color or grayscale. In Java, the BufferedImage class is used to handle images. You need to call getRGB() method of the BufferedImage class to get the value of the pixel. Getting Pixel…

  • Downloading & Uploading Images

    In this chapter we are going to see how you can download an image from internet, perform some image processing techniques on the image, and then again upload the processed image to a server. Downloading an Image In order to download an image from a website, we use java class named URL, which can be found…

  • Java BufferedImage Class

    Java BufferedImage class is a subclass of Image class. It is used to handle and manipulate the image data. A BufferedImage is made of ColorModel of image data. All BufferedImage objects have an upper left corner coordinate of (0, 0). Constructors This class supports three types of constructors. The first constructor constructs a new BufferedImage with a specified ColorModel and Raster. The second…

  • Introduction

    Digital Image Processing (DIP) deals with manipulation of digital images using a digital computer. It is a sub field of signals and systems but focuses particularly on images. DIP focuses on developing a computer system that is able to perform processing on an image. The input of such system is a digital image. The system…