Access to feature points captured by SLAM
Please provide your development details as below;
1. SDK Version: 3.5.2
2. Development Environment: unity-android
3. Tracker/Scanner:
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): free
5. Target Device(Optional):
Hey
How can I have access to the feature points captured by SLAM?
Based on my research in your codes, I think it should be in "poseMatrices" from Map3d class? It is an internal class though, not accessible.
Thanks
Hi, thank you for using our sdk.
Do you want to get feature points from saved 3dmap file or do you want to get them when running visual slam?
Hi,
I would love to know both, from the 3dmap file and when the slam is running.
Thanks so much
Thanks for your interest in MAXST SDK.
You can refer to the FeatureRenderer GameObject in the VisualSLAM Example Scene. (FeatureRenderer exists in Assets> MaxstAR> Prefabs> Prefab.)
If you want to use it, drag & drop it to the desired scene, and then set ARCamera of FeaturePointBehavior to use it.
And here's how to get Feature points at code level.
private Vector3[] convertFloatToVertex3(float[] vertex, int count)
{
if (count == 0)
{
return null;
}
Vector3[] tempVertex = new Vector3[count];
for (int i = 0; i < count; i++)
{
tempVertex[i] = new Vector3(vertex[0 + (i * 3)], vertex[1 + (i * 3)], vertex[2 + (i * 3)]);
}
return tempVertex;
}
void Update()
{
GuideInfo guideInfo = TrackerManager.GetInstance().GetGuideInfo();
int featureCount = guideInfo.GetFeatureCount();
if (featureCount == 0)
{
return;
}
if (featureCount > 0)
{
float[] featureBuffer = guideInfo.GetFeatureBuffer();
Vector3[] vertexVector3Array = convertFloatToVertex3(featureBuffer, featureCount);
}
}
Thanks.
Sam
Maxst Support Team