Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The preview view contains a list of all images in the input folder. However, these are usually spread over several pages to keep the loading times of the images to be displayed as short as possible. Depending on the selected setting, opposite right and left book pages are displayed next to each other, or alternately only right and only left images are displayed, so that they can be compared quickly.
Within the preview view you can define how large the images should be displayed and whether the cropping frame should be displayed above the original image or a preview of the later cropped image instead.
Corrections can be made to each individual image directly from this display. Thus, by means of the slider beside the image, the rotation can be changed, with the mouse pointer the book fold can be positioned differently and by means of clicking and dragging, the size and position of the cropping frame can be changed.
Tip: Note that you can also adjust an image (rotation, book fold or frame) by holding down the Shift key.
In this case, your correction will be applied not only to the currently selected image, but also to all subsequent images displayed. This may save a lot of time for manual correction work.
Besides the possibility to change each image directly from the preview view, the three buttons next to each image allow direct access to the detailed view of the image analysis for the corresponding image within the single page view.
Using the Forward
and Backward
buttons above and below the preview list, the user can scroll through the pages of the displayed images.
In the Folder and File Options area, global settings for handling files can be made. You can also reset the complete LayoutWizzard workflow from here.
Within the overview, the mode for the display can be switched in the upper left corner. Usually the LayoutWizard opens in normal mode. The most important settings can already be edited directly here. If you want to display the advanced settings options, you can activate the advanced mode. Switching between the two display modes is possible by using this button in the title bar:
The following options are available in normal display mode.
The page mode is used to define the page processing in right, left, double or single pages. Each mode sets the orientation for all images once. Subsequent changes to the orientation of individual pages change the orientation of all subsequent pages as specified by the page mode. The internal name within the table below is the one used in the LayoutWizzard page mode configuration file.
The setting for the writing direction determines the direction in which the text flows. If the writing direction is right-to-left
, the first page after binding is a right page in alternating page mode. If the writing direction is left-to-right
, the first page after the cover is a left page. In case of the double page mode
, the respective part of the double page is saved as a separate file in the corresponding order before the other part of the double page.
With the button Discard and start over all LayoutWizzard data for this operation can be deleted. This includes all analysis data as well as the configuration specific to this process. After clicking on this button, a menu will open where you can select the desired template for the new configuration. A subsequent click on OK
discards all previous data and creates a new configuration for the process based on the selected template.
The following options are only available in advanced mode.
The Input folder defines the folder within the images
folder of the Goobi operation from which the original images are read. This is usually the folder containing the master digitised images.
The output folder specifies the folder within the images
folder of the Goobi operation in which the clipped derivatives are to be saved. This is usually the derivatives folder.
This option allows you to specify how the compression of images created after cropping should be performed. Basically the derivatives are saved in Tiff format. However, here you can specify whether the images within the Tiff container should be compressed using JPEG compression.
Outliers are images that show strikingly different values in the analysis than the maximum of 12 images before and after them. Outliers are also images whose analysis could not be completed due to errors or timeouts. Outliers are displayed in red in the file list and surrounded by a red frame in the preview view.
The following outlier types are distinguished and can be selected as to be marked:
If right and left images are scanned separately, but still need to fit together in a double-page view, LayoutWizzard can crop pages so that the content starts at the same height, so that the upper book edge is as flush as possible on all pages. Please note, however, that depending on the recording, it is often not possible to cut two pages completely flush without distortion. For an optimal double-page display, a double-page scan is therefore always recommended instead of this option.
Most of the work in the LayoutWizzard generally takes place in the background of Goobi. This involves automatic image analysis and the final cropping of the images after a user has checked the cropping suggestion from the image analysis in the meantime.
However, checking these cropping suggestions is the most important point of interaction between Goobi users and LayoutWizzard. Here, the user can see for each image how it has been analyzed and how LayoutWizzard would crop it. For each individual image, the user can now decide whether cropping should be carried out differently. Accordingly, the plugin provides a user interface that allows to rotate the images, to change the position of the book fold and also to edit the cropping frame in its size and position. To perform this processing, LayoutWizzard offers two different views: the preview view
for viewing and directly correcting all images of an operation and the single page view
for detailed processing of individual images.
All general settings for configuration and analysis workflow are located in the Single page view
. However, the actual checking and correction will in most cases only take place in the Preview view
. For this reason, LayoutWizzard should be configured so that the entry into the plugin from an accepted task is as direct as possible to the preview view.
Page mode | Description | Internal name |
---|---|---|
Writing direction | Description |
---|---|
Outlier types | Description |
---|---|
Alternating
The images are treated alternately as right and left pages. The orientation of the first page depends on the Write Direction
setting.
ALTERNATING
Only left pages
All images are treated as left pages.
ALL_LEFT
Only right pages
All images are treated as right sides.
ALL_RIGHT
Double pages
All images are treated as double pages. This means that they will be split into two single images when saved, if a fold line has been set.
DOUBLE_PAGES
Double pages with covers
The images are treated in the same way as in Double Page mode
, except for the first and last page. These two pages are treated as single pages
.
DOUBLE_PAGES_WITH_COVERS
Single pages
Each page is treated as a single sheet. This means that no book fold is cut.
SINGLE_PAGES
Independent
In this mode, all pages retain the current orientation. Changes to the orientation of individual pages have no effect on the following pages.
INDEPENDENT
Left-to-right
In alternate page mode, the first page after binding is a left page. In double page mode, the left page of a double page comes before the right page in the page order.
Right-to-left
In alternate page mode, the first page after binding is a right page. In double page mode, the right page of a double page comes before the left page in the page order.
Compression
Description
None
Uncompressed Tiff
JPEG
JPEG-compressed Tiff
Rotation
The angle of the lateral alignment is striking.
Page size
The size of the cutting frame is striking.
Book spine position
The distance of the book spine from the page margin is striking.
Not processed
The image could not be fully analyzed.
All
All types of outliers mentioned above should be marked.
None
Outliers should not be marked at all.
Adjustment mode
Description
No adjustment
The adjustment is switched off.
Adjustment of opposite sides, left to right
Opposite sides are cut flush with each other. The opposite side of a left page is always the following right page.
Adjustment of opposite sides, right to left
Opposite sides are cut flush with each other. The opposite side of a right-hand page is always the following left-hand page.
Adjustment on all sides
All sides are cut as flush as possible. This often causes large untrimmed edges, requires relatively long processing time and is therefore usually not recommended.
The Save view usually shows the image as the cropped derivative is saved. An exception to this are images with double page orientation. These are displayed as a single image, i.e. without any division at the fold line.
In advanced mode, you can specify the folder where the images are saved. The path you specify here is always a subfolder of the images
folder in the Goobi operation. There are also several options for saving images directly:
Icon | Description |
---|---|
In the file list in the lower area, all image files in the input folder are listed with their file name. A click on one of the file names opens the respective image in the single page view.
The file name is completely or partially highlighted in green if analysis steps for the image have already been completed. If no analysis steps have been completed at all, the file name is completely highlighted in white. For each completed analysis step, the background fills green and is completely green when all analysis steps have been completed.
Please note that automatic saving can only be successful if all images are completely green. In the file list, you can quickly identify those images that still need to be processed before the current workflow step can be completed.
This area is only visible when an analysis step is selected and is then named after the respective step. It contains configuration parameters for each step, which determine the automatic analysis of this step for all images. The most important parameters are directly visible, all others only in the extended view. Help on the meaning of each parameter is displayed in the Goobi header bar when you click Show help texts
.
Below the parameters, this area also has three buttons that control the execution of the analysis:
Icon | Description |
---|---|
The Single Page View, sometimes also called Overview Page
, contains global settings of the LayoutWizard as well as all settings for the currently viewed page. This view is divided into several sections, with the details of some of these sections only visible when the corresponding sections are active. Switching between the areas is possible by clicking on the title bar of an area. The title bar also contains a button on the right side of some areas to switch the extended mode
for this area on and off. In extended mode
, additional options are available that are not usually needed in normal operation. The subareas are described individually below.
This is the technical documentation for the Goobi plugin LayoutWizzard for automated cropping of book page scans.
Name | Wert |
---|---|
The LayoutWizzard is a tool for the analysis of digitized book pages and similar materials, which recognizes the position of the physical page in the digitized image and can align and crop the image accordingly.
The analysis in LayoutWizzard is semi-automatic. It usually starts with an automatic step in which all images are analyzed according to fixed algorithms. The results are then checked in a manual step and corrected if necessary. Finally, in a further automatic step, cropped derivatives of the source images are generated, usually within the derivatives folder in the corresponding Goobi process.
The automatic work steps (Automatic Image Analysis
and Automatic Cropping
) are generally outsourced in a TaskManager plug-in so that other work within Goobi is not restricted by a high computing load on the Goobi server. However, it is also possible to run them without the TaskManager plug-in, so that these automatic steps within Goobi Step plug-ins without their own user interface are carried out directly within Goobi workflow.
Manual control of the analysis results with the suggested cropping is carried out within a standalone Goobi Step plug-in with a user interface so that its operation is fully integrated into Goobi workflow.
Depending on the individual installation of Goobi workflow and the respective workflows, the individual work steps can of course be named individually. In the following screenshot, for example, the three successive work steps have been given different names:
LayoutWizzard's image analysis works in several phases in order to arrive at the desired image derivative starting from the original image. For this purpose, each image goes through an image analysis in which the pages are aligned, the object is recognized and the book fold is determined. Accordingly, the image analysis usually consists of the following phases:
The preview view includes an image area like the following for each image file. It consists of the actual image display, the controls for rotation and cropping frame, and several buttons to enter the detail view for a specific analysis phase.
The image display contains the actual image. The image is rotated according to the analysis results and contains markers for the fold position (red) and the cutting frame (turquoise). Both markers can be touched and moved with the mouse to correct the analysis data. Clicking, holding and dragging the mouse within the cropping frame moves the entire frame.
Tip: If you hold down the Shift key
during one of these actions, the change is applied to all subsequent images of the same orientation on the current page. Relative coordinates are used. Thus, if one moves the fold of a right image to a position 10% from the left image edge while holding down the Shift-key
, the fold will be positioned 10% from the left image edge for all following right images on the page; independent of the absolute size of the images.
Additionally, by double-clicking on the image, a rotation mode is opened, in which the rotation of the image can be changed by moving the mouse up and down. This rotation is not proportional to the mouse movement, but the further away the mouse is from the origin, the stronger the rotation. A double click again will end the rotation mode.
With the slider next to the image display, the rotation of the image can be changed. Simply click and drag the button up or down to change the rotation of the selected image.
In addition to the image display, there is a control element for moving the cropping frame. This button can be moved with the mouse in all directions and thus moves the position of the cropping frame. Please note that the displacement of the frame is not proportional. The further the button is dragged after clicking, the faster the frame is moved.
The three buttons next to the image display allow you to enter the single page view for the selected analysis phase in order to adjust individual analysis parameters there. If you click on the Open Preview button in the detail view again, you will be taken back to the same image in the preview view
.
Below the buttons for the detail view is the image number within the input folder. This is not the file name of the image file but a simple counter that in case of many similarly displayed images should give an orientation at which position within the image files one is currently located.
Depending on the configuration of the LayoutWizard, a drop-down menu may also appear in this area. This allows you to change the orientation for the respective page. Please note that the change made here is only applied to the currently selected image and does not affect subsequent images.
Sample | Phase |
---|---|
The configuration file of the Goobi Step plug-in, which is the user interface for LayoutWizzard, must be located in the config
directory of the Goobi installation. Its file name in current Goobi versions is plugin_intranda_step_LayoutWizzard.xml
.
Usually the full path to this configuration file is as follows:
The content of this configuration file is structured as follows:
ATTENTION: Please make sure that the correct path to the LayoutWizzard configuration file within the<layout-wizzard-config-path>
element is specified here.
Start
The original image (master scan) is often slightly distorted and often contains a visible area of the opposite page of the book.
1. Phase: Deskew Page
In the first phase, the alignment of the page and its rotation relative to a horizontal reading direction is detected. This rotation is deducted during saving, so that the page is ideally aligned horizontally. This phase is often referred to as deskewing.
2. Phase: Crop Page
In the second phase, the recognition of the detected object takes place, usually e.g. the book. A rectangular cropping frame is calculated around the detected object, which contains the object completely with as little additional margin as possible. In order for this frame to fit as exactly as possible on a rectangular object such as a book, the page orientation (phase 1) should be applied beforehand. This phase is often referred to as trimming, because it removes the mostly dark edges of the image.
3. Phase: Detect Book Spine
In the third phase the book fold is determined. This is only necessary if the book fold is actually part of the image and should be cut along the fold to hide the part of the opposite page. This analysis phase is highly dependent on the determined orientation of the page, that is, whether it is a right or left page in the book or a double page. In the latter case, the image is divided into two single images when saved, one each to the right and left of the determined fold.
End
The LayoutWizzard's suggestion is handed over to the user for review after all analysis phases have been completed, where it is adapted if necessary.
This button saves the current image cropped into the output folder.
This button saves the current and all following images cropped into the output folder.
This button saves all the images of the operation cropped into the output folder.
This button analyses the current image for the selected analysis step, regardless of the status of the analysis step. If previous analysis steps have not yet been executed, these steps are also executed.
This button resets the analysis status of all images for the selected analysis step. The step and all subsequent ones are then considered as not executed for all images. Existing analysis results are discarded. This is important if you want to perform an automatic analysis again, since analysis steps that are considered to have already been performed are not performed again otherwise.
This button resets the analysis status for the current and all subsequent images.
Identifier
intranda_step_layoutwizzard
Repository
Licence
Proprietary commercial
Last change
27.07.2024 13:42:51
Below the image area are several buttons to exit the plugin and continue the workflow.
Icon | Description |
---|---|
The LayoutWizzard workflow in Goobi generally consists of several Goobi workflow steps that work together. A typical LayoutWizzard workflow as part of a Goobi workflow might look like the following:
In the first step (in this example Automatic Image Analysis
) an automatic layout analysis of the images is performed to check the rotation, the content area and the position of the book fold. This is usually done in an external TaskManager to relieve the strain on Goobi's system resources. In the second step (LayoutWizzard
in this example), the results of the analysis are then checked manually and, if necessary, corrected. This is done within a separate user interface that has been installed as a Goobi plug-in. As soon as this manual check has been completed, the automatic saving (referred to here as Automatic image cropping
) of the cropped derivatives takes place, based on the data previously analyzed and possibly adjusted. This saving also usually takes place within the TaskManager.
Since the individual workflow steps of the LayoutWizzard work on a common database of configuration and analysis data, the data must be kept persistent at least for the duration of the LayoutWizard workflow. This is done in the imageData.xml
file in the Goobi operations folder. As an example, such a complete path to this file would read accordingly:
This file contains all configuration settings for the corresponding process as well as the analysis data for each image, from which the derivatives are created in the final saving step.
The right area includes the display of the current image and a header area with some information about the image file. Most important here is the drop-down menu for selecting the orientation of the current page. Please note that changing the orientation also changes the orientation of all subsequent pages, according to the rules selected in the page mode
.
In the header, you can also switch to the next and previous image, as well as the next or previous outlier.
In the actual image display, when one of the analysis steps is selected, the analysis result of the selected step is visible and can be edited directly with the mouse.
The work step area contains a list of all configured analysis steps. These are each listed with several buttons.
Icon | Description |
---|
‌
Below the analysis phases, the section contains the following additional options:
As the installation, configuration and technical operation require more detailed explanations, these are described in the individual chapters of this documentation. The following chapters on technical details are available:
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:
The content of such a configuration looks exemplary as follows:
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.
The following list of general configuration paths is not complete. However, it contains all configurations that must be individually adapted for an installation.
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.
The installation consists of a total of four program libraries that must be accessible in Apache Tomcat or Goobi:
File | Location |
---|
In addition to these program files, two configuration files are required, one for the Goobi plug-in and one for the underlying LayoutWizzard program library.
The configuration file of the plugin plugin_LayoutWizzardPlugin.xml
must be located in the config
configuration directory within the Goobi working directory. This is usually the path to the file:
Within this configuration file the path to the actual central configuration of the LayoutWizard is specified. The structure of this file looks like this:
The actual configuration file specifies various parameters for the layout analysis process. These parameters are listed as examples in the following configuration file. As defined in the plugin configuration file, it is located under the following path:
As an example, this configuration file has the following content:
This area is only available if the Crop page
step is selected and this option is enabled in the configuration. It shows the position and size of the crop frame for the current image. It is displayed in millimeters or another configurable unit of measurement. The values displayed here can be edited directly and always remain synchronous with the frame in the image display.
Additionally, this area has buttons to transfer the size and position of the current frame to other images:
Icon | Description |
---|
Within the preview view there is a menu with several buttons for the configuration of the image display in the left area.
The functions offered in this menu have the following meaning:
Function | Description |
---|
Icon | Description |
---|
Path | Description |
---|
Path | Description |
---|
Visibility | Description |
---|
For details on customizing the configurations, see the .
| Number of images per page in the Goobi LayoutWizzard plugin preview |
| Height of the thumbnail file in pixels displayed in the preview view. Smaller images allow faster display, but have a lower resolution. |
| Width in pixels of the thumbnail file displayed for the single-page view of the Goobi LayoutWizzard plugin Smaller images allow faster display, but have a lower resolution. |
| The maximum number of simultaneously running analysis or storage processes. This applies to Goobi and TaskManager separately. The images are processed sequentially for each operation. However, simultaneous processing may occur if several LayoutWizard jobs are running in parallel in the TaskManager. |
| This value specifies the maximum time for analyzing or saving an image after which the execution for the image should be aborted. An analysis that was interrupted due to timeouts is noted, but the analysis of the following images is continued. The missing analysis data can be added in the manual control. However, a canceled save always ends the TaskManager job with an error. Useful values for the timeout are between 4 seconds and about one minute, depending on the performance and reliability of the system and the size and complexity of the images to be analyzed. |
| This value defines the time unit in which analysisTimeout/duration is specified. Possible values are |
| This value determines the compression level that is used by default for saving the derivatives. Valid values here are |
| This value can be used to determine whether existing image derivatives should be overwritten during saving. |
| Here you can specify whether the derivatives should also be saved if not all image metadata can be transferred. This can happen, for example, if unknown metadata exists for the Java image library. It is therefore advisable to always leave this value set to |
| The parameter is always visible in the interface when the corresponding step is selected. |
| The parameter is only visible in the user interface when the analysis step block in the user interface is in extended mode. |
| The parameter is not displayed at all in the interface. |
| In the |
| In the |
| In the |
The number of images that have already been fully analyzed is displayed here. When all images are processed, the green icon with the check mark appears. This should already be the case after the automatic analysis is completed. If not, the missing images must be searched for and the analysis steps must be completed manually or automatically. Note that the step to automatically save the LayoutWizzard data only works if all images have been completely analyzed before. A red icon with a cross appears if an automatic analysis is currently being performed within the plugin. A click on this red icon will stop the analysis. |
The button |
This button opens the preview view, in which all images can be displayed and edited one below the other. |
| This is the name of the analysis setting in the plugin interface. |
|
| At this point it is determined whether the generation of images for the analysis and storage of the derivatives should be done by an external program. This can speed up the image generation considerably under certain circumstances, but it can also be more error-prone, since the generation then takes place outside of Java. |
| This value defines the console command to call the external program for generating images. The execution specifics are appended to this command, following the format of |
| This value contains all internal parameters of the respective automatic analysis step. |
| This defines the internal name of the block. It must correspond to one of the following values:
|
| This value can be used to determine whether an analysis step should be used. The value |
| At this point the sequence of the analysis step within the entire analysis is determined. |
This button saves all configurations and image data made in the interface for the current process and closes the plugin. The user is then returned to the view from which he entered the plugin.
This button saves all the configurations and image data made in the interface for the current process and closes the plug-in and the current Goobi workflow step. The user is then taken to the My Tasks
view. If the following workflow step is an automatic step, it is started immediately.
This button saves all configurations and image data made in the interface for the current process and closes the plugin. The user is then taken to the view My Tasks
. The Goobi workflow is rotated back one step, i.e. generally to the previous step for the LayoutWizzard analysis. If this is an automatic step, it is executed immediately.
This button terminates the plugin immediately without saving any data before, except for image derivatives that have been saved via the save view or by resetting the entire analysis. The user is then returned to the view from which he entered the plugin.
The background color of the step indicates whether this step has already been executed for the current image. If the background is green, this means that the analysis step has already been executed. This should always be the case if an automatic analysis has already been performed and no errors occurred during processing. If, on the other hand, the background is highlighted in white, the data for this step must be entered manually or a new automatic analysis must be attempted. |
The individual steps can be activated or deactivated with the |
If you click on the button |
Transfer frame to all other images. |
Transfer frame to all subsequent images. |
Transfer frame to all right images. This is only available if the current image is a right image. |
Transfer frame to all subsequent right images. This is only available if the current image is a right image. |
Transfer frame to all left images. This is only available if the current image is a left image. |
Transfer frame to all subsequent left images. This is only available if the current image is a left image. |
This button takes you to the overview page of the LayoutWizard. Depending on the configuration, this is also the initial page. From there you can return to the preview view by clicking on the button Open Preview. |
With this button you can save the changes you have made so far. Using this button is especially advisable if you foresee an interruption of your work, which might last longer and thus lead to a timeout of the current user session. |
A click on this button toggles the display of the preview images, so that either a preview of the final image or a display of the original image with book fold and frame lines is shown. |
These buttons change the size of the preview images displayed. Larger images allow better direct editing. Smaller images, on the other hand, allow more images to be viewed at the same time. |
These options allow you to switch between displaying right and left pages separately and displaying left and right pages simultaneously. |
This value defines the default page mode to be used. The specifications valid for this are defined within the .