// // C++ Interface: GenericEdgeDetector // // Description: // // // Author: Takeshi Nakazato , (C) 2012 // // Copyright: See COPYING file that comes with this distribution // // #ifndef _GENERIC_EDGE_DETECTOR_H_ #define _GENERIC_EDGE_DETECTOR_H_ #include #include #include "EdgeDetector.h" namespace asap { class GenericEdgeDetector : public EdgeDetector { public: GenericEdgeDetector() ; virtual ~GenericEdgeDetector() ; casa::Vector detect() ; private: // parse options void parseOption( const casa::Record &option ) ; // steps for edge detection algorithm void topixel() ; void countup() ; void thresholding() ; void labeling() ; void trimming() ; void selection() ; void tuning() ; // internal methods void setup() ; casa::uInt _labeling() ; casa::uInt __labeling( casa::Vector &a ) ; casa::uInt _trimming() ; casa::uInt _trimming1DX() ; casa::uInt _trimming1DY() ; casa::uInt _trimming1D( casa::Vector &a ) ; void _search( casa::uInt &start, casa::uInt &end, const casa::Vector &a ) ; // pixel info casa::Double cenx_ ; casa::Double ceny_ ; casa::Double pcenx_ ; casa::Double pceny_ ; casa::uInt nx_ ; casa::uInt ny_ ; casa::Double dx_ ; casa::Double dy_ ; // storage for detection casa::Matrix pdir_ ; casa::Matrix apix_ ; // options casa::Float width_ ; casa::Float fraction_ ; casa::Bool elongated_ ; } ; } #endif /* _GENERIC_EDGE_DETECTOR_H_ */