Request for Changes-47: Improve the CompareImages app

From OTBWiki
Jump to: navigation, search

[Request for Changes - 47] Improve the CompareImages app



The CompareImages application didn't indicate the number of pixels which are different. I proposed with this RFC to add this output parameter to the application.


If you have a difference in a an image, it is interesting to know how many pixel are different.

Implementation details

Classes and files

M       Modules/Filtering/Statistics/include/otbStreamingCompareImageFilter.h
M       Modules/Filtering/Statistics/include/otbStreamingCompareImageFilter.txx

Modify the API to provide the number of pixel which are different. Modify the computation of difference to increment a counter when we have a diff.


M       Modules/Applications/AppImageUtils/app/otbCompareImages.cxx

Add the output parameter


M      Modules/Filtering/Statistics/test/otbStreamingCompareImageFilter.cxx

Test Data have been updated.



Additional notes

I have used to compare two float the method provided by ITKMath.h, it could be interesting to use this method everywhere we do comparison.