Commit 1f661bfd authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #168 from mshabunin/meta-module

contrib_world module
parents 312c8fa7 2b74ca6f
...@@ -32,4 +32,4 @@ if(ENABLE_SOLUTION_FOLDERS) ...@@ -32,4 +32,4 @@ if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications") set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif() endif()
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main) install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION bin COMPONENT main)
...@@ -32,4 +32,4 @@ if(ENABLE_SOLUTION_FOLDERS) ...@@ -32,4 +32,4 @@ if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications") set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif() endif()
install(TARGETS ${the_target} RUNTIME DESTINATION bin COMPONENT main) install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION bin COMPONENT main)
...@@ -338,7 +338,7 @@ namespace bioinspired ...@@ -338,7 +338,7 @@ namespace bioinspired
class Parallel_computeGradient: public cv::ParallelLoopBody class Parallel_computeGradient: public cv::ParallelLoopBody
{ {
private: protected:
float *imageGradient; float *imageGradient;
const float *luminance; const float *luminance;
unsigned int nbColumns, doubleNbColumns, nbRows, nbPixels; unsigned int nbColumns, doubleNbColumns, nbRows, nbPixels;
......
...@@ -503,7 +503,7 @@ public: ...@@ -503,7 +503,7 @@ public:
inline unsigned int getOutputNBpixels() { return _photoreceptorsPrefilter.getNBpixels(); } inline unsigned int getOutputNBpixels() { return _photoreceptorsPrefilter.getNBpixels(); }
private: protected:
// processing activation flags // processing activation flags
bool _useParvoOutput; bool _useParvoOutput;
......
set(the_description "Separate world module containing all contrib modules")
set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
set(BUILD_opencv_contrib_world_INIT OFF) # disabled by default
# add new submodules to this list
set(OPENCV_MODULE_CHILDREN
bgsegm
bioinspired
ccalib
cvv
datasets
face
latentsvm
line_descriptor
optflow
reg
rgbd
saliency
surface_matching
text
tracking
xfeatures2d
ximgproc
xobjdetect
xphoto
)
ocv_list_add_prefix(OPENCV_MODULE_CHILDREN "opencv_")
ocv_define_module(contrib_world)
# ocv_add_module(contrib_world)
# set(link_deps "")
# foreach(m ${OPENCV_MODULE_opencv_contrib_world_CHILDREN})
# list(APPEND link_deps ${OPENCV_MODULE_${m}_LINK_DEPS})
# endforeach()
#
# ocv_glob_module_sources()
# ocv_module_include_directories()
#
# ocv_create_module(${link_deps})
#ifndef __OPENCV_CONTRIB_WORLD_HPP__
#define __OPENCV_CONTRIB_WORLD_HPP__
#endif
#include "opencv2/contrib_world.hpp"
...@@ -111,7 +111,7 @@ void AR_hmdbImp::loadDatasetSplit(const string &path, int number) ...@@ -111,7 +111,7 @@ void AR_hmdbImp::loadDatasetSplit(const string &path, int number)
if (itId == actionsId.end()) if (itId == actionsId.end())
{ {
actionsId.insert(make_pair(action, actionsId.size())); actionsId.insert(make_pair(action, actionsId.size()));
id = actionsId.size(); id = (int)actionsId.size();
} else } else
{ {
id = (*itId).second; id = (*itId).second;
......
...@@ -129,7 +129,7 @@ void OR_imagenetImp::loadDataset(const string &path) ...@@ -129,7 +129,7 @@ void OR_imagenetImp::loadDataset(const string &path)
{ {
Ptr<OR_imagenetObj> curr(new OR_imagenetObj); Ptr<OR_imagenetObj> curr(new OR_imagenetObj);
curr->id = atoi(line.c_str()); curr->id = atoi(line.c_str());
numberToString(validation.back().size()+1, curr->image); numberToString((int)validation.back().size()+1, curr->image);
curr->image = "val/ILSVRC2010_val_" + curr->image + ".JPEG"; curr->image = "val/ILSVRC2010_val_" + curr->image + ".JPEG";
validation.back().push_back(curr); validation.back().push_back(curr);
...@@ -153,7 +153,7 @@ void OR_imagenetImp::loadDataset(const string &path) ...@@ -153,7 +153,7 @@ void OR_imagenetImp::loadDataset(const string &path)
{ {
Ptr<OR_imagenetObj> curr(new OR_imagenetObj); Ptr<OR_imagenetObj> curr(new OR_imagenetObj);
curr->id = *it; curr->id = *it;
numberToString(test.back().size()+1, curr->image); numberToString((int)test.back().size()+1, curr->image);
curr->image = "test/ILSVRC2010_test_" + curr->image + ".JPEG"; curr->image = "test/ILSVRC2010_test_" + curr->image + ".JPEG";
test.back().push_back(curr); test.back().push_back(curr);
......
...@@ -98,7 +98,7 @@ void OR_sunImp::loadDatasetPart(const string &path, vector< Ptr<Object> > &datas ...@@ -98,7 +98,7 @@ void OR_sunImp::loadDatasetPart(const string &path, vector< Ptr<Object> > &datas
curr->label = (*it).second; curr->label = (*it).second;
} else } else
{ {
curr->label = pathLabel.size(); curr->label = (int)pathLabel.size();
pathLabel.insert(make_pair(labelStr, curr->label)); pathLabel.insert(make_pair(labelStr, curr->label));
paths.push_back(labelStr); paths.push_back(labelStr);
} }
......
...@@ -570,7 +570,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k ...@@ -570,7 +570,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
/* create a map to record association between KeyLines and their position /* create a map to record association between KeyLines and their position
in ScaleLines vector */ in ScaleLines vector */
std::map<std::pair<int, int>, int> correspondences; std::map<std::pair<int, int>, size_t> correspondences;
/* fill ScaleLines object */ /* fill ScaleLines object */
for ( size_t slCounter = 0; slCounter < keylines.size(); slCounter++ ) for ( size_t slCounter = 0; slCounter < keylines.size(); slCounter++ )
...@@ -601,7 +601,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k ...@@ -601,7 +601,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
/* update map */ /* update map */
int id = kl.class_id; int id = kl.class_id;
int oct = kl.octave; int oct = kl.octave;
correspondences.insert( std::pair<std::pair<int, int>, int>( std::pair<int, int>( id, oct ), slCounter ) ); correspondences.insert( std::pair<std::pair<int, int>, size_t>( std::pair<int, int>( id, oct ), slCounter ) );
} }
/* delete useless OctaveSingleLines */ /* delete useless OctaveSingleLines */
...@@ -632,7 +632,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k ...@@ -632,7 +632,7 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
{ {
/* get original index of keypoint */ /* get original index of keypoint */
int lineOctave = ( sl[k][lineC] ).octaveCount; int lineOctave = ( sl[k][lineC] ).octaveCount;
int originalIndex = correspondences.find( std::pair<int, int>( k, lineOctave ) )->second; int originalIndex = (int)correspondences.find( std::pair<int, int>( k, lineOctave ) )->second;
if( !returnFloatDescr ) if( !returnFloatDescr )
{ {
......
...@@ -425,9 +425,9 @@ int ICP::registerModelToScene(const Mat& srcPC, const Mat& dstPC, double& residu ...@@ -425,9 +425,9 @@ int ICP::registerModelToScene(const Mat& srcPC, const Mat& dstPC, double& residu
if (node) if (node)
{ {
// select the first node // select the first node
int idx = reinterpret_cast<long>(node->data)-1, dn=0; long idx = reinterpret_cast<long>(node->data)-1, dn=0;
int dup = (int)node->key-1; int dup = (int)node->key-1;
int minIdxD = idx; long minIdxD = idx;
float minDist = distances[idx]; float minDist = distances[idx];
while ( node ) while ( node )
......
...@@ -1998,7 +1998,7 @@ enum { ...@@ -1998,7 +1998,7 @@ enum {
computation. computation.
*/ */
class dissimilarity { class dissimilarity {
private: protected:
double * Xa; double * Xa;
auto_array_ptr<double> Xnew; auto_array_ptr<double> Xnew;
ptrdiff_t dim; // size_t saves many statis_cast<> in products ptrdiff_t dim; // size_t saves many statis_cast<> in products
......
...@@ -70,7 +70,7 @@ namespace xphoto ...@@ -70,7 +70,7 @@ namespace xphoto
void operator() (const Range &range) const; void operator() (const Range &range) const;
private: protected:
const Mat &src; const Mat &src;
std::vector <Mat> &patches; // image decomposition into sliding patches std::vector <Mat> &patches; // image decomposition into sliding patches
...@@ -182,4 +182,4 @@ namespace xphoto ...@@ -182,4 +182,4 @@ namespace xphoto
} }
} }
} }
\ No newline at end of file
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