public override IObservable <TArray> Process <TArray>(IObservable <TArray> source) { var outputFactory = ArrFactory <TArray> .TemplateSizeFactory; var inputFactory = ArrFactory <TArray> .TemplateSizeChannelFactory; return(source.Select(input => { var output = outputFactory(input, Depth.F32, 2); if (input.ElementType != output.ElementType) { var temp = inputFactory(input, Depth.F32); CV.Convert(input, temp); input = temp; } CV.DFT(input, output, OperationFlags, 0); return output; })); }