Shep Bryan
Shep Bryan

Reputation: 669

Find the boundary pixels of binary mask in Julia

I am trying to do image processing on an image in Julia. I have a binary mask for a region of interest within my image. I need to find the border of pixels just outside of my mask. In python I can use skimage.segmentation.find_boundaries, and in Matlab I can use boundarymask. Does Julia have any convenient tools to do this?

Upvotes: 2

Views: 494

Answers (1)

Shep Bryan
Shep Bryan

Reputation: 669

I found a quick and dirty solution using PyCall which I will post for now, but if anyone finds a better solution that uses standard Julia modules I will accept that answer over mine.

using Conda
using PyCall

Conda.add("scikit-image")

find_boundaries = pyimport("skimage.segmentation").find_boundaries

mask = # load mask ...

border = find_boundaries(mask)

Upvotes: 1

Related Questions