Class SurfaceTracker
- Espace de noms
- easyar
SurfaceTracker assure le suivi des surfaces environnementales.
SurfaceTracker occupe 1 tampon (buffer) de caméra. La capacité du tampon de la caméra doit être définie via camera.setBufferCapacity avec une valeur au moins égale au nombre total de tampons utilisés par tous les composants.
Après création, les méthodes start/stop peuvent être appelées pour démarrer et arrêter le fonctionnement. Ces appels sont très légers en ressources.
Lorsque le composant n'est plus nécessaire, appelez close pour le fermer. Il ne doit plus être utilisé après fermeture.
SurfaceTracker reçoit les InputFrame via inputFrameSink. Connectez InputFrameSource à inputFrameSink pour l'utiliser.
Méthodes
isAvailable
Renvoie true uniquement sur les systèmes Android, iOS et lorsque l'accéléromètre-gyroscope est disponible.
bool easyar_SurfaceTracker_isAvailable(void)
static bool isAvailable()
public static boolean isAvailable()
companion object fun isAvailable(): Boolean
+ (bool)isAvailable
public static func isAvailable() -> Bool
public static bool isAvailable()
Retours
| Type | Description |
|---|---|
| Boolean |
inputFrameSink
InputFrame port d'entrée. Les InputFrame doivent obligatoirement posséder une image, un horodatage et des paramètres de caméra.
Remarque : La caméra ne prend pas en charge le modèle de caméra grand-angle.
void easyar_SurfaceTracker_inputFrameSink(easyar_SurfaceTracker * This, easyar_InputFrameSink * * Return)
std::shared_ptr<InputFrameSink> inputFrameSink()
public @Nonnull InputFrameSink inputFrameSink()
fun inputFrameSink(): InputFrameSink
- (easyar_InputFrameSink *)inputFrameSink
public func inputFrameSink() -> InputFrameSink
public virtual InputFrameSink inputFrameSink()
Retours
| Type | Description |
|---|---|
| InputFrameSink |
bufferRequirement
Le nombre de camera buffers occupés par le composant actuel.
int easyar_SurfaceTracker_bufferRequirement(easyar_SurfaceTracker * This)
int bufferRequirement()
public int bufferRequirement()
fun bufferRequirement(): Int
- (int)bufferRequirement
public func bufferRequirement() -> Int32
public virtual int bufferRequirement()
Retours
| Type | Description |
|---|---|
| Int32 |
outputFrameSource
OutputFrame port de sortie
void easyar_SurfaceTracker_outputFrameSource(easyar_SurfaceTracker * This, easyar_OutputFrameSource * * Return)
std::shared_ptr<OutputFrameSource> outputFrameSource()
public @Nonnull OutputFrameSource outputFrameSource()
fun outputFrameSource(): OutputFrameSource
- (easyar_OutputFrameSource *)outputFrameSource
public func outputFrameSource() -> OutputFrameSource
public virtual OutputFrameSource outputFrameSource()
Retours
| Type | Description |
|---|---|
| OutputFrameSource |
create
créer
void easyar_SurfaceTracker_create(easyar_SurfaceTracker * * Return)
static std::shared_ptr<SurfaceTracker> create()
public static @Nonnull SurfaceTracker create()
companion object fun create(): SurfaceTracker
+ (easyar_SurfaceTracker *)create
public static func create() -> SurfaceTracker
public static SurfaceTracker create()
Retours
| Type | Description |
|---|---|
| SurfaceTracker |
start
Commencez l'algorithme de suivi.
bool easyar_SurfaceTracker_start(easyar_SurfaceTracker * This)
bool start()
public boolean start()
fun start(): Boolean
- (bool)start
public func start() -> Bool
public virtual bool start()
Retours
| Type | Description |
|---|---|
| Boolean |
stop
Suspendre l'algorithme de suivi. Appelez start pour redémarrer le suivi.
void easyar_SurfaceTracker_stop(easyar_SurfaceTracker * This)
void stop()
public void stop()
fun stop(): Unit
- (void)stop
public func stop() -> Void
public virtual void stop()
Retours
| Type | Description |
|---|---|
| Void |
close
close after
void easyar_SurfaceTracker_close(easyar_SurfaceTracker * This)
void close()
public void close()
fun close(): Unit
- (void)close
public func close() -> Void
public virtual void close()
Retours
| Type | Description |
|---|---|
| Void |
alignTargetToCameraImagePoint
Positionner le point de suivi sur un point spécifié de l'image de la caméra. Dans le système de coordonnées d'image ([0, 1]^2), x est orienté vers la droite et y vers le bas, avec l'origine dans le coin supérieur gauche. Utilisez imageCoordinatesFromScreenCoordinates pour convertir des coordonnées d'écran en coordonnées d'image.
void easyar_SurfaceTracker_alignTargetToCameraImagePoint(easyar_SurfaceTracker * This, easyar_Vec2F cameraImagePoint)
void alignTargetToCameraImagePoint(Vec2F cameraImagePoint)
public void alignTargetToCameraImagePoint(@Nonnull Vec2F cameraImagePoint)
fun alignTargetToCameraImagePoint(cameraImagePoint: Vec2F): Unit
- (void)alignTargetToCameraImagePoint:(easyar_Vec2F *)cameraImagePoint
public func alignTargetToCameraImagePoint(_ cameraImagePoint: Vec2F) -> Void
public virtual void alignTargetToCameraImagePoint(Vec2F cameraImagePoint)
Paramètres
| Nom | Type | Description |
|---|---|---|
| cameraImagePoint | Vec2F |
Retours
| Type | Description |
|---|---|
| Void |