Skip to content

About

A C++ implementation of a bright spot detector.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

BrightSpotDetector

A C++ implementation of a bright spot detector.


Features

  • Detects bright spots in grayscale images (e.g., thermal/IR images)
  • Configurable detection parameters
  • Adjustable search ROI (region of interest)
  • Returns all detected bounding boxes
  • Based on OpenCV
  • Works on Windows, Linux, macOS

Requirements

  • C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+)
  • OpenCV 4.x
  • pkg-config (Linux/macOS)
  • CMake 3.16+ (optional, for building with CMake)

Building

macOS/Linux:

g++ -std=c++17 -Wall -Wextra -g3 main.cpp BrightSpotDetector.cpp -o detector `pkg-config --cflags --libs opencv4`

Windows (MinGW/MSYS2):

g++ -std=c++17 -Wall -Wextra -g3 main.cpp BrightSpotDetector.cpp -o detector.exe `pkg-config --cflags --libs opencv4`

Usage

  1. Place your image as test.png in the project root.
  2. Run the executable: macOS/Linux:
./detector

Windows (MinGW/MSYS2):

detector.exe

Adjusting Parameters

Parameter Type Default Description
crop_size_percent int 28 Percentage of image borders to exclude from search (0–49)
erode_bbox int 50 Percentage to expand bbox for background brightness calculation
min_brightness_factor float 1.3 Minimum brightness ratio to be considered a bright spot
min_wh_percent float 1.0 Minimum object width/height as % of frame
max_wh_percent int 15 Maximum object width/height as % of frame
gaussian_sigma int 10 Gaussian penalty for distance from center

Example of the operation

Result output

License

This project is open-source and licensed under the MIT License. See the LICENSE file in the root repository for details.

About

A C++ implementation of a bright spot detector.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages