Maruthi Krishna has Published 870 Articles

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

9K+ 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

778 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

1K+ 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

997 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

904 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

2K+ 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

668 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

763 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

How to drop a MongoDB Collection using Java?

Maruthi Krishna

Maruthi Krishna

Updated on 10-Apr-2020 08:39:17

2K+ Views

You can drop an existing collection from MongoDB using the drop() method.Syntaxdb.coll.drop()Where, db is the database.coll is the collection (name) in which you want to insert the documentExampleAssume we have created 3 collections in a MongoDB database as shown below −> use sampleDatabase switched to db sampleDatabase > db.createCollection("students") { ... Read More

How to delete a MongoDB document using Java?

Maruthi Krishna

Maruthi Krishna

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

3K+ Views

You can delete a document from an existing collection in MongoDB using the remove() method.Syntaxdb.coll.remove(DELLETION_CRITTERIA)Where, db is the database.coll is the collection (name) in which you want to insert the documentExampleAssume we have a collection named students in the MongoDB database with the following documents −{name:"Ram", age:26, city:"Mumbai"} {name:"Roja", age:28, ... Read More

Advertisements