本文整理汇总了C++中Video_Win类的典型用法代码示例。如果您正苦于以下问题:C++ Video_Win类的具体用法?C++ Video_Win怎么用?C++ Video_Win使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Video_Win类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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();
}
开发者ID:rpankka,项目名称:micmac,代码行数:60,代码来源:dequantif.cpp
示例2: aImDif
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();
}
}
开发者ID:,项目名称:,代码行数:30,代码来源:
示例3: aPCase
cCaseNamePoint * cX11_Interface::GetIndexNamePoint()
{
Video_Win aW = mMenuNamePoint->W();
aW.raise();
for (int aK=0 ; aK<int(mVNameCase.size()) ; aK++)
{
int aGr = (aK%2) ? 255 : 200 ;
Pt2di aPCase(0,aK);
mMenuNamePoint->ColorieCase(aPCase,aW.prgb()(aGr,aGr,aGr),1);
cCaseNamePoint & aCNP = mVNameCase[aK];
mMenuNamePoint->StringCase(aPCase,aCNP.mFree ? aCNP.mName : "***" ,true);
}
Clik aClk = aW.clik_in();
//aW.lower();
Pt2di aKse = mMenuNamePoint->Pt2Case(Pt2di(aClk._pt));
cCaseNamePoint * aRes = &(mVNameCase[aKse.y]);
//cout << aRes->mName << " Type " << aRes->mTCP << endl;
if (! aRes->mFree) return 0;
return aRes;
}
开发者ID:,项目名称:,代码行数:27,代码来源:
示例4: Show
void cElHJaFacette::Show(REAL aDirH,INT aCoul,bool WithBox)
{
Video_Win aW = *(mPlan->W());
aW.hach(mVPt,Pt2dr::FromPolar(1.0,aDirH),3.0,aW.pdisc()(aCoul));
if (WithBox)
{
aW.draw_rect(mBox._p0,mBox._p1,aW.pdisc()(aCoul));
}
}
开发者ID:jakexie,项目名称:micmac,代码行数:9,代码来源:cElHJaFacette.cpp
示例5: PtrWStd
Video_Win Video_Win::WStd(Pt2di sz,REAL zoom,bool all_pal,bool SetClikCoord)
{
Video_Win * aPW = PtrWStd(Pt2di(Pt2dr(sz)*zoom),all_pal);
Video_Win aRes = aPW->chc(Pt2dr(-0.5,-0.5),Pt2dr(zoom,zoom),SetClikCoord);
delete aPW;
return aRes;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:9,代码来源:out_general.cpp
示例6: ShowPoint
void cAppliOptimTriplet::ShowPoint(cImOfTriplet * aIm,Pt2df aP,int aCoul,int aRay)
{
Video_Win * aW = aIm->W();
if (aW)
{
Pt2dr aPr(aP.x,aP.y);
aPr = aIm->Im()->CS()->R3toF2(PZ1(aPr));
aW->draw_circle_abs(aPr,aRay,Line_St(aW->pdisc()(aCoul)));
}
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:10,代码来源:cNewO_OptimTriplet.cpp
示例7: ElMin
Output Video_Win::WiewAv(Pt2di sz,Pt2di szmax)
{
REAL zoom = ElMin(szmax.x/(REAL)sz.x,szmax.y/(REAL)sz.y);
Video_Win res = WStd(sz,zoom,false);
Video_Win w0 = res.chc(Pt2dr(0,0),Pt2dr(1,1));
ELISE_COPY(w0.all_pts(),P8COL::black,w0.odisc());
return res.odisc() << (int) P8COL::red;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:10,代码来源:out_general.cpp
示例8: REAL
void cEtalonnage::TestVisuFTM()
{
INT aSzPh = 4100;
INT aSz = 800;
REAL aZ = aSz / REAL(aSzPh);
Video_Win aW = Video_Win::WStd(Pt2di(aSzPh,aSzPh),aZ);
std::vector<std::string> mVNames = mParam.AllImagesCibles();
for
(
std::vector<string>::const_iterator iTN = mVNames.begin();
iTN != mVNames.end();
iTN++
)
{
std::string aName = NamePointeResult(*iTN,false,true);
cout << aName << "\n";
ELISE_fp aFile(aName.c_str(),ELISE_fp::READ);
string buf;
bool GotEOF = false;
while (! GotEOF)
{
//aFile.fgets(buf,NbBuf,GotEOF,false);
aFile.fgets(buf,GotEOF);
if (GotEOF)
{
}
if ((!GotEOF) && (buf[0] != '#'))
{
INT anId;
REAL anX,anY,aL;
sscanf(buf.c_str(),"%d %lf %lf %lf",&anId,&anX,&anY,&aL);
if (anId>=0)
{
INT aCoul = P8COL::red;
if (aL > 1.0) aCoul = P8COL::blue;
if (aL > 1.5) aCoul = P8COL::green;
aW.draw_circle_abs
(
Pt2dr(anX,anY),
aL*10.0,
aW.pdisc()(aCoul)
);
}
}
}
}
getchar();
}
开发者ID:archeos,项目名称:micmac-archeos,代码行数:53,代码来源:VisuFtm.cpp
示例9: 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()
);
}
开发者ID:jakexie,项目名称:micmac,代码行数:12,代码来源:b_0_48_2.cpp
示例10: PutFileText
void PutFileText(Video_Win aW,const std::string & aName)
{
ELISE_fp aFile (aName.c_str(),ELISE_fp::READ);
int aCpt=0;
char * aCstr = 0;
while ((aCstr = aFile.std_fgets()))
{
aW.fixed_string(Pt2dr(10,15*aCpt +20),aCstr,aW.pdisc()(P8COL::black),true);
aCpt++;
}
aFile.close();
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:14,代码来源:Extern_Vino.cpp
示例11: BenchRoy
void BenchRoy()
{
REAL aV0,aV1;
INT ParMin = -25;
INT ParMax = 25;
Pt2di aP0 =ImCox ? Pt2di(350,300) :Pt2di(20,20);
Pt2di aP1 =ImCox ? Pt2di(470,450) :Pt2di(SzI.x-20,SzI.y-20);
Im2D_U_INT1 aI2 = Im1();
Im2D_REAL4 XPar = XParalaxe();
Im2D_U_INT1 aI1 = Im2(aI2,XPar);
// Revert(aI2); Revert(aI1);
if (Visu)
{
Video_Win aWParX = Video_Win::WStd(aI1.sz(),1);
aWParX.set_title("ParX Vraie");
VisuParalx(aWParX,XPar.in(),aV0,aV1,true);
}
Im2D_INT2 aRes =
TestCoxRoy
(
2,
aI1,
aI2,
aP0,
aP1,
ParMin,
ParMax
);
if (Visu)
{
Fonc_Num FRes = trans(aRes.in(0),-aP0);
Video_Win aWParX = Video_Win::WStd(aI1.sz(),1);
aWParX.set_title("ParX Calc");
VisuParalx(aWParX,FRes,aV0,aV1,false);
}
}
开发者ID:jakexie,项目名称:micmac,代码行数:49,代码来源:b_0_48_2.cpp
示例12: Pt2dr
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));
}
开发者ID:,项目名称:,代码行数:17,代码来源:
示例13: bench_delaunay
void bench_delaunay()
{
Pt2di sz (950,950);
Disc_Pal Pdisc = Disc_Pal::P8COL();
Elise_Set_Of_Palette SOP(NewLElPal(Pdisc));
Video_Display Ecr((char *) NULL);
Ecr.load(SOP);
Video_Win W (Ecr,SOP,Pt2di(50,50),sz);
for (INT nb = 100; nb < 500 ; nb +=50)
{
std::list<PtDelTest> L;
ElFilo<PtDelTest> Pts;
for (INT k= 0; k< nb; k++)
{
PtDelTest pt
(
(INT)( 10 + (sz.x -20) * NRrandom3()),
(INT)( 10 + (sz.y -20) * NRrandom3())
);
// Pts.pushlast(pt);
L.push_back(pt);
//W.draw_circle_loc(pt.pt(),4,Pdisc(P8COL::red));
W.draw_circle_loc(Pt2dr(pt.pt()),4,Pdisc(P8COL::red)); // __NEW
}
DelTestAct Act(W);
Delaunay_Mediatrice
(
L.begin(),
L.end(),
Pt_of_DPT,
Act,
200.0,
(PtDelTest *) 0
);
// W.clik_in();
W.clear();
}
}
开发者ID:jakexie,项目名称:micmac,代码行数:45,代码来源:b_0_43.cpp
示例14: Pgr
Video_Win * Video_Win::PtrWStd(Pt2di sz,bool all_pal,const Pt2dr & aScale)
{
Disc_Pal Pdisc = Disc_Pal::PNCOL();
Gray_Pal Pgr (30);
Circ_Pal Pcirc = Circ_Pal::PCIRC6(30);
RGB_Pal Prgb (2,2,2);
Elise_Set_Of_Palette SOP(NewLElPal(Pdisc)+Elise_Palette(Pgr)+Elise_Palette(Prgb)+Elise_Palette(Pcirc));
if (! all_pal)
SOP = Elise_Set_Of_Palette (NewLElPal(Pdisc));
Video_Display Ecr((char *) NULL);
Ecr.load(SOP);
Video_Win * aRes = new Video_Win (Ecr,SOP,Pt2di(50,50),sz);
aRes = aRes->PtrChc(Pt2dr(0,0),aScale);
return aRes;
}
开发者ID:xialang2012,项目名称:micmac-archeos,代码行数:18,代码来源:out_general.cpp
示例15: 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()
);
}
开发者ID:jakexie,项目名称:micmac,代码行数:14,代码来源:b_0_48_1.cpp
示例16: TestXmlX11
void TestXmlX11()
{
Video_Win aW = Video_Win::WStd(Pt2di(700,800),1.0);
cElXMLTree aFullTreeParam("EnvVino.xml");
cWXXVinoSelector aSelector("FXDiv10.tif");
cElXMLTree aFilter("FilterVino.xml");
cWindowXmlEditor aWX(aW,true,aFullTreeParam.Fils().front(),&aSelector,&aFilter);
// cWXXTreeSelector aSelId;
aWX.TopDraw();
aWX.Interact();
aW.clear(); aW.clik_in();
aWX.TopDraw();
aWX.Interact();
aFullTreeParam.StdShow("SORTIE.xml");
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:24,代码来源:Extern_XmlX11.cpp
示例17: 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);
}
开发者ID:liminlu0314,项目名称:micmac,代码行数:24,代码来源:morpho.cpp
示例18: TheWinIm
void cASAMG::ComputeSubset(int aNbPts,cResumNuage & aRN)
{
Video_Win * aW = mAppli->Param().VisuLowPts().Val() ? TheWinIm() : 0;
double aSzCel = sqrt(double(mSz.x*mSz.y)/aNbPts);
Pt2di aNb2C = round_up(Pt2dr(mSz)/aSzCel);
Pt2di aPK;
Im2D_U_INT1 anImDist(mSz.x,mSz.y);
TIm2D<U_INT1,INT> aTDist(anImDist);
ELISE_COPY(mMasqN.all_pts(),mMasqN.in(),anImDist.out());
Chamfer::d32.im_dist(anImDist);
if (aW)
{
ELISE_COPY(anImDist.all_pts(),mStdN->ImDef().in()!=0,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>0),P8COL::blue,aW->odisc());
ELISE_COPY(select(anImDist.all_pts(),anImDist.in()>10),P8COL::yellow,aW->odisc());
}
int aNbSomTot = 0;
std::vector<Pt2di> aVPts;
std::vector<int> aVNb;
for (aPK.x=0 ; aPK.x<aNb2C.x ; aPK.x++)
{
Pt2di aP0,aP1;
aP0.x = (aPK.x*mSz.x) / aNb2C.x;
aP1.x = ((aPK.x+1)*mSz.x) / aNb2C.x;
for (aPK.y=0 ; aPK.y<aNb2C.y ; aPK.y++)
{
aP0.y = (aPK.y*mSz.y) / aNb2C.y;
aP1.y = ((aPK.y+1)*mSz.y) / aNb2C.y;
Pt2di aP;
Pt2dr aPMoy(0,0);
int aNbSom=0;
if (aW)
{
aW->draw_rect(Pt2dr(aP0),Pt2dr(aP1),Line_St(aW->pdisc()(P8COL::green)));
}
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
aPMoy = aPMoy + Pt2dr(aP);
aNbSom++;
}
}
}
if (aNbSom>0)
{
aPMoy = aPMoy/double(aNbSom);
double aDBest = 1e10;
Pt2di aPBest(0,0);
for (aP.x=aP0.x; aP.x<aP1.x ; aP.x++)
{
for (aP.y=aP0.y; aP.y<aP1.y ; aP.y++)
{
if (mTMasqN.get(aP))
{
double aDist = euclid(Pt2dr(aP),aPMoy) - std::min(6,aTDist.get(aP))/1.8;
if (aDist<aDBest)
{
aDBest = aDist;
aPBest = aP;
}
}
}
}
aVPts.push_back(aPBest);
aVNb.push_back(aNbSom);
/*
cLinkPtFuNu aPF(aPBest.x,aPBest.y,aNbSom);
aVPTR.push_back(aPF);
*/
aNbSomTot += aNbSom;
if (aW)
{
aW->draw_circle_abs(Pt2dr(aPBest),3.0,aW->pdisc()(P8COL::red));
}
}
}
}
aRN.Reset(aVPts.size());
aRN.mNbSom = aNbSomTot;
for (int aK=0 ; aK<int(aVPts.size()); aK++)
{
aRN.mVX.push_back(aVPts[aK].x);
aRN.mVY.push_back(aVPts[aK].y);
aRN.mVNb.push_back(aVNb[aK]);
}
if (aW)
//.........这里部分代码省略.........
开发者ID:,项目名称:,代码行数:101,代码来源:
示例19: Video_Win
void cImOfTriplet::InitW(const Pt2dr & aSzMax)
{
mW = new Video_Win (Video_Win::LoadTiffWSzMax(mIm->Name(),aSzMax,mZoomW));
mW->set_title(mIm->Name().c_str());
}
开发者ID:jakexie,项目名称:micmac-archeos,代码行数:5,代码来源:cNewO_OptimTriplet.cpp
示例20: InitNbWindows
void cX11_Interface::Init()
{
//SetImagesPriority(0,);
InitNbWindows();
Pt2di aSzF = mParam->SectionWindows().SzTotIm().Val().dcbyc(mNb2W);;
int aCpt=0;
Video_Win * aLastW = 0;
Video_Win * aLastWX0 = 0;
Video_Win * aWTitle = 0;
Video_Win * aWY0XMax = 0;
Pt2di aSzTitle(aSzF.x,15);
for (int aKY =0 ; aKY<mNb2W.y ; aKY++)
{
for (int aKX =0 ; aKX<mNb2W.x ; aKX++)
{
if (aCpt<mNbW)
{
Video_Win * aRes = 0;
if (aCpt==0)
{
aWTitle = Video_Win::PtrWStd(aSzTitle,true);
aRes = new Video_Win(*aWTitle,Video_Win::eBasG,aSzF);
// aRes = Video_Win::PtrWStd(aSzF,true);
aLastWX0 = aRes;
mDisp = new Video_Display(aRes->disp());
}
else
{
if (aKX==0)
{
aWTitle = new Video_Win(*aLastWX0,Video_Win::eBasG,aSzTitle);
aRes = new Video_Win(*aWTitle,Video_Win::eBasG,aSzF);
aLastWX0 = aRes;
}
else
{
aWTitle = new Video_Win(*aLastW,Video_Win::eDroiteH,aSzTitle);
aRes = new Video_Win(*aWTitle,Video_Win::eBasG,aSzF);
}
}
ELISE_COPY(aWTitle->all_pts(),P8COL::yellow,aWTitle->odisc());
ELISE_COPY(aRes->all_pts(),P8COL::blue,aRes->odisc());
aLastW = aWTitle;
mWins.push_back(new cWinIm(*mAppli,*aRes,*aWTitle,*mAppli->imageVis(aCpt)));
if ((aKY==0) && (aKX==(mNb2W.x -1)))
{
aWY0XMax = aWTitle;
}
}
aCpt++;
}
}
Pt2di zoomWindowSize = mParam->SectionWindows().SzWZ().ValWithDef(round_ni(Pt2dr(mParam->SzTotIm().Val())*0.6));
mWZ = new Video_Win(*aWY0XMax,Video_Win::eDroiteH, zoomWindowSize);
mZFON = new cFenOuiNon(*mWZ,Pt2di(200,20));
mVNameCase.push_back( cCaseNamePoint("Cancel",eCaseCancel) );
if (mParam->EnterName().Val())
{
mVNameCase.push_back( cCaseNamePoint("Enter New",eCaseSaisie) );
}
InitVNameCase();
mMenuNamePoint = new cFenMenu(*mWZ,Pt2di(120,20),Pt2di(1,mVNameCase.size()));
if (mParam->EnterName().Val())
{
mWEnter = new Video_Win(mMenuNamePoint->W(),Video_Win::eDroiteH,Pt2di(150,20));
mWEnter->move_translate(Pt2di(0,20));
ELISE_COPY(mWEnter->all_pts(),P8COL::yellow,mWEnter->odisc());
//mWEnter->move_to(Pt2di(100,20));
mWEnter->lower();
}
ELISE_COPY(mWZ->all_pts(),P8COL::green,mWZ->odisc());
}
开发者ID:,项目名称:,代码行数:84,代码来源:
注:本文中的Video_Win类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论