Mahotas - Regional Minima of Image Last Updated : 19 Feb, 2022 Comments Improve Suggest changes Like Article Like Report In this article, we will see how we can get regional minima of images in mahotas. Regional minima is a stricter criterion than the local minima as it takes the whole object into account and not just the neighborhood. Minima are connected components of pixels with a constant intensity value, surrounded by pixels with a higher value. In this tutorial, we will use the “Lena” image, below is the command to load it. mahotas.demos.load('lena') Below is the Lena image In order to do this we will use mahotas.regmin methodSyntax : mahotas.regmin(img)Argument : It takes image object as argumentReturn : It returns image object Note: Input image should be filtered or should be loaded as greyIn order to filter the image we will take the image object which is numpy.ndarray and filter it with the help of indexing, below is the command to do this image = image[:, :, 0] Below is the implementation Python3 # importing required libraries import mahotas import mahotas.demos from pylab import gray, imshow, show import numpy as np import matplotlib.pyplot as plt # loading image img = mahotas.demos.load('lena') # filtering image img = img.max(2) print("Image") # showing image imshow(img) show() # finding regional minima new_img = mahotas.regmin(img) # showing image print("Regional Minima") imshow(new_img) show() Output : Image Regional Minima Another example Python3 # importing required libraries import mahotas import numpy as np from pylab import gray, imshow, show import os import matplotlib.pyplot as plt # loading image img = mahotas.imread('dog_image.png') # filtering image img = img[:, :, 0] print("Image") # showing image imshow(img) show() # finding regional minima new_img = mahotas.regmin(img) # showing image print("Regional Minima") imshow(new_img) show() Output : Image Regional Minima Comment More infoAdvertise with us Next Article Mahotas - Getting Mean Value of Image R rakshitarora Follow Improve Article Tags : Python Python-Mahotas Practice Tags : python Similar Reads Mahotas - Regional Maxima of Image In this article, we will see how we can get regional maxima of images in mahotas. Regional maxima is a stricter criterion than the local maxima as it takes the whole object into account and not just the neighborhood. Maxima are connected components of pixels with a constant intensity value, surround 2 min read Mahotas - Roundness of Image In this article we will see how we can get the image roundness feature in mahotas. Roundness is dominated by the shape's gross features rather than the definition of its edges and corners, or the surface roughness of a manufactured object. A smooth ellipse can have low roundness, if its eccentricity 2 min read Mahotas - Local Minima in Image In this article we will see how we can find local minima of the image in mahotas. Local minima is basically local peaks in the image. In this tutorial we will use âlenaâ image, below is the command to load it. mahotas.demos.load('lena') Below is the lena image   In order to do this we will use ma 2 min read Mahotas - Getting Mean Value of Image In this article we will see how we can get the mean value of image in mahotas. Mean value is the sum of pixel values divided by the total number of pixel values. Pixel Values Each of the pixels that represents an image stored inside a computer has a pixel value which describes how bright that pixel 2 min read Mahotas - Image Stretching In this article we will see how we can do image stretching in mahotas. Contrast stretching (often called normalization) is a simple image enhancement technique that attempts to improve the contrast in an image by `stretching' the range of intensity values it contains to span a desired range of value 2 min read Mahotas - Image Overlay In this article we will see how we can apply image overlay in mahotas. Image overlay in mahotas create an image which is grayscale, but with possible boolean overlays. In this tutorial we will use âlenaâ image, below is the command to load it. mahotas.demos.load('lena') Below is the lena image  In 2 min read Like