Class RegistrationAction

All Implemented Interfaces:
HumanFaceListener, ActionListener, Serializable, Cloneable, EventListener, Action

public class RegistrationAction extends ControlPanelAction<RegistrationPanel> implements HumanFaceListener
Action listener for the ICP and Procrustes registration.

Besides the UX logic, this object stores the parameters and results of manual, ICP, or Procrustes registration (alignment of human faces)

This object also serves as HumanFaceListener. It means that it is invoked whenever one of the faces are changed and then can react to these changes.

Changes made by these objects are announced to other listeners. Following events are triggered:

  • MeshChangedEvent
See Also:
  • Field Details

    • MINIMAL_SIGNIFICANT_POINTS

      public static final int MINIMAL_SIGNIFICANT_POINTS
      See Also:
  • Constructor Details

    • RegistrationAction

      public RegistrationAction(Canvas canvas, FacesProxy faces, JTabbedPane topControlPane)
      Constructor. A new RegistrationPanel is instantiated and added to the topControlPane
      Parameters:
      canvas - OpenGL canvas
      faces - Faces processed by current analytical task
      topControlPane - A top component when a new control panel is placed
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class ControlPanelAction<RegistrationPanel>
    • acceptEvent

      public void acceptEvent(HumanFaceEvent event)
      Description copied from interface: HumanFaceListener
      Subscription method, which is invoked when an event appears.
      Specified by:
      acceptEvent in interface HumanFaceListener
      Parameters:
      event - A fired event.
    • applyProcrustes

      protected void applyProcrustes()
      Calculates Procrustes analysis and transforms secondary face.
    • applyICP

      protected void applyICP()
    • getOrDetectLandmarks

      protected boolean getOrDetectLandmarks(List<Landmark> fpList, int faceSlot)
      Returns either existing or auto-detected feature points.
      Parameters:
      fpList - output list
      faceSlot - face slot
      Returns:
      true if pre-defined landmarks are used (put into the output list)