Skip to content

Instantly share code, notes, and snippets.

@mcs07
Created January 2, 2016 20:47
Show Gist options
  • Save mcs07/7b722cfafe8bad81aa69 to your computer and use it in GitHub Desktop.
Save mcs07/7b722cfafe8bad81aa69 to your computer and use it in GitHub Desktop.
Fix OSRA use of graphicsmagick adaptiveThreshold to avoid ambiguous error
diff --git a/src/osra_grayscale.cpp b/src/osra_grayscale.cpp
index 32816ed..1b819d1 100644
--- a/src/osra_grayscale.cpp
+++ b/src/osra_grayscale.cpp
@@ -266,12 +266,12 @@ bool convert_to_gray(Image &image, bool invert, bool adaptive, bool verbose)
image.despeckle();
if (invert)
{
- image.adaptiveThreshold(window,window,7);
+ image.adaptiveThreshold(window,window,7.0);
}
else
{
image.negate();
- image.adaptiveThreshold(window,window,7);
+ image.adaptiveThreshold(window,window,7.0);
image.negate();
}
}
@LorisBachert
Copy link

This is just awesome. Fixed the make error. Thank you for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment