Using image morphological techniques, locate the broken locations - image-processing

Can someone please guide the steps/the operation to be performed to construct this image and detect the broken fence position of the Image.
Thresholding the image to a binary image : to convert the input image to a binary image
Inverting the image : inverting it to get a black background and white lines
Dilation with SE one unit of the fence structure
Apply Erosion
Bitwise-and masks together: retrieve the original back- and foreground the image is inverted by subtracting the bitwise_or from 255
Constructed Image - Original Image will give us the position of the broken fence
Will this solution work ?

Depends what you call locate.
After large horizontal erosion and binarization:

Related

Extracting near-border elements of an image using logical operators and/or morphological transformations

Using logical operators (intersection, difference...etc) and/or morphological transformations (erosion, dilation and skeletonization) and given an image as the one below (original image), how can all the elements which are cut by the image's frame be extracted ? in order to keep only whole ones.
Original image
Intended result:
Near-border elements
Whole elements
I have tried intersecting the original image with another representing only the frame, and then applying a dilation on the intersection (though it doesn't seem possible to me to reconstitute the elements by dilating lines) and here are the results:
An image representing only the frame Intersection between the frame image and the original image Dilation of the intersection
(The dilation was tired with circular and square structuring elements of sizes ranging from 3X3 to 51X51)
Thank You.
This is morphological reconstruction (flood-filling). Marker - border of image, mask - original image.
https://www.mathworks.com/content/dam/mathworks/tag-team/Objects/m/64199_91822v00_eddins_final.pdf

How to remove white pixels from Binary image using Morphological Operators?

I am working with images of rocks. Here I have to segment them. I get a depth image as input.
After thresholding the image, there are some white pixels which I tried to remove but to no avail.
The methods I have used :
1. Bilateral Filter (not a morphological operator)
2. Closing
3. Erosion
The result are shown in the images below.
My task is to remove those white pixels INSIDE THE ROCKS using morphological operations. If the white pixels are not removed it affects my algorithm later(distance transform).
Is there a way using only morphological operations?If not, is there any other way?
1.Bilateral Filter
2.Closing
3.Erosion
4.Original Depth Image

What Operations can I use to extract the Hard Edges/Lines from this image

I'm able to detect the main hard edges in an image quite well using morphological gradient - see below image. How can I process this image to just extract the hardest/whitest edges? Thresholding either results in a very noisy image or hard edges lacking in detail/too eroded.
My thresholding result:
My goal is something like this:
*Note: I'm attempting to use the Morphological Gradient operation as a light weight way to detect the hard/main edges in an image. The OpenCV code will run on a raspberry pi robot so I'm trying to be quite efficient with my resources - thus I'm using Morphological Gradient as opposed to Canny or etc.
Original image:
I initially said Difference of Gaussians but you already had a better threshold image.
So I took the first image as input and performed Otsu Threshold. I used the image obtained from the function cv2.threshold(img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU) to detect lines.
Lines were detected using cv2.HoughLinesP()
My (not so good) result:
You have the option of drawing the lines onto your original image.

How to detect large galaxies using thresholding?

I'm required to create a map of galaxies based on the following image,
http://www.nasa.gov/images/content/690958main_p1237a1.jpg
Basically I need to smooth the image first using a mean filter then apply thresholding to the image.
However, I'm also asked to detect only large galaxies in the image. So what should I adjust the smoothing mask or thresholding in order to achieve that goal?
Both: by smoothing the picture first, the pixels around smaller galaxies will "blend" with the black space and, thus, shift to a lower intensity value. This lower intensity can then be thresholded, leaving only the white centres of bigger galaxies.

Stretch region of image through opencv or opengl in iOS

I am trying to make double chin in fat image as mentioned in my desired result image below.
I have morphed the normal face to fat face by wrapping an image on mesh and deformed the mesh.
Original image
Wrapped image on mesh grid with vertex points displaced
Current result image
I tried a lot by arranging mesh points but could not get the result like I have shown in first image.
Any ideas how to achieve this by open GL or open CV in iOS?
It's obvious from the first image that there is an added effect to produce the double or triple chin.
This actually looks like a either a preset image blended into the original or a scale and stretched version of the original chin blended into the warped image.

Resources