Example #1
0
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();
}