jp.keijiro.apriltag
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -14,3 +14,3 @@ { | ||
"unityRelease": "0f1", | ||
"version": "1.0.0" | ||
"version": "1.0.1" | ||
} |
@@ -76,3 +76,3 @@ jp.keijiro.apriltag - AprilTag package for Unity | ||
``` | ||
"jp.keijiro.apriltag": "1.0.0" | ||
"jp.keijiro.apriltag": "1.0.1" | ||
``` | ||
@@ -97,3 +97,3 @@ | ||
"dependencies": { | ||
"jp.keijiro.apriltag": "1.0.0", | ||
"jp.keijiro.apriltag": "1.0.1", | ||
... | ||
@@ -103,1 +103,50 @@ ``` | ||
[scoped registry]: https://docs.unity3d.com/Manual/upm-scoped.html | ||
How to detect tags | ||
------------------ | ||
At first, create the `AprilTag.TagDetector` object specifying the input image | ||
dimensions. You can run the detector in a lower resolution by specifying a | ||
decimation factor. It may improve the speed at the cost of accuracy and | ||
detection rate. | ||
```csharp | ||
detector = new AprilTag.TagDetector(imageWidth, imageHeight, decimation); | ||
``` | ||
Call the `ProcessImage` method every frame to detect tags from an input image. | ||
You can use a `Color32` array to give an image. At the same time, you have to | ||
specify the camera FoV (horizontal) in degrees and the tag size in meters. | ||
```csharp | ||
webcamTexture.GetPixels32(buffer); | ||
detector.ProcessImage(buffer, fov, tagSize); | ||
``` | ||
You can retrieve the detected tags from the `DetectedTags` property. | ||
```csharp | ||
foreach (var tag in detector.DetectedTags) | ||
Debug.Log($"{tag.ID} {tag.Position} {tag.Rotation}"); | ||
``` | ||
Dispose the detector object when you no longer need it. | ||
```csharp | ||
detector.Dispose(); | ||
``` | ||
For details, please check the [WebCamTest.cs] example, which shows how to | ||
detect tags from images with `WebCamTexture`. | ||
[WebCamTest.cs]: /Assets/WebcamTest.cs | ||
Related repositories | ||
-------------------- | ||
- The original AprilTag project repository: | ||
https://github.com/AprilRobotics/apriltag | ||
- Pre-generated tag images: | ||
https://github.com/AprilRobotics/apriltag-imgs | ||
- A fork of the AprilTag repository used to build Unity plugin binaries. | ||
https://github.com/keijiro/apriltag |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1870767
150