Qt-based GUI to visualize image-like data.
Project description
iminspect
A python utility package for image/matrix visualization.
Dependencies
numpy
, for matrix manipulationPyQt5
, for the graphical user interfaceqimage2ndarray
, to convert numpy ndarrays to Qt imagesvito
, a lightweight vision tool package
Example usage:
from iminspect.inspector import inspect, DataType
import numpy as np
# Show random noise image:
inspect(np.random.rand(4096,4096) - 0.5)
# Show as class labels:
inspect((np.random.rand(16,16) * 1e2 % 5).astype(np.int16), data_type=DataType.CATEGORIC)
Exemplary screenshot (visualizing categoric data, i.e. labels):
UI Documentation
- To inspect a data point/pixel, just move the mouse above it.
- Zooming
Ctrl+Wheel
to zoom in/outCtrl+Shift+Wheel
to speed up zoomingCtrl+{+|-}
to zoom in/outCtrl+Shift+{+|-}
to zoom in/out fasterCtrl+F
zoom such that image fills the available canvasCtrl+1
zoom to original size
- Scrolling
Wheel
scroll up/downShift+Wheel
speeds up scrollingCtrl+{Up|Down|Left|Right}
to scroll using keyboardCtrl+Shift+{Up|Down|Left|Right}
scrolls faster
- Keyboard shortcuts
Ctrl+Q
closes the inspection GUICtrl+O
shows dialog to open another file
Changelog
1.0.0
- Major code refactoring: use data type enum instead of various flags (this breaks previous inspect() calls).
- Optical flow support.
- Load another file from disk (via
Ctrl+O
). - Usability improvements, e.g. restore display settings when opening similar data type, handle file loading errors, etc.
0.2.0
- Major refactoring: moved image utils and colorizing code to separate vito package.
- Usability improvements: keyboard shortcuts for zooming, scaling and scrolling.
0.1.2
- Added tests for non-GUI functionality.
- Integrate github runners for test/build/deploy.
- Fix definition for colormap gray.
0.1.1
- Additional features:
- ImageCanvas supports ROI selection (useful for custom input widgets).
- Refactoring:
- Clean up imports.
- Make pylint/flake8 happier.
- Fixes:
- Adjust scrollbars when zooming multiple linked ImageCanvas.
- Additional features:
0.1.0
- Initial public release.
Known Issues
- Incrementally in-/decreasing the zoom factor worked "good enough", thus I didn't bother in making it more complex/user-friendly.
Planned Extensions
- Support saving (raw vs visualization) - thoroughly check PIL's capabilities (e.g. 16 bit depth PNGs or int32 label images).
- Add input widgets for shortcut-only commands (e.g. file I/O).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iminspect-1.0.0.tar.gz
(23.0 kB
view hashes)
Built Distribution
iminspect-1.0.0-py3-none-any.whl
(24.0 kB
view hashes)
Close
Hashes for iminspect-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2554ba4d7c492fa8a35ad87ed2b8273e1f5059f6d466360c1f6533886a60ea6d |
|
MD5 | b6615e27155e44f34409ac0a9b946990 |
|
BLAKE2b-256 | b6b3f7f493e8fff7d07b12371bf56b6b8c31b1c5f9cec6f8fca37ac0982a0fb0 |