Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
e07f313d6d | |
![]() |
56f02c8bb2 | |
![]() |
d362fa7a8d | |
![]() |
43fbe4a62a | |
![]() |
96a33cb70c |
|
@ -0,0 +1,9 @@
|
|||
FROM python:3
|
||||
|
||||
WORKDIR /current
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN python -m pip install -r requirements.txt
|
||||
|
||||
ENTRYPOINT ["python", "depix.py"]
|
10
README.md
10
README.md
|
@ -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`
|
||||
|
|
6
depix.py
6
depix.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue