当前位置: 首页>>代码示例>>C++>>正文


C++ Tiff_Im::phot_interp方法代码示例

本文整理汇总了C++中Tiff_Im::phot_interp方法的典型用法代码示例。如果您正苦于以下问题:C++ Tiff_Im::phot_interp方法的具体用法?C++ Tiff_Im::phot_interp怎么用?C++ Tiff_Im::phot_interp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tiff_Im的用法示例。


在下文中一共展示了Tiff_Im::phot_interp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: aSzBrd

cTmpReechEpip::cTmpReechEpip
(
        bool aConsChan,
        const std::string & aNameOri,
        Box2dr aBoxImIn,
        ElDistortion22_Gen * anEpi,
        Box2dr aBox,
        double aStep,
        const std::string & aNameOut,
        const std::string & aPostMasq,
        int aNumKer ,
        bool Debug
) :
    mBoxImIn(aBoxImIn),
    mEpi    (anEpi),
    mStep   (aStep),
    mP0     (aBox._p0),
    mSzEpi  (aBox.sz()),
    mSzRed  (round_up (aBox.sz() / aStep) + Pt2di(1,1)),
    mRedIMasq  (mSzRed.x,mSzRed.y,0),
    mRedTMasq  (mRedIMasq),
    mRedImX    (mSzRed.x,mSzRed.y),
    mRedTImX   (mRedImX),
    mRedImY    (mSzRed.x,mSzRed.y),
    mRedTImY   (mRedImY)
{



    cInterpolateurIm2D<REAL4> * aPtrSCI = 0;


    if (aNumKer==0)
    {
        aPtrSCI = new cInterpolBilineaire<REAL4>;
    }
    else 
    {
      
       cKernelInterpol1D * aKer = 0;
       if (aNumKer==1)
          aKer = new cCubicInterpKernel(-0.5);
       else
          aKer = new cSinCardApodInterpol1D(cSinCardApodInterpol1D::eTukeyApod,aNumKer,aNumKer/2,1e-4,false);

       aPtrSCI =  new  cTabIM2D_FromIm2D<REAL4>   (aKer,1000,false);
       // cTabIM2D_FromIm2D<REAL4>   aSSCI (&aKer,1000,false);
    }

    cInterpolateurIm2D<REAL4> & aSCI = *aPtrSCI;



    Pt2di aPInd;

    for (aPInd.x=0 ; aPInd.x<mSzRed.x ; aPInd.x++)
    {
       for (aPInd.y=0 ; aPInd.y<mSzRed.y ; aPInd.y++)
       {
          bool Ok= false;
          Pt2dr aPEpi = ToFullEpiCoord(aPInd);
          Pt2dr aPIm =  anEpi->Inverse(aPEpi);
          if ((aPIm.x>mBoxImIn._p0.x) && (aPIm.y>mBoxImIn._p0.y) && (aPIm.x<mBoxImIn._p1.x) && (aPIm.y<mBoxImIn._p1.y))
          {
               Pt2dr aPEpi2 = anEpi->Direct(aPIm);
               if (euclid(aPEpi-aPEpi2) < 1e-2)
               {
                    Ok= true;
                    mRedTMasq.oset(aPInd,Ok);
               }
          }
          mRedTImX.oset(aPInd,aPIm.x);
          mRedTImY.oset(aPInd,aPIm.y);
       }
    }
    ELISE_COPY(mRedIMasq.all_pts(),dilat_d8(mRedIMasq.in(0),4),mRedIMasq.out());


    Tiff_Im aTifOri = Tiff_Im::StdConvGen(aNameOri.c_str(),aConsChan ? -1 :1 ,true);
    Tiff_Im aTifEpi  = Debug                       ?
                       Tiff_Im(aNameOut.c_str())     :
                       Tiff_Im
                       (
                           aNameOut.c_str(),
                           mSzEpi,
                           aTifOri.type_el(),
                           Tiff_Im::No_Compr,
                           aTifOri.phot_interp()
                       )                            ;

    Tiff_Im aTifMasq = aTifEpi;
    bool ExportMasq = (aPostMasq!="NONE");

// std::cout << "POSTMAS " << aPostMasq << "\n";

    if (ExportMasq)
    {
        std::string aNameMasq = StdPrefix(aNameOut)+ aPostMasq  +".tif";
        aTifMasq =  Debug                         ?
                    Tiff_Im(aNameMasq.c_str())    :
//.........这里部分代码省略.........
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:101,代码来源:CPP_CreateEpip.cpp

示例2: ConvertIm_main

int ConvertIm_main(int argc,char ** argv)
{
    MMD_InitArgcArgv(argc,argv);
    Tiff_Im::SetDefTileFile(1000000);


    std::string aNameIn ;

    INT aReducX=0;
    INT aReducY=0;
    INT aReducXY=0;
    INT aVisu=0;
    GenIm::type_el aTypeOut ;
    std::string aNameTypeOut ="";

    Tiff_Im::PH_INTER_TYPE aPhInterpOut ;
    std::string aNamePITOut ="";
    std::string PITOut[] = {"RGB","BW"};
    std::list<std::string> lOut(PITOut, PITOut + sizeof(PITOut) / sizeof(std::string) );

    std::string aNameOut;
    std::string anExt;

    Pt2di aP0(0,0);

    Pt2di aSzOut ;
    Pt2di aSzTF(-1,-1);

    REAL aDyn=1.0;

    Pt2di aSzTileInterne(-1,-1);
    int aKCh = -1;


    std::vector<int> aVPermut;
    int aNoTile = 0;
    std::string aF2 ="";


    ElInitArgMain
    (
    argc,argv,
                LArgMain()  << EAMC(aNameIn, "Image", eSAM_IsExistFile),
    LArgMain()  << EAM(aNameOut,"Out",true)
                << EAM(anExt,"Ext",true)
                    << EAM(aSzOut,"SzOut",true, "Size out", eSAM_NoInit)
                    << EAM(aP0,"P0",true)
                    << EAM(aNameTypeOut,"Type",true, "TypeMNT", eSAM_None, ListOfVal(GenIm::bits1_msbf, ""))
                    << EAM(aNamePITOut,"Col",true, "Col", eSAM_None,lOut)
                    << EAM(aReducXY,"ReducXY",true)
                    << EAM(aReducX,"ReducX",true)
                    << EAM(aReducY,"ReducY",true)
                    << EAM(aVisu,"Visu",true)
                    << EAM(aSzTF,"SzTifTile",true)
                    << EAM(aSzTileInterne,"SzTileInterne",true)
                    << EAM(aDyn,"Dyn",true)
                    << EAM(aKCh,"KCh",true)
                    << EAM(aNoTile,"NoTile",true)
                    << EAM(aVPermut,"Permut",true, "Permut", eSAM_NoInit)
                    << EAM(aF2,"F2",true)
    );

    if (!MMVisualMode)
    {
        // Tiff_Im aTifIn = Tiff_Im::BasicConvStd(aNameIn);
        Tiff_Im aTifIn = Tiff_Im::UnivConvStd(aNameIn);
        INT aNbChIn = aTifIn.nb_chan();

        if (! EAMIsInit(&aTypeOut)) aTypeOut =aTifIn.type_el();
        if (! EAMIsInit(&aPhInterpOut)) aPhInterpOut =  aTifIn.phot_interp();
        if (! EAMIsInit(&aSzOut)) aSzOut = aTifIn.sz();

        if (aReducXY)
        {
            aReducX = 1;
            aReducY = 1;
        }
        if (aNameOut=="")
        {
            if (anExt=="")
            {
                if (aReducX && aReducY)
                    anExt = "_RXY";
                else if (aReducX)
                    anExt = "_RX";
                else if (aReducY)
                    anExt = "_RY";
                else
                    anExt= "_Out";
            }
            if (IsPostfixed(aNameIn))
              aNameOut = StdPrefix(aNameIn) + anExt +"." + StdPostfix(aNameIn);
           else
              aNameOut = aNameIn + anExt + "tif";
        }

        Pt2di aCoefReduc(aReducX != 0 ? 2 : 1, aReducY != 0 ? 2 : 1);
        aSzOut = aSzOut.dcbyc(aCoefReduc);

        if (aNameTypeOut != "")
//.........这里部分代码省略.........
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:101,代码来源:CPP_ConvertIm.cpp


注:本文中的Tiff_Im::phot_interp方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。