A tool to magnify the local areas of images.
PyQt5, numpy, cv2
run main.bat
on Windows or
python main.py
upload
: upload one or several images; upload checkpoint file (".json") to restore previous settingssave
: choose the directory to save results and checkpoint fileprefix
: text added to the beginning of the original image name (e.g. "mag_" or "")suffix
: text (including image file format) added to the end of the original image name (e.g. ".jpg" or "_mag.jpg")
reset
: reset all settingsresolution-x/y
(range: 128~4096px, aspect ratio is preserved): resolution of the processed image (do not consider the magnification windows)crop top/bottom/left/down
(range: 0~80%): crop ratiointerval-x/y
(can be negative): distance between the original image and magnification windows or distance between the adjacent magnification windows (denotes relative offset when the number of magnification windows is set to 1)border
(can be negative): distance between the boundary of the magnification windows and that of the original imagelinewidth
: boundary line width of the magnification windowsaspect ratio
(range: 0.2~5.0): aspect ratio of the magnification windowsmagnification
(range: 1.0~10.0): magnification scalenumber
(range: 0~4): number of the magnification windowsposition
: position of the magnification windowsmag 1/2/3/4
: push the button to activate different magnification windowscolor 1/2/3/4
(default color or hex color codes): boundary line color of the magnification windowskeyboard Esc
: remove focus for all widgetskeyboard Q/E
ormouse scrolling up/down
: switch to other uploaded images (conditioned on removing focus)keyboard W/S/A/D
: fine-tune the position of the magnified area (conditioned on removing focus)keyboard 1/2/3/4
: activate different magnification windows (conditioned on removing focus)
After activating one magnification window, you can right-click on the right image to determine where to magnify. If the magnified area exceeds the range of the cropped original image, the corresponding magnification window will not display.
You can also use this tool to just change the file format or adjust the resolution of the image by setting number
to 0.
If you encounter any bugs or have any advice, please feel free to create an issue.