| 210 | } |
| 211 | |
| 212 | void ImageProximityFFT::MulAndScaleSpectrums(Image& Source, Image& Template, Image& Dest, float scale) |
| 213 | { |
| 214 | CheckSameSize(Source, Template); |
| 215 | CheckSameSize(Source, Dest); |
| 216 | |
| 217 | // Verify image types |
| 218 | if (Source.DataType() != SImage::F32 || Template.DataType() != SImage::F32 || Dest.DataType() != SImage::F32) |
| 219 | throw cl::Error(CL_IMAGE_FORMAT_NOT_SUPPORTED, "The function works only with F32 images"); |
| 220 | |
| 221 | // Verify image types |
| 222 | if (Source.NbChannels() != 2 || Template.NbChannels() != 2 || Dest.NbChannels() != 2) |
| 223 | throw cl::Error(CL_IMAGE_FORMAT_NOT_SUPPORTED, "The function works only with 2 channel images"); |
| 224 | |
| 225 | Kernel(mulAndScaleSpectrums, Source, Template, Dest, Source.Step(), Template.Step(), Dest.Step(), Source.Width(), Source.Height(), scale); |
| 226 | } |
| 227 | |
| 228 | void ImageProximityFFT::Convolve(Image& Source, Image& Template, Image& Dest) |
| 229 | { |
nothing calls this directly
no test coverage detected