A comprehensive cross-platform desktop application for polymer image analysis, generation, and visualization built with Qt Framework.
- Histogram Analysis: Calculate and visualize intensity distributions
- Edge Detection: Sobel edge detection algorithm
- Particle Analysis: Detect and analyze individual polymer particles
- Area calculation
- Perimeter measurement
- Circularity computation
- Centroid detection
- Image Processing:
- Grayscale conversion
- Binary thresholding
- Gaussian blur
- Heatmap generation
- Polymer Pattern Generation: Generate synthetic polymer chain structures
- Fiber Pattern: Create random fiber network patterns
- Crystalline Patterns: Generate polygonal crystalline structures
- Perlin Noise: Generate natural-looking noise patterns
- Voronoi Diagrams: Create cellular patterns
- Interactive Charts: Built with QCustomPlot
- Histograms
- Line graphs
- Scatter plots
- Bar charts
- Zoom and Pan: Interactive image viewing with mouse controls
- Dockable Panels: Customizable workspace layout
- Qt 5.15+ or Qt 6.x
- Modules required:
- Qt Core
- Qt Gui
- Qt Widgets
- Qt Charts
- Qt PrintSupport
- CMake 3.16+ or qmake
- C++17 compatible compiler:
- MSVC 2019+ (Windows)
- GCC 7+ (Linux)
- Clang/Apple Clang (macOS)
# Install Qt (if not already installed)
# Download from https://www.qt.io/download
# Create build directory
mkdir build
cd build
# Configure (adjust Qt path as needed)
cmake .. -DCMAKE_PREFIX_PATH="C:/Qt/6.5.0/msvc2019_64"
# Build
cmake --build . --config Release
# Run
.\Release\PolymerAnalyzer.exe# Install Qt using Homebrew
brew install qt
# Create build directory
mkdir build && cd build
# Configure
cmake .. -DCMAKE_PREFIX_PATH="/usr/local/opt/qt"
# Build
cmake --build . --config Release
# Run
open ./PolymerAnalyzer.app# Install Qt
sudo apt-get install qt6-base-dev qt6-charts-dev # Ubuntu/Debian
# or
sudo dnf install qt6-qtbase-devel qt6-qtcharts-devel # Fedora
# Create build directory
mkdir build && cd build
# Configure
cmake ..
# Build
cmake --build .
# Run
./PolymerAnalyzer- Open Qt Creator
- File → Open File or Project
- Select
PolymerAnalyzer.proorCMakeLists.txt - Configure the project with your Qt kit
- Build and Run (Ctrl+R or Cmd+R)
# Generate Makefile
qmake PolymerAnalyzer.pro
# Build
make # or nmake on Windows with MSVC
# or mingw32-make on Windows with MinGW
# Run
./PolymerAnalyzer # or PolymerAnalyzer.exe on WindowsAfter building, the executable will be in the build/Release or build/Debug directory.
You can create an installer using tools like Inno Setup or NSIS.
The application bundle will be created in the build directory. To create a DMG:
macdeployqt PolymerAnalyzer.app -dmgInstall to system:
sudo cmake --install . --prefix /usr/local- File → Open Image or click the "Open" button
- Supported formats: PNG, JPG, JPEG, BMP, TIF, TIFF
- Load an image
- Use the Analysis menu or toolbar:
- Histogram: View intensity distribution
- Particle Analysis: Detect and measure particles
- Measure Dimensions: Interactive measurement tools
- Load an image
- Use the Process menu:
- Grayscale: Convert to grayscale
- Edge Detection: Apply Sobel edge detection
- Threshold: Apply binary threshold
- Generate → Generate Polymer Pattern
- Synthetic polymer patterns will be created and displayed
- Analysis results appear in the Analysis Results dock
- Charts and graphs appear in the Visualization dock
- Use Properties dock for quick access to tools
- Mouse Wheel: Scroll to pan
- Ctrl + Mouse Wheel: Zoom in/out
- Middle Mouse Button: Drag to pan
- View Menu: Show/hide dock widgets
PolymerAnalyzer/
├── CMakeLists.txt # CMake build configuration
├── PolymerAnalyzer.pro # qmake project file
├── README.md # This file
├── src/
│ ├── main.cpp # Application entry point
│ ├── mainwindow.h/cpp # Main window implementation
│ ├── imageviewer.h/cpp # Image display widget
│ ├── analysisengine.h/cpp # Image analysis algorithms
│ ├── imagegenerator.h/cpp # Pattern generation
│ ├── visualizationwidget.h/cpp # Plotting widget
│ └── qcustomplot.h/cpp # Plotting library
├── ui/
│ └── mainwindow.ui # Qt Designer UI file
└── resources/
└── resources.qrc # Qt resources
QCustomPlot is included for advanced plotting. To add it:
- Download from https://www.qcustomplot.com/
- Extract
qcustomplot.handqcustomplot.cpp - Place them in the
src/directory
Or download directly:
# Windows PowerShell
Invoke-WebRequest -Uri "https://www.qcustomplot.com/release/2.1.1/QCustomPlot.tar.gz" -OutFile "QCustomPlot.tar.gz"
# macOS/Linux
wget https://www.qcustomplot.com/release/2.1.1/QCustomPlot.tar.gz
tar -xzf QCustomPlot.tar.gz
cp qcustomplot-source/qcustomplot.* src/- Ctrl+O: Open Image
- Ctrl+S: Save Image
- Ctrl+Q: Quit Application
- Ensure Qt is installed and CMAKE_PREFIX_PATH is set correctly
- On Windows, make sure Qt bin directory is in PATH
# Install missing Qt modules
# Ubuntu/Debian:
sudo apt-get install qt6-charts-dev libqt6charts6
# macOS:
brew install qt- Ensure C++17 is supported by your compiler
- Check Qt version (5.15+ or 6.x required)
- Verify all source files are present
- Advanced filtering (median, bilateral)
- 3D visualization support
- Machine learning-based analysis
- Batch processing
- Plugin system
- Export to various formats (CSV, Excel, PDF)
- Measurement calibration
- Image stitching
This project is provided as-is for educational and research purposes.
Contributions are welcome! Please feel free to submit issues and pull requests.
For questions and support, please open an issue on the project repository.