Fixed issue 22
git-svn-id: http://find-object.googlecode.com/svn/trunk/find_object@339 620bd6b2-0a58-f614-fd9a-1bd335dccda9
This commit is contained in:
parent
580aa6c6fc
commit
83e932eae3
@ -462,6 +462,7 @@ void ParametersToolBox::changeParameter(const int & value)
|
||||
{
|
||||
QComboBox * descriptorBox = (QComboBox*)this->getParameterWidget(Settings::kFeature2D_2Descriptor());
|
||||
QComboBox * nnBox = (QComboBox*)this->getParameterWidget(Settings::kNearestNeighbor_1Strategy());
|
||||
QComboBox * distBox = (QComboBox*)this->getParameterWidget(Settings::kNearestNeighbor_2Distance_type());
|
||||
bool isBinaryDescriptor = descriptorBox->currentText().compare("ORB") == 0 ||
|
||||
descriptorBox->currentText().compare("Brief") == 0 ||
|
||||
descriptorBox->currentText().compare("BRISK") == 0 ||
|
||||
@ -481,9 +482,11 @@ void ParametersToolBox::changeParameter(const int & value)
|
||||
*tmp.begin() = '8'; // set HAMMING
|
||||
Settings::setNearestNeighbor_2Distance_type(tmp);
|
||||
nnBox->blockSignals(true);
|
||||
distBox->blockSignals(true);
|
||||
this->updateParameter(Settings::kNearestNeighbor_1Strategy());
|
||||
this->updateParameter(Settings::kNearestNeighbor_2Distance_type());
|
||||
nnBox->blockSignals(false);
|
||||
distBox->blockSignals(false);
|
||||
if(sender() == nnBox)
|
||||
{
|
||||
this->updateParametersVisibility();
|
||||
@ -491,6 +494,7 @@ void ParametersToolBox::changeParameter(const int & value)
|
||||
}
|
||||
nnStrategyChanged = true;
|
||||
paramChanged.append(Settings::kNearestNeighbor_1Strategy());
|
||||
paramChanged.append(Settings::kNearestNeighbor_2Distance_type());
|
||||
}
|
||||
else if(!isBinaryDescriptor && nnBox->currentText().compare("Lsh") == 0)
|
||||
{
|
||||
@ -507,9 +511,11 @@ void ParametersToolBox::changeParameter(const int & value)
|
||||
*tmp.begin() = '0'; // set EUCLIDEAN_L2
|
||||
Settings::setNearestNeighbor_2Distance_type(tmp);
|
||||
nnBox->blockSignals(true);
|
||||
distBox->blockSignals(true);
|
||||
this->updateParameter(Settings::kNearestNeighbor_1Strategy());
|
||||
this->updateParameter(Settings::kNearestNeighbor_2Distance_type());
|
||||
nnBox->blockSignals(false);
|
||||
distBox->blockSignals(false);
|
||||
if(sender() == nnBox)
|
||||
{
|
||||
this->updateParametersVisibility();
|
||||
@ -517,6 +523,7 @@ void ParametersToolBox::changeParameter(const int & value)
|
||||
}
|
||||
nnStrategyChanged = true;
|
||||
paramChanged.append(Settings::kNearestNeighbor_1Strategy());
|
||||
paramChanged.append(Settings::kNearestNeighbor_2Distance_type());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -597,7 +597,7 @@ cvflann::flann_distance_t Settings::getFlannDistanceType()
|
||||
if(ok)
|
||||
{
|
||||
QStringList strategies = split.last().split(';');
|
||||
if(strategies.size() == 8 && index>=0 && index<8)
|
||||
if(strategies.size() == 9 && index>=0 && index<=8)
|
||||
{
|
||||
distance = (cvflann::flann_distance_t)(index+1);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user