HandTracker
Detects hands in an image.
Last updated
Detects hands in an image.
Last updated
Implements interface.
HandTracker()
Creates a new HandTracker object.
Version
string
Read-Only. The API version.
Copyright
string
Read-Only. The API copyright.
Detects hands for the specified Texture2D.
Detects the hands from the specified color array, width and height.
Load(byte[], int, int, int)
Detects hands for the specified image data, width, height and channels.
Dispose()
void
Releases unmanaged resources
The example shows how to detect hands with the HandTracker
class.
After loading the image to the texture there are 3 different ways to detect hands in that image:
The simplest is to detect hands for the specified Texture2D.
If you need to run the detection in another thread, for example, you can get the texture pixels and detect hands for the specified color array.
Alternatively, you can get the texture raw data and detect hands for the specified byte array.
To detect hands in an image file, load the file and detect hands for the specified byte array.
Once tracking is no longer needed, it's recommended to dispose of the HandTracker
. You can do that either in the OnApplicationQuit()
or the OnDestroy()
methods.
Load()
List<>
Load([], int, int)
List<>
List<>
To detect hands in a Texture2D, create a Texture2D and load an image. There are multiple ways to load an image. You could load it from a webcam using the , from a file in the Assets folder or from a file on your disc.