Hello , I use otbStreamingCompareImageFilter to compare two images.
But I have problem when I use GetPSNR() and GetMSE() both of output is
1.79769e+308 (I think PSNR result is ... DB %).
My code.
typedef otb::PersistentCompareImageFilter<ImageType> CompareImageType;
ReaderType::Pointer movingReader = ReaderType::New();
movingReader->SetFileName("images.jpg");
movingReader->Update();
ImageType::Pointer o_image = movingReader->GetOutput();
ReaderType::Pointer movingReader2 = ReaderType::New();
movingReader2->SetFileName("images2.jpg");
movingReader2->Update();
ImageType::Pointer u_image = movingReader2->GetOutput();
CompareImageType::Pointer compareFilter = CompareImageType::New();
compareFilter->SetInput1(o_image);
compareFilter->SetInput2(u_image);
compareFilter->Update();
cout << "MSE of two images" << compareFilter->GetMSE()<< endl;
cout << "PSNR of two images" << compareFilter->GetPSNR()<< endl;
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.