-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from JuliaRobotics/feat/3Q20/drawimgtags
add drawTags! and bump v0.7.4
- Loading branch information
Showing
6 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Functionality that may be loaded more than one | ||
|
||
export drawTags!, drawTags | ||
|
||
|
||
""" | ||
drawTags! | ||
Draw axes and tag IDs on an image based on detections in `tags`. | ||
Notes | ||
- Will self detect tags, or requires user to pass in `tags` detections. | ||
""" | ||
function drawTags!(imageCol::AbstractArray{<:AbstractRGB,2}, | ||
K::AbstractArray{<:Real,2}, | ||
tags::AbstractArray{AprilTag,1} = AprilTagDetector()(imageCol), | ||
drawReticle::Bool = false ) | ||
# | ||
# draw the tag number for each tag | ||
if @isdefined(drawTagID!) | ||
foreach(x->drawTagID!(imageCol, x),tags) | ||
end | ||
#draw color box on tag corners | ||
foreach(tag->drawTagBox!(imageCol, tag, width = 2, drawReticle = drawReticle), tags) | ||
foreach(tag->drawTagAxes!(imageCol,tag, K), tags) | ||
imageCol | ||
end | ||
|
||
""" | ||
drawTags | ||
Draw axes and tag IDs on an image based on detections in `tags`. | ||
Notes | ||
- Will self detect tags, or requires user to pass in `tags` detections. | ||
""" | ||
drawTags(imageCol::AbstractArray{<:AbstractRGB,2},K::AbstractArray{<:Real,2},tags::AbstractArray{AprilTag,1}=AprilTagDetector()(imageCol),drawReticle::Bool=false ) = drawTags!(RGB.(imageCol),K,tags,drawReticle) | ||
# Convert image to RGB | ||
# imageCol = RGB.(image) | ||
|
||
|
||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters