Commit 03a62545 authored by Clément Démoulins's avatar Clément Démoulins
Browse files

Add support for non-binary images.

parent 45e57f35
......@@ -5,8 +5,8 @@ include_once "inc/demopage.php";
// Useful includes to know (usually already included)
//
// include_once "config.php";
// include_once "form_maker.php";
// include_once "inc/config.php";
// include_once "inc/form_maker.php";
// include_once "inc/copyright.php";
// include_once "inc/time_functor.php";
// include_once "inc/file_manager.php";
......@@ -122,8 +122,9 @@ class Example extends DemoPage
{
global $demos_bindir;
// Make sure the input image can be displayed in the browser.
$this->run("convert", "{$input} {$tmpfile}_orig.png");
// Binarize input to make sure it can be processed.
$this->run("$demos_bindir/sauvola_ms",
"{$input} {$tmpfile}_orig.png --win-size 51 2>&1", false);
// Run the demo
$this->run("$demos_bindir/staff_removal",
......@@ -163,7 +164,7 @@ class Example extends DemoPage
// Add some specifications on the input images.
public function specifications()
{
return "<b>Input must be a black and white image.</b>";
return "<b>Input must be a black (foreground) and white (background) image.</b>";
}
// Optional: Set copyright to be displayed for each example image.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment