From 806aab164b62eb8249103882a85868a13aff2d52 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 28 Mar 2012 14:31:03 +0000 Subject: [PATCH] save, load & copy HOGDescriptor::nlevels (ticket #1533) --- modules/objdetect/src/hog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/objdetect/src/hog.cpp b/modules/objdetect/src/hog.cpp index b1074ac6e..053b988d7 100644 --- a/modules/objdetect/src/hog.cpp +++ b/modules/objdetect/src/hog.cpp @@ -109,6 +109,7 @@ bool HOGDescriptor::read(FileNode& obj) obj["histogramNormType"] >> histogramNormType; obj["L2HysThreshold"] >> L2HysThreshold; obj["gammaCorrection"] >> gammaCorrection; + obj["nlevels"] >> nlevels; FileNode vecNode = obj["SVMDetector"]; if( vecNode.isSeq() ) @@ -134,7 +135,8 @@ void HOGDescriptor::write(FileStorage& fs, const String& objName) const << "winSigma" << getWinSigma() << "histogramNormType" << histogramNormType << "L2HysThreshold" << L2HysThreshold - << "gammaCorrection" << gammaCorrection; + << "gammaCorrection" << gammaCorrection + << "nlevels" << nlevels; if( !svmDetector.empty() ) fs << "SVMDetector" << "[:" << svmDetector << "]"; fs << "}"; @@ -166,6 +168,7 @@ void HOGDescriptor::copyTo(HOGDescriptor& c) const c.L2HysThreshold = L2HysThreshold; c.gammaCorrection = gammaCorrection; c.svmDetector = svmDetector; + c.nlevels = nlevels; } void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,