Configuration of the LayoutWizzard

The central configuration of the LayoutWizzard takes place in a separate configuration file. This file can be located anywhere in the file system, because its path can be specified in any program component of the LayoutWizzard. Usually the path to this central configuration file is as follows:

/opt/digiverso/LayoutWizzard/layoutwizzard_config.xml

The content of such a configuration looks exemplary as follows:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- intranda Layout Wizzard v1.1 configuration file -->

<config>
	<useOpenCV>false</useOpenCV>
	<!-- Higher values decrease the likelihood of images being labeled as outliers 
		("suspicious angle/pagesize") -->
    <outliers>        
       <type>NOT_PROCESSED</type>
	   <errorMultiplier>3.0</errorMultiplier>
	   <weightExponent>2.0</weightExponent>
    </outliers>
<!-- 	<contentServerUrl>http://G2GURL/goobi/cs/cs</contentServerUrl> -->
	<contentServerUrl>/cs/cs</contentServerUrl>
	<outputFolderSuffix>media</outputFolderSuffix>
	<analysisImagesBasePath>/opt/digiverso/git/layout-wizzard/LayoutWizzard/samples/debug
	</analysisImagesBasePath>
	<previews>
		<previewsPerPage>100</previewsPerPage>
		<maxPreviewsCached>100</maxPreviewsCached>
		<previewHeight>600</previewHeight>
		<largePreviewWidth>5000</largePreviewWidth>
	</previews>
	<processingThreads>4</processingThreads>
	<analysisTimeout>
		<duration>20</duration>
		<unit>SECONDS</unit>
	</analysisTimeout>
	<saving>
		<defaultCompression quality="85">JPEG
		</defaultCompression>
		<overwriteExistingImages>true</overwriteExistingImages>
		<ignoreImageMetadataErrors>false</ignoreImageMetadataErrors>
	</saving>

	<analysis id="bound_book">
    <info>
        <label>Bound book</label>
    </info>
		<pageMode>ALTERNATING_START_RIGHT</pageMode>
		<analysisStep name="PAGESKEW" use="true" order="1">
			<saveAnalysisImages visibility="INVISIBLE" path="deskew">false
			</saveAnalysisImages>
			<deskewerMode visibility="VISIBLE">ALL_EDGES</deskewerMode>
			<lineFinderMode visibility="INVISIBLE">OUTERCONTOURS
			</lineFinderMode>
			<lineGroupingMode visibility="INVISIBLE">GROUP_BY_DISTANCE
			</lineGroupingMode>
			<analysisImageSize>300</analysisImageSize>
			<rimAreaToIgnoreLines>0.05</rimAreaToIgnoreLines>
			<lowerCannyThreshold>2</lowerCannyThreshold>
			<cannyRatio>2</cannyRatio>
			<!-- <houghLineThreshold>10</houghLineThreshold> -->
			<minHoughLineLength>10</minHoughLineLength>
			<maxHoughLineGapSize>4</maxHoughLineGapSize>
			<featureSizeThreshold>5</featureSizeThreshold>
			<maxLineAngleDeviation>5</maxLineAngleDeviation>
			<maxLineDistance>10</maxLineDistance>
		</analysisStep>

		<analysisStep name="CONTENTAREA" use="true" order="2">
			<analysisImageSize>150</analysisImageSize>
			<saveAnalysisImages visibility="INVISIBLE" path="edgeDetection">false
			</saveAnalysisImages>
			<bitonalThreshold>220</bitonalThreshold>
			<featureSizeThreshold>2.0</featureSizeThreshold>
			<contentPadding visibility="VISIBLE">-10</contentPadding>
			<bitonalInvert visibility="HIDDEN">false</bitonalInvert>
			<rimAreaToIgnoreLines>0.0</rimAreaToIgnoreLines>
		</analysisStep>

		<analysisStep name="BOOKSPINE" use="true" order="3">
			<saveAnalysisImages visibility="INVISIBLE" path="spineDetection">false
			</saveAnalysisImages>
			<lineFinderMode visibility="HIDDEN">SUZUKICONTOURS
			</lineFinderMode>
			<lineGroupingMode visibility="HIDDEN">GROUP_BY_DISTANCE
			</lineGroupingMode>
			<croppingAggressiveness visibility="VISIBLE">CAUTIOUS
			</croppingAggressiveness>

			<analysisImageSize>400</analysisImageSize>
			<rimAreaToIgnoreLines>2</rimAreaToIgnoreLines>
			<lowerCannyThreshold>1</lowerCannyThreshold>
			<cannyRatio>3</cannyRatio>
			<minHoughLineLength>10</minHoughLineLength>
			<maxHoughLineGapSize>2</maxHoughLineGapSize>
			<featureSizeThreshold>0.1</featureSizeThreshold>
			<maxLineAngleDeviation>5</maxLineAngleDeviation>
			<maxLineDistance>5</maxLineDistance>
			<spineOffset visibility="VISIBLE">0</spineOffset>
		</analysisStep>
	</analysis>
	
	<analysis id="default">
	   [...]
	</analysis>
	
</config>

The configuration consists of some general settings and several <analysis> blocks. The <analysis> blocks mainly control the settings for the automatic analysis. Different projects or tasks can use different settings by passing the id of the <analysis> block to the automatic analysis.

General settings always affect all operations and are not overwritten by operation-specific settings.

General settings

The following list of general configuration paths is not complete. However, it contains all configurations that must be individually adapted for an installation.

Analysis configuration

Each <analysis> block has an attribute id that controls which block is used for a particular analysis. The last block must have the id="default". Settings from this block are always used if no analysis id is passed to an analysis call, or if a setting is not configured in the actually used block. All other blocks consist accordingly of the subset of configurations that differ from the default configuration.

The following settings can exist in each <analysis> block:

The settings in the <analysisStep> blocks concern specific parameters of the analysis algorithms. They are not described further here. However, users can potentially adjust any parameter in the interface. If the settings made in this way prove sufficient to be adopted in the configuration, the corresponding block in the configuration file can be set to the new value. The appropriate parameter block can be determined by finding the <analysisStep> for the respective analysis step in the configuration file and changing the block with the internal parameter name there. The internal parameter name is displayed in the user interface as a tooltip when the mouse pointer is held over the label of the changed parameter.

Additionally, all analysis parameter blocks can have the visibility attribute, which controls the visibility of the parameter in the user interface. If this attribute is missing, the default value HIDDEN is used.

Last updated