Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: abhinavgupta/SIFT-DSMAC
base: 3a5fbc922d
...
head fork: abhinavgupta/SIFT-DSMAC
compare: e1de7c148d
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
6 CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.3)
-project( SIFT_Descriptor)
+project( zoomout)
find_package (OpenCV REQUIRED)
-add_executable ( SIFT_Descriptor SIFT_Descriptor )
-target_link_libraries ( SIFT_Descriptor ${OpenCV_LIBS})
+add_executable (SIFT_Descriptor SIFT_Descriptor.cpp zoomout.cpp)
+target_link_libraries ( SIFT_Descriptor ${OpenCV_LIBS} )
View
10 README
@@ -23,9 +23,11 @@ CMake 2.8
BUILDIING FROM SOURCE:
-1. Go to the directory and run the following commands:
+1. USE CMAKE
-cmake .
+mkdir build
+cd build
+cmake ..
make
This should make the required files and the executable as well
@@ -33,7 +35,7 @@ This should make the required files and the executable as well
RUNNING THE CODE:
-./SIFT_descriptor <img1> <img2> <resize parameter in power of two> <threshold multiplier for min distance>
+./SIFT_descriptor <Object image> <Scene Image> <resize parameter in power of two> <threshold multiplier for min distance>
img1 : Object Image (This will be the zoomed in version)
img2 : Scene Image (This will be the Map version, scaled out as compared to the object image)
@@ -47,4 +49,4 @@ Abhinav Gupta
CONSTRBUTORS:
-Ritesh Ranjan
+Ritesh Ranjan
View
10 SIFT_Descriptor.cpp
@@ -11,6 +11,7 @@
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
+#include "utils.hpp"
#define ASSERT(condition, message) \
if (! (condition)) { \
@@ -44,12 +45,7 @@ int main (int argc, char** argv)
return -1;
}
- for (int i =0; i< atoi(argv[3]); i++)
- {
- pyrDown(img_object_temp, img_object, Size( img_object_temp.cols/2, img_object_temp.rows/2)); // Scaling down the object image by a factor of 2^[argv[3]]
-
- img_object_temp = img_object;
- }
+ img_object = zoomout(img_object_temp, atoi(argv[3]));
std::vector<KeyPoint> keypoints_object, keypoints_scene; //Initializing data structures for keypoints & descriptors
Mat descriptors_object, descriptors_scene;
@@ -134,4 +130,4 @@ int main (int argc, char** argv)
* @function readme
*/
void readme()
- { std::cout << " Usage: ./SIFT_descriptor <img1> <img2> <resize parameter in power of two> <threshold multiplier for min distance> \n FOR FURTHER INFO CHECK README \n" << std::endl; }
+ { std::cout << " Usage: ./SIFT_descriptor <object_image> <scene_image> <resize parameter in power of two> <threshold multiplier for min distance> \n FOR FURTHER INFO CHECK README \n" << std::endl; }
View
BIN  test-images/TEST.JPG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  test-images/swiss.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
6 utils.hpp
@@ -0,0 +1,6 @@
+#ifndef UTILS_HPP
+#define UTILS_HPP
+
+cv::Mat zoomout( cv::Mat src, int iterations );
+
+#endif
View
32 zoomout.cpp
@@ -0,0 +1,32 @@
+#include "opencv2/imgproc/imgproc.hpp"
+#include "opencv2/highgui/highgui.hpp"
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+using namespace cv;
+
+/**
+ * @function main
+ */
+Mat zoomout( Mat src, int iterations )
+{
+
+
+
+
+ Mat dst = src;
+
+
+ for( int i = 0; i<iterations; i++)
+ {
+ pyrDown( src, dst, Size( src.cols/2, src.rows/2 ) );
+ src = dst;
+ }
+
+
+
+
+ return dst;
+}
+

No commit comments for this range

Something went wrong with that request. Please try again.