docs: protected void processLayer(GrayF32 image1 , GrayF32 image2 , GrayF32 derivX2 , GrayF32 derivY2) {
  
  		float w = SOR_RELAXATION;
  		float uf,vf;
  
  		// outer Taylor expansion iterations
  		for( int warp = 0; warp < numWarps; warp++ ) {
  
  			initFlowX.setTo(flowX);
  			initFlowY.setTo(flowY);
  
  			warpImageTaylor(derivX2, initFlowX, initFlowY, warpDeriv2X);
  			warpImageTaylor(derivY2, initFlowX, initFlowY, warpDeriv2Y);
  			warpImageTaylor(image2, initFlowX, initFlowY, warpImage2);
  
  			float error;
  			int iter = 0;
  
  			do {
  				// inner SOR iteration.
  				error = 0;
  
  				// inner portion
  				for( int y = 1; y < image1.height-1; y++ ) {
  					int pixelIndex = y*image1.width+1;
  					for (int x = 1; x < image1.width-1; x++, pixelIndex++ ) {
  						// could speed this up a bit more by precomputing the constant portion before the do-while loop
  						float ui = initFlowX.data[pixelIndex];
  						float vi = initFlowY.data[pixelIndex];
  
  						float u = flowX.data[pixelIndex];
  						float v = flowY.data[pixelIndex];
  
  						float I1 = image1.data[pixelIndex];
  						float I2 = warpImage2.data[pixelIndex];
  
  						float I2x = warpDeriv2X.data[pixelIndex];
  						float I2y = warpDeriv2Y.data[pixelIndex];
  
  						float AU = A(x,y,flowX);
  						float AV = A(x,y,flowY);
  
  						flowX.data[pixelIndex] = uf = (1-w)*u + w*((I1-I2+I2x*ui - I2y*(v-vi))*I2x + alpha2*AU)/(I2x*I2x + alpha2);
  						flowY.data[pixelIndex] = vf = (1-w)*v + w*((I1-I2+I2y*vi - I2x*(uf-ui))*I2y + alpha2*AV)/(I2y*I2y + alpha2);
  
  						error += (uf - u)*(uf - u) + (vf - v)*(vf - v);
  					}
  				}
  
  				// border regions require special treatment
  				int pixelIndex0 = 0;
  				int pixelIndex1 = (image1.height-1)*image1.width;
  				for (int x = 0; x < image1.width; x++ ) {
  					error += iterationSorSafe(image1,x,0,pixelIndex0++);
  					error += iterationSorSafe(image1,x,image1.height-1,pixelIndex1++);
  				}
  
  				pixelIndex0 = image1.width;
  				 pixelIndex1 = image1.width + image1.width-1;
  				for( int y = 1; y < image1.height-1; y++ ) {
  					error += iterationSorSafe(image1,0,y,pixelIndex0);
  					error += iterationSorSafe(image1,image1.width-1,y,pixelIndex1);
  
  					pixelIndex0 += image1.width;
  					pixelIndex1 += image1.width;
  				}
  
  			} while( error > convergeTolerance*image1.width*image1.height && ++iter < maxInnerIterations);
  		}
  	}