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

--remove-background options currently not implemented? #884

Closed
Perangelot opened this issue Jan 5, 2022 · 3 comments
Closed

--remove-background options currently not implemented? #884

Perangelot opened this issue Jan 5, 2022 · 3 comments

Comments

@Perangelot
Copy link

--remove-background does not work for me, producing the following error code:

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.10/concurrent/futures/process.py", line 243, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 192, in exec_page_sync
ocr_image, preprocess_out = make_intermediate_images(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 135, in make_intermediate_images
preprocess_out = preprocess(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 104, in preprocess
image = preprocess_remove_background(image, page_context)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_pipeline.py", line 469, in preprocess_remove_background
raise NotImplementedError("--remove-background is temporarily not implemented")
NotImplementedError: --remove-background is temporarily not implemented
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 385, in run_pipeline
exec_concurrent(context, executor)
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_sync.py", line 274, in exec_concurrent
executor(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/_concurrent.py", line 82, in __call__
self._execute(
File "/home/vitus/.local/lib/python3.10/site-packages/ocrmypdf/builtin_plugins/concurrency.py", line 135, in _execute
result = future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 438, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
NotImplementedError: --remove-background is temporarily not implemented```

It seems to be irrespective of the pdf file I put in. I have installed ocrmypdf via `pip` because the arch package could not install; for some reason, `python-humanfriendly` could not be detected there.
@mara004
Copy link
Contributor

mara004 commented Jan 5, 2022

From the release notes of v13.0.0:

The argument ``--remove-background`` is temporarily disabled while we search for an alternative to the Leptonica
implementation of this feature.

@metroite
Copy link

metroite commented Nov 7, 2024

Is there an alternative or are there plans to implement this feature in the future?

@v4u6h4n
Copy link

v4u6h4n commented Nov 15, 2024

Also interested, am a bit stuck about what to use an alternative to get rid of paper colour and texture.

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

5 participants