1 | initial version |
to cross-correlate same size images:
//FORWARD TRANSFORMS
cv::cuda::dft(image1, G_image1, Size(SIZE,SIZE), DFT_SCALE);
cv::cuda::dft(image2, G_image2, Size(SIZE,SIZE), DFT_SCALE);
//MULTIPLY CONJUGATE
cv::cuda::mulSpectrums(G_image1,G_image2,G_image1,true);
//BACKWARD TRANSFORM
cv::cuda::dft(G_image1,RESULT,Size(SIZE,SIZE),DFT_REAL_OUTPUT | DFT_SCALE);
result in unscaled cross-correlation, to scale between (-1,1):
2 | No.2 Revision |
to cross-correlate same size images:
//FORWARD TRANSFORMS
cv::cuda::dft(image1, G_image1, Size(SIZE,SIZE), DFT_SCALE);
cv::cuda::dft(image2, G_image2, Size(SIZE,SIZE), DFT_SCALE);
//MULTIPLY CONJUGATE
cv::cuda::mulSpectrums(G_image1,G_image2,G_image1,true);
//BACKWARD TRANSFORM
cv::cuda::dft(G_image1,RESULT,Size(SIZE,SIZE),DFT_REAL_OUTPUT | DFT_SCALE);
result in unscaled cross-correlation, to scale between (-1,1):
3 | No.3 Revision |
to cross-correlate same size images:
//FORWARD TRANSFORMS
cv::cuda::dft(image1, G_image1, Size(SIZE,SIZE), DFT_SCALE);
cv::cuda::dft(image2, G_image2, Size(SIZE,SIZE), DFT_SCALE);
//MULTIPLY CONJUGATE
cv::cuda::mulSpectrums(G_image1,G_image2,G_image1,true);
//BACKWARD TRANSFORM
cv::cuda::dft(G_image1,RESULT,Size(SIZE,SIZE),DFT_REAL_OUTPUT | DFT_SCALE);