MCPcopy Create free account
hub / github.com/CRVI/OpenCLIPP / MulAndScaleSpectrums

Method MulAndScaleSpectrums

C++/programs/ImageProximityFFT.cpp:212–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void 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
228void ImageProximityFFT::Convolve(Image& Source, Image& Template, Image& Dest)
229{

Callers

nothing calls this directly

Calls 6

CheckSameSizeFunction · 0.85
DataTypeMethod · 0.80
NbChannelsMethod · 0.80
StepMethod · 0.80
WidthMethod · 0.80
HeightMethod · 0.80

Tested by

no test coverage detected