public void setImageGradient ( D derivX , D derivY ) { InputSanityCheck . checkSameShape ( derivX , derivY ) ; if ( derivX . stride != derivY . stride || derivX . startIndex != derivY . startIndex ) throw new IllegalArgumentException ( "stride and start index must be the same" ) ; savedAngle . reshape ( derivX . width , derivX . height ) ; savedMagnitude . reshape ( derivX . width , derivX . height ) ; imageDerivX . wrap ( derivX ) ; imageDerivY . wrap ( derivY ) ; precomputeAngles ( derivX ) ; }
Sets the gradient and precomputes pixel orientation and magnitude