Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.1-rc1 #86

Merged
merged 15 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI
on:
push:
branches:
- master
tags: '*'
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.3'
- '1.7'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using AprilTags
DocMeta.setdocmeta!(AprilTags, :DocTestSetup, :(using AprilTags); recursive=true)
doctest(AprilTags)'
53 changes: 36 additions & 17 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
name: CompatHelper

on:
schedule:
- cron: '20 00 * * *'
issues:
types: [opened, reopened]

- cron: 0 0 * * *
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.2.0]
julia-arch: [x86]
os: [ubuntu-latest]
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
version: '1'
# arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "AprilTags"
uuid = "f0fec3d5-a81e-5a6a-8c28-d2b34f3659de"
keywords = ["AprilTags", "fiducials", "markers", "camera", "calibration"]
desc = "Visual fiducial marking system"
version = "0.9.0"
version = "0.9.1"

[deps]
AprilTags_jll = "49f4e9a8-0306-5d58-91df-e9c3c0e42747"
Expand All @@ -18,9 +18,9 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
AprilTags_jll = "0.1.0"
ColorTypes = "0.10"
ColorTypes = "0.10, 0.11"
Colors = "0.8, 0.9, 0.10, 0.11, 0.12"
DocStringExtensions = "0.8"
DocStringExtensions = "0.8, 0.9"
FixedPointNumbers = "0.7, 0.8"
ImageDraw = "0.1, 0.2"
Requires = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AprilTags

[![Build Status](https://travis-ci.org/JuliaRobotics/AprilTags.jl.svg?branch=master)](https://travis-ci.org/JuliaRobotics/AprilTags.jl)
[![CI](https://github.com/JuliaRobotics/AprilTags.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/JuliaRobotics/AprilTags.jl/actions/workflows/CI.yml)
[![codecov.io](http://codecov.io/github/JuliaRobotics/AprilTags.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaRobotics/AprilTags.jl?branch=master)
[![docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://juliarobotics.github.io/AprilTags.jl/latest/)

Expand Down
3 changes: 2 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
AprilTags = "f0fec3d5-a81e-5a6a-8c28-d2b34f3659de"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.21"
Documenter = "0.27"
12 changes: 6 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
using Pkg
Pkg.build("AprilTags")
using Documenter, AprilTags
using AprilTags
using Documenter

makedocs(
modules = [AprilTags],
format = :html,
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
),
sitename = "AprilTags.jl",
pages = Any[
"Home" => "index.md",
"Functions" => "func_ref.md"
]
# html_prettyurls = !("local" in ARGS),
)


deploydocs(
repo = "github.com/JuliaRobotics/AprilTags.jl.git",
target = "build"
)
)
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ See the [Calibration example](https://github.com/JuliaRobotics/AprilTags.jl/blob

```@docs
calcCalibResidualAprilTags!
calcCornerProjectionsAprilTags!
```

## Manual Outline
Expand Down
8 changes: 4 additions & 4 deletions src/calibrationutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ using AprilTags
using FileIO

# where are the photos of the calibration files
filepaths = [photo1.jpg; photo2.jpg;...]
filepaths = ["photo1.jpg"; "photo2.jpg";...]
# load the images into memory
imgs = load.(filepaths)

# It's imporant that you measure and specif_height the tag length correctly here
# It's imporant that you measure and specify the tag length correctly here
# 30 mm is just a guess, insert your own correct tag measurements here.
taglength = 0.03

# rough guess of what calibration parameters might be
# x,y <==> rows,colums
# img[rows,columns] <==> img[height, width]
c_width = size(imgs[1],2) / 2 # columns across in Images.jl
c_height = size(imgs[1],1) / 2 # rows down in Images.jl
f_width = size(imgs[1],1)
Expand Down Expand Up @@ -220,7 +220,7 @@ freeDetector!(detector) # could also use a deepcopy to duplicate the memory to a

### Related

[`calcCornerProjectionsAprilTags`](@ref)
[`calcCornerProjectionsAprilTags!`](@ref)
"""
function calcCalibResidualAprilTags!( images::AbstractVector,
allTags::AbstractVector;
Expand Down
21 changes: 20 additions & 1 deletion src/helpers.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
@enum TagFamilies tag36h11 tag25h9 tag16h5

"""
$(TYPEDEF)
Represents the detected April tag.
---
Fields:
$(TYPEDFIELDS)
"""
struct AprilTag
"The family of the tag."
family::String
"The decoded ID of the tag."
id::Int
"""How many error bits were corrected?
Note: accepting large numbers of corrected errors leads to greatly increased false positive rates.
NOTE: As of this implementation, the detector cannot detect tags with a Hamming distance greater than 2."""
hamming::Int
# goodness::Float32
"""A measure of the quality of the binary decoding process: the average difference between the intensity of a data bit versus
the decision threshold. Higher numbers roughly indicate better decodes. This is a reasonable measure of detection accuracy
only for very small tags-- not effective for larger tags (where we could have sampled anywhere within a bit cell and still
gotten a good detection.)"""
decision_margin::Float32
"""The 3x3 homography matrix describing the projection from an "ideal" tag (with corners at (-1,1), (1,1), (1,-1), and (-1,-1))
to pixels in the image."""
H::Matrix{Float64}
"The center of the detection in image pixel coordinates"
c::Vector{Float64}
"The corners of the tag in image pixel coordinates. These always wrap counter-clock wise around the tag."
p::Vector{Vector{Float64}}
end

Expand Down