-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmain.cpp
More file actions
46 lines (35 loc) · 1.44 KB
/
Copy pathmain.cpp
File metadata and controls
46 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/nonfree/features2d.hpp>
#include <iostream>
#include <algorithm>
#include <functional>
#include <memory>
#include <iterator>
#include "core/fusion_algorithms.hpp"
#include "core/register_algorithms.hpp"
#include "app/imagefusion.hpp"
using namespace cv;
using namespace std;
using namespace std::placeholders;
int main()
{
//pet = transform(pet, 9, -13, 0.97, -0.08, 0.08, 1.06);
//pet = transform(pet, 0, 0, cos(M_PI/4), -sin(M_PI/4), sin(M_PI/4), cos(M_PI/4));
auto available_fusion_names = imagefusion::fusion_strategies();
std::copy(available_fusion_names.begin(),
available_fusion_names.end(),
std::ostream_iterator<std::string>(std::cout, "\n"));
auto available_register_names = imagefusion::register_strategies();
std::copy(available_register_names.begin(),
available_register_names.end(),
std::ostream_iterator<std::string>(std::cout, "\n"));
Mat fused = imagefusion::perform_fusion_from_files("mrit1.jpg", "mrit2.jpg", "mutualinformation", "alphablend");
Mat fused_unregistered = imagefusion::perform_fusion_from_files("mrit1.jpg", "mrit2.jpg", "identity", "alphablend");
imshow("floating image", pet);
imshow("original image", image);
imshow("fused transformed", fused);
imshow("fused unregistered", fused_unregistered);
waitKey(0);
}