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 and Description |
---|
OmrConfig()
Initializes a new instance of the
OmrConfig class with default settings. |
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.
|
public OmrConfig()
Initializes a new instance of the OmrConfig
class with default settings.
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.
public boolean getTrimWhitePixels()
Gets value indicating should be the area containing an OMR mark reduced or not to size that contain all black pixels.
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.
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.
Copyright © 2017. All Rights Reserved.