Maruthi Krishna has Published 951 Articles

How to convert OpenCV Mat object to BufferedImage object using Java?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 09:13:16

2K+ Views

If you try to read an image using the OpenCV imread() method it returns a Mat object. If you want to display the contents of the resultant Mat object using an AWT/Swings window You need to convert the Mat object to an object of the class java.awt.image.BufferedImage. To do so, ... Read More

How to perform Bitwise Not operation on images using Java OpenCV?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 09:08:58

307 Views

You can compute the bitwise conjunction between two images using the bitwise_not() method of the org.opencv.core.Core class.This method accepts two Mat objects representing the source and destination matrices, calculates the inverse of each element in the source matrix and stores the result in the destination matrix.Exampleimport org.opencv.core.Core; import org.opencv.core.Mat; import ... Read More

How to get pixels (RGB values) of an image using Java OpenCV library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 09:07:06

7K+ Views

A digital image is stored as a 2D array of pixels and a pixel is the smallest element of a digital image.Each pixel contains the values of alpha, red, green, blue values and the value of each color lies between 0 to 255 which consumes 8 bits (2^8).The ARGB values ... Read More

How to draw markers on an image using Java OpenCV library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 09:04:25

543 Views

You can draw makers on an image using the drawMarker() method of the org.opencv.imgproc.Imgproc class. This method accepts the following parameters −img − A Mat object representing the input image.position − An object of the class Point to specify the position of the marker.color − An object of the class ... Read More

How to match the key points of two images using OpenCV Java library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 09:01:54

731 Views

The detect() method of the org.opencv.features2d.Feature2D (abstract) class detects the key points of the given image. To this method, you need to pass a Mat object representing the source image and an empty MatOfKeyPoint object to hold the read key points.The drawMatches() method of the org.opencv.features2d.Feature2D class finds the matches between the ... Read More

How to Detect the key points of an image using OpenCV Java library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:59:18

750 Views

The detect() method of the org.opencv.features2d.Feature2D (abstract) class detects the key points of the given image. To this method, you need to pass a Mat the object representing the source image and an empty MatOfKeyPoint object to hold the read key points.You can draw the draw key points on the ... Read More

How to find the area of an image contour Java OpenCV library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:56:59

670 Views

Contours are nothing but the line joining all the points along the boundary of a particular shape. Using this you can −Find the shape of an object.Calculate the area of an object.Detect an object.Recognize an object.You can find the contours of various shapes, objects in an image using the findContours() ... Read More

How to find Image Contours using Java OpenCV library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:52:28

1K+ Views

Contours are nothing but the line joining all the points along the boundary of a particular shape. Using this you can −Find the shape of an object.Calculate the area of an object.Detect an object.Recognize an object.You can find the contours of various shapes, objects in an image using the findContours() ... Read More

How to perform Bitwise And operation on two images using Java OpenCV?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:47:14

507 Views

You can compute bitwise conjunction between two images using the bitwise_and() method of the org.opencv.core.Core class.This method accepts three Mat objects representing the source, destination and result matrices, calculates the bitwise conjunction of each every element in the source matrices and stores the result in the destination matrix.ExampleIn the following Java ... Read More

How to change the color spaces of an image using Java OpenCV library?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:42:41

586 Views

Using color space protocol you can represent the colors in an image. There are several color spaces available in OpenCV some of them are −BGR − RGB is the most widely used color space in this, each pixel is actually formed by three different colors (intensity) values: red, blue and ... Read More

Advertisements