Top Hat and Black Hat Morphological Operations in Java

Maruthi Krishna
Updated on 13-Apr-2020 10:43:48

777 Views

Morphological operations are the set of operations that process images according to the given shapes.Erosion − Erosion is a morphological operation during which pixels are removed from the image boundaries.Dilation − During is a morphological operation during which pixels are added to the image boundaries.Where the total number of pixels added/removed depends on the dimensions of the structuring element used.Morphological Opening − During this operation erosion is applied on the given input and on the result dilation is applied. This is used to remove small objects from the foreground of an image.Morphological Closing − During this operation dilation is applied ... Read More

Alternative for OpenCV imshow Method in Java

Maruthi Krishna
Updated on 13-Apr-2020 10:40:10

1K+ Views

The HighGui class of the org.opencv.highgui package allows you to create and manipulate windows and display them. You can display an image in a window using the imshow() method of this class. This method accepts two parameters−A string variable representing the name of the window.A Mat object representing the contents of an image.It is recommended to invoke the waitKey() method after imshow().ExampleThe following example reads an image, converts it into a grayscale image, detects the edges in it and displays all the three images (original, gray-scale and, edges) in windows using HighGui.import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.highgui.HighGui; import org.opencv.imgcodecs.Imgcodecs; import ... Read More

Morphological Gradient in Image Processing

Maruthi Krishna
Updated on 13-Apr-2020 10:37:50

1K+ Views

Erosion and dilation are the two basic morphological operations. As the name implies, morphological operations are the set of operations that process images according to their shapes.During dilation operation additional pixels are added to an image boundary and, during erosion operation, additional pixels are removed from image boundaries, The total number of pixels added during the dilation process depends on the dimensions of the structuring element used.Morphological Gradient is the operation that is equal to the difference between dilation and erosion of an image. Each pixel value in the resulting image indicates the contrast intensity in the nearby pixels. This ... Read More

Explain Morphological Closing in OpenCV using Java

Maruthi Krishna
Updated on 13-Apr-2020 09:37:53

482 Views

Morphological operations are the set of operations that process images according to the given shapes. Erosion and dilation are the two basic morphological operations.During dilation, additional pixels are added to the image boundaries.During erosion, additional pixels are removed from the image boundaries.The total number of pixels added/removed depends on the dimensions of the structuring element used. You can perform erosion and dilation operations using the erode() and dilate() methods respectively.In addition to dilation, OpenCV provides more morphological transformations such as Opening, Closing, Morphological Gradient, Top Hat, Black Hat.Morphological ClosingThis is an operation that is equivalent to applying dilation on an ... Read More

Explain Morphological Opening in OpenCV Using Java

Maruthi Krishna
Updated on 13-Apr-2020 09:34:36

681 Views

Morphological operations are the set of operations that process images according to the given shapes. Erosion and dilation are the two basic morphological operations.During dilation, additional pixels are added to the image boundaries.During erosion, additional pixels are removed from the image boundaries.The total number of pixels added/removed depends on the dimensions of the structuring element used. You can perform erosion and dilation operations using the erode() and dilate() methods respectively.In addition to dilation, OpenCV provides more morphological transformations such as Opening, Closing, Morphological Gradient, Top Hat, Black Hat.Morphological openingThis is an operation that is equivalent to applying erosion on an ... Read More

Canny Edge Detection in OpenCV Using Java

Maruthi Krishna
Updated on 13-Apr-2020 09:28:20

2K+ Views

The canny edge detector is known as optimal detector since it detects only the existing edges, gives only one response per page and minimizes the distance between the edge pixels and detected pixels.The Canny() method of the Imgproc class applies the canny edge detection algorithm on the given image. this method accepts −Two Mat objects representing the source and destination images.Two double variables to hold the threshold values.To detect the edges of a given image using the canny edge detector −Read the contents of the source image using the imread() method of the Imgcodecs class.Convert it into a gray scale ... Read More

Add Text to an Image Using Java OpenCV Library

Maruthi Krishna
Updated on 13-Apr-2020 09:22:27

1K+ Views

You can add text to an image using the putText() method of the org.opencv.imgproc.Imgproc class. This method renders the specified text in the given image. It accepts −An empty mat object to store the source image.A string object to specify the desired text.A Point object specifying the position of the text.Integer constant specifying the font of the text.scale factor that is multiplied by the font-specific base size.A Scalar object specifying the color of the text.An integer value specifying the color of the textExampleimport org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.Point; import org.opencv.core.Scalar; import org.opencv.highgui.HighGui; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; public class AddingText { ... Read More

Fit Ellipses Around Possible Objects in Image Using OpenCV Java

Maruthi Krishna
Updated on 13-Apr-2020 09:20:23

327 Views

You can fit an ellipse over a shape using the fitEllipse() method of the org.opencv.imgproc.Imgproc class. This method accepts an object of MatOfPoint2f class, calculates the ellipse that would fit the given set of points and returns a RotatedRect object.Using this you can draw ellipses around the possible objects in an image. To do so, Read an image using the imread() method of the Imgproc class.Convert it into a grayscale image using the cvtColor() method of the Imgproc class.Convert the gray image to binary using the threshold() method of the Imgproc class.Find the contours in the image using the findContours() method ... Read More

Modify Default Editor of JShell in Java 9

raja
Updated on 13-Apr-2020 09:12:48

487 Views

JShell implements REPL (Read-Evaluate-Print Loop) that reads the code from the command-line, evaluates the given snippet, and prints the result back to us.In JShell, it's possible to edit code from the default JShell editor by using JShell Editor Pad. We can also use the "/set" command to modify the default editor in order to define another one. When launching the "/edit" command, this editor can be used. In order to perform this operation, we can simply launch the "/set editor [editor]" command.Suppose we want to set the Notepad application as the default program for editing code, then just type the command: "/set editor ... Read More

Satellite Tracking

Ajay yadav
Updated on 13-Apr-2020 08:18:46

598 Views

This article showcases the real − time satellite tracking and orbit prediction program for both the Linux and desktop using gpredict software. We can run in real-time, simulated real-time (fast forward and backward), and manual time control with this tool.Core features of GpredictTracking of a large number of satellites moving across the globe.Display the tracking data in lists, maps, polar plots and any combination of these.We can predict upcoming passes with the base stationDetailed information both the real-time and non-real time modesDoppler tuning of radios via Hamlib rigctldAntenna rotator control via Hamlib rotctldPrerequisiteThe satellite tracking software gpredict requires the following ... Read More

Advertisements