Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 745 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 745 Bytes

A fast 2D Region Detector

Based on the MSER Algorithm from "Linear Time Maximally Stable Extremal Regions" by David Nistér and Henrik Stewénius.

Usage

uint8_t * pixels = ...
unsigned int width = ...
unsigned int height = ...	

typedef RegionDetector::RegionAllocator<RegionDetector::Region> AllocatorType;
typedef RegionDetector::RegionDetectorDetector<RegionDetector::Region, AllocatorType> DetectorType;

DetectorType detector;
AllocatorType allocator;

RegionDetector::Region *rootRegion = detector.detect(pixels, width, height, &allocator);
	
std::vector<RegionDetector::Region*> regions = RegionDetector::Helpers::regionHierarchyToVector(rootRegion);

License

This software is licensed under the MIT license.