My Blog

My WordPress Blog

My Blog

My WordPress Blog

01. Java Digital Image Processing

OpenCV Color Space Conversion

In order to change color space of one image to another using OpenCV, we read image into BufferedImage and convert it into Mat Object. Its syntax is given below − OpenCv allows many color conversion types, all of which can be found in the Imgproc class. Some of the types are described briefly − Sr.No. Color Conversion Type 1 […]

OpenCV GrayScale Conversion

In order to convert a color image to Grayscale image using OpenCV, we read the image into BufferedImage and convert it into Mat Object. Its syntax is given below − Then you can transform the image from RGB to Grayscale format by using method cvtColor() in the Imgproc class. Its syntax is given below − The method cvtColor() takes three parameters which are the source […]

Create Zooming Effect

Zooming is the process of enlarging an image so that the details in the image become more visible and prominent. We use OpenCV function resize to apply zooming to images. It can be found under Imgproc package. Its syntax is given below − In the resize function, we pass source image, destination image and its size, zooming factor, and the interpolation […]

Weighted Average Filter

In weighted average filter, we gave more weight to the center value, due to which the contribution of center becomes more than the rest of the values. Due to weighted average filtering, we can control the blurring of image. We use OpenCV function filter2D to apply weighted average filter to images. It can be found under Imgproc package. Its syntax is […]

Laplacian Operator

Laplacian Operator is also a derivative operator which is used to find edges in an image. The major difference between Laplacian and other operators like Prewitt, Sobel, Robinson, and Kirsch is that these all are first order derivative masks but Laplacian is a second order derivative mask. We use OpenCV function filter2D to apply Laplacian operator to images. It […]

Sobel Operator

Sobel operator is very similar to Prewitt operator. It is also a derivative mask and is used for edge detection. Sobel operator is used to detect two kinds of edges in an image: Vertical direction edges and Horizontal direction edges. We are going to use OpenCV function filter2D to apply Sobel operator to images. It can be found under Imgproc package. […]

Scroll to top