Beispiel #1
0
        public ObjectFeatures GetFeatures(int objectId, ObjectView.Perspective perspective)
        {
            WorldObject wo = null;

            if (WorldObjects.TryGetValue(objectId, out wo))
            {
                return(wo.GetFeatures(perspective));
            }

            return(null);
        }
Beispiel #2
0
        /// <summary>
        /// Train the object identifier with images mapped to an ID and perspective.
        /// </summary>
        /// <param name="objectId">An identifier for the object on the image</param>
        /// <param name="imagePath">Path to an image of the object to learn</param>
        /// <param name="perspective">The perspective used when taking the picture</param>
        public void Train(int objectId, string imagePath, ObjectView.Perspective perspective)
        {
            WorldObject wo;

            if (WorldObjects.TryGetValue(objectId, out wo))
            {
            }
            else
            {
                wo = new WorldObject(objectId);
                WorldObjects.Add(objectId, wo);
            }

            wo.AddView(imagePath, perspective);
        }
 /// <summary>
 /// TEMP
 /// </summary>
 /// <returns></returns>
 public ObjectFeatures GetFeatures(ObjectView.Perspective perspective)
 {
     return(Views[(int)perspective].Features);
 }
 /// <summary>
 /// </summary>
 /// <param name="imagePath"></param>
 /// <param name="perspective"></param>
 public void AddView(string imagePath, ObjectView.Perspective perspective)
 {
     Views[(int)perspective] = new ObjectView(perspective, imagePath);
 }