GithubHelp home page GithubHelp logo

wqb9553 / image_local_magnification_tool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juewenpeng/image_local_magnification_tool

0.0 0.0 0.0 1.94 MB

A tool to magnify the local areas of images.

Python 99.85% Batchfile 0.15%

image_local_magnification_tool's Introduction

Image_Local_Magnification_Tool

A tool to magnify the local areas of images.

image

Requirements:

PyQt5, numpy, cv2

Usage:

run main.bat on Windows or

python main.py
  • upload : upload one or several images; upload checkpoint file (".json") to restore previous settings
  • save : choose the directory to save results and checkpoint file
    • prefix : 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 settings
  • resolution-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 ratio
  • interval-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 image
  • linewidth : boundary line width of the magnification windows
  • aspect ratio (range: 0.2~5.0): aspect ratio of the magnification windows
  • magnification (range: 1.0~10.0): magnification scale
  • number (range: 0~4): number of the magnification windows
  • position: position of the magnification windows
  • mag 1/2/3/4 : push the button to activate different magnification windows
  • color 1/2/3/4 (default color or hex color codes): boundary line color of the magnification windows
  • keyboard Esc : remove focus for all widgets
  • keyboard Q/E or mouse 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.

image_local_magnification_tool's People

Contributors

juewenpeng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.