本文整理匯總了C++中ELISE_COPY函數的典型用法代碼示例。如果您正苦於以下問題:C++ ELISE_COPY函數的具體用法?C++ ELISE_COPY怎麽用?C++ ELISE_COPY使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ELISE_COPY函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: anOldL
void RImGrid::ExtDef()
{
Neighbourhood V4 = Neighbourhood::v4();
Neighbourhood V8 = Neighbourhood::v8();
Liste_Pts_INT2 anOldL(2);
bool First = true;
while(First || (!anOldL.empty()))
{
Flux_Pts aFlx = First ?
select(mGrid.all_pts(), mGrid.in()!=mDef):
anOldL.all_pts();
Liste_Pts_INT2 aNewL(2);
ELISE_COPY
(
dilate(aFlx,sel_func(V4,mGrid.in(mDef/2)==mDef)),
2*mDef,
mGrid.out() | aNewL
);
Neigh_Rel aROK = sel_func(V8,mGrid.in(mDef)!= mDef);
ELISE_COPY
(
aNewL.all_pts(),
aROK.red_sum( mGrid.in())
/ aROK.red_sum(1),
mGrid.out()
);
anOldL = aNewL;
First = false;
}
}
示例2: FLoc
void cImage_LumRas::CalculShadeByDiff()
{
mImShade.Resize(mAppli.mImGr.sz());
std::string aNameOut = mDir+ "LumRas_"+StdPrefix(mName) + ".tif";
Tiff_Im TifTest
(
aNameOut.c_str(),
mIm.sz(),
// GenIm::u_int1,
GenIm::real4,
Tiff_Im::No_Compr,
Tiff_Im::BlackIsZero
);
Fonc_Num aFRas = FLoc(6,50,mIm);
Fonc_Num aFStd = FLoc(6,50,mAppli.mImGr);
Tiff_Im::Create8BFromFonc("Test-Ras.tif",mIm.sz(),aFRas*100);
Tiff_Im::Create8BFromFonc("Test-Std.tif",mIm.sz(),aFStd*100);
// Fonc_Num cImage_LumRas::FLoc(int aNbIter,int aSzW,Fonc_Num aF)
ELISE_COPY(mImShade.all_pts(),(aFRas-aFStd),mImShade.out());
ELISE_COPY
(
TifTest.all_pts(),
// Max(0,Min(255,128 * (1 + 2*mImShade.in()))),
mImShade.in(),
TifTest.out()
);
}
示例3: AnIm
void bench_im_reech
(
Fonc_Num Fonc,
Pt2di SzIm,
Fonc_Num reechantX,
Fonc_Num reechantY,
INT sz_grid,
REAL aMaxDif
)
{
Im2D_U_INT1 AnIm(SzIm.x,SzIm.y);
ELISE_COPY(AnIm.all_pts(),Fonc,AnIm.out());
REAL dif;
ELISE_COPY
(
AnIm.interior(3),
Abs
(
AnIm.ImGridReech (reechantX,reechantY,sz_grid,-100)
- Fonc[Virgule(reechantX,reechantY)]
),
VMax(dif)
);
BENCH_ASSERT(dif<aMaxDif);
}
示例4: FiltrageDepthByProgDyn
void cMMTP::MaskProgDyn(const cParamFiltreDepthByPrgDyn & aParam)
{
std::cout << "BEGIN MASK PRGD\n";
mImMasqFinal = FiltrageDepthByProgDyn(mContBT,mImLabel,aParam);
std::cout << "END MASK PRGD\n";
#ifdef ELISE_X11
if(TheWTiePCor)
{
ELISE_COPY(mImLabel.all_pts(),mImLabel.in(),TheWTiePCor->odisc());
ELISE_COPY
(
select(mImLabel.all_pts(),mImMasqFinal.in() && (mImLabel.in()==1)),
P8COL::green,
TheWTiePCor->odisc()
);
ELISE_COPY
(
select(mImLabel.all_pts(),mImMasqFinal.in() && (mImLabel.in()==2)),
P8COL::blue,
TheWTiePCor->odisc()
);
TheWTiePCor->clik_in();
}
#endif
}
示例5: TestKL
void TestKL()
{
Pt2di aSZ(200,200);
Im2D_Bits<1> aImMasqF(aSZ.x,aSZ.y,1);
Im2D_Bits<1> aImMasqDef(aSZ.x,aSZ.y,1);
ELISE_COPY(rectangle(Pt2di(70,0),Pt2di(130,200)),0,aImMasqDef.out());
Im2D<U_INT2,INT> aImVal(aSZ.x,aSZ.y);
ELISE_COPY(aImVal.all_pts(),FX,aImVal.out());
Video_Win aW=Video_Win::WStd(aSZ,3.0);
ELISE_COPY(aW.all_pts(),aImVal.in(),aW.ogray());
ELISE_COPY(aW.all_pts(),aImMasqDef.in(),aW.odisc());
getchar();
aImVal = ImpaintL2(aImMasqDef,aImMasqF,aImVal);
// NComplKLipsParLBas(aImMasqDef,aImMasqF,aImVal,1.0);
ELISE_COPY(aW.all_pts(),aImVal.in(),aW.ogray());
Tiff_Im::Create8BFromFonc("toto.tif",aSZ,aImVal.in());
getchar();
}
示例6: cElNuage3DMaille
template <class Type,class TBase> cElNuage3DMaille_FromImProf<Type,TBase>::cElNuage3DMaille_FromImProf
(
const std::string & aDir,
const cXML_ParamNuage3DMaille & aNuage,
Fonc_Num aFMasq,
Fonc_Num aFProf,
bool WithEmpyData,
bool aDequant
) :
cElNuage3DMaille(aDir,aNuage,aFMasq,WithEmpyData),
mIm (mSzData.x,mSzData.y),
mTIm (mIm),
mProf0 (aNuage.Image_Profondeur().Val().OrigineAlti()),
mResolProf (aNuage.Image_Profondeur().Val().ResolutionAlti()),
mDequant (aDequant)
{
if (mDequant && (!WithEmpyData))
{
ElImplemDequantifier aDeq(mSzData);
aDeq.DoDequantif(mSzData,aFProf);
ELISE_COPY(mIm.all_pts(),aDeq.ImDeqReelle(),mIm.out());
}
else
{
ELISE_COPY ( mIm.all_pts(), aFProf, mIm.out());
}
}
示例7: bench_Proj32
void bench_Proj32()
{
Pt2di aSz(200,300);
Pt2di aC = aSz/2;
double aR = 50;
Fonc_Num aF = Square(FX-aC.x)+Square(FY-aC.y) < ElSquare(aR);
// aF = 0;
Im2D_INT2 aI1(aSz.x,aSz.y);
ELISE_COPY
(
aI1.all_pts(),
aF * Polar_Def_Opun::polar(Virgule(FX-aC.x,FY-aC.y),0).v1()*(255.0/(2.0*PI))
+ (1-aF) * (frandr() * 255),
aI1.out()
);
Video_Win aW= Video_Win::WStd(aSz,1.0);
ELISE_COPY(aI1.all_pts(),aI1.in(),aW.ocirc());
getchar();
cResProj32 aR32 = Projection32(aF,aSz);
ELISE_COPY
(
aI1.all_pts(),
aI1.in()[Virgule(aR32.PX().in(),aR32.PY().in())],
aW.ocirc()
);
getchar();
}
示例8: Pt2di
void ElImplemDequantifier::Test()
{
INT Z=2;
Pt2di aSZ = mSzReel - Pt2di(2,2);
Video_Win aW = Video_Win::WStd(aSZ,Z);
aW.set_title("Image Quant");
Video_Win aW2 = Video_Win::WStd(aSZ,Z);
Video_Win aW3 = Video_Win::WStd(aSZ,Z);
Video_Win aW4 = Video_Win::WStd(aSZ,Z);
aW2.set_title("Deq");
aW3.set_title("Deq+Cuv");
aW4.set_title("FRELLE");
Fonc_Num aFR = sin(FX/20.0) * sin(FY/20.0) * 3 + FX/70.0;
// aFR = 5 * (1- (Square(FX-aSZ.x/2)+Square(FY-aSZ.y/2))/square_euclid(aSZ/2));
Fonc_Num aFonc = round_ni (aFR);
Fonc_Num aBase = 0;// aFonc;
REAL Ampl = 90.0;
ELISE_COPY(aW.all_pts(),(aFonc -aBase)*Ampl,aW.ocirc());
DoDequantif(aSZ,aFonc,true);
ELISE_COPY ( aW2.all_pts(), (ImDeqReelle()-aBase)*Ampl, aW2.ocirc());
SetTraitSpecialCuv(true);
DoDequantif(aSZ,aFonc,true);
ELISE_COPY ( aW3.all_pts(), (ImDeqReelle()-aBase)*Ampl, aW3.ocirc());
ELISE_COPY ( aW4.all_pts(), (aFR-aBase)*Ampl, aW4.ocirc());
/*
Video_Win aW4 = Video_Win::WStd(aSZ,Z);
ELISE_COPY
(
aW3.all_pts(),
Moy(Moy( aF.in(0),3),3) *Ampl,
aW3.ocirc()
);
ELISE_COPY
(
aW3.all_pts(),
Moy(Moy( ImDeqReelle(),3),3) *Ampl,
aW4.ocirc()
);
*/
while(1) getchar();
}
示例9: bench_dist_chamfrain
void bench_dist_chamfrain()
{
bench_env_klip(Pt2di(200,300));
{
Im2D<U_INT1,INT> I(300,300,0);
//ELISE_COPY(disc(Pt2di(150,150),120),1,I.out());
ELISE_COPY(disc(Pt2dr(150,150),120),1,I.out()); // __NEW
dist_chamfer_cabl(I,35);
}
{
Im2D<U_INT1,INT> I(600,600,0);
//ELISE_COPY(disc(Pt2di(300,300),290),1,I.out());
//ELISE_COPY(disc(Pt2di(300,300),5),0,I.out());
ELISE_COPY(disc(Pt2dr(300,300),290),1,I.out()); // __NEW
ELISE_COPY(disc(Pt2dr(300,300),5),0,I.out()); // __NEW
dist_chamfer_cabl(I,144);
}
cout << "OK chamfer TEST \n";
}
示例10: PartitionRenato
void PartitionRenato(int argc,char** argv)
{
std::string aName;
double aPropSzW=0.1,aSeuil=75;
double aPropExag = 0.1;
int aNbIter = 3;
ElInitArgMain
(
argc,argv,
LArgMain() << EAMC(aName,"Name Input"),
LArgMain() << EAM(aPropSzW,"PropSzW",true,"Prop Size of W, def =0.1")
<< EAM(aSeuil,"Seuil",true,"Threshold beetween Black & White, Def=75")
);
Tiff_Im aTIn = Tiff_Im::UnivConvStd(aName);
Pt2di aSz = aTIn.sz();
int aSzW = round_ni((euclid(aSz)*aPropSzW) / sqrt(aNbIter));
Im2D_REAL4 anIm0(aSz.x,aSz.y);
Im2D_REAL4 anIm1(aSz.x,aSz.y);
Im2D_U_INT1 aImInside(aSz.x,aSz.y,1);
ELISE_COPY(anIm0.all_pts(),255-aTIn.in(),anIm0.out());
int aNbF = 3;
for (int aKF=0 ; aKF<aNbF ; aKF++)
{
Im2D_REAL4 anImFond(aSz.x,aSz.y);
Fonc_Num aFIn = anIm0.in(0);
for (int aK=0 ; aK<aNbIter ; aK++)
aFIn = (rect_som(aFIn,aSzW)*aImInside.in(0)) / Max(1.0,rect_som(aImInside.in(0),aSzW));
ELISE_COPY(anImFond.all_pts(),aFIn,anImFond.out());
if (aKF == (aNbF-1))
{
Fonc_Num aF = anIm0.in()-anImFond.in();
aF = aF / aSeuil;
aF = (aF -0.1) / (1-2*aPropExag);
aF = Max(0.0,Min(1.0,aF));
ELISE_COPY(anIm1.all_pts(),255.0 *(1-aF),anIm1.out());
}
else
{
ELISE_COPY
(
aImInside.all_pts(),
anIm0.in() < anImFond.in()+aSeuil,
aImInside.out()
);
}
}
Tiff_Im::Create8BFromFonc(std::string("Bin-")+StdPrefix(aName)+".tif",aTIn.sz(),anIm1.in());
}
示例11: SetSize
void ElImplemDequantifier::DoDequantif(Pt2di aSzIm,Fonc_Num f2Deq,bool aVerifI)
{
SetSize(aSzIm);
SetChamfer(Chamfer::d32);
Symb_FNum aFC = Max(trans(Rconv(f2Deq),Pt2di(-1,-1)),eValOut+2);
Symb_FNum aIFC = round_ni(aFC);
double aDifI;
ELISE_COPY
(
mImQuant.interior(1),
Virgule(aIFC,Abs(aFC-aIFC)),
// Max(trans(f2Deq,Pt2di(-1,-1)),eValOut+2),
Virgule(mImQuant.out(),VMax(aDifI))
);
if (aVerifI)
{
ELISE_ASSERT(aDifI<1e-6,"Non int in ElImplemDequantifier::DoDequantif");
}
ELISE_COPY(mImQuant.border(1),eValOut, mImQuant.out());
QuickSetDist(1);
Symb_FNum sM (mDistMoins.in());
Symb_FNum sP (mDistPlus.in());
/*
Pt2di P128(1565+2,1100+2);
Pt2di P126(1475+2,1085+2);
std::cout << "P128 : "
<< int(mDistMoins.data()[P128.y][P128.x]) << " "
<< int(mDistPlus.data()[P128.y][P128.x]) << "\n" ;
std::cout << "P126 : "
<< int(mDistMoins.data()[P126.y][P126.x]) << " "
<< int(mDistPlus.data()[P126.y][P126.x]) << "\n" ;
std::cout << "SZ IM " << aSzIm << "\n"; getchar();
*/
ELISE_COPY
(
mImDeq.all_pts(),
trans(mImQuant.in()+(sM/Rconv(sM+sP)-0.5),Pt2di(1,1)),
mImDeq.out()
);
}
示例12: ELISE_COPY
void ElImplemDequantifier::QuickSetDist(INT aNbStep)
{
ELISE_COPY(mDistPlus.all_pts(),eMaxDist,mDistPlus.out());
ELISE_COPY(mDistMoins.all_pts(),eMaxDist,mDistMoins.out());
for (INT aP0=0; aP0<mNbPts ; aP0++)
{
INT aQuant0 = lDQ[aP0];
if (aQuant0 != eValOut)
{
for (INT aKV=0; aKV<mNbVYm ; aKV++)
{
INT aPV = aP0 + mVYm[aKV];
INT aQuantV = lDQ[aPV];
if (aQuantV != eValOut)
{
INT aPds = mPdsYm[aKV];
if (aQuantV<aQuant0)
{
ElSetMin(mDPL[aPV],aPds-1);
ElSetMin(mDM[aP0],aPds-1);
}
else if (aQuantV>aQuant0)
{
ElSetMin(mDPL[aP0],aPds-1);
ElSetMin(mDM[aPV],aPds-1);
}
else
{
ElSetMin(mDPL[aP0],mDPL[aPV]+aPds);
ElSetMin(mDM[aP0],mDM[aPV]+aPds);
}
}
}
}
}
OnePasseInverseVideo();
for (INT aK=0; aK<aNbStep ; aK++)
{
OnePasseVideo();
OnePasseInverseVideo();
}
if (mTraitCuv)
{
TraitCuv(mDPL,mDM);
TraitCuv(mDM ,mDPL);
}
}
示例13: dist_chamfer_cabl
void dist_chamfer_cabl(Im2D<U_INT1,INT> I,INT v_max)
{
Im2D<U_INT1,INT> I0(I.tx(),I.ty(),0);
ELISE_COPY(I0.all_pts(),I.in(),I0.out());
Chamfer::d32.im_dist(I);
INT nb_dif;
ELISE_COPY
(
I.all_pts(),
I0.in()!=(I.in()!=0),
sigma(nb_dif)
);
BENCH_ASSERT(nb_dif == 0);
INT tx = I.tx();
INT ty = I.ty();
U_INT1 ** d = I.data();
INT vmax = I.vmax()-1;
for (int x=1; x<tx-1 ; x++)
for (int y=1; y<ty-1 ; y++)
{
INT v;
if (d[y][x])
v = std::min3
(
std::min3(d[y+1][x-1]+3,d[y+1][x]+2,d[y+1][x+1]+3),
std::min3(d[y][x-1]+2,vmax,d[y][x+1]+2),
std::min3(d[y-1][x-1]+3,d[y-1][x]+2,d[y-1][x+1]+3)
);
else
v = 0;
BENCH_ASSERT(v == d[y][x]);
}
INT dif;
ELISE_COPY
(
I.all_pts(),
Abs
(
Min(I.in(),v_max)
- extinc_32(I0.in(0),v_max)
),
VMax(dif)
);
BENCH_ASSERT(dif == 0);
}
示例14: MakeFoncRepart
void MakeFoncRepart(Im1D_REAL8 aH,int * aVMax=0)
{
double aNbP;
ELISE_COPY(aH.all_pts(),aH.in(),sigma(aNbP));
REAL8 * aDH = aH.data();
for (int aK=1 ; aK<aNbH ; aK++)
{
if (aDH[aK] && aVMax) *aVMax = aK;
aDH[aK] += aDH[aK-1];
}
ELISE_COPY(aH.all_pts(),aH.in() * (255.0/aNbP),aH.out());
}
示例15: VisuParalx
void VisuParalx(Video_Win aW,Fonc_Num f,REAL & aV0,REAL & aV1,bool CalcV)
{
if (CalcV)
ELISE_COPY ( aW.all_pts(),Rconv(f),VMin(aV0) | VMax(aV1));
ELISE_COPY
(
aW.all_pts(),
AUC(round_ni((f-aV0) * (255.0/(aV1-aV0)))),
aW.ogray()
);
}