Request for Changes-47: Improve the CompareImages app
From OTBWiki
Contents
[Request for Changes - 47] Improve the CompareImages app
Status
- Author: Mickaël Savinaud
- Submitted on 28.06.2016
- Proposed target release : 5.6
- Adopted : +3 from Julien, Rémi, Guillaume
- Merged : 1ffa7b13f2bb02a54d628b06ea469a3dda77f869
- Data Branch [1]
Summary
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.
Rationale
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.
Applications
M Modules/Applications/AppImageUtils/app/otbCompareImages.cxx
Add the output parameter
Tests
M Modules/Filtering/Statistics/test/otbStreamingCompareImageFilter.cxx
Test Data have been updated.
Documentation
N/A
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.