Author: saqibkhan
-
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…