Exemplo n.º 1
0
void ExtractSIFT::getParametersFromDialog()
{
	if (!m_dialog)
		return;

	//get the parameters from the dialog
	m_nr_octaves = m_dialog->nrOctaves->value();
	m_min_scale = static_cast<float>(m_dialog->minScale->value());
	m_nr_scales_per_octave = m_dialog->scalesPerOctave->value();
	m_use_min_contrast = m_dialog->useMinContrast->checkState();
	m_min_contrast = m_use_min_contrast ? static_cast<float>(m_dialog->minContrast->value()) : 0;
	m_field_to_use = m_dialog->intensityCombo->currentText().toStdString();

	if (m_field_to_use == "rgb")
	{
		m_mode = RGB;
	}
	else
	{
		m_mode = SCALAR_FIELD;
	}

	QString fieldname(m_field_to_use.c_str());
	fieldname.replace(' ', '_');
	m_field_to_use_no_space = fieldname.toStdString();
}
Exemplo n.º 2
0
std::vector<std::string> MxArray::fieldnames() const
{
    if (!isStruct())
        mexErrMsgIdAndTxt("mexopencv:error", "MxArray is not a struct array");
    int n = nfields();
    std::vector<std::string> v;
    v.reserve(n);
    for (int i = 0; i < n; ++i)
        v.push_back(fieldname(i));
    return v;
}
Exemplo n.º 3
0
void
SQLTableListManager::commitSpatial()
{
/* for index|key name (field) split name from field
*/
	std::string::size_type first = tempcontents_.find_first_of('('),
	  last = tempcontents_.find_last_of(')'),
	  space = tempcontents_.find_first_of(' ');

	std::string fieldname(tempcontents_.substr(first + 1, last - first - 1));
	std::string keyname((space == std::string::npos)?"":tempcontents_.substr(0, space));

	temptable_.spatial.insert(std::make_pair<std::string, std::string>(fieldname, keyname));
}
Exemplo n.º 4
0
void
SQLTableListManager::commitIndex()
{
/* for index|key name (field) split name from field
*/
	std::string::size_type first = tempcontents_.find_first_of('('),
	  last = tempcontents_.find_last_of(')'),
	  space = tempcontents_.find_first_of(' ');

	std::string fieldname(tempcontents_.substr(first + 1, last - first - 1));
	std::string keyname((space == std::string::npos)?"":tempcontents_.substr(0, space));

/* Let's check if we are to add the index as we might have already encountered a foreign key on this field
*/
	TableIndexList::iterator it = temptable_.noindex.find(std::make_pair<std::string, std::string>(fieldname, ""));
	if (it == temptable_.noindex.end())
	{
		temptable_.index.insert(std::make_pair<std::string, std::string>(fieldname, keyname));
	}
}