Commit 806aab16 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

save, load & copy HOGDescriptor::nlevels (ticket #1533)

parent 5aae21c0
...@@ -109,6 +109,7 @@ bool HOGDescriptor::read(FileNode& obj) ...@@ -109,6 +109,7 @@ bool HOGDescriptor::read(FileNode& obj)
obj["histogramNormType"] >> histogramNormType; obj["histogramNormType"] >> histogramNormType;
obj["L2HysThreshold"] >> L2HysThreshold; obj["L2HysThreshold"] >> L2HysThreshold;
obj["gammaCorrection"] >> gammaCorrection; obj["gammaCorrection"] >> gammaCorrection;
obj["nlevels"] >> nlevels;
FileNode vecNode = obj["SVMDetector"]; FileNode vecNode = obj["SVMDetector"];
if( vecNode.isSeq() ) if( vecNode.isSeq() )
...@@ -134,7 +135,8 @@ void HOGDescriptor::write(FileStorage& fs, const String& objName) const ...@@ -134,7 +135,8 @@ void HOGDescriptor::write(FileStorage& fs, const String& objName) const
<< "winSigma" << getWinSigma() << "winSigma" << getWinSigma()
<< "histogramNormType" << histogramNormType << "histogramNormType" << histogramNormType
<< "L2HysThreshold" << L2HysThreshold << "L2HysThreshold" << L2HysThreshold
<< "gammaCorrection" << gammaCorrection; << "gammaCorrection" << gammaCorrection
<< "nlevels" << nlevels;
if( !svmDetector.empty() ) if( !svmDetector.empty() )
fs << "SVMDetector" << "[:" << svmDetector << "]"; fs << "SVMDetector" << "[:" << svmDetector << "]";
fs << "}"; fs << "}";
...@@ -166,6 +168,7 @@ void HOGDescriptor::copyTo(HOGDescriptor& c) const ...@@ -166,6 +168,7 @@ void HOGDescriptor::copyTo(HOGDescriptor& c) const
c.L2HysThreshold = L2HysThreshold; c.L2HysThreshold = L2HysThreshold;
c.gammaCorrection = gammaCorrection; c.gammaCorrection = gammaCorrection;
c.svmDetector = svmDetector; c.svmDetector = svmDetector;
c.nlevels = nlevels;
} }
void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle, void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment