本文整理汇总了C++中Video_Win::ogray方法的典型用法代码示例。如果您正苦于以下问题:C++ Video_Win::ogray方法的具体用法?C++ Video_Win::ogray怎么用?C++ Video_Win::ogray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video_Win
的用法示例。
在下文中一共展示了Video_Win::ogray方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestDifProf
void cASAMG::TestDifProf(const cASAMG & aNE) const
{
Im2D_REAL4 aImDif(mSz.x,mSz.y,1000);
TIm2D<REAL4,REAL8> aTDif(aImDif);
Pt2di anIndex;
for (anIndex.x=0 ; anIndex.x <mSz.x ; anIndex.x++)
{
for (anIndex.y=0 ; anIndex.y <mSz.y ; anIndex.y++)
{
if (mTMasqN.get(anIndex))
{
Pt3dr aPE = mStdN->PtOfIndex(anIndex);
aTDif.oset(anIndex,aNE.SignedDifProf(aPE));
}
}
}
Video_Win * aW = TheWinIm();
if (aW)
{
ELISE_COPY
(
aImDif.all_pts(),
Min(255,Abs(aImDif.in()*300)),
aW->ogray()
);
aW->clik_in();
}
}
示例2: 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()
);
}
示例3: ShowIm2
void ShowIm2(Im2D_INT2 aZ,Video_Win aW)
{
INT zMax,zMin;
ELISE_COPY(aZ.all_pts(),aZ.in(),VMax(zMax)|VMin(zMin));
cout << "Z = [" << zMin << " , " << zMax << "]\n";
ELISE_COPY
(
aZ.all_pts(),
Max(0,Min(255,aZ.in())), // (aZ.in()-zMin) * (255.0/(zMax-zMin)),
aW.ogray()
);
}
示例4:
void cX11_Interface::DrawZoom(const Pt2dr & aPGlob)
{
double aZoom = 10.0;
Pt2dr aPIm = aPGlob- Pt2dr(mAppli->DecRech());
Pt2dr aPMil = Pt2dr(mWZ->sz())/(2.0*aZoom);
Video_Win aWC = mWZ->chc(aPIm-aPMil,Pt2dr(aZoom,aZoom));
ELISE_COPY
(
aWC.all_pts(),
mAppli->ImRechVisu().in(0),
aWC.ogray()
);
aWC.draw_circle_abs(aPIm,4.0,Line_St(aWC.pdisc()(P8COL::blue),3.0));
}
示例5: lena_for_ever
void lena_for_ever()
{
Video_Display Ecr((char *) NULL);
Gray_Pal Pgray (30);
Disc_Pal Pdisc = Disc_Pal::P8COL();
Elise_Set_Of_Palette SOP(newl(Pgray)+Pdisc);
Ecr.load(SOP);
Video_Win W (Ecr,SOP,Pt2di(50,50),Pt2di(SZX,SZY));
Elise_File_Im FLena("../IM_ELISE/lena",2,SXY,GenIm::u_int1,1,0);
Im2D_U_INT1 I(SZX,SZY);
ELISE_COPY
(
W.all_pts(),
FLena.in(),
W.ogray() | I.out()
);
bench_dilate_simple(W,I);
bench_zonec_simple(W,I);
}
示例6: aRes
Im2D_INT2 TestCoxRoy
(
INT aSzV,
Im2D_U_INT1 imG1,
Im2D_U_INT1 imG2,
Pt2di aP0,
Pt2di aP1,
INT aParMin,
INT aParMax
)
{
ElTimer aRoyTimer;
TheP0 = aP0;
Pt2di aSz = aP1 -aP0;
Im2D_INT2 aRes (aSz.x,aSz.y);
TheCorr = new EliseCorrel2D
(
imG1.in(0),
imG2.in(0),
imG1.sz(),
aSzV,
false,
-1,
true,
true
);
Im2D_INT2 aIZMin(aSz.x,aSz.y,(INT2)(aParMin));
Im2D_INT2 aIZMax(aSz.x,aSz.y,(INT2)(aParMax));
cInterfaceCoxRoyAlgo * TheCRA = cInterfaceCoxRoyAlgo::NewOne
(
aSz.x,
aSz.y,
aIZMin.data(),
aIZMax.data(),
false,
false
);
InitCostCoxRoy(*TheCRA);
INT MpdFlow=0;
if (false)
{
cInterfaceCoxAlgo * pSCA = cInterfaceCoxAlgo::StdNewOne
(
aSz,
0,
aParMax-aParMin,
2,
false
);
for (INT anX=aP0.x ; anX<aP1.x ; anX++)
for (INT anY=aP0.y ; anY<aP1.y ; anY++)
for (INT aZ=0 ; aZ<(aParMax-aParMin) ; aZ++)
{
Pt2di aP(anX,anY);
REAL aC = TheCorr->Correl(aP,aP+Pt2di(aZ+aParMin,0));
pSCA->SetCost(Pt3di(anX-aP0.x,anY-aP0.y,aZ),MakeCapa(1-aC));
}
MpdFlow = pSCA->PccMaxFlow();
Im2D_INT2 aSol = pSCA->Sol(0);
Video_Win aW = Video_Win::WStd(aSol.sz(),1.0);
aW.set_title("MPD");
INT aV0,aV1;
ELISE_COPY(aSol.all_pts(),aSol.in(),VMin(aV0)|VMax(aV1));
ELISE_COPY(aSol.all_pts(),(aSol.in()-aV0)*(255.0/(aV1-aV0)),aW.ogray());
delete pSCA;
}
cout << "MPD Flow " << MpdFlow << "\n";
aRoyTimer.reinit();
INT aFl1 = TheCRA->TopMaxFlowStd(aRes.data());
cout << "Roy Time = " << aRoyTimer.uval() << "\n";
ELISE_COPY(aRes.all_pts(),aRes.in(),aRes.out());
{
INT aV0,aV1;
ELISE_COPY(aRes.all_pts(),aRes.in(),VMin(aV0)|VMax(aV1));
cout << "Cox Roy Interv = " << aV0 << " --- " << aV1 << "\n";
}
delete TheCRA;
INT ecartPlani = 2;
INT ecartAlti = 5;
ELISE_COPY
//.........这里部分代码省略.........
示例7: GrShade_main
//.........这里部分代码省略.........
if (aTShade != "u_int1")
Dyn = 100;
bool Done = false;
if ( (aModeOmbre=="CielVu")
|| ((aModeOmbre=="Mixte") && (aVPdsFiltre[0] > 0.0))
)
{
std::cout << "BEGIN CIEL" << endl;
Done = true;
for (int aK=0 ; aK< 2 ; aK++)
{
SPds = 0;
for (int i=0; i<aNbDir; i++)
{
REAL Teta = (2*PI*i) / aNbDir ;
Pt2dr U(cos(Teta),sin(Teta));
Pt2di aDir = Pt2di(U * (aNbDir * 4));
REAL Pds = (1-aPdsAnis) + aPdsAnis *ElSquare(1.0 - euclid(U,Pt2dr(0,1))/2);
if (aK==1)
Pds = (Pds*Dyn) / (2*aSTot);
Symb_FNum Gr = (1-cos(PI/2-atan(gray_level_shading(aMnt.in()))))
*255.0;
cout << "Dir " << i << " Sur " << aNbDir << " P= " << Pds << endl;
SPds += Pds;
if (aK==1)
{
ELISE_COPY
(
line_map_rect(aDir,Pt2di(0,0),aSzIn),
Min(255*Dyn,aShade.in()+Pds*Gr),
aShade.out()
// | (pW ? (pW->ogray()<<(aShade.in()/SPds)) : Output::onul())
| (pW ? (pW->ogray()<<(Gr)) : Output::onul())
);
}
}
aSTot = SPds;
}
double aMul = (aModeOmbre=="Mixte") ? aVPdsFiltre[0] : 1.0;
ELISE_COPY(aShade.all_pts(),aShade.in()*(aMul/SPds),aShade.out());
SPds = aMul;
std::cout << "BEGIN CIEL" << endl;
}
if (
(aModeOmbre=="Local")
|| ((aModeOmbre=="Mixte") && (aVPdsFiltre[1] > 0.0))
)
{
std::cout << "BEGIN LOCAL" << endl;
Done = true;
Fonc_Num aFonc = aMnt.in_proj();
Fonc_Num aMoy = aFonc;
for (int aK=0 ; aK<aNbIterF; aK++)
aMoy = canny_exp_filt(aMoy*aIMasq.in_proj(),aFactExp,aFactExp)
/ Max(0.1,canny_exp_filt(aIMasq.in_proj(),aFactExp,aFactExp));
double aMul = (aModeOmbre=="Mixte") ? aVPdsFiltre[1] : 1.0;
ELISE_COPY
(
rectangle(Pt2di(0,0),aSzIn),
Max(0,Min(255, aShade.in() +(128+(aFonc-aMoy)*aDyn)* aMul)),
aShade.out()
);
SPds += aMul;
示例8: FiltreRemoveBorderHeter
void FiltreRemoveBorderHeter(Im2D_REAL4 anIm,Im2D_U_INT1 aImMasq,double aCostRegul,double aCostTrans)
{
Pt2di aSz = anIm.sz();
double aVMax,aVMin;
ELISE_COPY(aImMasq.border(1),0,aImMasq.out());
ELISE_COPY(aImMasq.all_pts(),aImMasq.in()!=0,aImMasq.out());
ELISE_COPY(anIm.all_pts(),anIm.in(),VMax(aVMax)|VMin(aVMin));
Video_Win * aW = Video_Win::PtrWStd(aSz);
ELISE_COPY(anIm.all_pts(),(anIm.in()-aVMin) * (255.0/(aVMax-aVMin)),aW->ogray());
std::cout << "VMAX " << aVMax << "\n";
//ELISE_COPY(aW->all_pts(),aImMasq.in(),aW->odisc());
//aW->clik_in();
ELISE_COPY
(
aW->all_pts(),
nflag_close_sym(flag_front8(aImMasq.in_proj()!=0)),
aW->out_graph(Line_St(aW->pdisc()(P8COL::red)))
);
cParamFiltreDepthByPrgDyn aParam = StdGetFromSI(Basic_XML_MM_File("DefFiltrPrgDyn.xml"),ParamFiltreDepthByPrgDyn);
aParam.CostTrans() = aCostTrans;
aParam.CostRegul() = aCostRegul;
Im2D_Bits<1> aNewMasq = FiltrageDepthByProgDyn(anIm,aImMasq,aParam);
ELISE_COPY
(
select(aNewMasq.all_pts(),aNewMasq.in()),
2,
aImMasq.out()
);
TIm2D<U_INT1,INT> aTMasq(aImMasq);
FiltrageCardCC(false,aTMasq,2,0,100);
Neighbourhood aNV4=Neighbourhood::v4();
Neigh_Rel aNrV4 (aNV4);
ELISE_COPY
(
conc
(
select(select(aImMasq.all_pts(),aImMasq.in()==1),aNrV4.red_sum(aImMasq.in()==0)),
aImMasq.neigh_test_and_set(aNV4,1,0,256)
),
3,
Output::onul()
);
ELISE_COPY
(
aNewMasq.all_pts(),
aImMasq.in(),
aW->odisc()
);
/*
ELISE_COPY
(
aW->all_pts(),
nflag_close_sym(flag_front8(aNewMasq.in_proj())),
aW->out_graph(Line_St(aW->pdisc()(P8COL::green)))
);
*/
aW->clik_in();
}
示例9: VisuGray
void VisuGray(Video_Win aW,Fonc_Num aFonc)
{
REAL aMax,aMin;
ELISE_COPY(aW.all_pts(),Rconv(aFonc),VMax(aMax)|VMin(aMin));
ELISE_COPY(aW.all_pts(),(aFonc-aMin)*255.0/(aMax-aMin),aW.ogray());
}
示例10: aBoxW
void cElHJaPlan3D::Show
(
Video_Win aW,
INT aCoul,
bool ShowDroite,
bool ShowInterEmpr
)
{
if (aCoul >=0)
ELISE_COPY(aW.all_pts(),aCoul,aW.ogray());
Box2dr aBoxW(Pt2dr(0,0),Pt2dr(aW.sz()));
for (INT aK=0; aK<INT(mVInters.size()) ; aK++)
{
cElHJaDroite * aDr =mVInters[aK];
if (aDr)
{
ElSeg3D aSeg = aDr->Droite();
Pt3dr aQ0 = aSeg.P0();
Pt3dr aQ1 = aSeg.P1();
Pt2dr aP0(aQ0.x,aQ0.y);
Pt2dr aP1(aQ1.x,aQ1.y);
Seg2d aS(aP0,aP1);
Seg2d aSC = aS.clipDroite(aBoxW);
if (ShowDroite && (! aSC.empty()))
{
aW.draw_seg(aSC.p0(),aSC.p1(),aW.pdisc()(P8COL::magenta));
}
}
}
tFullSubGrPl aSGrFul;
if (ShowInterEmpr)
{
for (tItSomGrPl itS=mGr->begin(aSGrFul) ; itS.go_on() ; itS++)
{
aW.draw_circle_loc
(
(*itS).attr().Pt(),
4.0,
aW.pdisc()(P8COL::blue)
);
for (tItArcGrPl itA=(*itS).begin(aSGrFul) ; itA.go_on() ; itA++)
{
tSomGrPl &s1 = (*itA).s1();
tSomGrPl &s2 = (*itA).s2();
if (&s1 < &s2)
{
aW.draw_seg
(
s1.attr().Pt(),
s2.attr().Pt(),
aW.pdisc()(P8COL::black)
);
}
}
}
}
// for (INT aK=0 ; aK<INT(mFacOblig.size()) ; aK++)
// mFacOblig[aK]->Show(PI/2.0,P8COL::cyan,false);
}