Extract coordinates from a specific contour

I am new with Julia.
Is there a library, a way, to extract cartesian coordinates from a drawing?
At the end I need an array with point from a drawing.

This should be what you’re looking for:

2 Likes

Btw, there is this website, to discover packages:
JuliaHub :slight_smile:

2 Likes

this only makes contour from points. so not quite what I need.
Thanks for the searching tip.

You can extract cartesian points from the output of Contour.jl. If you want to find cartesian coordinates that meet some feature requirement within the drawing then we’d need to know what it is your doing before we could provide any more help.

Easy with GMT.jl

using GMT
# Create an example grid
G = GMT.peaks();

# Get the contours a interval of 2
D = grdcontour(G, cont=2, dump=true)
Array{GMT.GMTdataset,1} with 11 segments
Header1:        -6 contour -Z-6
Header2:        -4 contour -Z-4
Header3:        -2 contour -Z-2
Header4:        -2 contour -Z-2
Header5:        0 contour -Z0
Header6:        0 contour -Z0
Header7:        2 contour -Z2
Header8:        2 contour -Z2
Header9:        4 contour -Z4
Header10:       6 contour -Z6
Header11:       8 contour -Z8
First segment DATA
15×3 Array{Float64,2}:
  0.125       -1.47679  -6.0
  0.25        -1.44115  -6.0
  0.375       -1.46158  -6.0
  0.428516    -1.5      -6.0
  ...

# Plot them if wanted.
plot(D, aspect=:equal, name="contours.png", show=true)

thank you for your replies.
I tried ImageSegmentation.
Not yet there.