Compare commits

...

5 Commits
main ... docker

Author SHA1 Message Date
beurtschipper e07f313d6d
Merge pull request #10 from mgp25/main
Dockerfile and minor updates
2020-12-07 22:53:18 +01:00
mgp25 56f02c8bb2 Update Readme 2020-12-07 17:01:47 +01:00
mgp25 d362fa7a8d Add Dockerfile 2020-12-07 16:53:57 +01:00
mgp25 43fbe4a62a Update Readme 2020-12-07 16:53:47 +01:00
mgp25 96a33cb70c DePix: Update Arg Parser 2020-12-07 16:53:36 +01:00
3 changed files with 22 additions and 3 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:3
WORKDIR /current
COPY . .
RUN python -m pip install -r requirements.txt
ENTRYPOINT ["python", "depix.py"]

View File

@ -26,3 +26,13 @@ The algorithm uses the fact that the linear box filter processes every block sep
For most pixelized images Depix manages to find single-match results. It assumes these are correct. The matches of surrounding multi-match blocks are then compared to be geometrically at the same distance as in the pixelized image. Matches are also treated as correct. This process is repeated a couple of times.
After correct blocks have no more geometrical matches, it will output all correct blocks directly. For multi-match blocks, it outputs the average of all matches.
## Dockerfile
Build:
`docker build -t depix .`
Run:
`docker run -it --rm -v $(pwd):/data depix -p images/testimages/testimage3_pixels.png -s images/searchimages/debruinseq_notepad_Windows10_closeAndSpaced.png -o /data/output.png`

View File

@ -14,9 +14,9 @@ usage = '''
'''
parser = argparse.ArgumentParser(description = usage)
parser.add_argument('-p', '--pixelimage', help = 'Path to image with pixelated rectangle')
parser.add_argument('-s', '--searchimage', help = 'Path to image with patterns to search')
parser.add_argument('-o', '--outputimage', help = 'Path to output image')
parser.add_argument('-p', '--pixelimage', help = 'Path to image with pixelated rectangle', required=True)
parser.add_argument('-s', '--searchimage', help = 'Path to image with patterns to search', required=True)
parser.add_argument('-o', '--outputimage', help = 'Path to output image', nargs='?', default='output.png')
args = parser.parse_args()
pixelatedImagePath = args.pixelimage