dfd-tud / deda

https://dfd.inf.tu-dresden.de
GNU General Public License v3.0
1.59k stars 92 forks source link

Cant detect a pattern #31

Open p1r473 opened 8 months ago

p1r473 commented 8 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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