|
If you object localizer is purely image based, there is a framework prepared that you can use and fill with your own functionality. Follow these instructions on implementing an ObjectLocalizationProcessor: Implementing RGB ObjectLocalizerProcessors
Otherwise, you need to implement the Ice interface memoryx::ObjectLocalizerInterface. Depending on the input you use you should also inherit from the visionx::PointCloudProcessor or visionx::PointCloudAndImageProcessor. If you encounter compilation problems due to multiple inheritance, follow the instructions here: I have compilation problems due to multiple inheritance.
Essentially, you have to implement the function ObjectLocalizationResultList localizeObjectClasses(ObjectClassNameList objectClassNames) from the interface. The input is a list of (usually just one) object names, and the output is a list of localization results. You can potentially return several results for the same object.
This function is automatically called by MemoryX when somebody requested the localization of an object. The appropriate localizer for the object is saved in the object class in the memory (usually either in PriorKnowledge or LongtermMemory). When the object is in the PriorKowledge, the localizer can be set using the PriorKnowledgeEditor gui plugin. Otherwise, the localizer for an object class can be set like this: