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

Cant detect a pattern #31

Open
p1r473 opened this issue Apr 5, 2024 · 3 comments
Open

Cant detect a pattern #31

p1r473 opened this issue Apr 5, 2024 · 3 comments

Comments

@p1r473
Copy link
Contributor

p1r473 commented Apr 5, 2024

I am trying to anonymise a document for printing
I cant seem to detect my pattern
Ive tried printing my calibration test page and scanning it many times, with bmp tiff and png. Ive tried 300 600 1200 dpi. Ive tried all sorts of margins. No matter what I do I cant detect the pattern

I am able to zoom in on my image and indeed see the yellow marks with my own eyes
I am also able to detect the tracking dot with deda_extract_yd Detected tracking dot pattern

Is there any way to turn a unknown pattern into a recognized pattern @timojuez

❯ /home/pi/deda/deda_bin/deda_anonmask_create_img.py -r Image\ \(5\).png
Traceback (most recent call last):
  File "/home/pi/deda/deda_bin/deda_anonmask_create_img.py", line 46, in <module>
    Main()()
  File "/home/pi/deda/deda_bin/deda_anonmask_create_img.py", line 39, in __call__
    mask = calibrationScan2Anonmask(image_data, self.args.copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/libdeda/privacy.py", line 273, in calibrationScan2Anonmask
    return AnonmaskCreator(imbin,verbose)(copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/libdeda/privacy.py", line 105, in __call__
    self.restoreSkewByDots()
  File "/root/.local/lib/python3.11/site-packages/libdeda/privacy.py", line 184, in restoreSkewByDots
    pp = PrintParser(self.im,ydxArgs=dict(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/libdeda/print_parser.py", line 78, in __init__
    raise exceptions[0]
  File "/root/.local/lib/python3.11/site-packages/libdeda/print_parser.py", line 68, in __init__
    self.pattern = self._calcPattern()
                   ^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/libdeda/print_parser.py", line 145, in _calcPattern
    raise YD_Parsing_Error("Cannot detect pattern.",self.yd)
libdeda.print_parser.YD_Parsing_Error: Cannot detect pattern.   
@Bitwolfies
Copy link

Yeah, its depressing, I scanned at 1200 and the yellow dots are clear as day, yet the program just cannot seem to find them. No idea what I did wrong.

@timojuez
Copy link
Collaborator

Hi guys,

first, I wonder about the filename /home/pi/deda/deda_bin/deda_anonmask_create_img.py. It should be deda_anonmask_create in our repository. Anyway, it looks like Deda doesn't recognise a pattern. It must be one of the supported ones by Deda. Do you know, which pattern the printer is using? If you like, send me a picture.

@Bitwolfies
Copy link

@timojuez Here's the scan, along with a screenshot.
deda
Screenshot_20240919_042109

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