ImageDraw.jl Documentation
A drawing package for JuliaImages
Introduction
ImageDraw supports basic drawing on Images. You can draw points, lines, circles, ellipse and paths.
Basic usage
Let's start with a drawing a circle
using TestImages, ImageDraw, ColorVectorSpace
img = testimage("lighthouse")
# Detect edges at different scales by adjusting the `spatial_scale` parameter.
draw!(img, Ellipse(CirclePointRadius(350,200,100)))
When displayed, these three images look like this:
Drawing a circle with a thickness
using TestImages, ImageDraw, ColorVectorSpace
img = testimage("lighthouse")
# With keyword argument fill = false, circle with given thickness is computed
draw!(img, Ellipse(CirclePointRadius(350, 200, 100; thickness = 75, fill = false)))
Drawing a Rectangle.
using TestImages, ImageDraw, ImageCore, ImageShow
using FileIO # hide
img = testimage("lighthouse")
img_example_stage1 = draw!(img, Polygon(RectanglePoints(Point(10, 10), Point(100, 100))), RGB{N0f8}(1))
img_example_stage2 = draw!(img_example_stage1, Polygon(RectanglePoints(CartesianIndex(110, 10), CartesianIndex(200, 200))), RGB{N0f8}(1))
img_example_stage3 = draw!(img_example_stage2, Polygon(RectanglePoints(220, 10, 300, 300)), RGB{N0f8}(1))
Drawing a Cross.
using TestImages, ImageDraw, ColorVectorSpace, ImageCore
img = testimage("lighthouse");
draw!(img, Cross(Point(200,150), 50), RGB{N0f8}(1))