Mathematica Asked on August 13, 2021
How can I take the image data of the area around a max?
img = Import["https://i.stack.imgur.com/YDCGF.png"]
markers = MaxDetect[GaussianFilter[img, 10], Padding -> 1];
HighlightImage[img, markers, Method -> {"DiskMarkers", 5}]
I would like to take the image data of the shape it is within like:
Update: I made a brute force version using ImageTrim[]
and PixelValuePositions[]
but this is just using a approximate square around the max detect point
I am not sure I understand exactly what is required but I'll try something. In the last image all pixels are set to 0 except in the areas of interest (where the pixels of the original image are shown).
img = Import["https://i.stack.imgur.com/YDCGF.png"]
markers = MaxDetect[GaussianFilter[img, 10], 0.03, Padding -> 1]
comp = ImageMultiply[img, markers]
data = ImageData[comp];
Correct answer by Jean-Pierre on August 13, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP