34 std::ifstream in(filename.c_str());
49 std::ifstream in(filename.c_str());
64 in >>
k->_y >>
k->_x >>
k->_scale >>
k->_ori >>
k->_score;
103 o <<
dims << std::endl;
127 o <<
dims << std::endl;
134 double sc = 2.5 * scale;
136 o << x <<
" " << y <<
" " << 1.0 /
sc <<
" 0 " << 1.0 /
sc;
151 o <<
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" << std::endl;
152 o <<
"<KeypointXMLList xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
154 o <<
" <YDim>" <<
imageinfo.height <<
"</YDim>" << std::endl;
155 o <<
" <ImageFile>" <<
imageinfo.filename <<
"</ImageFile>" << std::endl;
156 o <<
" <Arr>" << std::endl;
161 o <<
" <KeypointN>" << std::endl;
162 o <<
" <X>" << x <<
"</X>" << std::endl;
163 o <<
" <Y>" << y <<
"</Y>" << std::endl;
164 o <<
" <Scale>" << scale <<
"</Scale>" << std::endl;
165 o <<
" <Orientation>" <<
orientation <<
"</Orientation>" << std::endl;
168 o <<
" <Dim>" <<
dims <<
"</Dim>" << std::endl;
169 o <<
" <Descriptor>" << std::endl;
173 o <<
" <int>" << (
vec[
i] * 256) <<
"</int>" << std::endl;
175 o <<
" </Descriptor>" << std::endl;
177 o <<
" </KeypointN>" << std::endl;
182 o <<
" </Arr>" << std::endl;
183 o <<
"</KeypointXMLList>" << std::endl;
void writeHeader(const ImageInfo &imageinfo, int nKeypoints, int dims)
void writeKeypoint(double x, double y, double scale, double orientation, double score, int dims, double *vec)
ImageInfo loadKeypoints(const std::string &filename, KeyPointVect_t &vec)
std::shared_ptr< KeyPoint > KeyPointPtr
static bool identifySIFTKeypoints(const std::string &filename)
static ImageInfo loadSIFTKeypoints(const std::string &filename, KeyPointVect_t &vec)
std::vector< KeyPointPtr > KeyPointVect_t
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.