calculate covariance's image on cuda

Hello, i would like to ask you how can i calculate the covariance of an image on cuda and thak you in advance

I suppose with ‘covariance image’ you mean calculating the covariance matrix. A quick google gives e.g. matrix - Parallel computation of big covariance matrices - Computational Science Stack Exchange