com.aspose.omr

Class OmrConfig



  • public class OmrConfig
    extends Object

    Configuration for OMR extraction algorithm.


     
     OmrTemplate template = OmrTemplate.load("template.amr"); // template path
     OmrEngine engine = new OmrEngine(template);
     OmrConfig config = engine.getConfiguration();
     // The area containing an OMR mark will not be reduced to size that contain all black pixels.
     config.setTrimWhitePixels(false);
     

    • Constructor Summary

      Constructors 
      Constructor and Description
      OmrConfig()
      Initializes a new instance of the OmrConfig class with default settings.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      double getFillThreshold()
      Gets the threshold percentage of black pixels in the area to consider it filled.
      boolean getTrimWhitePixels()
      Gets value indicating should be the area containing an OMR mark reduced or not to size that contain all black pixels.
      void setFillThreshold(double value)
      Sets the threshold percentage of black pixels in the area to consider it filled.
      void setTrimWhitePixels(boolean value)
      Sets value indicating should be the area containing an OMR mark reduced or not to size that contain all black pixels.
    • Constructor Detail

      • OmrConfig

        public OmrConfig()

        Initializes a new instance of the OmrConfig class with default settings.

    • Method Detail

      • getFillThreshold

        public double getFillThreshold()

        Gets the threshold percentage of black pixels in the area to consider it filled. The value is in range [0;1], with 1 corresponding to 100% of pixels in area must be black to consider it filled.

      • getTrimWhitePixels

        public boolean getTrimWhitePixels()

        Gets value indicating should be the area containing an OMR mark reduced or not to size that contain all black pixels.

      • setFillThreshold

        public void setFillThreshold(double value)

        Sets the threshold percentage of black pixels in the area to consider it filled. The value is in range [0;1], with 1 corresponding to 100% of pixels in area must be black to consider it filled.

      • setTrimWhitePixels

        public void setTrimWhitePixels(boolean value)

        Sets value indicating should be the area containing an OMR mark reduced or not to size that contain all black pixels.