Hi! I try to calculate area and perimeters of labeled regions of binary image. For example:
using Images, ImageView, ImageSegmentation, TestImages, IndirectArrays, ImageMorphology
img = testimage("blobs")
# f = AdaptiveThreshold(window_size = 512)
f = Otsu()
imgbin = binarize(img, f);
seg = fast_scanning(imgbin, 0.2);
labels_map(seg);
Maybe, this question is trivial, but in offical docs and other post in stackoverflow or here I couldn’t find answer of this topic.
How to evalute this regions geometrical propertires?
Mi answer is possibly late but have a look at the Regions.jl package.
Maybe take a laplacian or sobel operator to get a better idea of the borders from there you can go ahead
There are a handful of methods in ImageMorphology.jl for characterizing connected components in an image. I wanted something that organized the region features in the same way that the region props table works in SciKit Image in python, so my colleagues and I developed some tools to at least get some of the basic measures. See the regionprops and regionprops_table functions in IceFloeTracker.jl. Source code here: https://github.com/WilhelmusLab/IceFloeTracker.jl/blob/main/src/Segmentation/regionprops.jl. At some point we will likely make a pull request for one of the other JuliaImages libraries but I’m not sure yet which one it would make the most sense in.