Skip to content

Commit

Permalink
Come
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim committed Jan 9, 2025
1 parent 574d86b commit 6ab2d0d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions documentation/all_docs_ref/all_refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ its use requires resorting to the \myreflink{Monolithic} mode.

## IP functions

{{ generate_tablerefs improc}}

| | | | | | | | |
|:-----|:----|:----|:----|:----|:----|:----|:----|
| \myreflink{fillsinks} | \myreflink{imfill} | \myreflink{imreconstruct} | | | | | |

## GDAL utility functions

Expand Down
2 changes: 1 addition & 1 deletion documentation/utilities/fillsinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fillsinks(G::GMTgrid; conn=4, region=nothing, saco=false, insitu=false)

Fill sinks in a grid.

This function uses the ``imfill`` function to find how to fill sinks in a grid. But since ``imfill``
This function uses the \myreflink{imfill} function to find how to fill sinks in a grid. But since \myreflink{imfill}
operates on UInt8 matrices only the vertical (z) descrimination of the grid is reduced to 256 levels,
which is not that much.

Expand Down
8 changes: 4 additions & 4 deletions documentation/utilities/imfill.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ Example from Matlab imfill.
```julia
using GMT

I = gmtread(getpath4docs("coins.jpg");
I = gmtread(getpath4docs("coins.jpg"));
Ibw1 = binarize(I);
Ibw2 = imfill(Ibw);
Ibw2 = imfill(Ibw1);
grdimage(I, figsize=5)
grdimage!(Ibw1, figsize=5, xshift=5)
grdimage!(Ibw2, figsize=5, xshift=5, show=true)
grdimage!(Ibw1, figsize=5, xshift=5.1)
grdimage!(Ibw2, figsize=5, xshift=5.1, show=true)
```
\end{examplefig}

Expand Down
8 changes: 4 additions & 4 deletions documentation/utilities/imreconstruct.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ text(["Hello World"], region=(1.92,2.08,1.97,2.02), x=2.0, y=2.0,
font=(30, "Helvetica-Bold", :white),
frame=(axes=:none, bg=:black), figsize=(6,0), name="tmp.png")

# Read only one band (althouh gray scale the "tmp.png" is actually RGB)
# Read only one band (althouh gray scale, the "tmp.png" is actually RGB)
I = gmtread("tmp.png", band=1);

# Create a marker image that identifies the object in the image you want to extract through segmentation.
Expand All @@ -48,9 +48,9 @@ marker = fill(UInt8(0),(size(I)));
marker[390,130] = UInt8(255);

# Perform segmentation of the mask image using the marker image.
Ir = imreconstruct(Im, I)
grdimage(I, figsize=8, yshift=2.56)
grdimage!(Ir, figsize=8, show=true)
Ir = imreconstruct(marker, I);
grdimage(I, figsize=8)
grdimage!(Ir, figsize=8, yshift=-2.57, show=true)
```
\end{examplefig}

Expand Down

0 comments on commit 6ab2d0d

Please sign in to comment.