StreamingCompareImageFilter does not support std::complex<> value type
Mantis Issue 206, reported by pimbo, assigned to jmichel, created: 2010-11-18
When trying to compare two complex images, compilation failed.
Comparaison between 2 complex values is impossible: min and max values could not be processed.
1294332896 - christopAny code sample to reproduce?
1294335324 - julienmthis code cannot compile :
std::complex a, b; bool comp = (a < b);
line 310 and 314 of otbStreamingCompareImageFilter.txx for example. can we add some vcl_abs at the right places and keep the behavior on real pixel types ? what should happen in the real case with negative values for example ?
1294336250 - julienObviously this filter has not been designed to handle complex types in the first place. Is PSNR compatible with complex types ?
1294378811 - christopWell, obviously, we are not going to fix the mathematical rule... I was more asking for code using the otbStreamingCompareImageFilter to be able to quickly run some test and fix it...
There is no problem for negative values, everything it squared. I guess we could just take the module of the difference in the complex case.
For the PSNR, the definition of the max is ambiguous: is it the max of the image or the max of the defined dynamic? The max-min