Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Border Removal Plugin #5

Closed
ahankinson opened this issue Jun 8, 2012 · 2 comments
Closed

Integrate Border Removal Plugin #5

ahankinson opened this issue Jun 8, 2012 · 2 comments

Comments

@ahankinson
Copy link
Member

The border removal plugin (github:DDMAL/gamera-lyric-extraction) works now, and it would be great if we could integrate it into the workflow system.

Using it is pretty straightforward:

from gamera.toolkits import lyric_extraction

# requires an image of type GREYSCALE

im = load_image("blah.tiff")
im = im.to_greyscale()

# border_removal returns a mask.
mask = im.border_removal(**use the defaults**)

result = im.mask(mask)

The result should be a greyscale file with the borders (incl. colour bars) removed.

The technique behind it is pretty tricky, so not sure if we can do this interactively with JS, but the default settings seem to work fine, so this can probably be a non-interactive task.

@ghost ghost assigned antonkhelou Jun 8, 2012
@antonkhelou
Copy link
Contributor

Ok, I will integrate it on monday. thanks for the code snippet - it will save me some time.

@ahankinson
Copy link
Member Author

The installation process for this has changed slightly. I have split the toolkits into four separate ones, all found at:

https://github.com/DDMAL/document-preprocessing-toolkit

Installation is fairly straightforward for each:

python setup.py install

After that, the only line that has changed from my former example is from gamera.toolkits import border_removal.

Don't worry about the other toolkits; I think we just need to do border removal for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants