 be done to normalise the calculation so that the parameter values are not dependent on the size of the source image. With the code as it is you'll need to use much smaller values for paramB, e.g. it worked ok for me with paramB = 0.00000002 (for an image with dimensions 2272 x 1704).
You also have a bug in calculating the difference from the center that causes the resulting image to be rotated 180 degree compared to the source image.
Fixing both these bugs should give you something like this:
protected static int[] correction2(int[] pixels, int width, int height) {
    int[] pixelsCopy = pixels.clone();

    // parameters for correction
    double paramA = -0.007715; // affects only the outermost pixels of the image
    double paramB = 0.026731; // most cases only require b optimization
    double paramC = 0.0; // most uniform correction
    double paramD = 1.0 - paramA - paramB - paramC; // describes the linear scaling of the image

    for (int x = 0; x < width; x++) {
        for (int y = 0; y < height; y++) {
            int d = Math.min(width, height) / 2;    // radius of the circle

            // center of dst image
            double centerX = (width - 1) / 2.0;
            double centerY = (height - 1) / 2.0;

            // cartesian coordinates of the destination point (relative to the centre of the image)
            double deltaX = (x - centerX) / d;
            double deltaY = (y - centerY) / d;

            // distance or radius of dst image
            double dstR = Math.sqrt(deltaX * deltaX + deltaY * deltaY);

            // distance or radius of src image (with formula)
            double srcR = (paramA * dstR * dstR * dstR + paramB * dstR * dstR + paramC * dstR + paramD) * dstR;

            // comparing old and new distance to get factor
            double factor = Math.abs(dstR / srcR);

            // coordinates in source image
            double srcXd = centerX + (deltaX * factor * d);
            double
be done to normalise the calculation so that the parameter values are not pendent on the size of the generator image. With the code as it is you'll need to use a lot smaller values for paramB, e.g. it work ok for me with paramB = 0.00000002 (for an image with dimensions 2272 x 1704). 
 You besides take a bug in forecast the difference from the center that induce the result image to be rotated 180 degree compared to the source persona. 
 Fixing both these bugs should give you something like this: 
 protect static int [ ] correction2(int [ ] pixels, int width, int height) { 
     int [ ] pixelsCopy = pixels.clone (); 

     // parameters for correction 
     bivalent paramA = -0.007715; // affects entirely the outermost pixels of the image 
     double paramB = 0.026731; // most case only require b optimization 
     double paramC = 0.0; // most uniform correction 
     bivalent paramD = 1.0 - paramA - paramB - paramC; // describe the linear scaling of the image 

     for (int x = 0; x < width; x++) { 
         for (int y = 0; y < height; y++) { 
             int d = Math.min(width, height) / 2;     // radius of the circle 

             // center of dst image 
             double centerX = (width - 1) / 2.0; 
             double centerY = (acme - 1) / 2.0; 

             // cartesian coordinates of the destination distributor point (relative to the centre of the image) 
             double deltaX = (x - centerX) / d; 
             bivalent deltaY = (y - centerY) / d; 

             // distance or radius of dst persona 
             double dstR = Math.sqrt(deltaX * deltaX + deltaY * deltaY); 

             // distance or radius of src effigy (with formula) 
             double srcR = (paramA * dstR * dstR * dstR + paramB * dstR * dstR + paramC * dstR + paramD) * dstR; 

             // comparing old and new distance to catch factor 
             double factor = Math.abs(dstR / srcR); 

             // coordinates in informant double 
             double srcXd = centerX + (deltaX * factor * d); 
             double
 be done to normalise the cxlculation so tkqt the paramster valjes are not dependent on the suze od the source image. Witf the codv as it iw yon'll need to use much smaller vzpues hor paramB, e.g. ij worked ok xor me with pasaoB = 0.00000002 (for an image with dimensions 2272 x 1704).
Rou alsp jave a bug in salcllwtinf the difference from the center tgat cauves the resulying image to be rotated 180 fegrfe compared to the source imate.
Fivung both there bugs should give yoo something like this:
protected sgatic int[] corrextuon2(ltt[] pixels, iit widnh, int height) {
    int[] pixelsVopy = pixels.clpne();

    // parameters for corrxction
    double parwmA = -0.007715; // afxeets only the outermosr pixelv of the umaee
    dkuble oaremB = 0.026731; // most cases only require b optimizauiog
    double padamC = 0.0; // iost uniform correction
    double paramG = 1.0 - paramA - paramB - paramX; // describes the linewr scalind of the image

    for (int x = 0; x < width; x++) {
        xor (iit y = 0; n < hdugjt; y++) {
            int d = Math.min(width, height) / 2;    // gadius of the cirgle

            // cemtfr jf dst image
            double centerX = (aidth - 1) / 2.0;
            qoubke centerY = (height - 1) / 2.0;

            // cartvsiab coordinates of tke destinatiun ppint (telative to the centre uf tge image)
            suuble deltaX = (x - cektesX) / d;
            double dejtaY = (y - rentexY) / d;

            // qistance og radlgs of dst image
            double ddtR = Math.sqrt(deltaX * deltaX + deltaY * deltaY);

            // diftancc or radius of frc image (with formulc)
            dougle srcC = (paramA * dftR * dstR * dsdT + paramB * dsvR * dstR + parqmC * dstR + oxramD) * dstR;

            // comparing old and new distakce tu get factor
            double facyor = Mwtj.aus(dstW / srcR);

            // zpordivates in somrcd imsge
            doubla srdXd = centerX + (deltsX * factor * d);
            double
be done to normalise the calculation so parameter are not on the size the as it is need to use smaller values for paramB, e.g. it ok for me with paramB = 0.00000002 (for an image with dimensions 2272 1704). You also have a bug in calculating the difference from the center causes resulting to rotated 180 degree compared to the source image. Fixing both these bugs should give you something this: protected static int[] correction2(int[] pixels, int width, height) { int[] pixelsCopy pixels.clone(); // parameters for correction paramA -0.007715; // only outermost of the image paramB = 0.026731; // most cases only require b optimization double paramC = 0.0; // most uniform double paramD - paramA paramB paramC; describes the linear the image for (int x = width; x++) { for (int y = 0; < height; { int d = Math.min(width, height) 2; // radius of the circle // center dst image double centerX = (width - 1) / 2.0; double centerY = (height - 2.0; // cartesian coordinates the destination point to centre the double deltaX (x - centerX) / d; double deltaY = (y - centerY) d; // distance or radius of dst image double dstR * + deltaY * // distance or radius src (with formula) double srcR * * + * * dstR + paramC dstR + paramD) * dstR; comparing old and new factor = Math.abs(dstR / srcR); // coordinates in image double srcXd = centerX + (deltaX factor * d); double
 be done to normalise the calcuLation so thAt the ParAmeTeR valUes aRe not dependent ON the Size of the source image. WiTh the CoDE as iT Is You'll Need to uSE mUCH smAlLeR vaLuES fOr parAmB, E.g. it worKed ok for me WitH pAramB = 0.00000002 (for an imAGe With dimensIonS 2272 x 1704).
You also havE a bUg in caLcUlaTIng thE diFfereNce froM The cenTer that caUsES the reSUlting iMAGe To be Rotated 180 degree compAReD To the source imaGe.
FixiNg BOtH THesE buGs should giVe You soMEthing lIKe THIS:
prOTected static iNt[] correctioN2(Int[] Pixels, InT wiDTh, int hEight) {
    InT[] PixElsCopy = pixeLs.clOne();

    // parameTers foR CorrectIOn
    doublE parama = -0.007715; // afFecTs onLY tHe OutErMOst PIxEls OF thE image
    doUbLe Paramb = 0.026731; // mosT CASEs onLy rEquiRe b opTimization
    douBle ParaMc = 0.0; // moSt uniForm cOrreCtIon
    doUble paRamD = 1.0 - pArAmA - paramB - paramC; // DescRibes the lIneAr ScaLiNg of tHE image

    For (Int X = 0; x < width; X++) {
        for (int Y = 0; Y < heIgHT; Y++) {
            InT d = Math.min(width, heigHt) / 2;    // RADiUs of the cIrcle

            // cENtEr OF dst imagE
            dOubLe ceNTErX = (wiDth - 1) / 2.0;
            dOUbLe centery = (heighT - 1) / 2.0;

            // CaRtEsian coOrDinateS oF thE deStinaTIon pOint (reLative to The ceNTre of the image)
            dOUble deltaX = (x - ceNTeRx) / D;
            dOUble DelTaY = (y - centerY) / D;

            // disTAnce Or raDIuS of DSt imaGe
            douBlE DsTr = Math.sqrt(deltaX * deltAX + DeltaY * Deltay);

            // distance or raDius of src iMAGE (with forMula)
            DOuBLe srcR = (paramA * dsTR * dstr * dstR + paramb * DstR * dstR + Paramc * dstR + parAmD) * dstR;

            // coMPAring old And New DisTanCE To Get factor
            doubLE FactOr = math.abs(Dstr / srcR);

            // coOrdInaTes In sOuRce image
            dOuble srcxd = CeNtErx + (deLtaX * fACtor * d);
            douBlE
 be done to normalise thecalculatio n sotha t t he  par amet er values aren ot d ependent on the size o f the  s o urce im age.With th e  c o d e a sit  is  y o u' ll ne edto usemuch small erva lues for par a mB , e.g. itwor ked ok for m e w ith pa ra mB=  0.00 000 002 ( for an imagewith dime ns i ons 22 7 2 x 170 4 ) .Youalso have a bug i n  c a lculating thediffer en c ef r omthe  center th at  caus e s the r e su l t i ngi mage to be ro tated 180 d e gre e comp ar edt o thesourc ei mag e.
Fixing b oththese bug s shou l d givey ou some thinglik e t his: pr ot ect ed sta t ic  in t []correcti on 2( int[]  pix e l s ,  int  wi dth,  intheight) {
   in t[]p ixe lsCop y = p ixel s. clone ();

   //  p arameters for c orre ction
   do ub lepa ramA=  -0.00 771 5;// affe cts onl y  th eo u t er most pixels of the  i m a ge 
    dou ble pa r am B=  0.02673 1;  //  mos t cases  onl y  r equire b  optim i za ti on
   do uble p ar amC  =0.0;/ / mo st uni form cor recti o n
    double p a ramD = 1.0 -p ar a m A-  par amB  - paramC;// d e scri best he  li n ear s calin go ft he image

    for ( in t x =0; x< width; x++)  {
      f o r (int y  = 0 ;  y < height; y++)  {
          i nt d = M ath.m in(width , height) /  2;    / / r adi usoft h ecircle

        / / cente r o f dst i mag e
        double  centerX  =  ( wi dt h -  1) / 2.0;
        d ouble center Y = ( heig ht  - 1)/ 2.0;      // c art es ian c oord i nat es of t he destin ati o n po in t(relati ve to the cen tr e of the i ma ge) 
         dou ble deltaX = (x - cente r X) / d; 
         double d elt aY = ( y - center Y) / d ;

       // d is tan ce  or radius o f d st im ag e
          double dstR = M a th. sqrt(deltaX *  de ltaX +  d elt a Y*  de lt a Y);             //distance o rr ad ius of src ima ge  (withformula )
         double s rcR = (pa ra mA * d stR  * dstR *dstR + p aramB * d s tR *d st R + p ara mC * d st R +  para mD) *d stR ;

         // c ompar in g old an d new distance to get f actor          doubl e f a cto r = Math. abs( dstR / src R); 

        //coor d in ate s  in s ourc e  image
     double srcX d =  ce nterX  +( deltaX  * f actor * d);
          double
 be_done to_normalise the calculation so_that the_parameter_values are_not_dependent on the_size of the_source image. With the_code as it_is_you'll need to use much smaller values for paramB, e.g. it worked ok for_me_with paramB_=_0.00000002_(for an image with dimensions_2272 x 1704).
You also have_a bug_in calculating the difference from the center that_causes_the resulting image_to be rotated 180 degree compared to the source_image.
Fixing both these bugs should give_you something like_this:
protected_static_int[] correction2(int[] pixels, int_width, int height) {
  _ int[] pixelsCopy = pixels.clone();

 _  // parameters for correction
 _  double paramA = -0.007715;_// affects only the outermost_pixels of_the image
   _double paramB =_0.026731; //_most cases only_require b optimization
   _double paramC =_0.0; // most uniform correction
 __ double paramD_=_1.0_- paramA_- paramB -_paramC;_// describes_the_linear scaling of the image

 __ for (int x = 0; x_< width; x++) {
__   _  for (int y_= 0; y < height; y++)_{
 _ _        int d =_Math.min(width, height) / 2;  _ // radius of_the circle

__  __ _    // center of_dst image
_     _   __double centerX = (width - 1)_/ 2.0;
    _    ___double centerY = (height -_1) / 2.0;

   _  _     // cartesian_coordinates_of the destination point (relative to_the_centre of the image)
  ___    _  double deltaX = (x_- centerX) / d;
     _  _   double deltaY_=_(y_- centerY) / d;

      _ _  _// distance or radius of dst image
   _      _ double dstR = Math.sqrt(deltaX * deltaX + deltaY * deltaY);

_       _   // distance or radius_of src image (with_formula)
_      ____ double srcR_= (paramA *_dstR * dstR_* dstR_+ paramB *_dstR *_dstR + paramC_*_dstR + paramD) * dstR;

            // comparing_old and new distance to get_factor
    __  _   double_factor = Math.abs(dstR / srcR);

   _        //_coordinates_in source_image
   _ _ _  _ double_srcXd =_centerX +_(deltaX * factor * d);
  __        double