template<class Src1ArrayT, class Src2ArrayT>
Definition at line 17 of file Diff.h. References ILOG_ERROR, ILOG_FUNCTION, Impala::Core::Array::Trait::BpoTestEqual< DstArrayT, Src1ArrayT, Src2ArrayT >::mNr, Impala::Core::Array::Trait::BpoTestEqual< DstArrayT, Src1ArrayT, Src2ArrayT >::mNrDiff, Impala::Core::Array::Trait::BpoTestEqual< DstArrayT, Src1ArrayT, Src2ArrayT >::mSumDiff, Impala::Core::Array::Trait::BpoTestEqual< DstArrayT, Src1ArrayT, Src2ArrayT >::mSumSrc1, Impala::Core::Array::Trait::BpoTestEqual< DstArrayT, Src1ArrayT, Src2ArrayT >::mSumSrc2, and Impala::Core::Array::Pattern::PatBinaryPixOp(). 00018 { 00019 ILOG_FUNCTION(Impala.Core.Array.Diff); 00020 if (src1->CW() != src2->CW()) 00021 { 00022 ILOG_ERROR("Width differs: " << src1->CW() << " vs " << src2->CW()); 00023 return 1; 00024 } 00025 if (src1->CH() != src2->CH()) 00026 { 00027 ILOG_ERROR("Height differs: " << src1->CH() << " vs " << src2->CH()); 00028 return 1; 00029 } 00030 Trait::BpoTestEqual<Src1ArrayT, Src1ArrayT, Src2ArrayT> bpo(epsilon); 00031 Src1ArrayT* tmp = 0; 00032 Pattern::PatBinaryPixOp(tmp, src1, src2, bpo); 00033 delete tmp; 00034 if (bpo.mNrDiff > 0) 00035 { 00036 ILOG_ERROR("Found " << bpo.mNrDiff << " differences, in " 00037 << bpo.mNr << " pixels, sum diffs : " << bpo.mSumDiff 00038 << " avg diff : " << bpo.mSumDiff / bpo.mNrDiff 00039 << " avg src1 : " << bpo.mSumSrc1 / bpo.mNr 00040 << " avg src2 : " << bpo.mSumSrc2 / bpo.mNr); 00041 } 00042 return bpo.mNrDiff; 00043 }
Here is the call graph for this function:
|