How yanqing-shi/heat-haze-reduction works
Heat Haze is a small interactive OpenCV desktop tool for repairing locally selected heat-haze distortion in a photo. The user opens an image, marks a region by dragging, and releases to trigger edge detection, curve fitting, and pixel smoothing; the edited image is displayed and saved as result.jpg. Zoom, pan, and undo are part of the viewer workflow. The graph separates the repair stages even though they are implemented together in method.cpp. Relationships are limited to those shown in the excerpts or documented in the README.
Main entry points: WindowZoom.cpp Interactive viewer · main.cpp Application entry · method.cpp Edge detection · PolyFit.cpp Quadratic fitting
Components 9
Image viewer
- Application entry
Heat Haze/main.cpp - Interactive viewer
Heat Haze/WindowZoom.cpp - Mouse controls
Heat Haze/WindowZoom.cpp
Repair pipeline
- Edge detection
Heat Haze/method.cpp - Quadratic fitting
Heat Haze/PolyFit.cpp - Pixel smoothing
Heat Haze/method.cpp
Image results
- Edited image
Other components
- User
- Source image
Connections 11
- User → Application entry: starts
README.md - Application entry → Interactive viewer: creates
Heat Haze/main.cpp - Application entry → Source image: loads path
Heat Haze/main.cpp - User → Interactive viewer: marks region
README.md - Interactive viewer → Source image: displays
Heat Haze/WindowZoom.cpp - Interactive viewer → Mouse controls: registers callback
Heat Haze/WindowZoom.cpp - Mouse controls → Edge detection: invokes prep
Heat Haze/WindowZoom.cpp - Edge detection → Quadratic fitting: calls Poly
Heat Haze/method.cpp - Edge detection → Pixel smoothing: passes fit results
Heat Haze/method.cpp - Pixel smoothing → Edited image: writes result.jpg
Heat Haze/method.cpp - Mouse controls → Interactive viewer: refreshes image
Heat Haze/WindowZoom.cpp