Skip to content

Instantly share code, notes, and snippets.

@SimoneErcoli
SimoneErcoli / RedditCrawler
Created October 2, 2014 10:09
Crawler for reddit post written in Python
import praw
import time
from pprint import pprint
import urllib2
import urllib
from urlparse import urlparse
from os.path import splitext, basename
import cPickle
import os
@SimoneErcoli
SimoneErcoli / RansacMethodCPP
Created October 1, 2014 13:51
Ransac Method implemented in CPP for robust keypoints estimation
cv::Mat ransacTest(
const std::vector<std::vector<cv::DMatch> > &matches, // Matches between two set of keypoints
const std::vector<cv::KeyPoint>& keypoints1,
const std::vector<cv::KeyPoint>& keypoints2,
std::vector<std::vector<cv::DMatch> > &outMatches) {
// Convert keypoints into Point2f
std::vector<cv::Point2f> points1, points2;
for (std::vector<std::vector<cv::DMatch> >::
const_iterator it= matches.begin(); it!= matches.end(); ++it) {