├── Advanced Edge Detection ├── README.md ├── Source.cpp └── tulips.png ├── Colour Segmentation ├── .vs │ └── Colour Segmentation │ │ └── v14 │ │ └── .suo ├── Colour Segmentation.VC.db ├── Colour Segmentation.sln ├── Colour Segmentation │ ├── Colour Segmentation.vcxproj │ ├── Colour Segmentation.vcxproj.filters │ ├── Debug │ │ ├── Colour S.E6C285F0.tlog │ │ │ ├── CL.command.1.tlog │ │ │ ├── CL.read.1.tlog │ │ │ ├── CL.write.1.tlog │ │ │ ├── Colour Segmentation.lastbuildstate │ │ │ ├── link.command.1.tlog │ │ │ ├── link.read.1.tlog │ │ │ └── link.write.1.tlog │ │ ├── Colour Segmentation.Build.CppClean.log │ │ ├── Colour Segmentation.log │ │ ├── Source.obj │ │ ├── vc140.idb │ │ └── vc140.pdb │ ├── Source.cpp │ ├── drawing.jpg │ ├── hand.png │ └── segmented_img.jpg └── Debug │ ├── Colour Segmentation.exe │ ├── Colour Segmentation.ilk │ └── Colour Segmentation.pdb ├── Colour Transfer ├── .vs │ └── Colour Transfer │ │ └── v14 │ │ └── .suo ├── Colour Transfer.VC.db ├── Colour Transfer.sln ├── Colour Transfer │ ├── Colour Transfer.vcxproj │ ├── Colour Transfer.vcxproj.filters │ ├── Debug │ │ ├── Colour Transfer.log │ │ ├── Colour Transfer.tlog │ │ │ ├── CL.command.1.tlog │ │ │ ├── CL.read.1.tlog │ │ │ ├── CL.write.1.tlog │ │ │ ├── Colour Transfer.lastbuildstate │ │ │ ├── link.command.1.tlog │ │ │ ├── link.read.1.tlog │ │ │ └── link.write.1.tlog │ │ ├── Source.obj │ │ ├── vc140.idb │ │ └── vc140.pdb │ ├── Source.cpp │ ├── clock_tower.jpg │ ├── clock_tower_2.jpg │ └── paint.jpg └── Debug │ ├── Colour Transfer.exe │ ├── Colour Transfer.ilk │ └── Colour Transfer.pdb ├── Contrast Enhancement ├── README.md └── Source.cpp ├── Edge Detection ├── README.md ├── Source.cpp └── tulips.png ├── Gamma Correction and White Balance ├── enhance.cpp └── godfather.png ├── Harris Corner Detector ├── .vs │ └── Harris Corner Detector │ │ └── v14 │ │ └── .suo ├── Debug │ ├── Harris Corner Detector.exe │ ├── Harris Corner Detector.ilk │ └── Harris Corner Detector.pdb ├── Harris Corner Detector.VC.db ├── Harris Corner Detector.sln └── Harris Corner Detector │ ├── Debug │ ├── Harris C.75F5C99F.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── Harris Corner Detector.lastbuildstate │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ └── link.write.1.tlog │ ├── Harris Corner Detector.log │ ├── Source.obj │ ├── vc140.idb │ └── vc140.pdb │ ├── Harris Corner Detector.vcxproj │ ├── Harris Corner Detector.vcxproj.filters │ ├── Source.cpp │ ├── Thumbs.db │ ├── corner_detection_test.jpg │ └── x64 │ └── Debug │ ├── Harris C.75F5C99F.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── Harris Corner Detector.lastbuildstate │ ├── link.command.1.tlog │ ├── link.read.1.tlog │ ├── link.write.1.tlog │ └── unsuccessfulbuild │ ├── Harris Corner Detector.log │ ├── Source.obj │ ├── vc140.idb │ └── vc140.pdb ├── Histogram Equalization ├── README.md ├── Source.cpp ├── Thumbs.db ├── image.jpg └── lena_gray.jpg ├── Image Loading and Data ├── Haze6.jpg ├── README.md ├── Source.cpp └── Thumbs.db ├── Image Sharpening ├── README.md └── Source.cpp ├── Image Smoothing ├── README.md ├── Source.cpp ├── Thumbs.db └── lena_impulse_noise.jpg ├── Image Stitching ├── .vs │ └── Image Stitching │ │ └── v14 │ │ └── .suo ├── Debug │ ├── Image Stitching.exe │ ├── Image Stitching.ilk │ └── Image Stitching.pdb ├── Image Stitching.VC.db ├── Image Stitching.sln └── Image Stitching │ ├── Debug │ ├── Image Stitching.log │ ├── Image Stitching.tlog │ │ ├── CL.command.1.tlog │ │ ├── CL.read.1.tlog │ │ ├── CL.write.1.tlog │ │ ├── Image Stitching.lastbuildstate │ │ ├── link.command.1.tlog │ │ ├── link.read.1.tlog │ │ └── link.write.1.tlog │ ├── Source.obj │ ├── vc140.idb │ └── vc140.pdb │ ├── Image Stitching.vcxproj │ ├── Image Stitching.vcxproj.filters │ ├── Image Stitching.vcxproj.user │ ├── ORB_BruteForce-Hamming(2).yml │ ├── ORB_BruteForce-Hamming.yml │ ├── ORB_BruteForce-L1.yml │ ├── ORB_BruteForce.yml │ ├── Source.cpp │ ├── photos │ ├── Ryerson-left.jpg │ └── Ryerson-right.jpg │ └── x64 │ └── Debug │ ├── Image Stitching.log │ ├── Image Stitching.tlog │ ├── CL.command.1.tlog │ ├── CL.read.1.tlog │ ├── CL.write.1.tlog │ ├── Image Stitching.lastbuildstate │ ├── link.command.1.tlog │ ├── link.read.1.tlog │ ├── link.write.1.tlog │ └── unsuccessfulbuild │ ├── Source.obj │ ├── vc140.idb │ └── vc140.pdb ├── OpenCV_3_1_property_sheet.props ├── Point Operations on Digital Images ├── README.md ├── Source.cpp ├── Thumbs.db ├── image.jpg └── rgb_squares.png ├── README.md └── Seam-Carving ├── README.md └── Source.cpp /Advanced Edge Detection/README.md: -------------------------------------------------------------------------------- 1 | # Advanced-Edge-Detection 2 | 3 | Edge detection using the Canny edge detector 4 | -------------------------------------------------------------------------------- /Advanced Edge Detection/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace cv; 7 | using namespace std; 8 | 9 | int main() 10 | { 11 | Mat img = imread("tulips.png"); 12 | Mat blur, imgLaplacian, imgCanny; 13 | vector rgbColourEdges(3); 14 | 15 | // Smooth the image to reduce noise for more accurate edge detection 16 | GaussianBlur(img.clone(), blur, Size(3, 3), 0, 0, BORDER_DEFAULT); 17 | 18 | // Now for colour edge detection 19 | vector channels(3); 20 | split(blur.clone(), channels); 21 | double T = 20; 22 | double maxval = 255; 23 | for (int i = 0; i < 3; i++) 24 | { 25 | // Compute the second-order derivate i.e Laplacian operator 26 | Laplacian(blur.clone(), rgbColourEdges[i], CV_32F); 27 | convertScaleAbs(rgbColourEdges[i], rgbColourEdges[i]); 28 | 29 | threshold(rgbColourEdges[i], rgbColourEdges[i], T, maxval, THRESH_BINARY); 30 | 31 | } 32 | 33 | // Logical operation to between colour channels 34 | Mat tempEdges; 35 | cv::bitwise_or(rgbColourEdges[0], rgbColourEdges[1], tempEdges); 36 | cv::bitwise_or(tempEdges, rgbColourEdges[2], imgLaplacian); 37 | 38 | // Convert pixel type for display 39 | imgLaplacian.convertTo(imgLaplacian, CV_8U); 40 | 41 | // Apply the Canny Edge Detection algorithm 42 | Canny(img.clone(), imgCanny, 200, 230); 43 | 44 | imshow("Original Image", img); 45 | imshow("Laplacian Edges", imgLaplacian); 46 | imshow("Canny Edges", imgCanny); 47 | 48 | imwrite("Laplacian_T40.jpg", imgLaplacian); 49 | imwrite("Canny_T1_200_T2_230.jpg", imgCanny); 50 | 51 | waitKey(0); 52 | return 0; 53 | } -------------------------------------------------------------------------------- /Advanced Edge Detection/tulips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Advanced Edge Detection/tulips.png -------------------------------------------------------------------------------- /Colour Segmentation/.vs/Colour Segmentation/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/.vs/Colour Segmentation/v14/.suo -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation.VC.db -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Colour Segmentation", "Colour Segmentation\Colour Segmentation.vcxproj", "{E6C285F0-442C-45B0-B45B-FC1647B634FE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Debug|x64.ActiveCfg = Debug|x64 17 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Debug|x64.Build.0 = Debug|x64 18 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Debug|x86.ActiveCfg = Debug|Win32 19 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Debug|x86.Build.0 = Debug|Win32 20 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Release|x64.ActiveCfg = Release|x64 21 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Release|x64.Build.0 = Release|x64 22 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Release|x86.ActiveCfg = Release|Win32 23 | {E6C285F0-442C-45B0-B45B-FC1647B634FE}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Colour Segmentation.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {E6C285F0-442C-45B0-B45B-FC1647B634FE} 23 | Win32Proj 24 | ColourSegmentation 25 | 8.1 26 | 27 | 28 | 29 | Application 30 | true 31 | v140 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v140 38 | true 39 | Unicode 40 | 41 | 42 | Application 43 | true 44 | v140 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v140 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | true 78 | 79 | 80 | false 81 | 82 | 83 | false 84 | 85 | 86 | 87 | 88 | 89 | Level3 90 | Disabled 91 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Console 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | Level3 104 | Disabled 105 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 106 | true 107 | 108 | 109 | Console 110 | true 111 | 112 | 113 | 114 | 115 | Level3 116 | 117 | 118 | MaxSpeed 119 | true 120 | true 121 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 122 | true 123 | 124 | 125 | Console 126 | true 127 | true 128 | true 129 | 130 | 131 | 132 | 133 | Level3 134 | 135 | 136 | MaxSpeed 137 | true 138 | true 139 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 140 | true 141 | 142 | 143 | Console 144 | true 145 | true 146 | true 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Colour Segmentation.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/Colour Segmentation.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|Win32|C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Segmentation\| 3 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Colour S.E6C285F0.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour Segmentation.Build.CppClean.log: -------------------------------------------------------------------------------- 1 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\vc140.pdb 2 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\vc140.idb 3 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\source.obj 4 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\debug\colour segmentation.ilk 5 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\debug\colour segmentation.exe 6 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\debug\colour segmentation.pdb 7 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\cl.command.1.tlog 8 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\cl.read.1.tlog 9 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\cl.write.1.tlog 10 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\link.command.1.tlog 11 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\link.read.1.tlog 12 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\debug\colour s.e6c285f0.tlog\link.write.1.tlog 13 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Colour Segmentation.log: -------------------------------------------------------------------------------- 1 |  Source.cpp 2 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\source.cpp(10): warning C4018: '<': signed/unsigned mismatch 3 | c:\users\alison\documents\visual studio 2015\projects\website\colour segmentation\colour segmentation\source.cpp(12): warning C4018: '>': signed/unsigned mismatch 4 | Colour Segmentation.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Segmentation\Debug\Colour Segmentation.exe 5 | Colour Segmentation.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Segmentation\Debug\Colour Segmentation.pdb (Full PDB) 6 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/Source.obj -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/vc140.idb -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/Debug/vc140.pdb -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace cv; 5 | 6 | int findBiggestContour(std::vector > contours) 7 | { 8 | int indexOfBiggestContour = -1; 9 | int sizeOfBiggestContour = 0; 10 | for (int i = 0; i < contours.size(); i++) 11 | { 12 | if (contours[i].size() > sizeOfBiggestContour) 13 | { 14 | sizeOfBiggestContour = contours[i].size(); 15 | indexOfBiggestContour = i; 16 | } 17 | } 18 | return indexOfBiggestContour; 19 | } 20 | 21 | int main() 22 | { 23 | Mat img = imread("hand.png"); 24 | namedWindow("Original", WINDOW_AUTOSIZE); 25 | imshow("Original", img); 26 | 27 | // First smooth the image 28 | GaussianBlur(img.clone(), img, Size(5, 5), 0.67, 0.67); 29 | 30 | // Convert the image to the HSV colour space for segmentation processing 31 | Mat hsv; 32 | cvtColor(img, hsv, COLOR_BGR2HSV); 33 | 34 | // Segment the image based on the specified colour range 35 | Mat segmented_img; 36 | inRange(hsv, Scalar(0, 10, 60), Scalar(20, 150, 255), segmented_img); 37 | 38 | // ******OPTIONAL******* 39 | // Select only the biggest item within the colour range 40 | std::vector > contours; 41 | std::vector hierarchy; 42 | 43 | findContours(segmented_img, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0)); 44 | int s = findBiggestContour(contours); 45 | 46 | Mat drawing = Mat::zeros(img.size(), CV_8UC1); 47 | drawContours(drawing, contours, s, Scalar(255), -1, 8, hierarchy, 0, Point()); 48 | 49 | // Create a structuring element 50 | int dialation_size = 6; 51 | Mat element = getStructuringElement(cv::MORPH_CROSS, 52 | cv::Size(2 * dialation_size + 1, 2 * dialation_size + 1), 53 | cv::Point(dialation_size, dialation_size)); 54 | 55 | // Apply dilation on the image 56 | dilate(drawing.clone(), drawing, element); // dilate(image,dst,element); 57 | 58 | namedWindow("Segmented Image", WINDOW_AUTOSIZE); 59 | imshow("Segmented Image", drawing); 60 | 61 | imwrite("drawing.jpg", drawing); 62 | 63 | waitKey(0); 64 | 65 | return 0; 66 | } 67 | -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/drawing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/drawing.jpg -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/hand.png -------------------------------------------------------------------------------- /Colour Segmentation/Colour Segmentation/segmented_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Colour Segmentation/segmented_img.jpg -------------------------------------------------------------------------------- /Colour Segmentation/Debug/Colour Segmentation.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Debug/Colour Segmentation.exe -------------------------------------------------------------------------------- /Colour Segmentation/Debug/Colour Segmentation.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Debug/Colour Segmentation.ilk -------------------------------------------------------------------------------- /Colour Segmentation/Debug/Colour Segmentation.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Segmentation/Debug/Colour Segmentation.pdb -------------------------------------------------------------------------------- /Colour Transfer/.vs/Colour Transfer/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/.vs/Colour Transfer/v14/.suo -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer.VC.db -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Colour Transfer", "Colour Transfer\Colour Transfer.vcxproj", "{7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Debug|x64.ActiveCfg = Debug|x64 17 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Debug|x64.Build.0 = Debug|x64 18 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Debug|x86.ActiveCfg = Debug|Win32 19 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Debug|x86.Build.0 = Debug|Win32 20 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Release|x64.ActiveCfg = Release|x64 21 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Release|x64.Build.0 = Release|x64 22 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Release|x86.ActiveCfg = Release|Win32 23 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Colour Transfer.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {7E38CCEA-0F71-4466-9C5C-53E8D451CFEC} 23 | Win32Proj 24 | ColourTransfer 25 | 8.1 26 | 27 | 28 | 29 | Application 30 | true 31 | v140 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v140 38 | true 39 | Unicode 40 | 41 | 42 | Application 43 | true 44 | v140 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v140 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | true 78 | 79 | 80 | false 81 | 82 | 83 | false 84 | 85 | 86 | 87 | 88 | 89 | Level3 90 | Disabled 91 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Console 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | Level3 104 | Disabled 105 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 106 | true 107 | 108 | 109 | Console 110 | true 111 | 112 | 113 | 114 | 115 | Level3 116 | 117 | 118 | MaxSpeed 119 | true 120 | true 121 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 122 | true 123 | 124 | 125 | Console 126 | true 127 | true 128 | true 129 | 130 | 131 | 132 | 133 | Level3 134 | 135 | 136 | MaxSpeed 137 | true 138 | true 139 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 140 | true 141 | 142 | 143 | Console 144 | true 145 | true 146 | true 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Colour Transfer.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.log: -------------------------------------------------------------------------------- 1 |  Source.cpp 2 | Colour Transfer.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Transfer\Debug\Colour Transfer.exe 3 | Colour Transfer.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Transfer\Debug\Colour Transfer.pdb (Full PDB) 4 | -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/Colour Transfer.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|Win32|C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Colour Transfer\| 3 | -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Colour Transfer.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/Source.obj -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/vc140.idb -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/Debug/vc140.pdb -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace cv; 5 | 6 | int main(int argc, const char** argv) 7 | { 8 | //Load the images 9 | Mat style_img = imread("paint.jpg"); 10 | Mat tar_img = imread("clock_tower.jpg"); 11 | 12 | // Convert to Lab space and CV_32F1 13 | Mat style_lab, tar_lab; 14 | cvtColor(style_img, style_lab, COLOR_BGR2Lab); 15 | cvtColor(tar_img, tar_lab, COLOR_BGR2Lab); 16 | style_lab.convertTo(style_lab, CV_32FC1); 17 | tar_lab.convertTo(tar_lab, CV_32FC1); 18 | 19 | //Find mean and std of each channel for each image 20 | Mat mean_style, mean_tar, std_dev_style, std_dev_tar; 21 | meanStdDev(style_lab, mean_style, std_dev_style); 22 | meanStdDev(tar_lab, mean_tar, std_dev_tar); 23 | 24 | // Split into individual channels 25 | std::vector style_chs, tar_chs; 26 | split(style_lab, style_chs); 27 | split(tar_lab, tar_chs); 28 | 29 | // For each channel calculate the color distribution 30 | for (int i = 0; i < 3; i++) 31 | { 32 | // Normalize the colour channels by subtracting the mean a dividing by the standard deviation 33 | tar_chs[i] -= mean_tar.at(i); 34 | tar_chs[i] /= std_dev_tar.at(i); 35 | 36 | // Apply the colour style of the style image by reversing the operation, 37 | // multiplying by the standard deviation and adding the mean of the style image 38 | tar_chs[i] *= std_dev_style.at(i); 39 | tar_chs[i] += mean_style.at(i); 40 | } 41 | 42 | // Merge the channels, convert to CV_8UC1 each channel and convert to BGR 43 | Mat out; 44 | merge(tar_chs, out); 45 | out.convertTo(out, CV_8UC1); 46 | cvtColor(out, out, COLOR_Lab2BGR); 47 | 48 | // Show images 49 | namedWindow("Style image", 0); 50 | imshow("Style image", style_img); 51 | namedWindow("Target image", 0); 52 | imshow("Target image", tar_img); 53 | namedWindow("Output image", 0); 54 | imshow("Output image", out); 55 | 56 | waitKey(0); 57 | 58 | return 0; 59 | } -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/clock_tower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/clock_tower.jpg -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/clock_tower_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/clock_tower_2.jpg -------------------------------------------------------------------------------- /Colour Transfer/Colour Transfer/paint.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Colour Transfer/paint.jpg -------------------------------------------------------------------------------- /Colour Transfer/Debug/Colour Transfer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Debug/Colour Transfer.exe -------------------------------------------------------------------------------- /Colour Transfer/Debug/Colour Transfer.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Debug/Colour Transfer.ilk -------------------------------------------------------------------------------- /Colour Transfer/Debug/Colour Transfer.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Colour Transfer/Debug/Colour Transfer.pdb -------------------------------------------------------------------------------- /Contrast Enhancement/README.md: -------------------------------------------------------------------------------- 1 | # Contrast-Enhancement 2 | 3 | Various global and local methods of contrast enhancement 4 | -------------------------------------------------------------------------------- /Contrast Enhancement/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace cv; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | Mat img = imread("Haze5.jpg", IMREAD_UNCHANGED); // Read in the image file 11 | 12 | // Contrast Stretch 13 | 14 | // First build a LUT 15 | unsigned char lut[256]; 16 | double minVal, maxVal; 17 | minMaxLoc(img, &minVal, &maxVal); //find minimum and maximum intensities 18 | for (int i = 0; i < 256; i++) 19 | { 20 | lut[i] = 255*((i/(maxVal - minVal)) - (minVal / (maxVal - minVal))); 21 | } 22 | 23 | // Convert the image type to YCrCb 24 | Mat YCrCb; 25 | cvtColor(img, YCrCb, CV_BGR2YCrCb); 26 | vector channels; 27 | split(YCrCb, channels); 28 | 29 | // Establish the number of bins 30 | int histSize = 256; 31 | 32 | // Set the range 33 | float range[] = { 0, 256 }; 34 | const float* histRange = { range }; 35 | 36 | bool uniform = true; bool accumulate = false; 37 | 38 | Mat hist; 39 | 40 | // Compute the histogram 41 | calcHist(&channels[0], 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); 42 | 43 | // Draw the histogram 44 | int hist_w = 512; int hist_h = 400; 45 | int bin_w = cvRound((double)hist_w / histSize); 46 | 47 | Mat histImage(hist_h, hist_w, CV_8UC3, Scalar(255, 255, 255)); 48 | 49 | // Normalize the result to [ 0, histImage.rows ] 50 | normalize(hist, hist, 0, histImage.rows, NORM_MINMAX, -1, Mat()); 51 | 52 | for (int i = 1; i < histSize; i++) 53 | { 54 | line(histImage, Point(bin_w*(i - 1), hist_h - cvRound(hist.at(i - 1))), 55 | Point(bin_w*(i), hist_h - cvRound(hist.at(i))), 56 | Scalar(0, 0, 255), 2, 8, 0); 57 | } 58 | 59 | // Display and Save 60 | namedWindow("Original Image Histogram", CV_WINDOW_AUTOSIZE); 61 | imshow("Original Image Histogram", histImage); 62 | imwrite("Original_Image_Histogram.jpg", histImage); 63 | 64 | // Now stretch the contrast 65 | for (int i = 0; i < channels[0].rows; i++) 66 | { 67 | // Create a pointer to the pixel array 68 | uchar *p = channels[0].ptr(i); 69 | for (int j = 0; j < channels[0].cols; j++) 70 | { 71 | p[j] = lut[p[j]]; 72 | } 73 | } 74 | 75 | // Compute the histogram 76 | calcHist(&channels[0], 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); 77 | 78 | Mat histEnhanced(hist_h, hist_w, CV_8UC3, Scalar(255, 255, 255)); 79 | 80 | // Normalize the result to [ 0, histImage.rows ] 81 | normalize(hist, hist, 0, histEnhanced.rows, NORM_MINMAX, -1, Mat()); 82 | 83 | for (int i = 1; i < histSize; i++) 84 | { 85 | line(histEnhanced, Point(bin_w*(i - 1), hist_h - cvRound(hist.at(i - 1))), 86 | Point(bin_w*(i), hist_h - cvRound(hist.at(i))), 87 | Scalar(0, 0, 255), 2, 8, 0); 88 | } 89 | 90 | // Display and Save 91 | namedWindow("Enhance Image Histogram", CV_WINDOW_AUTOSIZE); 92 | imshow("Enhance Image Histogram", histEnhanced); 93 | imwrite("Enhanced_Image_Histogram.jpg", histEnhanced); 94 | 95 | merge(channels, YCrCb); 96 | cvtColor(YCrCb, img, CV_YCrCb2BGR); 97 | 98 | namedWindow("Image Window", WINDOW_AUTOSIZE); // Create a window of the same size as the image for display 99 | imshow("Image Window", img); // Show our image inside the window 100 | imwrite("image.jpg", img); 101 | waitKey(0); // Wait for a keystroke in the window 102 | return 0; 103 | } -------------------------------------------------------------------------------- /Edge Detection/README.md: -------------------------------------------------------------------------------- 1 | # Edge-Detection 2 | 3 | Basic edge detection using the Sobel and Scharr edge detectors 4 | -------------------------------------------------------------------------------- /Edge Detection/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace cv; 7 | using namespace std; 8 | 9 | int main() 10 | { 11 | Mat img = imread("tulips.png", CV_LOAD_IMAGE_UNCHANGED); 12 | Mat blur, gray, GrayEdges, finalColourEdges; 13 | vector rgbColourEdges(3); 14 | 15 | // Smooth the image to reduce noise for more accurate edge detection 16 | GaussianBlur(img.clone(), blur, Size(3, 3), 0, 0, BORDER_DEFAULT); 17 | 18 | // Convert it to grayscale 19 | cvtColor(blur.clone(), gray, CV_BGR2GRAY); 20 | 21 | // Generate grad_x and grad_y 22 | Mat grad_x, grad_y; 23 | Mat abs_grad_x, abs_grad_y; 24 | 25 | // Gradient X 26 | //Scharr(gray, grad_x, CV_32F, 1, 0, 1, 0, BORDER_DEFAULT); 27 | Sobel(gray, grad_x, CV_32F, 1, 0, 3, 1, 0, BORDER_DEFAULT); 28 | convertScaleAbs(grad_x, abs_grad_x); 29 | 30 | // Gradient Y 31 | //Scharr(gray, grad_y, CV_32F, 0, 1, 1, 0, BORDER_DEFAULT); 32 | Sobel(gray, grad_y, CV_32F, 0, 1, 3, 1, 0, BORDER_DEFAULT); 33 | convertScaleAbs(grad_y, abs_grad_y); 34 | 35 | // Calculate the magnitude 36 | Mat temp, tempFloat; 37 | pow(grad_x, 2, grad_x); 38 | pow(grad_y, 2, grad_y); 39 | temp = grad_x + grad_y; 40 | 41 | temp.convertTo(tempFloat, CV_32F); // We need CV_32F for the sqrt() function 42 | sqrt(temp, GrayEdges); 43 | 44 | GrayEdges.convertTo(GrayEdges, CV_8U); // Convert back for display 45 | 46 | double T = 120; 47 | double maxval = 255; 48 | threshold(GrayEdges, GrayEdges, T, maxval, THRESH_BINARY); 49 | 50 | imshow("Original Image", img); 51 | imshow("Grayscale Edge Detection", GrayEdges); 52 | //imwrite("Scharr_GrayEdges_thresh120.jpg", GrayEdges); 53 | 54 | // Now for colour edge detection 55 | vector channels(3); 56 | split(blur.clone(), channels); 57 | 58 | for (int i = 0; i < 3; i++) 59 | { 60 | // Generate grad_x and grad_y 61 | Mat colour_grad_x, colour_grad_y; 62 | Mat colour_abs_grad_x, colour_abs_grad_y; 63 | 64 | // Gradient X 65 | //Scharr(channels[i], colour_grad_x, CV_32F, 1, 0, 1, 0, BORDER_DEFAULT); 66 | Sobel(channels[i], colour_grad_x, CV_32F, 1, 0, 3, 1, 0, BORDER_DEFAULT); 67 | convertScaleAbs(colour_grad_x, colour_abs_grad_x); 68 | 69 | // Gradient Y 70 | //Scharr(channels[i], colour_grad_y, CV_32F, 0, 1, 1, 0, BORDER_DEFAULT); 71 | Sobel(channels[i], colour_grad_y, CV_32F, 0, 1, 3, 1, 0, BORDER_DEFAULT); 72 | convertScaleAbs(colour_grad_y, colour_abs_grad_y); 73 | 74 | // Calculate the magnitude 75 | Mat colour_temp, colour_tempFloat; 76 | pow(colour_grad_x, 2, colour_grad_x); 77 | pow(colour_grad_y, 2, colour_grad_y); 78 | colour_temp = colour_grad_x + colour_grad_y; 79 | 80 | colour_temp.convertTo(colour_tempFloat, CV_32F); // We need CV_32F for the sqrt() function 81 | sqrt(colour_temp, rgbColourEdges[i]); 82 | 83 | threshold(rgbColourEdges[i], rgbColourEdges[i], T, maxval, THRESH_BINARY); 84 | } 85 | 86 | Mat checkEdges; 87 | bitwise_or(rgbColourEdges[0], rgbColourEdges[1], checkEdges); 88 | bitwise_or(checkEdges, rgbColourEdges[2], finalColourEdges); 89 | 90 | finalColourEdges.convertTo(finalColourEdges, CV_8U); 91 | 92 | imshow("Colour Edge Detection", finalColourEdges); 93 | //imwrite("Scharr_ColourEdges_thresh120_OR.jpg", finalColourEdges); 94 | 95 | waitKey(0); 96 | return 0; 97 | } -------------------------------------------------------------------------------- /Edge Detection/tulips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Edge Detection/tulips.png -------------------------------------------------------------------------------- /Gamma Correction and White Balance/enhance.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | using namespace cv; 10 | using namespace cv::dnn; 11 | using namespace std; 12 | 13 | 14 | // White balancing using the method in Gimp https://docs.gimp.org/en/gimp-layer-white-balance.html 15 | Mat white_balance(Mat img, float perc = 0.05) 16 | { 17 | CV_Assert(img.data); 18 | 19 | // Accept only char colour type matrices 20 | CV_Assert(img.depth() != sizeof(uchar)); 21 | // CV_Assert(img.channels() != 3); 22 | 23 | 24 | // Compute the histograms of the three colour channels 25 | int histSize = 256; 26 | 27 | // Set the range 28 | float range[] = { 0, 256 }; 29 | const float* histRange = { range }; 30 | 31 | bool uniform = true; bool accumulate = false; 32 | 33 | Mat r_hist, g_hist, b_hist; 34 | 35 | Mat bgr[3]; //destination array 36 | split(img, bgr);//split source 37 | 38 | // Compute the histogram 39 | calcHist(&bgr[2], 1, 0, Mat(), r_hist, 1, &histSize, &histRange, uniform, accumulate); 40 | calcHist(&bgr[1], 1, 0, Mat(), g_hist, 1, &histSize, &histRange, uniform, accumulate); 41 | calcHist(&bgr[0], 1, 0, Mat(), b_hist, 1, &histSize, &histRange, uniform, accumulate); 42 | 43 | Mat r_norm_hist = r_hist / bgr[2].total(); 44 | Mat g_norm_hist = g_hist / bgr[1].total(); 45 | Mat b_norm_hist = b_hist / bgr[0].total(); 46 | 47 | 48 | 49 | 50 | // Now get the CDF 51 | 52 | std::vector r_cdf; 53 | std::vector g_cdf; 54 | std::vector b_cdf; 55 | for (int i = 0; i < 256; i++) 56 | { 57 | if (i == 0) 58 | { 59 | r_cdf.push_back((r_norm_hist.at(i, 0))); 60 | g_cdf.push_back((g_norm_hist.at(i, 0))); 61 | b_cdf.push_back((b_norm_hist.at(i, 0))); 62 | } 63 | else 64 | { 65 | r_cdf.push_back((r_norm_hist.at(i, 0) + r_cdf[i-1]) ); 66 | g_cdf.push_back((g_norm_hist.at(i, 0) + g_cdf[i-1]) ); 67 | b_cdf.push_back((b_norm_hist.at(i, 0) + b_cdf[i-1]) ); 68 | } 69 | 70 | } 71 | 72 | 73 | 74 | 75 | // Get the min and max pixel values indicating the 5% of pixels at the ends of the histograms 76 | float r_min_val = -1, g_min_val = -1, b_min_val = -1; // Dummy value 77 | float r_max_val = -1, g_max_val = -1, b_max_val = -1; // Dummy value 78 | 79 | for (int i = 0; i < 256; i++) 80 | { 81 | if (r_cdf[i] >= perc && r_min_val == -1) 82 | { 83 | r_min_val = (float)i; 84 | } 85 | 86 | if (r_cdf[i] >= (1.0 - perc) && r_max_val == -1) 87 | { 88 | cout << r_cdf[i] << endl; 89 | r_max_val = (float)i; 90 | } 91 | 92 | if (g_cdf[i] >= perc && g_min_val == -1) 93 | { 94 | g_min_val = (float)i; 95 | } 96 | 97 | if (g_cdf[i] >= (1.0 - perc) && g_max_val == -1) 98 | { 99 | g_max_val = (float)i; 100 | } 101 | 102 | if (b_cdf[i] >= perc && b_min_val == -1) 103 | { 104 | b_min_val = (float)i; 105 | } 106 | 107 | if (b_cdf[i] >= (1.0 - perc) && b_max_val == -1) 108 | { 109 | b_max_val = (float)i; 110 | } 111 | } 112 | 113 | 114 | // Build look up table 115 | unsigned char r_lut[256], g_lut[256], b_lut[256]; 116 | for (int i = 0; i < 256; i++) 117 | { 118 | float index = (float)i; 119 | r_lut[i] = saturate_cast(255.0 * ((index - r_min_val) / (r_max_val - r_min_val))); 120 | g_lut[i] = saturate_cast(255.0 * ((index - g_min_val) / (g_max_val - g_min_val))); 121 | b_lut[i] = saturate_cast(255.0 * ((index - b_min_val) / (b_max_val - b_min_val))); 122 | } 123 | 124 | 125 | 126 | Mat out = img.clone(); 127 | MatIterator_ it, end; 128 | for (it = out.begin(), end = out.end(); it != end; it++) 129 | { 130 | 131 | (*it)[2] = r_lut[(*it)[2]]; 132 | (*it)[1] = g_lut[(*it)[1]]; 133 | (*it)[0] = b_lut[(*it)[0]]; 134 | } 135 | 136 | 137 | return out; 138 | 139 | } 140 | 141 | float mean_pixel(Mat img) 142 | { 143 | if (img.channels() > 2) 144 | { 145 | cvtColor(img.clone(), img, CV_BGR2GRAY); 146 | return mean(img)[0]; 147 | } 148 | else 149 | { 150 | return mean(img)[0]; 151 | } 152 | } 153 | 154 | float auto_gamma_value(Mat img) 155 | { 156 | float max_pixel = 255; 157 | float middle_pixel = 128; 158 | float pixel_range = 256; 159 | float mean_l = mean_pixel(img); 160 | 161 | float gamma = log(middle_pixel/pixel_range)/ log(mean_l/pixel_range); // Formula from ImageJ 162 | 163 | return gamma; 164 | 165 | } 166 | 167 | 168 | Mat gamma_correction(Mat img, float gamma=0) 169 | { 170 | CV_Assert(img.data); 171 | 172 | // Accept only char type matrices 173 | CV_Assert(img.depth() != sizeof(uchar)); 174 | 175 | 176 | if (gamma == 0) {gamma = auto_gamma_value(img);} 177 | 178 | 179 | // Build look up table 180 | unsigned char lut[256]; 181 | for (int i = 0; i < 256; i++) 182 | { 183 | lut[i] = saturate_cast(pow((float)(i / 255.0), gamma) * 255.0f); 184 | } 185 | 186 | Mat out = img.clone(); 187 | const int channels = out.channels(); 188 | switch (channels) 189 | { 190 | case 1: 191 | { 192 | MatIterator_ it, end; 193 | for (it = out.begin(), end = out.end(); it != end; it++) 194 | *it = lut[(*it)]; 195 | 196 | break; 197 | } 198 | case 3: 199 | { 200 | MatIterator_ it, end; 201 | for (it = out.begin(), end = out.end(); it != end; it++) 202 | { 203 | 204 | (*it)[0] = lut[((*it)[0])]; 205 | (*it)[1] = lut[((*it)[1])]; 206 | (*it)[2] = lut[((*it)[2])]; 207 | } 208 | 209 | break; 210 | 211 | } 212 | } 213 | 214 | return out; 215 | } 216 | 217 | 218 | /* 219 | Huang, S. C., Cheng, F. C., & Chiu, Y. S. (2013). 220 | Efficient contrast enhancement using adaptive gamma correction with weighting distribution. 221 | IEEE Transactions on Image Processing, 22(3), 1032-1041. 222 | */ 223 | Mat adaptive_gamma_correction(Mat img, float alpha=0) 224 | { 225 | 226 | CV_Assert(img.data); 227 | 228 | // Accept only char type matrices 229 | CV_Assert(img.depth() != sizeof(uchar)); 230 | 231 | // Automatically compute the alpha value 232 | if (alpha == 0) {alpha = auto_gamma_value(img);} 233 | 234 | // Get the image probability density function using the histogram 235 | Mat gray_img; 236 | if (img.channels() > 2) 237 | { 238 | cvtColor(img.clone(), gray_img, CV_BGR2GRAY); 239 | } 240 | 241 | 242 | // Establish the number of bins 243 | int histSize = 256; 244 | 245 | // Set the range 246 | float range[] = { 0, 256 }; 247 | const float* histRange = { range }; 248 | 249 | bool uniform = true; bool accumulate = false; 250 | 251 | Mat hist; 252 | 253 | // Compute the histogram 254 | calcHist(&gray_img, 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); 255 | 256 | Mat norm_hist = hist / gray_img.total(); 257 | double pdf_min = 0; 258 | double pdf_max = 0; 259 | minMaxLoc(norm_hist, &pdf_min, &pdf_max); 260 | 261 | std::vector pdf_weights; 262 | for (int i = 0; i < 256; i++) 263 | { 264 | pdf_weights.push_back(pdf_max * (pow(( norm_hist.at(i, 0) - pdf_min) / (pdf_max - pdf_min), alpha) )); 265 | } 266 | 267 | std::vector cdf_weights; 268 | float pdf_weights_total = sum(pdf_weights)[0]; 269 | for (int i = 0; i < 256; i++) 270 | { 271 | if (i == 0) 272 | { 273 | cdf_weights.push_back((pdf_weights[i])); 274 | } 275 | else 276 | { 277 | cdf_weights.push_back((pdf_weights[i] + cdf_weights[i-1]) ); 278 | } 279 | 280 | } 281 | 282 | // Build look up table 283 | unsigned char lut[256]; 284 | for (int i = 0; i < 256; i++) 285 | { 286 | float gamma = 1 - cdf_weights[i]; 287 | lut[i] = saturate_cast(pow((float)(i / 255.0), gamma) * 255.0f); 288 | } 289 | 290 | Mat out = img.clone(); 291 | const int num_channels = out.channels(); 292 | switch (num_channels) 293 | { 294 | case 1: 295 | { 296 | MatIterator_ it, end; 297 | for (it = out.begin(), end = out.end(); it != end; it++) 298 | *it = lut[(*it)]; 299 | 300 | break; 301 | } 302 | case 3: 303 | { 304 | MatIterator_ it, end; 305 | for (it = out.begin(), end = out.end(); it != end; it++) 306 | { 307 | 308 | (*it)[0] = lut[((*it)[0])]; 309 | (*it)[1] = lut[((*it)[1])]; 310 | (*it)[2] = lut[((*it)[2])]; 311 | } 312 | 313 | break; 314 | 315 | } 316 | } 317 | 318 | return out; 319 | 320 | } 321 | 322 | int main() 323 | { 324 | 325 | Mat img = imread("godfather.png", CV_LOAD_IMAGE_COLOR); 326 | 327 | std::cout << mean_pixel(img) << std::endl; 328 | 329 | 330 | Mat out; 331 | 332 | cout << "Denoising ..." << endl; 333 | fastNlMeansDenoisingColored(img, out); 334 | imwrite("denoised.png", out); 335 | 336 | // cout << "White balancing ..." << endl; 337 | // out = white_balance(out.clone()); 338 | // imwrite("white_balanced.png", out); 339 | 340 | cout << "Adaptive gamma correction ..." << endl; 341 | out = adaptive_gamma_correction(out.clone(), 2); 342 | 343 | 344 | cout << "Saving ..." << endl; 345 | 346 | imwrite("out.png", out); 347 | 348 | return 0; 349 | } -------------------------------------------------------------------------------- /Gamma Correction and White Balance/godfather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Gamma Correction and White Balance/godfather.png -------------------------------------------------------------------------------- /Harris Corner Detector/.vs/Harris Corner Detector/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/.vs/Harris Corner Detector/v14/.suo -------------------------------------------------------------------------------- /Harris Corner Detector/Debug/Harris Corner Detector.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Debug/Harris Corner Detector.exe -------------------------------------------------------------------------------- /Harris Corner Detector/Debug/Harris Corner Detector.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Debug/Harris Corner Detector.ilk -------------------------------------------------------------------------------- /Harris Corner Detector/Debug/Harris Corner Detector.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Debug/Harris Corner Detector.pdb -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector.VC.db -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Harris Corner Detector", "Harris Corner Detector\Harris Corner Detector.vcxproj", "{75F5C99F-7B62-4316-AA5E-3A5DBDB80817}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Debug|x64.ActiveCfg = Debug|x64 17 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Debug|x64.Build.0 = Debug|x64 18 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Debug|x86.ActiveCfg = Debug|Win32 19 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Debug|x86.Build.0 = Debug|Win32 20 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Release|x64.ActiveCfg = Release|x64 21 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Release|x64.Build.0 = Release|x64 22 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Release|x86.ActiveCfg = Release|Win32 23 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/Harris Corner Detector.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|Win32|C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Harris Corner Detector\| 3 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Harris C.75F5C99F.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Harris Corner Detector.log: -------------------------------------------------------------------------------- 1 |  Harris Corner Detector.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Harris Corner Detector\Debug\Harris Corner Detector.exe 2 | Harris Corner Detector.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Harris Corner Detector\Debug\Harris Corner Detector.pdb (Full PDB) 3 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/Source.obj -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/vc140.idb -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Debug/vc140.pdb -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Harris Corner Detector.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {75F5C99F-7B62-4316-AA5E-3A5DBDB80817} 23 | Win32Proj 24 | HarrisCornerDetector 25 | 8.1 26 | 27 | 28 | 29 | Application 30 | true 31 | v140 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v140 38 | true 39 | Unicode 40 | 41 | 42 | Application 43 | true 44 | v140 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v140 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | true 76 | 77 | 78 | true 79 | 80 | 81 | false 82 | 83 | 84 | false 85 | 86 | 87 | 88 | 89 | 90 | Level3 91 | Disabled 92 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 93 | true 94 | 95 | 96 | Console 97 | true 98 | 99 | 100 | 101 | 102 | 103 | 104 | Level3 105 | Disabled 106 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 107 | true 108 | 109 | 110 | Console 111 | true 112 | 113 | 114 | 115 | 116 | Level3 117 | 118 | 119 | MaxSpeed 120 | true 121 | true 122 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 123 | true 124 | 125 | 126 | Console 127 | true 128 | true 129 | true 130 | 131 | 132 | 133 | 134 | Level3 135 | 136 | 137 | MaxSpeed 138 | true 139 | true 140 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 141 | true 142 | 143 | 144 | Console 145 | true 146 | true 147 | true 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Harris Corner Detector.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Source.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | This is an implementation of the Harris Corner Detector from the paper : 3 | Harris, Chris, and Mike Stephens. "A combined corner and edge detector." 4 | Alvey vision conference.Vol. 15. 1988. 5 | 6 | The algorithm steps are : 7 | (1) Compute the horizontal and vertical derivatives of the image 8 | (2) Compute 3 images corresponding to the 3 different terms in martix M 9 | (3) Convolve each of these three images with a Gaussian to have spatial weighting 10 | (4) Compute the cornerness value using the eigen values of matrix M 11 | (5) Find the local maxima(Non - Maximum Suppression) above some threshold 12 | to get the final corner points 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | using namespace cv; 21 | using namespace std; 22 | 23 | int main() 24 | { 25 | // Input image 26 | Mat img = imread("corner_detection_test.jpg", CV_LOAD_IMAGE_GRAYSCALE); 27 | img.convertTo(img, CV_32F); // 32-bit float type 28 | 29 | float cornerThreshold = 0.02; // Cornerness threshold value 30 | 31 | // (1) First we compute the derivatives 32 | Mat grad_x, grad_y; 33 | Sobel(img.clone(), grad_x, CV_32F, 1, 0, 3, 1, 0, BORDER_DEFAULT); 34 | Sobel(img.clone(), grad_y, CV_32F, 0, 1, 3, 1, 0, BORDER_DEFAULT); 35 | 36 | // (2) We need to find the matrix M which is defined as: 37 | // [X*X, X*Y; X*Y, Y*Y] 38 | // Where X and Y are the horizontal and vertical derivatives of the image, respectively 39 | Mat XX = Mat::zeros(Size(img.cols, img.rows), CV_32F), 40 | XY = Mat::zeros(Size(img.cols, img.rows), CV_32F), 41 | YY = Mat::zeros(Size(img.cols, img.rows), CV_32F); 42 | multiply(grad_x.clone(), grad_x.clone(), XX); 43 | multiply(grad_x.clone(), grad_y.clone(), XY); 44 | multiply(grad_y.clone(), grad_y.clone(), YY); 45 | 46 | // (3) Now we apply the Gaussian filter to have spatial weighting 47 | GaussianBlur(XX.clone(), XX, Size(7, 7), 1, 1); 48 | GaussianBlur(XY.clone(), XY, Size(7, 7), 1, 1); 49 | GaussianBlur(YY.clone(), YY, Size(7, 7), 1, 1); 50 | 51 | // (4) and(5) Now we build the matrix M, compute the cornerness R, and threshold it 52 | float alpha = 0.05; 53 | Mat M = Mat::zeros(Size(2, 2), CV_32F); 54 | vector eigenvalues(2); 55 | Mat cornerness = Mat::zeros(Size(img.cols, img.rows), CV_32F); 56 | for (int i = 0; i < img.rows; i++) 57 | { 58 | // Create a pointer to the pixel array 59 | float *xx = XX.ptr(i); 60 | float *xy = XY.ptr(i); 61 | float *yy = YY.ptr(i); 62 | for (int j = 0; j < img.cols; j++) 63 | { 64 | M.at(0, 0) = xx[j]; 65 | M.at(0, 1) = xy[j]; 66 | M.at(1, 0) = xy[j]; 67 | M.at(1, 1) = yy[j]; 68 | 69 | eigen(M, eigenvalues); 70 | 71 | cornerness.at(i, j) = (float)determinant(M) - alpha*((float)trace(M)[0] * (float)trace(M)[0]); 72 | //cornerness.at(i, j) = eigenvalues[0] * eigenvalues[1] - alpha*(eigenvalues[0] + eigenvalues[1])*(eigenvalues[0] + eigenvalues[1]); 73 | 74 | } 75 | } 76 | 77 | // Threshold 78 | threshold(cornerness, cornerness, 100000000, 255, THRESH_TOZERO); 79 | 80 | // Non-Maximum Suppression 81 | int rad = 3; 82 | int dim = 2 * rad + 1; 83 | 84 | for (int i = rad; i < img.rows - rad; i++) // Start looping slightly inward to handle the borders for sliding window 85 | { 86 | // Create a pointer to the pixel array 87 | float *p = cornerness.ptr(i); 88 | 89 | for (int j = rad; j < img.cols - rad; j++) 90 | { 91 | Mat NMS = cornerness(Range(j - rad, j + rad), Range(i - rad, i + rad)); // Extract the sliding window 92 | double minVal, maxVal; 93 | minMaxLoc(NMS, &minVal, &maxVal); 94 | if (p[j] < maxVal) 95 | { 96 | p[j] = 0; 97 | } 98 | } 99 | } 100 | 101 | // Draw the corner points on the image 102 | for (int i = 0; i < img.rows; i++) 103 | { 104 | float *p = cornerness.ptr(i); 105 | for (int j = 0; j < img.cols; j++) 106 | { 107 | if (p[j] > 0) { circle(img, Point(j, i), 1, Scalar(0, 0, 255)); } 108 | } 109 | } 110 | 111 | // Convert to uchar for display 112 | img.convertTo(img, CV_8U); 113 | imshow("Corners Image", img); 114 | 115 | waitKey(0); 116 | return 0; 117 | } -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/Thumbs.db -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/corner_detection_test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/corner_detection_test.jpg -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/Harris Corner Detector.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|x64|c:\users\alison\documents\visual studio 2015\Projects\Harris Corner Detector\| 3 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris C.75F5C99F.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Harris Corner Detector.log: -------------------------------------------------------------------------------- 1 |  Source.cpp 2 | c:\users\alison\documents\visual studio 2015\projects\harris corner detector\harris corner detector\source.cpp(29): warning C4305: 'initializing': truncation from 'double' to 'float' 3 | c:\users\alison\documents\visual studio 2015\projects\harris corner detector\harris corner detector\source.cpp(52): warning C4305: 'initializing': truncation from 'double' to 'float' 4 | opencv_core310d.lib(opencv_core310d.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' 5 | -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/Source.obj -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/vc140.idb -------------------------------------------------------------------------------- /Harris Corner Detector/Harris Corner Detector/x64/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Harris Corner Detector/Harris Corner Detector/x64/Debug/vc140.pdb -------------------------------------------------------------------------------- /Histogram Equalization/README.md: -------------------------------------------------------------------------------- 1 | # Histogram-Equalization 2 | 3 | Global Histogram Equalization and Histogram plotting 4 | -------------------------------------------------------------------------------- /Histogram Equalization/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace cv; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | Mat img = imread("lake.jpg", IMREAD_GRAYSCALE); // Read in the image file 11 | 12 | if (img.empty()){ "\nImage is empty!!\n"; } 13 | 14 | // Establish the number of bins 15 | int histSize = 256; 16 | 17 | // Set the range 18 | float range[] = { 0, 256 }; 19 | const float* histRange = { range }; 20 | 21 | bool uniform = true; bool accumulate = false; 22 | 23 | Mat hist; 24 | 25 | // Compute the histogram 26 | calcHist(&img, 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); 27 | 28 | // Draw the histogram 29 | int hist_w = 512; int hist_h = 400; 30 | int bin_w = cvRound((double)hist_w / histSize); 31 | 32 | Mat histImage(hist_h, hist_w, CV_8UC3, Scalar(255, 255, 255)); 33 | 34 | // Normalize the result to [ 0, histImage.rows ] 35 | normalize(hist, hist, 0, histImage.rows, NORM_MINMAX, -1, Mat()); 36 | 37 | for (int i = 1; i < histSize; i++) 38 | { 39 | line(histImage, Point(bin_w*(i - 1), hist_h - cvRound(hist.at(i - 1))), 40 | Point(bin_w*(i), hist_h - cvRound(hist.at(i))), 41 | Scalar(0, 0, 255), 2, 8, 0); 42 | } 43 | 44 | // Display and Save 45 | namedWindow("Original Image Histogram", CV_WINDOW_AUTOSIZE); 46 | imshow("Original Image Histogram", histImage); 47 | imwrite("Original_Image_Histogram.jpg", histImage); 48 | 49 | namedWindow("Image Window", WINDOW_AUTOSIZE); // Create a window of the same size as the image for display 50 | imshow("Image Window", img); // Show our image inside the window 51 | imwrite("image.jpg", img); 52 | 53 | // Perform Global Histogram Equalization 54 | Mat out; 55 | cv::Ptr clahe = cv::createCLAHE(); 56 | clahe->setClipLimit(2.0); 57 | clahe->apply(img, out); 58 | //equalizeHist(img, out); 59 | 60 | // Compute the histogram 61 | calcHist(&out, 1, 0, Mat(), hist, 1, &histSize, &histRange, uniform, accumulate); 62 | 63 | Mat outHistImage(hist_h, hist_w, CV_8UC3, Scalar(255, 255, 255)); 64 | 65 | // Normalize the result to [ 0, histImage.rows ] 66 | normalize(hist, hist, 0, outHistImage.rows, NORM_MINMAX, -1, Mat()); 67 | 68 | for (int i = 1; i < histSize; i++) 69 | { 70 | line(outHistImage, Point(bin_w*(i - 1), hist_h - cvRound(hist.at(i - 1))), 71 | Point(bin_w*(i), hist_h - cvRound(hist.at(i))), 72 | Scalar(0, 0, 255), 2, 8, 0); 73 | } 74 | 75 | // Display and Save 76 | namedWindow("Equalized Image Histogram", CV_WINDOW_AUTOSIZE); 77 | imshow("Equalized Image Histogram", outHistImage); 78 | imwrite("Equalized_Image_Histogram.jpg", outHistImage); 79 | 80 | namedWindow("Equalized Image Window", WINDOW_AUTOSIZE); // Create a window of the same size as the image for display 81 | imshow("Equalized Image Window", out); // Show our image inside the window 82 | imwrite("Equalized_Image.jpg", out); 83 | 84 | waitKey(0); // Wait for a keystroke in the window 85 | return 0; 86 | } -------------------------------------------------------------------------------- /Histogram Equalization/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Histogram Equalization/Thumbs.db -------------------------------------------------------------------------------- /Histogram Equalization/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Histogram Equalization/image.jpg -------------------------------------------------------------------------------- /Histogram Equalization/lena_gray.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Histogram Equalization/lena_gray.jpg -------------------------------------------------------------------------------- /Image Loading and Data/Haze6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Loading and Data/Haze6.jpg -------------------------------------------------------------------------------- /Image Loading and Data/README.md: -------------------------------------------------------------------------------- 1 | # Intro-to-Image-Processing 2 | 3 | Basic image loading and data extraction. 4 | -------------------------------------------------------------------------------- /Image Loading and Data/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace cv; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | Mat img = imread("C:\\George Seif\\Woman.png", IMREAD_UNCHANGED); // Read in the image file 11 | 12 | // Print out some information about the image 13 | int rows = img.rows; 14 | int cols = img.cols; 15 | int channels = img.channels(); 16 | 17 | cout << "Image Rows = " << rows << endl; 18 | cout << "Image Columns = " << cols << endl; 19 | cout << "Image Channels = " << channels << endl; 20 | 21 | namedWindow("Image Window", WINDOW_AUTOSIZE); // Create a window of the same size as the image for display 22 | imshow("Image Window", img); // Show our image inside the window 23 | waitKey(0); // Wait for a keystroke in the window 24 | return 0; 25 | } -------------------------------------------------------------------------------- /Image Loading and Data/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Loading and Data/Thumbs.db -------------------------------------------------------------------------------- /Image Sharpening/README.md: -------------------------------------------------------------------------------- 1 | # Image-Sharpening 2 | 3 | Image sharpening using both the Laplacian and Unsharp masks. 4 | -------------------------------------------------------------------------------- /Image Sharpening/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | using namespace cv; 7 | using namespace std; 8 | 9 | int main() 10 | { 11 | Mat img = imread("parrot.jpg"); 12 | Mat laplacianSharpening, unsharpSharpening; 13 | 14 | // Laplacian sharpening 15 | float laplacianBoostFactor = 1.2; // Controls the amount of Laplacian Sharpening 16 | Mat kern = (Mat_(3, 3) << 0, -1, 0, -1, 5*laplacianBoostFactor, -1, 0, -1, 0); // The filtering mask for Laplacian sharpening 17 | filter2D(img.clone(), laplacianSharpening, img.depth(), kern, Point(-1, -1)); // Applies the masking operator to the image 18 | 19 | // Unsharp mask sharpening 20 | Mat blur; 21 | GaussianBlur(img.clone(), blur, Size(5, 5), 0.67, 0.67); 22 | Mat unsharpMask = img.clone() - blur; // Compute the unsharp mask 23 | threshold(unsharpMask.clone(), unsharpMask, 20, 255, THRESH_TOZERO); 24 | float unsharpBoostFactor = 9; // Controls the amount of Unsharp Mask Sharpening 25 | unsharpSharpening = img.clone() + (unsharpMask * unsharpBoostFactor); 26 | 27 | imshow("Original Image", img); 28 | imshow("Laplacian Sharpened Image", laplacianSharpening); 29 | imshow("Unsharp Masking Sharpening", unsharpSharpening); 30 | 31 | imwrite("Laplacian_Sharp_Boost_1_point_2.jpg", laplacianSharpening); 32 | imwrite("Unsharp_Sharp_Boost_9_Threshold_20.jpg", unsharpSharpening); 33 | 34 | waitKey(0); 35 | return 0; 36 | } -------------------------------------------------------------------------------- /Image Smoothing/README.md: -------------------------------------------------------------------------------- 1 | # Image Smoothing 2 | 3 | Various methods of image smoothing including Box, Gaussian, and Median filtering. 4 | -------------------------------------------------------------------------------- /Image Smoothing/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace cv; 6 | 7 | int main() 8 | { 9 | Mat inputGaussian = imread("lena_gaussian_noise.png", CV_LOAD_IMAGE_UNCHANGED); 10 | Mat inputImpulse = imread("lena_impulse_noise.jpg", CV_LOAD_IMAGE_UNCHANGED); 11 | 12 | Mat imgBox3x3, imgBox7x7, imgGauss3x3, imgGauss7x7, imgMedian3x3, imgMedian7x7; 13 | 14 | namedWindow("Gaussian Noise Image", 1); 15 | namedWindow("Impulse Noise Image", 1); 16 | imshow("Gaussian Noise Image", inputGaussian); 17 | imshow("Impulse Noise Image", inputImpulse); 18 | 19 | boxFilter(inputGaussian.clone(), imgBox3x3, inputGaussian.depth(), Size(3, 3)); 20 | boxFilter(inputGaussian.clone(), imgBox7x7, inputGaussian.depth(), Size(7, 7)); 21 | 22 | int wndSize = 3; 23 | double sigma = (wndSize - 1) / 6; 24 | GaussianBlur(inputGaussian.clone(), imgGauss3x3, Size(wndSize, wndSize), sigma, sigma); 25 | wndSize = 7; 26 | sigma = (wndSize - 1) / 6; 27 | GaussianBlur(inputGaussian.clone(), imgGauss7x7, Size(wndSize, wndSize), sigma, sigma); 28 | 29 | medianBlur(inputGaussian.clone(), imgMedian3x3, 3); 30 | medianBlur(inputGaussian.clone(), imgMedian7x7, 7); 31 | 32 | //namedWindow("Gaussian Noise, 3x3 Box Blurred Image", 1); 33 | //namedWindow("Gaussian Noise, 3x3 Gaussian Blurred Image", 1); 34 | //namedWindow("Gaussian Noise, 3x3 Median Blurred Image", 1); 35 | //namedWindow("Gaussian Noise, 7x7 Box Blurred Image", 1); 36 | //namedWindow("Gaussian Noise, 7x7 Gaussian Blurred Image", 1); 37 | //namedWindow("Gaussian Noise, 7x7 Median Blurred Image", 1); 38 | 39 | //imshow("Gaussian Noise, 3x3 Box Blurred Image", imgBox3x3); 40 | //imshow("Gaussian Noise, 3x3 Gaussian Blurred Image", imgGauss3x3); 41 | //imshow("Gaussian Noise, 3x3 Median Blurred Image", imgMedian3x3); 42 | //imshow("Gaussian Noise, 7x7 Box Blurred Image", imgBox7x7); 43 | //imshow("Gaussian Noise, 7x7 Gaussian Blurred Image", imgGauss7x7); 44 | //imshow("Gaussian Noise, 7x7 Median Blurred Image", imgMedian7x7); 45 | 46 | imwrite("gaussian_noise_imgBox3x3.jpg", imgBox3x3); 47 | imwrite("gaussian_noise_imgBox7x7.jpg", imgBox7x7); 48 | imwrite("gaussian_noise_imgGauss3x3.jpg", imgGauss3x3); 49 | imwrite("gaussian_noise_imgGauss7x7.jpg", imgGauss7x7); 50 | imwrite("gaussian_noise_imgMedian3x3.jpg", imgMedian3x3); 51 | imwrite("gaussian_noise_imgMedian7x7.jpg", imgMedian7x7); 52 | 53 | boxFilter(inputImpulse.clone(), imgBox3x3, inputImpulse.depth(), Size(3, 3)); 54 | boxFilter(inputImpulse.clone(), imgBox7x7, inputImpulse.depth(), Size(7, 7)); 55 | 56 | wndSize = 3; 57 | sigma = (wndSize - 1) / 6; 58 | GaussianBlur(inputImpulse.clone(), imgGauss3x3, Size(wndSize, wndSize), sigma, sigma); 59 | wndSize = 7; 60 | sigma = (wndSize - 1) / 6; 61 | GaussianBlur(inputImpulse.clone(), imgGauss7x7, Size(wndSize, wndSize), sigma, sigma); 62 | 63 | medianBlur(inputImpulse.clone(), imgMedian3x3, 3); 64 | medianBlur(inputImpulse.clone(), imgMedian7x7, 7); 65 | 66 | namedWindow("Impulse Noise, 3x3 Box Blurred Image", 1); 67 | namedWindow("Impulse Noise, 3x3 Gaussian Blurred Image", 1); 68 | namedWindow("Impulse Noise, 3x3 Median Blurred Image", 1); 69 | namedWindow("Impulse Noise, 7x7 Box Blurred Image", 1); 70 | namedWindow("Impulse Noise, 7x7 Gaussian Blurred Image", 1); 71 | namedWindow("Impulse Noise, 7x7 Median Blurred Image", 1); 72 | 73 | imshow("Impulse Noise, 3x3 Box Blurred Image", imgBox3x3); 74 | imshow("Impulse Noise, 3x3 Gaussian Blurred Image", imgGauss3x3); 75 | imshow("Impulse Noise, 3x3 Median Blurred Image", imgMedian3x3); 76 | imshow("Impulse Noise, 7x7 Box Blurred Image", imgBox7x7); 77 | imshow("Impulse Noise, 7x7 Gaussian Blurred Image", imgGauss7x7); 78 | imshow("Impulse Noise, 7x7 Median Blurred Image", imgMedian7x7); 79 | 80 | imwrite("Impulse_noise_imgBox3x3.jpg", imgBox3x3); 81 | imwrite("Impulse_noise_imgBox7x7.jpg", imgBox7x7); 82 | imwrite("Impulse_noise_imgGauss3x3.jpg", imgGauss3x3); 83 | imwrite("Impulse_noise_imgGauss7x7.jpg", imgGauss7x7); 84 | imwrite("Impulse_noise_imgMedian3x3.jpg", imgMedian3x3); 85 | imwrite("Impulse_noise_imgMedian7x7.jpg", imgMedian7x7); 86 | 87 | waitKey(0); 88 | 89 | return 0; 90 | } -------------------------------------------------------------------------------- /Image Smoothing/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Smoothing/Thumbs.db -------------------------------------------------------------------------------- /Image Smoothing/lena_impulse_noise.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Smoothing/lena_impulse_noise.jpg -------------------------------------------------------------------------------- /Image Stitching/.vs/Image Stitching/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/.vs/Image Stitching/v14/.suo -------------------------------------------------------------------------------- /Image Stitching/Debug/Image Stitching.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Debug/Image Stitching.exe -------------------------------------------------------------------------------- /Image Stitching/Debug/Image Stitching.ilk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Debug/Image Stitching.ilk -------------------------------------------------------------------------------- /Image Stitching/Debug/Image Stitching.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Debug/Image Stitching.pdb -------------------------------------------------------------------------------- /Image Stitching/Image Stitching.VC.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching.VC.db -------------------------------------------------------------------------------- /Image Stitching/Image Stitching.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Image Stitching", "Image Stitching\Image Stitching.vcxproj", "{8CEBBEBC-98BF-4145-9A21-77DA18F206EF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Debug|x64.ActiveCfg = Debug|x64 17 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Debug|x64.Build.0 = Debug|x64 18 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Debug|x86.ActiveCfg = Debug|Win32 19 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Debug|x86.Build.0 = Debug|Win32 20 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Release|x64.ActiveCfg = Release|x64 21 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Release|x64.Build.0 = Release|x64 22 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Release|x86.ActiveCfg = Release|Win32 23 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.log: -------------------------------------------------------------------------------- 1 |  Image Stitching.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Image Stitching\Debug\Image Stitching.exe 2 | Image Stitching.vcxproj -> C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Image Stitching\Debug\Image Stitching.pdb (Full PDB) 3 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/Image Stitching.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|Win32|C:\Users\Alison\Documents\Visual Studio 2015\Projects\Website\Image Stitching\| 3 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Image Stitching.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/Source.obj -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/vc140.idb -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/Debug/vc140.pdb -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Image Stitching.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {8CEBBEBC-98BF-4145-9A21-77DA18F206EF} 23 | Win32Proj 24 | ImageStitching 25 | 8.1 26 | 27 | 28 | 29 | Application 30 | true 31 | v140 32 | Unicode 33 | 34 | 35 | Application 36 | false 37 | v140 38 | true 39 | Unicode 40 | 41 | 42 | Application 43 | true 44 | v140 45 | Unicode 46 | 47 | 48 | Application 49 | false 50 | v140 51 | true 52 | Unicode 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | true 78 | 79 | 80 | false 81 | 82 | 83 | false 84 | 85 | 86 | 87 | 88 | 89 | Level3 90 | Disabled 91 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Console 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | Level3 104 | Disabled 105 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 106 | true 107 | C:\OpenCV 3.1\build\install\x86\vc14\bin;C:\OpenCV 3.1\build\install\include 108 | 109 | 110 | Console 111 | true 112 | C:\OpenCV 3.1\build\install\x86\vc14\lib 113 | opencv_calib3d310d.lib;opencv_core310d.lib;opencv_face310d.lib;opencv_features2d310d.lib;opencv_flann310d.lib;opencv_highgui310d.lib;opencv_imgcodecs310d.lib;opencv_imgproc310d.lib;opencv_ml310d.lib;opencv_objdetect310d.lib;opencv_photo310d.lib;opencv_shape310d.lib;opencv_stitching310d.lib;opencv_superres310d.lib;opencv_video310d.lib;opencv_videoio310d.lib;opencv_videostab310d.lib;opencv_ximgproc310d.lib;opencv_ximgproc310.lib;opencv_xphoto310d.lib;opencv_xphoto310.lib 114 | 115 | 116 | 117 | 118 | Level3 119 | 120 | 121 | MaxSpeed 122 | true 123 | true 124 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 125 | true 126 | 127 | 128 | Console 129 | true 130 | true 131 | true 132 | 133 | 134 | 135 | 136 | Level3 137 | 138 | 139 | MaxSpeed 140 | true 141 | true 142 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 143 | true 144 | 145 | 146 | Console 147 | true 148 | true 149 | true 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Image Stitching.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Image Stitching.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Ryerson-left.jpg Ryerson-right.jpg 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/ORB_BruteForce-Hamming(2).yml: -------------------------------------------------------------------------------- 1 | %YAML 1.0 2 | --- 3 | Matches: [ 0, 11, 0, 46., 1, 443, 0, 64., 2, 71, 0, 64., 3, 5, 0, 42., 4, 4 | 86, 0, 36., 5, 432, 0, 53., 6, 10, 0, 27., 7, 255, 0, 62., 8, 142, 0, 5 | 47., 9, 483, 0, 47., 10, 134, 0, 44., 11, 182, 0, 62., 12, 125, 0, 6 | 48., 13, 27, 0, 36., 14, 340, 0, 51., 15, 490, 0, 64., 16, 68, 0, 7 | 56., 17, 157, 0, 49., 18, 179, 0, 60., 19, 35, 0, 33., 20, 75, 0, 8 | 58., 21, 432, 0, 49., 22, 321, 0, 63., 23, 45, 0, 45., 24, 332, 0, 9 | 39., 25, 68, 0, 70., 26, 462, 0, 63., 27, 32, 0, 39., 28, 49, 0, 26., 10 | 29, 45, 0, 58., 30, 5, 0, 55., 31, 89, 0, 41., 32, 89, 0, 42., 33, 11 | 469, 0, 49., 34, 42, 0, 41., 35, 22, 0, 57., 36, 63, 0, 34., 37, 355, 12 | 0, 62., 38, 24, 0, 45., 39, 173, 0, 66., 40, 2, 0, 23., 41, 418, 0, 13 | 45., 42, 11, 0, 37., 43, 427, 0, 49., 44, 284, 0, 50., 45, 11, 0, 14 | 42., 46, 362, 0, 39., 47, 120, 0, 45., 48, 275, 0, 49., 49, 88, 0, 15 | 17., 50, 67, 0, 36., 51, 15, 0, 26., 52, 101, 0, 48., 53, 17, 0, 55., 16 | 54, 52, 0, 53., 55, 126, 0, 23., 56, 307, 0, 64., 57, 338, 0, 55., 17 | 58, 73, 0, 42., 59, 107, 0, 47., 60, 284, 0, 54., 61, 142, 0, 44., 18 | 62, 231, 0, 58., 63, 233, 0, 41., 64, 97, 0, 39., 65, 368, 0, 43., 19 | 66, 73, 0, 60., 67, 17, 0, 51., 68, 96, 0, 21., 69, 478, 0, 66., 70, 20 | 275, 0, 64., 71, 81, 0, 16., 72, 268, 0, 42., 73, 372, 0, 47., 74, 21 | 317, 0, 59., 75, 11, 0, 57., 76, 62, 0, 59., 77, 85, 0, 41., 78, 351, 22 | 0, 70., 79, 32, 0, 32., 80, 316, 0, 41., 81, 474, 0, 62., 82, 60, 0, 23 | 17., 83, 1, 0, 54., 84, 194, 0, 44., 85, 399, 0, 48., 86, 466, 0, 24 | 42., 87, 194, 0, 65., 88, 57, 0, 47., 89, 117, 0, 45., 90, 60, 0, 25 | 56., 91, 464, 0, 55., 92, 17, 0, 51., 93, 73, 0, 55., 94, 314, 0, 26 | 63., 95, 14, 0, 44., 96, 328, 0, 53., 97, 83, 0, 43., 98, 103, 0, 27 | 40., 99, 112, 0, 28., 100, 464, 0, 58., 101, 89, 0, 39., 102, 79, 0, 28 | 57., 103, 294, 0, 47., 104, 198, 0, 62., 105, 414, 0, 61., 106, 283, 29 | 0, 40., 107, 32, 0, 43., 108, 76, 0, 28., 109, 56, 0, 45., 110, 120, 30 | 0, 45., 111, 143, 0, 46., 112, 126, 0, 22., 113, 85, 0, 35., 114, 83, 31 | 0, 42., 115, 283, 0, 45., 116, 45, 0, 52., 117, 76, 0, 54., 118, 89, 32 | 0, 21., 119, 455, 0, 55., 120, 127, 0, 57., 121, 261, 0, 51., 122, 33 | 115, 0, 24., 123, 8, 0, 57., 124, 125, 0, 51., 125, 70, 0, 52., 126, 34 | 117, 0, 33., 127, 316, 0, 41., 128, 50, 0, 38., 129, 255, 0, 56., 35 | 130, 144, 0, 44., 131, 154, 0, 49., 132, 111, 0, 26., 133, 131, 0, 36 | 23., 134, 283, 0, 49., 135, 91, 0, 27., 136, 27, 0, 33., 137, 80, 0, 37 | 66., 138, 134, 0, 42., 139, 444, 0, 65., 140, 91, 0, 55., 141, 23, 0, 38 | 44., 142, 187, 0, 66., 143, 129, 0, 22., 144, 358, 0, 52., 145, 425, 39 | 0, 55., 146, 112, 0, 46., 147, 149, 0, 30., 148, 253, 0, 62., 149, 40 | 179, 0, 60., 150, 444, 0, 64., 151, 448, 0, 53., 152, 112, 0, 29., 41 | 153, 328, 0, 42., 154, 29, 0, 74., 155, 196, 0, 50., 156, 198, 0, 42 | 49., 157, 152, 0, 50., 158, 316, 0, 53., 159, 155, 0, 47., 160, 268, 43 | 0, 33., 161, 269, 0, 47., 162, 118, 0, 55., 163, 116, 0, 29., 164, 44 | 85, 0, 54., 165, 369, 0, 48., 166, 342, 0, 61., 167, 110, 0, 28., 45 | 168, 240, 0, 62., 169, 123, 0, 46., 170, 24, 0, 28., 171, 111, 0, 46 | 51., 172, 61, 0, 28., 173, 89, 0, 42., 174, 28, 0, 49., 175, 100, 0, 47 | 52., 176, 432, 0, 67., 177, 218, 0, 63., 178, 100, 0, 56., 179, 162, 48 | 0, 25., 180, 270, 0, 52., 181, 194, 0, 38., 182, 203, 0, 48., 183, 49 | 414, 0, 35., 184, 95, 0, 29., 185, 336, 0, 59., 186, 180, 0, 57., 50 | 187, 187, 0, 60., 188, 101, 0, 42., 189, 113, 0, 17., 190, 209, 0, 51 | 62., 191, 269, 0, 53., 192, 11, 0, 28., 193, 364, 0, 44., 194, 103, 52 | 0, 40., 195, 41, 0, 16., 196, 2, 0, 53., 197, 358, 0, 50., 198, 153, 53 | 0, 55., 199, 174, 0, 58., 200, 231, 0, 50., 201, 211, 0, 40., 202, 54 | 270, 0, 47., 203, 218, 0, 59., 204, 252, 0, 56., 205, 223, 0, 46., 55 | 206, 129, 0, 23., 207, 411, 0, 62., 208, 288, 0, 57., 209, 342, 0, 56 | 45., 210, 145, 0, 48., 211, 336, 0, 36., 212, 202, 0, 25., 213, 109, 57 | 0, 31., 214, 323, 0, 36., 215, 443, 0, 67., 216, 209, 0, 14., 217, 58 | 157, 0, 51., 218, 235, 0, 24., 219, 409, 0, 51., 220, 309, 0, 31., 59 | 221, 112, 0, 35., 222, 302, 0, 42., 223, 198, 0, 42., 224, 121, 0, 60 | 28., 225, 256, 0, 24., 226, 387, 0, 52., 227, 363, 0, 62., 228, 253, 61 | 0, 44., 229, 206, 0, 26., 230, 134, 0, 42., 231, 264, 0, 48., 232, 62 | 238, 0, 46., 233, 269, 0, 53., 234, 123, 0, 24., 235, 122, 0, 35., 63 | 236, 196, 0, 48., 237, 45, 0, 67., 238, 449, 0, 62., 239, 85, 0, 51., 64 | 240, 414, 0, 38., 241, 388, 0, 59., 242, 277, 0, 32., 243, 136, 0, 65 | 41., 244, 150, 0, 47., 245, 149, 0, 27., 246, 124, 0, 25., 247, 262, 66 | 0, 50., 248, 131, 0, 23., 249, 336, 0, 45., 250, 6, 0, 65., 251, 437, 67 | 0, 56., 252, 48, 0, 65., 253, 336, 0, 41., 254, 296, 0, 47., 255, 68 | 430, 0, 42., 256, 143, 0, 40., 257, 371, 0, 60., 258, 114, 0, 25., 69 | 259, 263, 0, 30., 260, 431, 0, 50., 261, 393, 0, 48., 262, 23, 0, 70 | 68., 263, 220, 0, 28., 264, 99, 0, 65., 265, 133, 0, 63., 266, 246, 71 | 0, 61., 267, 145, 0, 18., 268, 90, 0, 51., 269, 268, 0, 33., 270, 72 | 101, 0, 48., 271, 205, 0, 24., 272, 225, 0, 52., 273, 267, 0, 47., 73 | 274, 265, 0, 34., 275, 202, 0, 20., 276, 168, 0, 66., 277, 198, 0, 74 | 35., 278, 253, 0, 42., 279, 134, 0, 48., 280, 299, 0, 33., 281, 38, 75 | 0, 59., 282, 179, 0, 70., 283, 425, 0, 53., 284, 354, 0, 43., 285, 76 | 314, 0, 27., 286, 252, 0, 50., 287, 385, 0, 48., 288, 168, 0, 66., 77 | 289, 387, 0, 49., 290, 238, 0, 19., 291, 430, 0, 33., 292, 388, 0, 78 | 47., 293, 277, 0, 24., 294, 432, 0, 50., 295, 342, 0, 57., 296, 483, 79 | 0, 45., 297, 387, 0, 62., 298, 309, 0, 23., 299, 395, 0, 56., 300, 80 | 361, 0, 33., 301, 112, 0, 37., 302, 392, 0, 36., 303, 431, 0, 48., 81 | 304, 385, 0, 38., 305, 11, 0, 53., 306, 342, 0, 44., 307, 385, 0, 82 | 49., 308, 336, 0, 52., 309, 302, 0, 21., 310, 298, 0, 30., 311, 274, 83 | 0, 33., 312, 498, 0, 39., 313, 122, 0, 30., 314, 303, 0, 56., 315, 84 | 473, 0, 63., 316, 304, 0, 26., 317, 106, 0, 53., 318, 145, 0, 49., 85 | 319, 199, 0, 19., 320, 290, 0, 42., 321, 306, 0, 22., 322, 112, 0, 86 | 49., 323, 310, 0, 37., 324, 363, 0, 54., 325, 232, 0, 54., 326, 296, 87 | 0, 24., 327, 425, 0, 49., 328, 57, 0, 51., 329, 337, 0, 50., 330, 33, 88 | 0, 62., 331, 307, 0, 14., 332, 317, 0, 27., 333, 294, 0, 26., 334, 89 | 473, 0, 58., 335, 232, 0, 30., 336, 243, 0, 55., 337, 184, 0, 49., 90 | 338, 387, 0, 44., 339, 259, 0, 49., 340, 85, 0, 44., 341, 354, 0, 91 | 36., 342, 27, 0, 48., 343, 336, 0, 45., 344, 137, 0, 62., 345, 282, 92 | 0, 49., 346, 353, 0, 32., 347, 387, 0, 31., 348, 456, 0, 36., 349, 93 | 14, 0, 53., 350, 210, 0, 31., 351, 352, 0, 28., 352, 26, 0, 57., 353, 94 | 414, 0, 41., 354, 252, 0, 57., 355, 434, 0, 31., 356, 184, 0, 56., 95 | 357, 456, 0, 50., 358, 28, 0, 46., 359, 288, 0, 49., 360, 371, 0, 96 | 36., 361, 358, 0, 15., 362, 30, 0, 56., 363, 301, 0, 27., 364, 280, 97 | 0, 62., 365, 350, 0, 29., 366, 498, 0, 28., 367, 345, 0, 30., 368, 98 | 368, 0, 29., 369, 348, 0, 30., 370, 309, 0, 31., 371, 367, 0, 29., 99 | 372, 387, 0, 65., 373, 303, 0, 27., 374, 369, 0, 39., 375, 116, 0, 100 | 47., 376, 157, 0, 70., 377, 343, 0, 51., 378, 326, 0, 42., 379, 430, 101 | 0, 32., 380, 89, 0, 31., 381, 11, 0, 44., 382, 314, 0, 37., 383, 346, 102 | 0, 21., 384, 348, 0, 46., 385, 458, 0, 30., 386, 106, 0, 59., 387, 103 | 356, 0, 34., 388, 431, 0, 59., 389, 399, 0, 25., 390, 340, 0, 30., 104 | 391, 419, 0, 53., 392, 446, 0, 30., 393, 430, 0, 34., 394, 112, 0, 105 | 53., 395, 74, 0, 44., 396, 434, 0, 24., 397, 116, 0, 50., 398, 362, 106 | 0, 59., 399, 352, 0, 27., 400, 237, 0, 48., 401, 423, 0, 22., 402, 107 | 408, 0, 27., 403, 456, 0, 43., 404, 498, 0, 27., 405, 430, 0, 45., 108 | 406, 100, 0, 49., 407, 57, 0, 41., 408, 326, 0, 46., 409, 444, 0, 109 | 40., 410, 393, 0, 55., 411, 415, 0, 30., 412, 417, 0, 36., 413, 401, 110 | 0, 46., 414, 483, 0, 38., 415, 400, 0, 33., 416, 70, 0, 52., 417, 111 | 397, 0, 31., 418, 387, 0, 40., 419, 184, 0, 43., 420, 302, 0, 35., 112 | 421, 387, 0, 43., 422, 306, 0, 34., 423, 411, 0, 38., 424, 184, 0, 113 | 56., 425, 348, 0, 18., 426, 348, 0, 51., 427, 8, 0, 56., 428, 348, 0, 114 | 51., 429, 137, 0, 65., 430, 488, 0, 30., 431, 431, 0, 23., 432, 364, 115 | 0, 29., 433, 448, 0, 28., 434, 57, 0, 42., 435, 456, 0, 29., 436, 116 | 338, 0, 51., 437, 184, 0, 46., 438, 95, 0, 37., 439, 446, 0, 39., 117 | 440, 8, 0, 58., 441, 417, 0, 51., 442, 436, 0, 49., 443, 464, 0, 53., 118 | 444, 441, 0, 44., 445, 433, 0, 49., 446, 381, 0, 55., 447, 396, 0, 119 | 42., 448, 498, 0, 16., 449, 458, 0, 42., 450, 5, 0, 57., 451, 183, 0, 120 | 47., 452, 439, 0, 30., 453, 423, 0, 26., 454, 362, 0, 64., 455, 483, 121 | 0, 31., 456, 483, 0, 47., 457, 461, 0, 26., 458, 342, 0, 51., 459, 122 | 478, 0, 46., 460, 434, 0, 36., 461, 368, 0, 50., 462, 462, 0, 28., 123 | 463, 306, 0, 41., 464, 452, 0, 35., 465, 326, 0, 66., 466, 401, 0, 124 | 27., 467, 488, 0, 24., 468, 456, 0, 54., 469, 487, 0, 28., 470, 175, 125 | 0, 51., 471, 484, 0, 42., 472, 483, 0, 43., 473, 473, 0, 51., 474, 126 | 478, 0, 54., 475, 469, 0, 22., 476, 474, 0, 46., 477, 482, 0, 43., 127 | 478, 6, 0, 58., 479, 417, 0, 53., 480, 498, 0, 14., 481, 8, 0, 50., 128 | 482, 480, 0, 26., 483, 306, 0, 45., 484, 281, 0, 36., 485, 436, 0, 129 | 41., 486, 423, 0, 25., 487, 246, 0, 48., 488, 179, 0, 53., 489, 375, 130 | 0, 61., 490, 100, 0, 55., 491, 472, 0, 32., 492, 497, 0, 63., 493, 131 | 187, 0, 62., 494, 495, 0, 51., 495, 259, 0, 47., 496, 88, 0, 51., 132 | 497, 447, 0, 45., 498, 494, 0, 50., 499, 462, 0, 44. ] 133 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/ORB_BruteForce-Hamming.yml: -------------------------------------------------------------------------------- 1 | %YAML 1.0 2 | --- 3 | Matches: [ 0, 11, 0, 49., 1, 443, 0, 76., 2, 71, 0, 74., 3, 5, 0, 47., 4, 4 | 86, 0, 36., 5, 432, 0, 64., 6, 10, 0, 28., 7, 338, 0, 72., 8, 142, 0, 5 | 51., 9, 483, 0, 54., 10, 134, 0, 48., 11, 320, 0, 73., 12, 125, 0, 6 | 56., 13, 27, 0, 40., 14, 340, 0, 62., 15, 490, 0, 75., 16, 68, 0, 7 | 61., 17, 157, 0, 54., 18, 179, 0, 70., 19, 35, 0, 35., 20, 75, 0, 8 | 68., 21, 425, 0, 57., 22, 321, 0, 72., 23, 45, 0, 54., 24, 332, 0, 9 | 43., 25, 88, 0, 81., 26, 307, 0, 72., 27, 32, 0, 41., 28, 49, 0, 28., 10 | 29, 45, 0, 68., 30, 5, 0, 62., 31, 89, 0, 48., 32, 38, 0, 45., 33, 11 | 439, 0, 57., 34, 42, 0, 46., 35, 22, 0, 63., 36, 63, 0, 34., 37, 414, 12 | 0, 73., 38, 24, 0, 49., 39, 242, 0, 75., 40, 2, 0, 24., 41, 418, 0, 13 | 51., 42, 11, 0, 41., 43, 427, 0, 54., 44, 284, 0, 56., 45, 11, 0, 14 | 47., 46, 362, 0, 45., 47, 120, 0, 49., 48, 275, 0, 55., 49, 88, 0, 15 | 17., 50, 67, 0, 39., 51, 15, 0, 28., 52, 101, 0, 55., 53, 17, 0, 63., 16 | 54, 52, 0, 60., 55, 126, 0, 24., 56, 307, 0, 73., 57, 287, 0, 63., 17 | 58, 73, 0, 45., 59, 107, 0, 50., 60, 284, 0, 60., 61, 142, 0, 46., 18 | 62, 76, 0, 68., 63, 332, 0, 45., 64, 97, 0, 41., 65, 368, 0, 48., 66, 19 | 73, 0, 73., 67, 17, 0, 55., 68, 96, 0, 22., 69, 361, 0, 81., 70, 275, 20 | 0, 77., 71, 81, 0, 18., 72, 268, 0, 47., 73, 372, 0, 52., 74, 317, 0, 21 | 67., 75, 11, 0, 66., 76, 62, 0, 66., 77, 85, 0, 45., 78, 351, 0, 81., 22 | 79, 32, 0, 38., 80, 316, 0, 45., 81, 355, 0, 74., 82, 60, 0, 18., 83, 23 | 1, 0, 61., 84, 194, 0, 46., 85, 399, 0, 53., 86, 466, 0, 48., 87, 24 | 194, 0, 77., 88, 57, 0, 53., 89, 117, 0, 48., 90, 60, 0, 64., 91, 25 | 464, 0, 63., 92, 17, 0, 61., 93, 73, 0, 62., 94, 314, 0, 74., 95, 14, 26 | 0, 48., 96, 328, 0, 54., 97, 83, 0, 47., 98, 103, 0, 44., 99, 112, 0, 27 | 28., 100, 464, 0, 68., 101, 89, 0, 41., 102, 79, 0, 59., 103, 481, 0, 28 | 55., 104, 454, 0, 71., 105, 384, 0, 67., 106, 283, 0, 48., 107, 32, 29 | 0, 47., 108, 76, 0, 32., 109, 56, 0, 54., 110, 120, 0, 54., 111, 143, 30 | 0, 51., 112, 126, 0, 22., 113, 85, 0, 41., 114, 67, 0, 47., 115, 283, 31 | 0, 50., 116, 45, 0, 57., 117, 76, 0, 65., 118, 89, 0, 22., 119, 455, 32 | 0, 60., 120, 127, 0, 62., 121, 261, 0, 56., 122, 115, 0, 26., 123, 8, 33 | 0, 67., 124, 125, 0, 59., 125, 11, 0, 59., 126, 117, 0, 37., 127, 34 | 316, 0, 44., 128, 50, 0, 40., 129, 338, 0, 64., 130, 144, 0, 49., 35 | 131, 154, 0, 54., 132, 111, 0, 27., 133, 131, 0, 24., 134, 283, 0, 36 | 55., 135, 91, 0, 28., 136, 27, 0, 35., 137, 80, 0, 76., 138, 134, 0, 37 | 49., 139, 462, 0, 79., 140, 91, 0, 64., 141, 23, 0, 51., 142, 187, 0, 38 | 82., 143, 129, 0, 24., 144, 284, 0, 57., 145, 456, 0, 63., 146, 112, 39 | 0, 51., 147, 149, 0, 31., 148, 253, 0, 73., 149, 179, 0, 68., 150, 40 | 449, 0, 78., 151, 399, 0, 64., 152, 112, 0, 30., 153, 328, 0, 45., 41 | 154, 398, 0, 85., 155, 196, 0, 56., 156, 198, 0, 52., 157, 152, 0, 42 | 54., 158, 224, 0, 65., 159, 155, 0, 51., 160, 268, 0, 37., 161, 269, 43 | 0, 50., 162, 118, 0, 59., 163, 116, 0, 30., 164, 140, 0, 62., 165, 44 | 369, 0, 57., 166, 342, 0, 74., 167, 162, 0, 31., 168, 109, 0, 74., 45 | 169, 123, 0, 52., 170, 24, 0, 30., 171, 111, 0, 60., 172, 61, 0, 30., 46 | 173, 166, 0, 43., 174, 145, 0, 52., 175, 100, 0, 63., 176, 432, 0, 47 | 79., 177, 282, 0, 77., 178, 100, 0, 68., 179, 162, 0, 25., 180, 270, 48 | 0, 55., 181, 194, 0, 39., 182, 288, 0, 56., 183, 362, 0, 42., 184, 49 | 95, 0, 32., 185, 336, 0, 68., 186, 180, 0, 63., 187, 187, 0, 74., 50 | 188, 101, 0, 46., 189, 113, 0, 18., 190, 137, 0, 72., 191, 269, 0, 51 | 64., 192, 11, 0, 28., 193, 364, 0, 49., 194, 103, 0, 45., 195, 41, 0, 52 | 18., 196, 369, 0, 57., 197, 127, 0, 56., 198, 153, 0, 63., 199, 174, 53 | 0, 68., 200, 231, 0, 57., 201, 211, 0, 45., 202, 270, 0, 55., 203, 54 | 218, 0, 69., 204, 252, 0, 63., 205, 223, 0, 51., 206, 129, 0, 23., 55 | 207, 411, 0, 75., 208, 288, 0, 66., 209, 336, 0, 50., 210, 8, 0, 53., 56 | 211, 336, 0, 37., 212, 202, 0, 26., 213, 109, 0, 34., 214, 323, 0, 57 | 42., 215, 385, 0, 77., 216, 209, 0, 16., 217, 157, 0, 57., 218, 235, 58 | 0, 24., 219, 409, 0, 58., 220, 309, 0, 33., 221, 49, 0, 38., 222, 59 | 302, 0, 47., 223, 198, 0, 45., 224, 121, 0, 30., 225, 113, 0, 26., 60 | 226, 387, 0, 64., 227, 363, 0, 72., 228, 253, 0, 48., 229, 206, 0, 61 | 27., 230, 212, 0, 51., 231, 264, 0, 52., 232, 238, 0, 52., 233, 269, 62 | 0, 59., 234, 123, 0, 27., 235, 122, 0, 38., 236, 196, 0, 56., 237, 63 | 449, 0, 78., 238, 449, 0, 70., 239, 85, 0, 60., 240, 285, 0, 42., 64 | 241, 23, 0, 74., 242, 277, 0, 33., 243, 136, 0, 42., 244, 150, 0, 65 | 55., 245, 149, 0, 28., 246, 124, 0, 25., 247, 262, 0, 57., 248, 131, 66 | 0, 23., 249, 336, 0, 48., 250, 6, 0, 74., 251, 252, 0, 62., 252, 282, 67 | 0, 76., 253, 336, 0, 47., 254, 296, 0, 56., 255, 430, 0, 44., 256, 68 | 234, 0, 42., 257, 371, 0, 71., 258, 114, 0, 27., 259, 263, 0, 30., 69 | 260, 431, 0, 56., 261, 393, 0, 51., 262, 446, 0, 79., 263, 220, 0, 70 | 31., 264, 99, 0, 72., 265, 133, 0, 74., 266, 446, 0, 72., 267, 145, 71 | 0, 19., 268, 56, 0, 63., 269, 268, 0, 35., 270, 101, 0, 52., 271, 72 | 205, 0, 26., 272, 225, 0, 59., 273, 267, 0, 51., 274, 265, 0, 35., 73 | 275, 202, 0, 21., 276, 168, 0, 79., 277, 198, 0, 37., 278, 253, 0, 74 | 47., 279, 284, 0, 51., 280, 299, 0, 35., 281, 234, 0, 67., 282, 179, 75 | 0, 83., 283, 425, 0, 62., 284, 354, 0, 51., 285, 314, 0, 30., 286, 76 | 252, 0, 59., 287, 385, 0, 55., 288, 168, 0, 81., 289, 387, 0, 55., 77 | 290, 238, 0, 23., 291, 430, 0, 36., 292, 388, 0, 57., 293, 277, 0, 78 | 24., 294, 385, 0, 55., 295, 342, 0, 67., 296, 483, 0, 53., 297, 387, 79 | 0, 73., 298, 309, 0, 23., 299, 197, 0, 62., 300, 350, 0, 34., 301, 80 | 112, 0, 41., 302, 392, 0, 43., 303, 431, 0, 52., 304, 385, 0, 41., 81 | 305, 11, 0, 57., 306, 342, 0, 50., 307, 385, 0, 57., 308, 336, 0, 82 | 55., 309, 302, 0, 21., 310, 298, 0, 31., 311, 274, 0, 35., 312, 498, 83 | 0, 43., 313, 122, 0, 32., 314, 303, 0, 67., 315, 473, 0, 73., 316, 84 | 304, 0, 27., 317, 106, 0, 60., 318, 8, 0, 55., 319, 199, 0, 21., 320, 85 | 290, 0, 48., 321, 306, 0, 24., 322, 112, 0, 56., 323, 310, 0, 43., 86 | 324, 363, 0, 60., 325, 232, 0, 61., 326, 296, 0, 24., 327, 425, 0, 87 | 55., 328, 85, 0, 59., 329, 104, 0, 56., 330, 130, 0, 67., 331, 307, 88 | 0, 15., 332, 317, 0, 29., 333, 294, 0, 29., 334, 473, 0, 63., 335, 89 | 232, 0, 31., 336, 120, 0, 63., 337, 184, 0, 56., 338, 387, 0, 49., 90 | 339, 402, 0, 55., 340, 85, 0, 47., 341, 354, 0, 42., 342, 260, 0, 91 | 56., 343, 336, 0, 51., 344, 255, 0, 71., 345, 282, 0, 52., 346, 353, 92 | 0, 35., 347, 387, 0, 35., 348, 456, 0, 37., 349, 14, 0, 61., 350, 93 | 210, 0, 37., 351, 352, 0, 29., 352, 129, 0, 63., 353, 414, 0, 44., 94 | 354, 252, 0, 65., 355, 434, 0, 36., 356, 184, 0, 62., 357, 456, 0, 95 | 56., 358, 28, 0, 54., 359, 288, 0, 55., 360, 371, 0, 38., 361, 358, 96 | 0, 15., 362, 30, 0, 67., 363, 301, 0, 29., 364, 303, 0, 72., 365, 97 | 350, 0, 31., 366, 498, 0, 29., 367, 345, 0, 31., 368, 368, 0, 29., 98 | 369, 348, 0, 31., 370, 309, 0, 36., 371, 367, 0, 36., 372, 198, 0, 99 | 75., 373, 303, 0, 29., 374, 369, 0, 43., 375, 116, 0, 55., 376, 179, 100 | 0, 81., 377, 343, 0, 54., 378, 326, 0, 44., 379, 430, 0, 33., 380, 101 | 89, 0, 35., 381, 11, 0, 48., 382, 314, 0, 39., 383, 346, 0, 22., 384, 102 | 348, 0, 53., 385, 458, 0, 35., 386, 106, 0, 66., 387, 356, 0, 35., 103 | 388, 395, 0, 68., 389, 399, 0, 26., 390, 340, 0, 31., 391, 419, 0, 104 | 64., 392, 446, 0, 30., 393, 430, 0, 37., 394, 112, 0, 59., 395, 74, 105 | 0, 47., 396, 434, 0, 24., 397, 116, 0, 52., 398, 395, 0, 70., 399, 106 | 352, 0, 29., 400, 387, 0, 53., 401, 423, 0, 23., 402, 408, 0, 27., 107 | 403, 456, 0, 45., 404, 498, 0, 30., 405, 430, 0, 51., 406, 100, 0, 108 | 55., 407, 57, 0, 45., 408, 326, 0, 52., 409, 444, 0, 42., 410, 338, 109 | 0, 63., 411, 415, 0, 30., 412, 417, 0, 39., 413, 364, 0, 54., 414, 110 | 483, 0, 42., 415, 400, 0, 36., 416, 70, 0, 54., 417, 397, 0, 32., 111 | 418, 387, 0, 43., 419, 184, 0, 45., 420, 302, 0, 40., 421, 387, 0, 112 | 47., 422, 306, 0, 37., 423, 411, 0, 40., 424, 184, 0, 64., 425, 348, 113 | 0, 18., 426, 348, 0, 59., 427, 8, 0, 67., 428, 348, 0, 54., 429, 157, 114 | 0, 78., 430, 488, 0, 31., 431, 431, 0, 25., 432, 364, 0, 30., 433, 115 | 448, 0, 31., 434, 57, 0, 49., 435, 456, 0, 30., 436, 338, 0, 59., 116 | 437, 184, 0, 49., 438, 95, 0, 42., 439, 446, 0, 39., 440, 8, 0, 67., 117 | 441, 417, 0, 57., 442, 436, 0, 52., 443, 464, 0, 61., 444, 484, 0, 118 | 52., 445, 433, 0, 59., 446, 381, 0, 60., 447, 396, 0, 44., 448, 498, 119 | 0, 16., 449, 458, 0, 48., 450, 100, 0, 65., 451, 369, 0, 52., 452, 120 | 439, 0, 31., 453, 423, 0, 27., 454, 362, 0, 76., 455, 466, 0, 32., 121 | 456, 465, 0, 54., 457, 461, 0, 28., 458, 342, 0, 55., 459, 478, 0, 122 | 51., 460, 434, 0, 39., 461, 368, 0, 55., 462, 462, 0, 33., 463, 407, 123 | 0, 46., 464, 452, 0, 37., 465, 326, 0, 77., 466, 401, 0, 30., 467, 124 | 488, 0, 27., 468, 425, 0, 59., 469, 487, 0, 32., 470, 441, 0, 58., 125 | 471, 484, 0, 43., 472, 483, 0, 46., 473, 473, 0, 56., 474, 478, 0, 126 | 58., 475, 469, 0, 24., 476, 474, 0, 51., 477, 482, 0, 48., 478, 6, 0, 127 | 66., 479, 417, 0, 55., 480, 498, 0, 15., 481, 8, 0, 55., 482, 480, 0, 128 | 26., 483, 306, 0, 49., 484, 489, 0, 41., 485, 436, 0, 46., 486, 423, 129 | 0, 27., 487, 246, 0, 59., 488, 179, 0, 63., 489, 375, 0, 69., 490, 130 | 100, 0, 64., 491, 472, 0, 35., 492, 464, 0, 73., 493, 457, 0, 65., 131 | 494, 434, 0, 58., 495, 259, 0, 58., 496, 88, 0, 54., 497, 476, 0, 132 | 50., 498, 494, 0, 63., 499, 462, 0, 47. ] 133 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/ORB_BruteForce-L1.yml: -------------------------------------------------------------------------------- 1 | %YAML 1.0 2 | --- 3 | Matches: [ 0, 11, 0, 889., 1, 441, 0, 1797., 2, 412, 0, 1496., 3, 100, 0, 4 | 1541., 4, 86, 0, 963., 5, 6, 0, 1247., 6, 86, 0, 833., 7, 338, 0, 5 | 1600., 8, 142, 0, 1047., 9, 351, 0, 1543., 10, 134, 0, 1036., 11, 6 | 323, 0, 1469., 12, 125, 0, 1513., 13, 27, 0, 775., 14, 340, 0, 1192., 7 | 15, 116, 0, 1627., 16, 314, 0, 1091., 17, 338, 0, 1491., 18, 475, 0, 8 | 1527., 19, 35, 0, 589., 20, 390, 0, 1856., 21, 432, 0, 1382., 22, 41, 9 | 0, 1569., 23, 485, 0, 1685., 24, 341, 0, 990., 25, 91, 0, 1647., 26, 10 | 307, 0, 1406., 27, 32, 0, 1107., 28, 49, 0, 500., 29, 355, 0, 1652., 11 | 30, 297, 0, 1651., 31, 89, 0, 871., 32, 38, 0, 1103., 33, 480, 0, 12 | 1087., 34, 42, 0, 1332., 35, 22, 0, 1670., 36, 61, 0, 1096., 37, 433, 13 | 0, 1351., 38, 57, 0, 1243., 39, 173, 0, 1456., 40, 2, 0, 492., 41, 14 | 107, 0, 1053., 42, 11, 0, 813., 43, 492, 0, 1233., 44, 284, 0, 1430., 15 | 45, 11, 0, 645., 46, 414, 0, 1051., 47, 18, 0, 954., 48, 275, 0, 16 | 1072., 49, 88, 0, 448., 50, 67, 0, 862., 51, 162, 0, 994., 52, 261, 17 | 0, 1344., 53, 17, 0, 1813., 54, 29, 0, 1358., 55, 126, 0, 384., 56, 18 | 413, 0, 1414., 57, 228, 0, 1326., 58, 73, 0, 1331., 59, 107, 0, 19 | 1323., 60, 228, 0, 1400., 61, 145, 0, 987., 62, 53, 0, 1283., 63, 20 | 196, 0, 958., 64, 123, 0, 861., 65, 345, 0, 776., 66, 451, 0, 1581., 21 | 67, 17, 0, 1534., 68, 96, 0, 451., 69, 343, 0, 1602., 70, 275, 0, 22 | 1429., 71, 81, 0, 671., 72, 268, 0, 1223., 73, 372, 0, 1099., 74, 23 | 294, 0, 1289., 75, 294, 0, 1493., 76, 285, 0, 1211., 77, 85, 0, 906., 24 | 78, 385, 0, 1850., 79, 32, 0, 860., 80, 302, 0, 1063., 81, 286, 0, 25 | 1419., 82, 60, 0, 425., 83, 443, 0, 1560., 84, 194, 0, 1425., 85, 26 | 225, 0, 1216., 86, 430, 0, 1188., 87, 429, 0, 1573., 88, 66, 0, 27 | 1218., 89, 117, 0, 1038., 90, 60, 0, 1121., 91, 497, 0, 1513., 92, 28 | 168, 0, 1220., 93, 413, 0, 1716., 94, 449, 0, 1620., 95, 14, 0, 997., 29 | 96, 328, 0, 997., 97, 83, 0, 1202., 98, 103, 0, 970., 99, 358, 0, 30 | 814., 100, 446, 0, 1439., 101, 212, 0, 948., 102, 115, 0, 1409., 103, 31 | 436, 0, 1455., 104, 91, 0, 1394., 105, 433, 0, 1680., 106, 387, 0, 32 | 919., 107, 76, 0, 1350., 108, 76, 0, 743., 109, 56, 0, 1192., 110, 33 | 18, 0, 1084., 111, 143, 0, 1128., 112, 126, 0, 455., 113, 85, 0, 34 | 1075., 114, 281, 0, 1216., 115, 356, 0, 1050., 116, 431, 0, 1727., 35 | 117, 231, 0, 1484., 118, 89, 0, 609., 119, 60, 0, 1183., 120, 100, 0, 36 | 1524., 121, 337, 0, 1125., 122, 115, 0, 950., 123, 179, 0, 1618., 37 | 124, 125, 0, 1584., 125, 24, 0, 878., 126, 404, 0, 830., 127, 316, 0, 38 | 1185., 128, 124, 0, 1502., 129, 195, 0, 1507., 130, 144, 0, 1132., 39 | 131, 154, 0, 1209., 132, 111, 0, 1020., 133, 131, 0, 816., 134, 60, 40 | 0, 1201., 135, 91, 0, 879., 136, 27, 0, 704., 137, 484, 0, 1343., 41 | 138, 134, 0, 1278., 139, 312, 0, 1671., 140, 107, 0, 1484., 141, 23, 42 | 0, 1424., 142, 229, 0, 1505., 143, 129, 0, 558., 144, 358, 0, 1030., 43 | 145, 8, 0, 1589., 146, 209, 0, 1300., 147, 149, 0, 833., 148, 253, 0, 44 | 1494., 149, 179, 0, 1029., 150, 413, 0, 1642., 151, 487, 0, 1421., 45 | 152, 112, 0, 717., 153, 328, 0, 865., 154, 281, 0, 1816., 155, 436, 46 | 0, 1196., 156, 74, 0, 1312., 157, 152, 0, 1379., 158, 392, 0, 1332., 47 | 159, 155, 0, 1519., 160, 268, 0, 1008., 161, 5, 0, 1524., 162, 84, 0, 48 | 1551., 163, 476, 0, 1039., 164, 85, 0, 1412., 165, 309, 0, 1096., 49 | 166, 253, 0, 1503., 167, 162, 0, 829., 168, 195, 0, 1553., 169, 340, 50 | 0, 1271., 170, 24, 0, 1004., 171, 111, 0, 1300., 172, 61, 0, 1133., 51 | 173, 166, 0, 898., 174, 28, 0, 1024., 175, 289, 0, 1735., 176, 80, 0, 52 | 1555., 177, 275, 0, 1627., 178, 201, 0, 1484., 179, 162, 0, 689., 53 | 180, 371, 0, 1509., 181, 211, 0, 898., 182, 384, 0, 1450., 183, 285, 54 | 0, 1157., 184, 86, 0, 1127., 185, 336, 0, 1378., 186, 286, 0, 1474., 55 | 187, 275, 0, 1123., 188, 338, 0, 1284., 189, 88, 0, 531., 190, 112, 56 | 0, 1755., 191, 269, 0, 1511., 192, 11, 0, 554., 193, 401, 0, 1123., 57 | 194, 171, 0, 1493., 195, 41, 0, 939., 196, 358, 0, 1130., 197, 79, 0, 58 | 1105., 198, 390, 0, 1317., 199, 107, 0, 1457., 200, 231, 0, 1015., 59 | 201, 211, 0, 998., 202, 270, 0, 1323., 203, 59, 0, 1347., 204, 289, 60 | 0, 1848., 205, 223, 0, 1014., 206, 129, 0, 786., 207, 411, 0, 1732., 61 | 208, 226, 0, 1595., 209, 130, 0, 1265., 210, 145, 0, 1311., 211, 336, 62 | 0, 1224., 212, 202, 0, 703., 213, 109, 0, 691., 214, 323, 0, 1169., 63 | 215, 385, 0, 1548., 216, 112, 0, 443., 217, 170, 0, 1375., 218, 306, 64 | 0, 702., 219, 409, 0, 1558., 220, 2, 0, 839., 221, 358, 0, 858., 222, 65 | 302, 0, 706., 223, 356, 0, 953., 224, 61, 0, 1155., 225, 256, 0, 66 | 799., 226, 387, 0, 1480., 227, 389, 0, 1514., 228, 152, 0, 1370., 67 | 229, 111, 0, 1010., 230, 212, 0, 1062., 231, 40, 0, 1094., 232, 354, 68 | 0, 1343., 233, 432, 0, 1394., 234, 123, 0, 587., 235, 122, 0, 778., 69 | 236, 89, 0, 1401., 237, 338, 0, 1553., 238, 413, 0, 1495., 239, 85, 70 | 0, 1380., 240, 362, 0, 1133., 241, 432, 0, 1433., 242, 277, 0, 1100., 71 | 243, 247, 0, 843., 244, 220, 0, 1393., 245, 149, 0, 955., 246, 124, 72 | 0, 765., 247, 133, 0, 1417., 248, 131, 0, 577., 249, 342, 0, 1584., 73 | 250, 432, 0, 1483., 251, 321, 0, 1599., 252, 497, 0, 1635., 253, 336, 74 | 0, 1423., 254, 296, 0, 1207., 255, 328, 0, 813., 256, 72, 0, 1284., 75 | 257, 141, 0, 1500., 258, 239, 0, 722., 259, 263, 0, 881., 260, 372, 76 | 0, 1417., 261, 393, 0, 1501., 262, 14, 0, 1563., 263, 110, 0, 853., 77 | 264, 287, 0, 1399., 265, 338, 0, 1585., 266, 446, 0, 1491., 267, 145, 78 | 0, 438., 268, 198, 0, 1225., 269, 268, 0, 763., 270, 280, 0, 1179., 79 | 271, 205, 0, 658., 272, 302, 0, 1368., 273, 267, 0, 853., 274, 301, 80 | 0, 1233., 275, 291, 0, 603., 276, 456, 0, 1610., 277, 204, 0, 981., 81 | 278, 253, 0, 1300., 279, 11, 0, 1232., 280, 299, 0, 975., 281, 492, 82 | 0, 1219., 282, 12, 0, 1530., 283, 385, 0, 1277., 284, 354, 0, 1045., 83 | 285, 314, 0, 780., 286, 395, 0, 1478., 287, 269, 0, 1451., 288, 469, 84 | 0, 1624., 289, 107, 0, 1220., 290, 238, 0, 561., 291, 430, 0, 703., 85 | 292, 388, 0, 1232., 293, 277, 0, 897., 294, 432, 0, 1218., 295, 179, 86 | 0, 1497., 296, 483, 0, 1034., 297, 233, 0, 1503., 298, 309, 0, 534., 87 | 299, 395, 0, 1089., 300, 350, 0, 1097., 301, 230, 0, 940., 302, 453, 88 | 0, 1094., 303, 431, 0, 1365., 304, 425, 0, 1030., 305, 11, 0, 1223., 89 | 306, 100, 0, 1392., 307, 23, 0, 1335., 308, 209, 0, 1144., 309, 302, 90 | 0, 594., 310, 298, 0, 1012., 311, 89, 0, 1019., 312, 212, 0, 1229., 91 | 313, 122, 0, 866., 314, 21, 0, 1446., 315, 419, 0, 1564., 316, 304, 92 | 0, 827., 317, 412, 0, 1680., 318, 338, 0, 1387., 319, 199, 0, 730., 93 | 320, 290, 0, 1106., 321, 306, 0, 454., 322, 34, 0, 1197., 323, 310, 94 | 0, 1291., 324, 382, 0, 1555., 325, 309, 0, 1394., 326, 296, 0, 551., 95 | 327, 269, 0, 1426., 328, 85, 0, 1033., 329, 70, 0, 1120., 330, 385, 96 | 0, 1500., 331, 307, 0, 396., 332, 317, 0, 816., 333, 294, 0, 681., 97 | 334, 6, 0, 1431., 335, 232, 0, 889., 336, 432, 0, 1272., 337, 184, 0, 98 | 1129., 338, 387, 0, 964., 339, 9, 0, 1347., 340, 85, 0, 877., 341, 99 | 354, 0, 893., 342, 27, 0, 1102., 343, 112, 0, 1071., 344, 436, 0, 100 | 1524., 345, 446, 0, 1494., 346, 353, 0, 860., 347, 387, 0, 821., 348, 101 | 342, 0, 999., 349, 387, 0, 1210., 350, 405, 0, 822., 351, 289, 0, 102 | 1064., 352, 317, 0, 1288., 353, 433, 0, 1085., 354, 395, 0, 1416., 103 | 355, 461, 0, 981., 356, 385, 0, 1229., 357, 456, 0, 1529., 358, 145, 104 | 0, 1283., 359, 248, 0, 1391., 360, 230, 0, 784., 361, 358, 0, 459., 105 | 362, 103, 0, 1554., 363, 301, 0, 719., 364, 287, 0, 1332., 365, 350, 106 | 0, 480., 366, 498, 0, 851., 367, 345, 0, 818., 368, 368, 0, 901., 107 | 369, 348, 0, 928., 370, 309, 0, 905., 371, 310, 0, 1040., 372, 347, 108 | 0, 1666., 373, 303, 0, 710., 374, 112, 0, 1219., 375, 123, 0, 1267., 109 | 376, 200, 0, 1637., 377, 292, 0, 1458., 378, 326, 0, 1081., 379, 382, 110 | 0, 799., 380, 357, 0, 985., 381, 11, 0, 1147., 382, 314, 0, 731., 111 | 383, 346, 0, 268., 384, 348, 0, 1354., 385, 488, 0, 974., 386, 50, 0, 112 | 1597., 387, 356, 0, 808., 388, 414, 0, 1376., 389, 448, 0, 829., 390, 113 | 340, 0, 912., 391, 419, 0, 1249., 392, 446, 0, 670., 393, 382, 0, 114 | 989., 394, 89, 0, 1150., 395, 74, 0, 906., 396, 461, 0, 1142., 397, 115 | 116, 0, 1082., 398, 395, 0, 1332., 399, 352, 0, 875., 400, 129, 0, 116 | 1120., 401, 423, 0, 791., 402, 408, 0, 821., 403, 456, 0, 1010., 404, 117 | 498, 0, 1163., 405, 433, 0, 1008., 406, 176, 0, 1547., 407, 85, 0, 118 | 1005., 408, 418, 0, 1584., 409, 444, 0, 1190., 410, 287, 0, 1137., 119 | 411, 415, 0, 1188., 412, 417, 0, 1030., 413, 401, 0, 1062., 414, 483, 120 | 0, 1085., 415, 268, 0, 1065., 416, 70, 0, 971., 417, 350, 0, 799., 121 | 418, 283, 0, 1224., 419, 184, 0, 1398., 420, 302, 0, 832., 421, 107, 122 | 0, 1169., 422, 392, 0, 839., 423, 411, 0, 1249., 424, 106, 0, 1758., 123 | 425, 348, 0, 525., 426, 348, 0, 1202., 427, 264, 0, 1201., 428, 71, 124 | 0, 1710., 429, 264, 0, 1539., 430, 488, 0, 479., 431, 431, 0, 591., 125 | 432, 401, 0, 778., 433, 448, 0, 631., 434, 57, 0, 925., 435, 456, 0, 126 | 901., 436, 338, 0, 1216., 437, 412, 0, 1685., 438, 450, 0, 957., 439, 127 | 421, 0, 1036., 440, 314, 0, 1591., 441, 417, 0, 1227., 442, 436, 0, 128 | 941., 443, 159, 0, 1402., 444, 371, 0, 948., 445, 433, 0, 1100., 446, 129 | 455, 0, 1288., 447, 396, 0, 1043., 448, 498, 0, 588., 449, 338, 0, 130 | 1029., 450, 497, 0, 1725., 451, 359, 0, 1158., 452, 439, 0, 811., 131 | 453, 435, 0, 845., 454, 352, 0, 1478., 455, 466, 0, 908., 456, 469, 132 | 0, 1228., 457, 350, 0, 989., 458, 342, 0, 1206., 459, 298, 0, 1344., 133 | 460, 495, 0, 1202., 461, 368, 0, 1098., 462, 462, 0, 783., 463, 407, 134 | 0, 1256., 464, 452, 0, 687., 465, 408, 0, 1729., 466, 401, 0, 872., 135 | 467, 488, 0, 602., 468, 425, 0, 1694., 469, 487, 0, 695., 470, 485, 136 | 0, 1093., 471, 499, 0, 1144., 472, 483, 0, 1178., 473, 387, 0, 1081., 137 | 474, 397, 0, 1360., 475, 469, 0, 490., 476, 474, 0, 1166., 477, 111, 138 | 0, 1386., 478, 354, 0, 1623., 479, 392, 0, 1611., 480, 498, 0, 321., 139 | 481, 8, 0, 1373., 482, 480, 0, 591., 483, 467, 0, 1256., 484, 281, 0, 140 | 667., 485, 436, 0, 972., 486, 404, 0, 1014., 487, 421, 0, 1078., 488, 141 | 17, 0, 1587., 489, 498, 0, 1492., 490, 8, 0, 1328., 491, 472, 0, 142 | 732., 492, 131, 0, 1468., 493, 206, 0, 1593., 494, 336, 0, 1450., 143 | 495, 372, 0, 1098., 496, 359, 0, 887., 497, 203, 0, 1294., 498, 381, 144 | 0, 1142., 499, 462, 0, 901. ] 145 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/ORB_BruteForce.yml: -------------------------------------------------------------------------------- 1 | %YAML 1.0 2 | --- 3 | Matches: [ 0, 24, 0, 2.8224633789062500e+02, 1, 441, 0, 4 | 4.1810882568359375e+02, 2, 412, 0, 3.4295773315429688e+02, 3, 100, 0, 5 | 3.9590530395507813e+02, 4, 283, 0, 2.5878369140625000e+02, 5, 6, 0, 6 | 3.5144415283203125e+02, 6, 10, 0, 2.4979992675781250e+02, 7, 146, 0, 7 | 3.9967987060546875e+02, 8, 142, 0, 2.7993392944335938e+02, 9, 351, 0, 8 | 3.9768453979492188e+02, 10, 134, 0, 3.0619601440429688e+02, 11, 462, 9 | 0, 3.7807406616210938e+02, 12, 389, 0, 3.7233990478515625e+02, 13, 10 | 27, 0, 2.3225201416015625e+02, 14, 340, 0, 3.4045852661132813e+02, 11 | 15, 116, 0, 4.0736593627929688e+02, 16, 314, 0, 12 | 2.7761303710937500e+02, 17, 338, 0, 3.5611093139648438e+02, 18, 411, 13 | 0, 3.7666827392578125e+02, 19, 35, 0, 1.7270495605468750e+02, 20, 14 | 273, 0, 4.5420370483398438e+02, 21, 5, 0, 3.5810473632812500e+02, 22, 15 | 414, 0, 3.7994079589843750e+02, 23, 374, 0, 3.8642465209960938e+02, 16 | 24, 341, 0, 2.6894238281250000e+02, 25, 91, 0, 17 | 3.8352444458007813e+02, 26, 364, 0, 3.3937884521484375e+02, 27, 371, 18 | 0, 2.9509658813476563e+02, 28, 49, 0, 2.4336802673339844e+02, 29, 19 | 107, 0, 4.0317364501953125e+02, 30, 297, 0, 3.9582192993164063e+02, 20 | 31, 89, 0, 2.7572994995117188e+02, 32, 38, 0, 3.1075552368164063e+02, 21 | 33, 480, 0, 2.9820629882812500e+02, 34, 42, 0, 22 | 3.6801086425781250e+02, 35, 22, 0, 3.8873385620117188e+02, 36, 61, 0, 23 | 3.0383547973632813e+02, 37, 433, 0, 3.5219454956054688e+02, 38, 174, 24 | 0, 3.2721856689453125e+02, 39, 229, 0, 3.4658187866210938e+02, 40, 2, 25 | 0, 1.8573637390136719e+02, 41, 96, 0, 2.6931579589843750e+02, 42, 11, 26 | 0, 2.7725619506835938e+02, 43, 492, 0, 3.1420535278320313e+02, 44, 27 | 228, 0, 3.3398202514648438e+02, 45, 11, 0, 2.0053179931640625e+02, 28 | 46, 285, 0, 3.3031802368164063e+02, 47, 18, 0, 29 | 2.6778350830078125e+02, 48, 275, 0, 2.8352777099609375e+02, 49, 88, 30 | 0, 1.9607141113281250e+02, 50, 67, 0, 2.4180984497070313e+02, 51, 31 | 268, 0, 2.8181198120117188e+02, 52, 261, 0, 3.4769238281250000e+02, 32 | 53, 17, 0, 4.3340628051757813e+02, 54, 29, 0, 3.3092596435546875e+02, 33 | 55, 126, 0, 1.5226292419433594e+02, 56, 413, 0, 34 | 3.6235894775390625e+02, 57, 358, 0, 3.3467147827148438e+02, 58, 289, 35 | 0, 3.5718621826171875e+02, 59, 107, 0, 3.4794683837890625e+02, 60, 36 | 228, 0, 3.3014843750000000e+02, 61, 145, 0, 2.6616723632812500e+02, 37 | 62, 371, 0, 3.4396801757812500e+02, 63, 196, 0, 38 | 2.6106704711914063e+02, 64, 123, 0, 2.5828860473632813e+02, 65, 345, 39 | 0, 2.3869645690917969e+02, 66, 451, 0, 3.5283282470703125e+02, 67, 40 | 17, 0, 3.8340057373046875e+02, 68, 96, 0, 1.7126295471191406e+02, 69, 41 | 301, 0, 3.8454779052734375e+02, 70, 275, 0, 3.4201901245117188e+02, 42 | 71, 278, 0, 2.5270932006835938e+02, 72, 255, 0, 43 | 3.2216921997070313e+02, 73, 372, 0, 3.0052453613281250e+02, 74, 129, 44 | 0, 3.0253759765625000e+02, 75, 294, 0, 3.6019299316406250e+02, 76, 45 | 285, 0, 3.1347567749023438e+02, 77, 85, 0, 2.6022683715820313e+02, 46 | 78, 385, 0, 4.2144274902343750e+02, 79, 32, 0, 47 | 2.7721472167968750e+02, 80, 302, 0, 2.7493090820312500e+02, 81, 390, 48 | 0, 3.3649368286132813e+02, 82, 60, 0, 1.6878684997558594e+02, 83, 27, 49 | 0, 3.7525323486328125e+02, 84, 194, 0, 3.7087869262695313e+02, 85, 50 | 225, 0, 3.1483963012695313e+02, 86, 221, 0, 3.3676254272460938e+02, 51 | 87, 365, 0, 3.8425512695312500e+02, 88, 174, 0, 52 | 3.3576181030273438e+02, 89, 117, 0, 3.0048294067382813e+02, 90, 60, 53 | 0, 3.0684686279296875e+02, 91, 107, 0, 3.7416708374023438e+02, 92, 54 | 168, 0, 3.0676376342773438e+02, 93, 205, 0, 3.7807275390625000e+02, 55 | 94, 314, 0, 3.9645428466796875e+02, 95, 14, 0, 56 | 2.7904299926757813e+02, 96, 328, 0, 2.7523626708984375e+02, 97, 83, 57 | 0, 3.6270098876953125e+02, 98, 103, 0, 2.8468930053710938e+02, 99, 58 | 358, 0, 2.3865455627441406e+02, 100, 473, 0, 3.5894290161132813e+02, 59 | 101, 34, 0, 2.8410562133789063e+02, 102, 104, 0, 60 | 3.4151281738281250e+02, 103, 436, 0, 3.6362756347656250e+02, 104, 61 | 113, 0, 3.4759313964843750e+02, 105, 474, 0, 4.0398886108398438e+02, 62 | 106, 356, 0, 2.6631747436523438e+02, 107, 76, 0, 63 | 3.3945840454101563e+02, 108, 76, 0, 2.7239492797851563e+02, 109, 96, 64 | 0, 3.1476974487304688e+02, 110, 18, 0, 3.1116555786132813e+02, 111, 65 | 143, 0, 3.3520739746093750e+02, 112, 126, 0, 1.7794662475585938e+02, 66 | 113, 85, 0, 3.2070703125000000e+02, 114, 281, 0, 67 | 2.8067062377929688e+02, 115, 356, 0, 2.7188232421875000e+02, 116, 68 | 444, 0, 4.3558007812500000e+02, 117, 225, 0, 3.8861935424804688e+02, 69 | 118, 89, 0, 2.3074444580078125e+02, 119, 60, 0, 70 | 3.0975634765625000e+02, 120, 2, 0, 3.5270382690429688e+02, 121, 142, 71 | 0, 2.9051678466796875e+02, 122, 358, 0, 2.7451593017578125e+02, 123, 72 | 347, 0, 3.9397082519531250e+02, 124, 125, 0, 3.9860256958007813e+02, 73 | 125, 24, 0, 2.2869630432128906e+02, 126, 404, 0, 74 | 2.5037171936035156e+02, 127, 316, 0, 2.9956802368164063e+02, 128, 75 | 396, 0, 3.6765200805664063e+02, 129, 195, 0, 3.7688327026367188e+02, 76 | 130, 144, 0, 3.0264501953125000e+02, 131, 35, 0, 77 | 3.2976354980468750e+02, 132, 111, 0, 3.0341061401367188e+02, 133, 60, 78 | 0, 2.7569549560546875e+02, 134, 158, 0, 3.2732858276367188e+02, 135, 79 | 91, 0, 2.6805410766601563e+02, 136, 27, 0, 2.2110630798339844e+02, 80 | 137, 469, 0, 3.1614712524414063e+02, 138, 134, 0, 81 | 3.5708541870117188e+02, 139, 312, 0, 3.8893572998046875e+02, 140, 82 | 107, 0, 3.3759442138671875e+02, 141, 107, 0, 3.5120791625976563e+02, 83 | 142, 229, 0, 3.5530691528320313e+02, 143, 129, 0, 84 | 2.0662042236328125e+02, 144, 358, 0, 3.0775640869140625e+02, 145, 5, 85 | 0, 3.7847720336914063e+02, 146, 209, 0, 3.4882086181640625e+02, 147, 86 | 283, 0, 2.3168945312500000e+02, 148, 253, 0, 3.5931045532226563e+02, 87 | 149, 179, 0, 2.5135830688476563e+02, 150, 385, 0, 88 | 3.7171899414062500e+02, 151, 116, 0, 3.6246792602539063e+02, 152, 89 | 112, 0, 2.4463645935058594e+02, 153, 328, 0, 2.4614427185058594e+02, 90 | 154, 281, 0, 4.2525051879882813e+02, 155, 436, 0, 91 | 3.2841741943359375e+02, 156, 278, 0, 3.3636737060546875e+02, 157, 92 | 152, 0, 3.7159252929687500e+02, 158, 485, 0, 3.4175576782226563e+02, 93 | 159, 155, 0, 3.9645806884765625e+02, 160, 268, 0, 94 | 2.8351367187500000e+02, 161, 5, 0, 3.6532998657226563e+02, 162, 223, 95 | 0, 3.7094879150390625e+02, 163, 288, 0, 3.1491110229492188e+02, 164, 96 | 300, 0, 3.7988156127929688e+02, 165, 309, 0, 2.7903045654296875e+02, 97 | 166, 253, 0, 3.6789263916015625e+02, 167, 162, 0, 98 | 2.6853118896484375e+02, 168, 195, 0, 3.9942834472656250e+02, 169, 99 | 340, 0, 3.0069418334960938e+02, 170, 339, 0, 3.4731253051757813e+02, 100 | 171, 111, 0, 3.6327676391601563e+02, 172, 267, 0, 101 | 3.5476046752929688e+02, 173, 166, 0, 2.7861801147460938e+02, 174, 28, 102 | 0, 2.8257388305664063e+02, 175, 289, 0, 4.0220767211914063e+02, 176, 103 | 80, 0, 4.0417446899414063e+02, 177, 275, 0, 3.7959848022460938e+02, 104 | 178, 201, 0, 3.4308599853515625e+02, 179, 162, 0, 105 | 2.3488081359863281e+02, 180, 371, 0, 3.3752185058593750e+02, 181, 106 | 211, 0, 2.9322686767578125e+02, 182, 384, 0, 3.6311154174804688e+02, 107 | 183, 285, 0, 3.3106948852539063e+02, 184, 237, 0, 108 | 2.9743905639648438e+02, 185, 336, 0, 3.5356753540039063e+02, 186, 109 | 390, 0, 3.5371316528320313e+02, 187, 275, 0, 2.8075433349609375e+02, 110 | 188, 145, 0, 3.4580340576171875e+02, 189, 88, 0, 111 | 2.2043820190429688e+02, 190, 347, 0, 4.0809802246093750e+02, 191, 112 | 265, 0, 3.6587838745117188e+02, 192, 11, 0, 1.9514097595214844e+02, 113 | 193, 401, 0, 3.1424990844726563e+02, 194, 171, 0, 114 | 3.4350982666015625e+02, 195, 41, 0, 3.4320401000976563e+02, 196, 358, 115 | 0, 3.0496884155273438e+02, 197, 79, 0, 2.6705242919921875e+02, 198, 116 | 362, 0, 3.3807839965820313e+02, 199, 107, 0, 3.4774847412109375e+02, 117 | 200, 231, 0, 2.8586535644531250e+02, 201, 211, 0, 118 | 3.2701681518554688e+02, 202, 270, 0, 3.4866744995117188e+02, 203, 59, 119 | 0, 3.7617681884765625e+02, 204, 289, 0, 4.2882397460937500e+02, 205, 120 | 24, 0, 2.8470159912109375e+02, 206, 129, 0, 2.5970751953125000e+02, 121 | 207, 214, 0, 4.1238211059570313e+02, 208, 412, 0, 122 | 3.6275473022460938e+02, 209, 130, 0, 3.2918838500976563e+02, 210, 30, 123 | 0, 3.6662924194335938e+02, 211, 336, 0, 3.2887078857421875e+02, 212, 124 | 202, 0, 2.3588768005371094e+02, 213, 109, 0, 2.4648123168945313e+02, 125 | 214, 400, 0, 3.3825729370117188e+02, 215, 255, 0, 126 | 4.0506417846679688e+02, 216, 112, 0, 1.9828010559082031e+02, 217, 127 | 170, 0, 3.3944808959960938e+02, 218, 306, 0, 2.1756837463378906e+02, 128 | 219, 409, 0, 3.9564630126953125e+02, 220, 2, 0, 129 | 2.7731030273437500e+02, 221, 358, 0, 2.3092422485351563e+02, 222, 130 | 302, 0, 2.0059411621093750e+02, 223, 243, 0, 2.6570849609375000e+02, 131 | 224, 121, 0, 3.4207162475585938e+02, 225, 256, 0, 132 | 2.5754806518554688e+02, 226, 396, 0, 3.7593615722656250e+02, 227, 76, 133 | 0, 3.7750497436523438e+02, 228, 470, 0, 3.5810891723632813e+02, 229, 134 | 111, 0, 3.0470312500000000e+02, 230, 34, 0, 3.3704895019531250e+02, 135 | 231, 40, 0, 2.7808990478515625e+02, 232, 459, 0, 136 | 3.2220956420898438e+02, 233, 342, 0, 3.9691183471679688e+02, 234, 137 | 123, 0, 2.5362768554687500e+02, 235, 122, 0, 2.2952124023437500e+02, 138 | 236, 73, 0, 3.4617337036132813e+02, 237, 338, 0, 139 | 3.6632635498046875e+02, 238, 413, 0, 3.5047253417968750e+02, 239, 29, 140 | 0, 3.7477059936523438e+02, 240, 213, 0, 2.9381628417968750e+02, 241, 141 | 432, 0, 3.6442694091796875e+02, 242, 277, 0, 3.1771685791015625e+02, 142 | 243, 247, 0, 2.3717292785644531e+02, 244, 445, 0, 143 | 3.4617047119140625e+02, 245, 40, 0, 2.7874362182617188e+02, 246, 124, 144 | 0, 2.8383270263671875e+02, 247, 133, 0, 3.3604016113281250e+02, 248, 145 | 131, 0, 2.2272628784179688e+02, 249, 342, 0, 3.9653750610351563e+02, 146 | 250, 6, 0, 3.9009613037109375e+02, 251, 321, 0, 147 | 3.9451617431640625e+02, 252, 120, 0, 3.4587860107421875e+02, 253, 148 | 336, 0, 3.7189111328125000e+02, 254, 296, 0, 3.2142962646484375e+02, 149 | 255, 328, 0, 2.2446157836914063e+02, 256, 72, 0, 150 | 3.3718539428710938e+02, 257, 141, 0, 3.9060464477539063e+02, 258, 151 | 114, 0, 2.4419664001464844e+02, 259, 371, 0, 2.7351232910156250e+02, 152 | 260, 372, 0, 3.8136203002929688e+02, 261, 287, 0, 153 | 3.7458377075195313e+02, 262, 348, 0, 3.7023910522460938e+02, 263, 154 | 110, 0, 2.5779254150390625e+02, 264, 337, 0, 3.3032559204101563e+02, 155 | 265, 280, 0, 3.5304531860351563e+02, 266, 446, 0, 156 | 3.6642187500000000e+02, 267, 145, 0, 1.9940913391113281e+02, 268, 157 | 198, 0, 2.9403912353515625e+02, 269, 268, 0, 2.1544140625000000e+02, 158 | 270, 52, 0, 2.9695117187500000e+02, 271, 205, 0, 159 | 2.1515576171875000e+02, 272, 97, 0, 3.4338607788085938e+02, 273, 267, 160 | 0, 2.3458686828613281e+02, 274, 301, 0, 3.4483764648437500e+02, 275, 161 | 202, 0, 2.2845130920410156e+02, 276, 338, 0, 3.7336578369140625e+02, 162 | 277, 114, 0, 2.9529138183593750e+02, 278, 253, 0, 163 | 3.9054577636718750e+02, 279, 11, 0, 3.4779016113281250e+02, 280, 299, 164 | 0, 2.8346252441406250e+02, 281, 166, 0, 3.3999411010742188e+02, 282, 165 | 12, 0, 3.9264233398437500e+02, 283, 255, 0, 3.2080212402343750e+02, 166 | 284, 354, 0, 2.9992166137695313e+02, 285, 314, 0, 167 | 2.4691699218750000e+02, 286, 395, 0, 3.9525183105468750e+02, 287, 168 | 269, 0, 3.6746563720703125e+02, 288, 469, 0, 3.9181118774414063e+02, 169 | 289, 107, 0, 3.3621420288085938e+02, 290, 238, 0, 170 | 2.2636917114257813e+02, 291, 430, 0, 2.2832214355468750e+02, 292, 171 | 388, 0, 3.4471728515625000e+02, 293, 402, 0, 2.7846365356445313e+02, 172 | 294, 432, 0, 3.5204827880859375e+02, 295, 385, 0, 173 | 3.5706723022460938e+02, 296, 483, 0, 3.0738900756835938e+02, 297, 174 | 233, 0, 3.3182073974609375e+02, 298, 309, 0, 1.8597311401367188e+02, 175 | 299, 395, 0, 3.1351715087890625e+02, 300, 350, 0, 176 | 3.1754525756835938e+02, 301, 358, 0, 2.4882925415039063e+02, 302, 177 | 357, 0, 2.8923001098632813e+02, 303, 205, 0, 3.7497198486328125e+02, 178 | 304, 425, 0, 2.8864511108398438e+02, 305, 207, 0, 179 | 3.5368771362304688e+02, 306, 100, 0, 3.5759194946289063e+02, 307, 23, 180 | 0, 3.2156958007812500e+02, 308, 209, 0, 2.9277978515625000e+02, 309, 181 | 302, 0, 2.3274449157714844e+02, 310, 298, 0, 3.3501641845703125e+02, 182 | 311, 228, 0, 2.9402380371093750e+02, 312, 212, 0, 183 | 2.9865866088867188e+02, 313, 98, 0, 2.3893304443359375e+02, 314, 284, 184 | 0, 3.6353817749023438e+02, 315, 107, 0, 3.7750894165039063e+02, 316, 185 | 239, 0, 3.0237725830078125e+02, 317, 412, 0, 3.9435769653320313e+02, 186 | 318, 338, 0, 3.5553482055664063e+02, 319, 199, 0, 187 | 2.7998928833007813e+02, 320, 290, 0, 3.7478793334960938e+02, 321, 188 | 306, 0, 1.7856091308593750e+02, 322, 34, 0, 2.8703833007812500e+02, 189 | 323, 402, 0, 3.7024044799804688e+02, 324, 285, 0, 190 | 3.9242834472656250e+02, 325, 309, 0, 3.4141763305664063e+02, 326, 191 | 296, 0, 2.0591502380371094e+02, 327, 269, 0, 3.3121292114257813e+02, 192 | 328, 85, 0, 3.1790408325195313e+02, 329, 353, 0, 193 | 2.8168243408203125e+02, 330, 385, 0, 3.6800814819335938e+02, 331, 194 | 307, 0, 1.9180718994140625e+02, 332, 86, 0, 2.6399810791015625e+02, 195 | 333, 118, 0, 2.5255296325683594e+02, 334, 107, 0, 196 | 3.5629202270507813e+02, 335, 306, 0, 2.8634243774414063e+02, 336, 24, 197 | 0, 3.1657543945312500e+02, 337, 184, 0, 3.0629562377929688e+02, 338, 198 | 387, 0, 2.9788925170898438e+02, 339, 418, 0, 3.2470755004882813e+02, 199 | 340, 85, 0, 2.9345697021484375e+02, 341, 354, 0, 200 | 2.8807812500000000e+02, 342, 277, 0, 3.0147470092773438e+02, 343, 201 | 302, 0, 2.7944052124023438e+02, 344, 201, 0, 3.7753146362304688e+02, 202 | 345, 414, 0, 3.6888345336914063e+02, 346, 261, 0, 203 | 2.4847937011718750e+02, 347, 387, 0, 2.8517889404296875e+02, 348, 204 | 342, 0, 2.9638995361328125e+02, 349, 468, 0, 3.2677975463867188e+02, 205 | 350, 405, 0, 2.2194593811035156e+02, 351, 289, 0, 206 | 3.3345166015625000e+02, 352, 114, 0, 3.2857571411132813e+02, 353, 207 | 433, 0, 3.0999194335937500e+02, 354, 395, 0, 3.6773632812500000e+02, 208 | 355, 461, 0, 2.7580972290039063e+02, 356, 385, 0, 209 | 2.8944256591796875e+02, 357, 5, 0, 3.7769830322265625e+02, 358, 28, 210 | 0, 3.3400149536132813e+02, 359, 248, 0, 3.8603756713867188e+02, 360, 211 | 358, 0, 2.4777409362792969e+02, 361, 358, 0, 1.8078993225097656e+02, 212 | 362, 25, 0, 4.3251705932617188e+02, 363, 301, 0, 213 | 2.3764469909667969e+02, 364, 287, 0, 3.6226785278320313e+02, 365, 214 | 350, 0, 2.1466719055175781e+02, 366, 498, 0, 2.8166113281250000e+02, 215 | 367, 345, 0, 2.4847535705566406e+02, 368, 368, 0, 216 | 2.9887622070312500e+02, 369, 348, 0, 2.9424819946289063e+02, 370, 217 | 309, 0, 2.7785427856445313e+02, 371, 268, 0, 2.9282760620117188e+02, 218 | 372, 347, 0, 4.2703396606445313e+02, 373, 303, 0, 219 | 2.3559710693359375e+02, 374, 21, 0, 3.4473321533203125e+02, 375, 116, 220 | 0, 3.5038836669921875e+02, 376, 200, 0, 4.0599877929687500e+02, 377, 221 | 58, 0, 3.3739144897460938e+02, 378, 326, 0, 3.2801373291015625e+02, 222 | 379, 382, 0, 2.4348510742187500e+02, 380, 357, 0, 223 | 2.7981243896484375e+02, 381, 8, 0, 3.2502307128906250e+02, 382, 205, 224 | 0, 1.9219520568847656e+02, 383, 346, 0, 9.5184028625488281e+01, 384, 225 | 409, 0, 3.5769680786132813e+02, 385, 488, 0, 3.0428604125976563e+02, 226 | 386, 50, 0, 3.5504223632812500e+02, 387, 356, 0, 227 | 2.6710296630859375e+02, 388, 414, 0, 3.4602023315429688e+02, 389, 228 | 448, 0, 2.7952639770507813e+02, 390, 358, 0, 3.1929296875000000e+02, 229 | 391, 419, 0, 3.1869262695312500e+02, 392, 446, 0, 230 | 2.5508822631835938e+02, 393, 382, 0, 3.1350756835937500e+02, 394, 231 | 228, 0, 2.9789764404296875e+02, 395, 405, 0, 2.3395512390136719e+02, 232 | 396, 461, 0, 3.0658767700195313e+02, 397, 116, 0, 233 | 3.4819247436523438e+02, 398, 395, 0, 3.3989410400390625e+02, 399, 234 | 406, 0, 2.7328372192382813e+02, 400, 129, 0, 3.0209271240234375e+02, 235 | 401, 302, 0, 2.7638922119140625e+02, 402, 408, 0, 236 | 2.6070480346679688e+02, 403, 456, 0, 2.9234567260742188e+02, 404, 237 | 228, 0, 3.3009695434570313e+02, 405, 433, 0, 2.6491506958007813e+02, 238 | 406, 176, 0, 3.8213479614257813e+02, 407, 85, 0, 239 | 3.0065097045898438e+02, 408, 418, 0, 3.7707824707031250e+02, 409, 240 | 444, 0, 3.1678698730468750e+02, 410, 353, 0, 2.9551141357421875e+02, 241 | 411, 415, 0, 3.5306091308593750e+02, 412, 438, 0, 242 | 3.0085876464843750e+02, 413, 401, 0, 2.9686022949218750e+02, 414, 243 | 483, 0, 3.0956259155273438e+02, 415, 268, 0, 3.0666430664062500e+02, 244 | 416, 70, 0, 2.5655603027343750e+02, 417, 469, 0, 245 | 2.5408659362792969e+02, 418, 96, 0, 3.0226477050781250e+02, 419, 184, 246 | 0, 3.6566104125976563e+02, 420, 358, 0, 2.6236425781250000e+02, 421, 247 | 114, 0, 3.0566320800781250e+02, 422, 392, 0, 2.8583038330078125e+02, 248 | 423, 237, 0, 3.1774044799804688e+02, 424, 305, 0, 249 | 4.0089025878906250e+02, 425, 348, 0, 2.2721134948730469e+02, 426, 250 | 409, 0, 2.7651943969726563e+02, 427, 264, 0, 3.1081668090820313e+02, 251 | 428, 80, 0, 4.2404833984375000e+02, 429, 40, 0, 252 | 3.6263757324218750e+02, 430, 488, 0, 1.8378520202636719e+02, 431, 253 | 431, 0, 2.0864562988281250e+02, 432, 401, 0, 2.4971583557128906e+02, 254 | 433, 487, 0, 1.9279263305664063e+02, 434, 57, 0, 255 | 2.6074700927734375e+02, 435, 456, 0, 2.7291207885742188e+02, 436, 256 | 338, 0, 3.2724304199218750e+02, 437, 412, 0, 3.8184158325195313e+02, 257 | 438, 450, 0, 3.1674438476562500e+02, 439, 421, 0, 258 | 2.7383935546875000e+02, 440, 314, 0, 3.6994729614257813e+02, 441, 259 | 417, 0, 3.2917016601562500e+02, 442, 436, 0, 2.7824630737304688e+02, 260 | 443, 159, 0, 3.3993234252929688e+02, 444, 371, 0, 261 | 2.6755184936523438e+02, 445, 433, 0, 3.0080557250976563e+02, 446, 262 | 455, 0, 3.1301757812500000e+02, 447, 74, 0, 3.1522213745117188e+02, 263 | 448, 498, 0, 2.4220239257812500e+02, 449, 338, 0, 264 | 2.8147290039062500e+02, 450, 497, 0, 4.4077090454101563e+02, 451, 265 | 481, 0, 3.1687854003906250e+02, 452, 439, 0, 2.4087963867187500e+02, 266 | 453, 148, 0, 2.5806005859375000e+02, 454, 395, 0, 267 | 3.6798370361328125e+02, 455, 466, 0, 2.9035839843750000e+02, 456, 268 | 469, 0, 3.1425149536132813e+02, 457, 350, 0, 2.8382916259765625e+02, 269 | 458, 342, 0, 3.3466101074218750e+02, 459, 298, 0, 270 | 3.2901065063476563e+02, 460, 495, 0, 3.4167236328125000e+02, 461, 271 | 485, 0, 3.0564031982421875e+02, 462, 431, 0, 2.7510906982421875e+02, 272 | 463, 407, 0, 3.5101281738281250e+02, 464, 452, 0, 273 | 2.3391665649414063e+02, 465, 365, 0, 4.1109732055664063e+02, 466, 274 | 443, 0, 2.8811630249023438e+02, 467, 488, 0, 2.5451129150390625e+02, 275 | 468, 425, 0, 3.9189028930664063e+02, 469, 487, 0, 276 | 2.2139331054687500e+02, 470, 485, 0, 2.7326361083984375e+02, 471, 277 | 499, 0, 2.9355068969726563e+02, 472, 483, 0, 3.4123892211914063e+02, 278 | 473, 387, 0, 3.1591613769531250e+02, 474, 397, 0, 279 | 3.2889208984375000e+02, 475, 469, 0, 1.7823019409179688e+02, 476, 42, 280 | 0, 3.4759170532226563e+02, 477, 237, 0, 3.3399102783203125e+02, 478, 281 | 354, 0, 4.0964251708984375e+02, 479, 197, 0, 3.9114062500000000e+02, 282 | 480, 498, 0, 1.6247769165039063e+02, 481, 34, 0, 283 | 3.4971417236328125e+02, 482, 480, 0, 2.1479058837890625e+02, 483, 284 | 467, 0, 3.4062002563476563e+02, 484, 281, 0, 2.2144750976562500e+02, 285 | 485, 436, 0, 3.1825775146484375e+02, 486, 263, 0, 286 | 2.7129504394531250e+02, 487, 421, 0, 2.6772000122070313e+02, 488, 17, 287 | 0, 3.9680853271484375e+02, 489, 498, 0, 3.9338021850585938e+02, 490, 288 | 8, 0, 3.3775732421875000e+02, 491, 472, 0, 2.1991361999511719e+02, 289 | 492, 6, 0, 3.8098031616210938e+02, 493, 206, 0, 290 | 4.0102743530273438e+02, 494, 336, 0, 3.3766256713867188e+02, 495, 291 | 259, 0, 2.8716198730468750e+02, 496, 359, 0, 2.6246713256835938e+02, 292 | 497, 279, 0, 3.3878311157226563e+02, 498, 381, 0, 293 | 3.0138677978515625e+02, 499, 462, 0, 2.7065661621093750e+02 ] 294 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/Source.cpp: -------------------------------------------------------------------------------- 1 | #define _CRT_SECURE_NO_DEPRECATE 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using namespace cv; 10 | 11 | Mat crop_black_borders(Mat img) 12 | { 13 | Mat gray; 14 | cvtColor(img, gray, CV_BGR2GRAY); 15 | Mat binary_img; 16 | threshold(gray, binary_img, 1, 255, CV_THRESH_BINARY); 17 | 18 | std::vector > contours; 19 | findContours(binary_img, contours, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0)); 20 | 21 | std::vector > contours_poly(contours.size()); 22 | approxPolyDP(Mat(contours[0]), contours_poly[0], 3, true); 23 | Rect boundRect = boundingRect(Mat(contours[0])); 24 | Mat out = img(boundRect); 25 | 26 | return out; 27 | } 28 | 29 | int main() 30 | { 31 | Mat img_1 = imread("photos/Ryerson-left.jpg"); 32 | Mat img_2 = imread("photos/Ryerson-right.jpg"); 33 | 34 | // Detecting keypoints and compute descriptors 35 | Ptr orb = ORB::create(); 36 | std::vector keypoints1, keypoints2; 37 | Mat descriptors1, descriptors2; 38 | orb->detectAndCompute(img_1, Mat(), keypoints1, descriptors1); 39 | orb->detectAndCompute(img_2, Mat(), keypoints2, descriptors2); 40 | 41 | // Matching descriptors 42 | Ptr descriptorMatcher = DescriptorMatcher::create("BruteForce-Hamming"); 43 | std::vector matches; 44 | descriptorMatcher->match(descriptors1, descriptors2, matches, Mat()); 45 | 46 | // Drawing the results 47 | // Keep best matches only to have a nice drawing. 48 | // We sort distance between descriptor matches 49 | Mat index; 50 | int nbMatch = int(matches.size()); 51 | Mat tab(nbMatch, 1, CV_32F); 52 | for (int i = 0; i(i, 0) = matches[i].distance; 55 | } 56 | sortIdx(tab, index, SORT_EVERY_COLUMN + SORT_ASCENDING); 57 | std::vector bestMatches; 58 | for (int i = 0; i < 200; i++) 59 | { 60 | bestMatches.push_back(matches[index.at(i, 0)]); 61 | } 62 | Mat matching_result; 63 | drawMatches(img_1, keypoints1, img_2, keypoints2, bestMatches, matching_result); 64 | 65 | 66 | // Localize the object 67 | std::vector img_1_points; 68 | std::vector img_2_points; 69 | for (size_t i = 0; i < bestMatches.size(); i++) 70 | { 71 | //-- Get the keypoints from the good matches 72 | img_1_points.push_back(keypoints1[bestMatches[i].queryIdx].pt); 73 | img_2_points.push_back(keypoints2[bestMatches[i].trainIdx].pt); 74 | } 75 | Mat H = findHomography(img_1_points, img_2_points, RANSAC); 76 | 77 | Mat stitching_result; 78 | warpPerspective(img_1, stitching_result, H, Size(img_1.cols + img_2.cols, img_1.rows)); 79 | Mat half(stitching_result, Rect(0, 0, img_2.cols, img_2.rows)); 80 | img_2.copyTo(half); 81 | 82 | Mat cropped_stitching_result = crop_black_borders(stitching_result); 83 | 84 | namedWindow("Result", 0); 85 | imshow("Result", cropped_stitching_result); 86 | 87 | waitKey(0); 88 | 89 | return 0; 90 | } -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/photos/Ryerson-left.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/photos/Ryerson-left.jpg -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/photos/Ryerson-right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/photos/Ryerson-right.jpg -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.log: -------------------------------------------------------------------------------- 1 |  Source.cpp 2 | opencv_stitching310d.lib(opencv_stitching310d.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' 3 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.command.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.read.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/CL.write.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/Image Stitching.lastbuildstate: -------------------------------------------------------------------------------- 1 | #TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 2 | Debug|x64|C:\Users\Alison\documents\visual studio 2015\Projects\Image Stitching\| 3 | -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.command.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.command.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.read.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.read.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.write.1.tlog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/link.write.1.tlog -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/unsuccessfulbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Image Stitching.tlog/unsuccessfulbuild -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/Source.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/Source.obj -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/vc140.idb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/vc140.idb -------------------------------------------------------------------------------- /Image Stitching/Image Stitching/x64/Debug/vc140.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Image Stitching/Image Stitching/x64/Debug/vc140.pdb -------------------------------------------------------------------------------- /OpenCV_3_1_property_sheet.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | C:\OpenCV 3.1\build\install\x86\vc14\bin;C:\OpenCV 3.1\build\install\include 9 | 10 | 11 | C:\OpenCV 3.1\build\install\x86\vc14\lib 12 | opencv_calib3d310d.lib;opencv_core310d.lib;opencv_face310d.lib;opencv_features2d310d.lib;opencv_flann310d.lib;opencv_highgui310d.lib;opencv_imgcodecs310d.lib;opencv_imgproc310d.lib;opencv_ml310d.lib;opencv_objdetect310d.lib;opencv_photo310d.lib;opencv_shape310d.lib;opencv_stitching310d.lib;opencv_superres310d.lib;opencv_video310d.lib;opencv_videoio310d.lib;opencv_videostab310d.lib;opencv_ximgproc310d.lib;opencv_ximgproc310.lib;opencv_xphoto310d.lib;opencv_xphoto310.lib 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Point Operations on Digital Images/README.md: -------------------------------------------------------------------------------- 1 | # Point-Operations-on-Digital-Images 2 | 3 | Perform various point operations on both grayscale and colour images, using both direct access and pointer access methods from OpenCV's C++ API. 4 | -------------------------------------------------------------------------------- /Point Operations on Digital Images/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using namespace cv; 6 | using namespace std; 7 | 8 | int main() 9 | { 10 | Mat img = imread("C:\\George Seif\\rgb_squares.png", IMREAD_UNCHANGED); // Read in the image file 11 | int ch = img.channels(); 12 | 13 | // For Colour Images 14 | for (int i = 0; i < img.rows; i++) 15 | { 16 | // Create a pointer to the pixel array 17 | uchar *p = img.ptr(i); 18 | for (int j = 0; j < img.cols; j++) 19 | { 20 | p[j*ch + 0] = 0; // B 21 | p[j*ch + 1] = 0; // G 22 | p[j*ch + 2] = p[j*ch + 2]; // R 23 | } 24 | } 25 | 26 | /*for (int i = 0; i < 720; i++) 27 | { 28 | for (int j = 0; j < 720; j++) 29 | { 30 | img.at(i, j)[0] = 0; // B 31 | img.at(i, j)[1] = 0; // G 32 | img.at(i, j)[2] = img.at(i, j).val[2]; // R 33 | } 34 | }*/ 35 | 36 | // For Grayscale Images 37 | 38 | /* 39 | for (int i = 0; i < img.rows; i++) 40 | { 41 | // Create a pointer to the pixel array 42 | uchar *p = img.ptr(i); 43 | for (int j = 0; j < img.cols; j++) 44 | { 45 | if (p[j] < 100){ p[j] = 0; } 46 | else if (p[j] > 155){ p[j] = 255; } 47 | else { p[j] = p[j]; } 48 | } 49 | }*/ 50 | 51 | /*float A = 1.5; 52 | int B = 40; 53 | for (int i = 0; i < img.rows; i++) 54 | { 55 | for (int j = 0; j < img.cols; j++) 56 | { 57 | img.at(i, j) = saturate_cast((int)A*img.at(i, j) + B); 58 | } 59 | }*/ 60 | 61 | namedWindow("Image Window", WINDOW_AUTOSIZE); // Create a window of the same size as the image for display 62 | imshow("Image Window", img); // Show our image inside the window 63 | imwrite("image.jpg", img); 64 | waitKey(0); // Wait for a keystroke in the window 65 | return 0; 66 | } -------------------------------------------------------------------------------- /Point Operations on Digital Images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Point Operations on Digital Images/Thumbs.db -------------------------------------------------------------------------------- /Point Operations on Digital Images/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Point Operations on Digital Images/image.jpg -------------------------------------------------------------------------------- /Point Operations on Digital Images/rgb_squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeorgeSeif/Image-Processing-OpenCV/0bda442f8ce47778b2865f612accf22e4c2059c1/Point Operations on Digital Images/rgb_squares.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Image-Processing 2 | Image Processing using the OpenCV C++ API 3 | 4 | This repository contains a collection of various image processing programs using the OpenCV 3.1 C++ API. It contains programs for: 5 | 6 | 1. Image loading and data extraction 7 | 2. Image pixel access and point operations 8 | 3. Contrast enhancement 9 | 4. Global and Local Histogram Equalization, and Histogram plotting 10 | 5. Image Smoothing 11 | 7. Image Sharpening 12 | 8. Edge Detection 13 | 9. Colour Based Segmentation 14 | 10. Colour Style Transfer 15 | 11. Seam Carving 16 | 12. Harris Corner Detector 17 | 13. Feature Detection and Matching 18 | 14. Image Stitching 19 | 15. Gamma Correction and White Balancing 20 | -------------------------------------------------------------------------------- /Seam-Carving/README.md: -------------------------------------------------------------------------------- 1 | # Seam Carving 2 | 3 | This repository contains an implementation of Seam Carving for content-aware image resizing from the paper: 4 | Avidan, Shai, and Ariel Shamir. "Seam carving for content-aware image resizing." ACM Transactions on graphics (TOG). Vol. 26. No. 3. ACM, 2007. 5 | 6 | ## Implementation Details 7 | This is implemented in C++ using the OpenCV Computer Vision library, version 3.1. 8 | 9 | Both image size expansion and compression are implemented. -------------------------------------------------------------------------------- /Seam-Carving/Source.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "cpp_util.hpp" 8 | 9 | using namespace cv; 10 | using std::cout; 11 | using std::cin; 12 | using std::endl; 13 | 14 | // Compute the energy matrix of the image 15 | Mat compute_energy_matrix(Mat img) 16 | { 17 | 18 | // For colour edge detection 19 | std::vector channels(3); 20 | split(img.clone(), channels); 21 | std::vector rgbColourEdges(3); 22 | 23 | for (int i = 0; i < 3; i++) 24 | { 25 | // Generate grad_x and grad_y 26 | Mat colour_grad_x, colour_grad_y; 27 | 28 | // Gradient X 29 | //Scharr(channels[i], colour_grad_x, CV_32F, 1, 0, 1, 0, BORDER_DEFAULT); 30 | Sobel(channels[i], colour_grad_x, CV_32F, 1, 0, 3, 1, 0, BORDER_DEFAULT); 31 | 32 | // Gradient Y 33 | //Scharr(channels[i], colour_grad_y, CV_32F, 0, 1, 1, 0, BORDER_DEFAULT); 34 | Sobel(channels[i], colour_grad_y, CV_32F, 0, 1, 3, 1, 0, BORDER_DEFAULT); 35 | 36 | rgbColourEdges[i] = abs(colour_grad_x) + abs(colour_grad_y); 37 | 38 | // Convert to float for the energy function 39 | rgbColourEdges[i].clone().convertTo(rgbColourEdges[i], CV_32F); 40 | 41 | } 42 | 43 | // Compute the final energy function by summing all of the colour channels 44 | Mat energy_matrix = Mat::zeros(img.size(), CV_32F); 45 | add(rgbColourEdges[0], rgbColourEdges[1], energy_matrix); 46 | add(rgbColourEdges[2], energy_matrix.clone(), energy_matrix); 47 | 48 | return energy_matrix; 49 | 50 | } 51 | 52 | // Compute the score matrix using dynamic programming, given the energy function 53 | Mat compute_score_matrix(Mat energy_matrix) 54 | { 55 | Mat score_matrix = Mat::zeros(energy_matrix.size(), CV_32F); 56 | score_matrix.row(0) = energy_matrix.row(0); 57 | 58 | for (int i = 1; i < score_matrix.rows; i++) 59 | { 60 | for (int j = 0; j < score_matrix.cols; j++) 61 | { 62 | float min_score = 0; 63 | 64 | // Handle the edge cases 65 | if (j - 1 < 0) 66 | { 67 | std::vector scores(2); 68 | scores[0] = score_matrix.at(i - 1, j); 69 | scores[1] = score_matrix.at(i - 1, j + 1); 70 | min_score = *std::min_element(std::begin(scores), std::end(scores)); 71 | } 72 | else if (j + 1 >= score_matrix.cols) 73 | { 74 | std::vector scores(2); 75 | scores[0] = score_matrix.at(i - 1, j - 1); 76 | scores[1] = score_matrix.at(i - 1, j); 77 | min_score = *std::min_element(std::begin(scores), std::end(scores)); 78 | } 79 | else 80 | { 81 | std::vector scores(3); 82 | scores[0] = score_matrix.at(i - 1, j - 1); 83 | scores[1] = score_matrix.at(i - 1, j); 84 | scores[2] = score_matrix.at(i - 1, j + 1); 85 | min_score = *std::min_element(std::begin(scores), std::end(scores)); 86 | } 87 | 88 | score_matrix.at(i, j) = energy_matrix.at(i, j) + min_score; 89 | } 90 | } 91 | 92 | return score_matrix; 93 | } 94 | 95 | // Given the score matrix, traverse back up to get the lowest energy seam 96 | std::vector get_seam(Mat score_matrix) 97 | { 98 | // Get the lowest score in the last row 99 | std::vector last_row = score_matrix.row(score_matrix.rows - 1); 100 | int end_idx = std::min_element(std::begin(last_row), std::end(last_row)) - std::begin(last_row); 101 | 102 | // Extract the lowest energy seam 103 | std::vector low_energy_seam(score_matrix.rows); 104 | low_energy_seam[low_energy_seam.size() - 1] = end_idx; 105 | int curr_col_idx = end_idx; 106 | float inf = std::numeric_limits::infinity(); 107 | 108 | for (int i = score_matrix.rows - 1; i > 0; i--) 109 | { 110 | int left_col_idx = curr_col_idx - 1; 111 | int right_col_idx = curr_col_idx + 1; 112 | int next_idx = 1; 113 | std::vector scores(3); 114 | 115 | if (left_col_idx < 0 || left_col_idx >= score_matrix.cols) 116 | { 117 | scores = { inf, score_matrix.at(i, curr_col_idx), score_matrix.at(i, right_col_idx) }; 118 | } 119 | else if (right_col_idx < 0 || right_col_idx >= score_matrix.cols) 120 | { 121 | scores = { score_matrix.at(i, left_col_idx), score_matrix.at(i, curr_col_idx), inf }; 122 | } 123 | else 124 | { 125 | scores = { score_matrix.at(i, left_col_idx), score_matrix.at(i, curr_col_idx), score_matrix.at(i, right_col_idx) }; 126 | } 127 | 128 | next_idx = std::min_element(std::begin(scores), std::end(scores)) - std::begin(scores); 129 | 130 | if (next_idx == 0) 131 | { 132 | curr_col_idx = left_col_idx; 133 | } 134 | 135 | if (next_idx == 3) 136 | { 137 | curr_col_idx = right_col_idx; 138 | } 139 | 140 | low_energy_seam[i - 1] = curr_col_idx; 141 | } 142 | 143 | 144 | return low_energy_seam; 145 | 146 | } 147 | 148 | Mat remove_single_seam(Mat img, std::vector low_energy_seam) 149 | { 150 | Mat out = Mat::zeros(Size(img.cols - 1, img.rows), img.type()); 151 | int ch = img.channels(); 152 | 153 | for (int i = 0; i < img.rows; i++) 154 | { 155 | int out_col_idx = 0; 156 | 157 | // Create a pointer to the pixel array 158 | uchar *img_p = img.ptr(i); 159 | uchar *out_p = out.ptr(i); 160 | for (int j = 0; j < img.cols; j++) 161 | { 162 | bool keep_pixel = true; 163 | 164 | if (low_energy_seam.at(i) == j) 165 | { 166 | keep_pixel = false; 167 | } 168 | 169 | if (keep_pixel == true) 170 | { 171 | out_p[out_col_idx*ch + 0] = img_p[j*ch + 0]; // B 172 | out_p[out_col_idx*ch + 1] = img_p[j*ch + 1]; // G 173 | out_p[out_col_idx*ch + 2] = img_p[j*ch + 2]; // R 174 | out_col_idx += 1; 175 | } 176 | else 177 | { 178 | continue; 179 | } 180 | } 181 | } 182 | 183 | return out; 184 | } 185 | 186 | Mat add_single_seam(Mat img, std::vector low_energy_seam) 187 | { 188 | Mat out = Mat::zeros(Size(img.cols + 1, img.rows), img.type()); 189 | int ch = img.channels(); 190 | 191 | for (int i = 0; i < img.rows; i++) 192 | { 193 | int img_col_idx = 0; 194 | 195 | // Create a pointer to the pixel array 196 | uchar *img_p = img.ptr(i); 197 | uchar *out_p = out.ptr(i); 198 | for (int j = 0; j < img.cols + 1; j++) 199 | { 200 | bool new_pixel = false; 201 | 202 | if (low_energy_seam.at(i) == j) 203 | { 204 | new_pixel = true; 205 | } 206 | 207 | if (new_pixel == false) 208 | { 209 | out_p[j*ch + 0] = img_p[img_col_idx*ch + 0]; // B 210 | out_p[j*ch + 1] = img_p[img_col_idx*ch + 1]; // G 211 | out_p[j*ch + 2] = img_p[img_col_idx*ch + 2]; // R 212 | img_col_idx += 1; 213 | } 214 | else 215 | { 216 | // Handle the edge cases 217 | if (img_col_idx - 1 < 0) 218 | { 219 | out_p[j*ch + 0] = (img_p[img_col_idx*ch + 0] + img_p[(img_col_idx + 1)*ch + 0]) / 2; // B 220 | out_p[j*ch + 1] = (img_p[img_col_idx*ch + 1] + img_p[(img_col_idx + 1)*ch + 1]) / 2; // G 221 | out_p[j*ch + 2] = (img_p[img_col_idx*ch + 2] + img_p[(img_col_idx + 1)*ch + 2]) / 2; // R 222 | } 223 | else if (img_col_idx + 1 >= img.cols) 224 | { 225 | out_p[j*ch + 0] = (img_p[(img_col_idx - 1)*ch + 0] + img_p[img_col_idx*ch + 0]) / 2; // B 226 | out_p[j*ch + 1] = (img_p[(img_col_idx - 1)*ch + 1] + img_p[img_col_idx*ch + 1]) / 2; // G 227 | out_p[j*ch + 2] = (img_p[(img_col_idx - 1)*ch + 2] + img_p[img_col_idx*ch + 2]) / 2; // R 228 | } 229 | else 230 | { 231 | out_p[j*ch + 0] = (img_p[(img_col_idx - 1)*ch + 0] + img_p[img_col_idx*ch + 0] + img_p[(img_col_idx + 1)*ch + 0]) / 3; // B 232 | out_p[j*ch + 1] = (img_p[(img_col_idx - 1)*ch + 1] + img_p[img_col_idx*ch + 1] + img_p[(img_col_idx + 1)*ch + 1]) / 3; // G 233 | out_p[j*ch + 2] = (img_p[(img_col_idx - 1)*ch + 2] + img_p[img_col_idx*ch + 2] + img_p[(img_col_idx + 1)*ch + 2]) / 3; // R 234 | } 235 | 236 | img_col_idx = img_col_idx; 237 | } 238 | } 239 | } 240 | 241 | return out; 242 | 243 | } 244 | 245 | Mat remove_all_seams(Mat img, int num_seams) 246 | { 247 | for (int i = 1; i <= num_seams; i++) 248 | { 249 | Mat energy = compute_energy_matrix(img.clone()); 250 | Mat score = compute_score_matrix(energy); 251 | std::vector seam = get_seam(score); 252 | cout << "Removing col seam # " << i << endl; 253 | img = remove_single_seam(img, seam); 254 | } 255 | 256 | return img; 257 | } 258 | 259 | Mat add_all_seams(Mat img, int num_seams) 260 | { 261 | // Getting all of the seams to duplicate and add 262 | // These are the first "num_seams" that we would normally remove 263 | Mat img_copy = img.clone(); 264 | 265 | cout << "Getting all seams " << num_seams << " to add..." << endl; 266 | std::vector> seams_to_add(num_seams); 267 | for (int i = 0; i < num_seams; i++) 268 | { 269 | Mat energy = compute_energy_matrix(img_copy.clone()); 270 | Mat score = compute_score_matrix(energy); 271 | std::vector seam = get_seam(score); 272 | seams_to_add.at(i) = seam; 273 | img_copy = remove_single_seam(img_copy, seam); 274 | cout << "Got seam # " << i + 1 << endl; 275 | } 276 | 277 | // Add all of the seams 278 | for (int i = 0; i < num_seams; i++) 279 | { 280 | cout << "Adding seam # " << i+1 << endl; 281 | img = add_single_seam(img, seams_to_add.at(i)); 282 | } 283 | 284 | return img; 285 | 286 | } 287 | 288 | 289 | Mat seam_carving(Mat img, Size out_size) 290 | { 291 | int num_row_seams = img.rows - out_size.height; 292 | int num_col_seams = img.cols - out_size.width; 293 | 294 | if (num_col_seams < 0) 295 | { 296 | num_col_seams = std::abs(num_col_seams); 297 | img = add_all_seams(img, num_col_seams); 298 | } 299 | else 300 | { 301 | img = remove_all_seams(img, num_col_seams); 302 | } 303 | 304 | transpose(img, img); 305 | 306 | if (num_row_seams < 0) 307 | { 308 | num_row_seams = std::abs(num_row_seams); 309 | img = add_all_seams(img, num_row_seams); 310 | } 311 | else 312 | { 313 | img = remove_all_seams(img, num_row_seams); 314 | } 315 | 316 | transpose(img, img); 317 | 318 | return img; 319 | } 320 | 321 | int main() 322 | { 323 | // Input image 324 | Mat img = imread("ryerson.jpg"); 325 | Mat img_copy = img.clone(); 326 | 327 | if (img.empty()) 328 | { 329 | cout << "ERROR: Image is empty!!!" << endl; 330 | return 0; 331 | } 332 | 333 | // Prompt the user to input the image size 334 | cout << "The image is of size = " << img.cols << " x " << img.rows << ". Enter in the new image size." << endl << endl; 335 | 336 | int num_rows = 0; 337 | int num_cols = 0; 338 | cout << "rows: "; cin >> num_rows; 339 | cout << "cols: "; cin >> num_cols; 340 | cout << endl; 341 | 342 | // Get the number of seams to add or remove 343 | 344 | // Add or remove seams according to the difference in number of rows and cols 345 | Mat out = seam_carving(img, Size(num_cols, num_rows)); 346 | 347 | namedWindow("Input Image", 0); 348 | namedWindow("Output Image", 0); 349 | imshow("Input Image", img_copy); 350 | imshow("Output Image", out); 351 | 352 | waitKey(0); 353 | 354 | return 0; 355 | } --------------------------------------------------------------------------------