コード例 #1
0
bool rspfOpenCVSobelFilter::loadState(const rspfKeywordlist& kwl, const char* prefix)
{
   rspfImageSourceFilter::loadState(kwl, prefix);

   const char* lookup = kwl.find(prefix, "xorder");
   if(lookup)
   {
      theXOrder = rspfString(lookup).toInt();
      printf("Read from spec file. xorder: %d\n",theXOrder);
   }
   lookup = kwl.find(prefix, "yorder");
   if(lookup)
   {
      theYOrder = rspfString(lookup).toInt();
      printf("Read from spec file. yorder: %d\n",theYOrder);
   }
   lookup = kwl.find(prefix, "aperture_size");
   if(lookup)
   {
      setApertureSize(rspfString(lookup));
   }
   return true;
}
コード例 #2
0
void rspfOpenCVSobelFilter::setProperty(rspfRefPtr<rspfProperty> property)
{
	if(!property.valid())
	{
		return;
	} 
    rspfString name = property->getName();
	if(name == "xorder")
    {
		theXOrder = property->valueToString().toInt();
    }
    else if(name == "yorder")
    {
		theYOrder = property->valueToString().toInt();
    }
    else if(name == "aperture_size")
    {
        setApertureSize(property->valueToString());
    }
	else
	{
		rspfImageSourceFilter::setProperty(property);
	}
}
コード例 #3
0
ファイル: cannyfilterpass.cpp プロジェクト: Neckara/ProjetSI
void CannyFilterPass::setParameters(double threshold1, double threshold2, int apertureSize)
{
    setThreshold1(threshold1);
    setThreshold2(threshold2);
    setApertureSize(apertureSize);
}