Skip to content

Commit 72bfc76

Browse files
author
Shivam Gupta
authored
quickstart: more newbie-friendly words tweak in the beginning part (#195)
1 parent e1cf7cb commit 72bfc76

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

docs/src/tutorials/quickstart.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# [Quickstart](@id page_quickstart)
22

3+
```@setup array
4+
using Images, ImageDraw
5+
6+
make_roi(tl::Point, br::Point) = Polygon([tl, Point(br.x, tl.y), br, Point(tl.x, br.y)])
7+
make_roi(xs::UnitRange, ys::UnitRange) = make_roi(Point(ys[1], xs[1]), Point(ys[end], xs[end]))
8+
```
9+
310
If you're comfortable with Julia or have used another image-processing
411
package before, this page may help you get started quickly. If some of
512
the terms or concepts here seem strange, don't worry---there are much
613
more detailed explanations in the following sections.
714

8-
## Images are just arrays
9-
10-
```@setup array
11-
using Images, ImageDraw
15+
To start with, let's load the `Images.jl` package:
1216

13-
make_roi(tl::Point, br::Point) = Polygon([tl, Point(br.x, tl.y), br, Point(tl.x, br.y)])
14-
make_roi(xs::UnitRange, ys::UnitRange) = make_roi(Point(ys[1], xs[1]), Point(ys[end], xs[end]))
17+
```@repl array
18+
using Images
1519
```
1620

21+
## Images are just arrays
22+
1723
For most purposes, any `AbstractArray` can be treated as an image. For example, numeric array can be interpreted as a grayscale image.
1824

1925
```@repl array
@@ -23,6 +29,9 @@ img = rand(4, 3)
2329
Gray.(img) #hide
2430
```
2531

32+
Don't worry if you don't get the "image" result, that's expected because it's actually recognized as a numerical array
33+
and not an image. You will learn how to automatically display an image later in JuliaImages.
34+
2635
We could also select a region-of-interest from a larger image
2736

2837
```@example array
@@ -69,9 +78,6 @@ draw!(out, roi_v_boundary, RGB{Float64}(0, 0, 1)) # hide
6978
draw!(out, roi_v, RGB{Float64}(0, 0, 1)) # hide
7079
```
7180

72-
Don't worry if you don't get the "image" result, that's expected and you'll
73-
learn how to automatically display an image later in JuliaImages.
74-
7581
Some add-on packages enable additional behavior. For example,
7682

7783
```@example array

0 commit comments

Comments
 (0)