mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
changes related with code review
This commit is contained in:
@@ -24,7 +24,7 @@ set_target_properties(${the_target} PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||||
INSTALL_NAME_DIR lib
|
||||
OUTPUT_NAME ${the_target})
|
||||
OUTPUT_NAME "opencv_trainsoftcascade")
|
||||
|
||||
if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
|
||||
|
||||
@@ -114,6 +114,8 @@ void sft::read(const cv::FileNode& node, Config& x, const Config& default_value)
|
||||
x.read(node);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct Out
|
||||
{
|
||||
Out(std::ostream& _out): out(_out) {}
|
||||
@@ -124,6 +126,7 @@ struct Out
|
||||
private:
|
||||
Out& operator=(Out const& other);
|
||||
};
|
||||
}
|
||||
|
||||
std::ostream& sft::operator<<(std::ostream& out, const Config& m)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/softcascade/softcascade.hpp>
|
||||
|
||||
namespace cv {using namespace scascade;}
|
||||
namespace cv {using namespace softcascade;}
|
||||
namespace sft
|
||||
{
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
namespace sft
|
||||
{
|
||||
|
||||
using cv::Dataset;
|
||||
using cv::softcascade::Dataset;
|
||||
|
||||
class ScaledDataset : public Dataset
|
||||
{
|
||||
|
||||
+4
-4
@@ -76,7 +76,7 @@ int main(int argc, char** argv)
|
||||
string configPath = parser.get<string>("config");
|
||||
if (configPath.empty())
|
||||
{
|
||||
std::cout << "Configuration file is missing or empty. Could not start training." << std::endl << std::flush;
|
||||
std::cout << "Configuration file is missing or empty. Could not start training." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ int main(int argc, char** argv)
|
||||
cv::FileStorage fs(configPath, cv::FileStorage::READ);
|
||||
if(!fs.isOpened())
|
||||
{
|
||||
std::cout << "Configuration file " << configPath << " can't be opened." << std::endl << std::flush;
|
||||
std::cout << "Configuration file " << configPath << " can't be opened." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ int main(int argc, char** argv)
|
||||
cv::FileStorage fso(cfg.outXmlPath, cv::FileStorage::WRITE);
|
||||
if(!fso.isOpened())
|
||||
{
|
||||
std::cout << "Training stopped. Output classifier Xml file " << cfg.outXmlPath << " can't be opened." << std::endl << std::flush;
|
||||
std::cout << "Training stopped. Output classifier Xml file " << cfg.outXmlPath << " can't be opened." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int main(int argc, char** argv)
|
||||
cv::Rect boundingBox = cfg.bbox(it);
|
||||
std::cout << "Object bounding box" << boundingBox << std::endl;
|
||||
|
||||
typedef cv::SoftCascadeOctave Octave;
|
||||
typedef cv::Octave Octave;
|
||||
|
||||
cv::Ptr<Octave> boost = Octave::create(boundingBox, npositives, nnegatives, *it, shrinkage, nfeatures);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user