Skip to content

Commit

Permalink
make 1 channel works
Browse files Browse the repository at this point in the history
  • Loading branch information
yan796 committed Jun 16, 2015
1 parent 90648aa commit e40c945
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions c++/src/libTILDE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,16 @@ vector < KeyPoint > applyApproxFilters_fast(const Mat & indatav, const TILDEobje

vector < Mat > convt_image;
//LOGD("data prepare started");
prepareData_fast(indatav,resizeRatio, false,&convt_image);
if (tilde_obj.parameters[3] == 1 && indatav.channels() == 1)//nb channels
{
Mat indata_resized = indatav;
if (resizeRatio != 1)
resize(indatav, indata_resized, Size(0, 0), resizeRatio, resizeRatio);

convt_image.push_back(indata_resized);
}else{
prepareData_fast(indatav,resizeRatio, false,&convt_image);
}
//LOGD("data prepared");
getScoresandCombine_Approx(tilde_obj, convt_image,keep_only_positive,&respImageFinal);

Expand Down Expand Up @@ -1339,10 +1348,10 @@ TILDEobjects getTILDEApproxObjects(const string & name, void *_p)
param->push_back(sizeFilters);
res.parameters = *param;
} else {
res.parameters.push_back(nbMax);
res.parameters.push_back(nbSum);
res.parameters.push_back(nbApproximatedFilters);
res.parameters.push_back(nbChannels);
res.parameters.push_back(nbMax);//0
res.parameters.push_back(nbSum);//1
res.parameters.push_back(nbApproximatedFilters);//2
res.parameters.push_back(nbChannels);//3
res.parameters.push_back(sizeFilters);
}
//--------------------
Expand Down

0 comments on commit e40c945

Please sign in to comment.