Qt-based GUI to visualize image-like data.
Project description
iminspect
A python utility package for image/matrix visualization.
Moving from MATLAB to python I was missing basic inspection tools for image data.
Thus, iminspect
provides a collection of basic visualization/inspection capabilities along with a minimalist Qt-based GUI.
The goal is to allow quick and easy visualization/analysis of:
- color images,
- monochrome images (i.e. any type of 2D matrices),
- label images (i.e. categorical data),
- binary masks,
- depth maps, and
- optical flow data.
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.CATEGORICAL)
# Show two images next to each other, e.g. useful to analyse RGB and
# corresponding depth, or RGB and corresponding optical flow:
inspect((data_color, data_depth))
# or specify the data types manually:
inspect((rgb, flow), data_type=(DataType.COLOR, DataType.FLOW)))
Example: visualizing categorical data (i.e. labels)
Example: visualizing a mask image
Example: visualizing RGB image and optical flow
UI Documentation
- To inspect a data point/pixel, just move the mouse above it.
- Zooming:
Ctrl+Wheel
to zoom in/out.Ctrl+Shift+Wheel
to speed up zooming.Ctrl+{+|-}
to zoom in/out.Ctrl+Shift+{+|-}
to zoom in/out faster.Ctrl+F
zoom such that image fills the available canvas.Ctrl+1
zoom to original size.
- Scrolling:
Wheel
scroll up/down.Shift+Wheel
speeds up scrolling.Ctrl+{Up|Down|Left|Right}
to scroll using keyboard.Ctrl+Shift+{Up|Down|Left|Right}
scrolls faster.
- Keyboard shortcuts:
Ctrl+Q
closes the inspection GUI.Ctrl+O
shows dialog to open another file.Ctrl+S
shows dialog to save input or visualization data.
Changelog
1.2.0
- Support multi-channel input data (with more than 4 channels).
- Support analysing multiple images at once, e.g. color images and corresponding optical flow.
- Major refactoring under the hood.
1.1.0
- Support saving visualization and raw input data to disk.
- Added shorthand wrapper to
inspect()
call. - UI improvements/layout changes.
- Fixed typos such as
DataType.CATEGORICAL
. - Added support for partially transparent images (i.e. RGBA).
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.
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.2.0.tar.gz
(32.6 kB
view hashes)
Built Distribution
iminspect-1.2.0-py3-none-any.whl
(34.6 kB
view hashes)
Close
Hashes for iminspect-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 042d8f78047771f746c0358aeb05c26d4cb004866cd16e0ec4ae9439bdc3f1af |
|
MD5 | a27b5fd6ad1bd4d1d9ec64c518cc563a |
|
BLAKE2b-256 | 3f32769c2bc9b1b3b325d33c7aa083bb3d4d476723edb1c18529c823ac8bbce8 |