This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bs4 | |
import re | |
import urllib2 | |
import sys | |
from collections import defaultdict | |
start = 1 | |
link = 'http://www.flipkart.com/mobiles/pr?p[0]=sort%3Dprice_asc&sid=tyy%2C4io&layout=grid&start={0}'.format(start) | |
response = urllib2.urlopen(link) | |
thePage = response.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bs4 | |
import re | |
import urllib2 | |
import sys | |
item = sys.argv[1:] | |
item = '+'.join(item) | |
link = 'http://www.flipkart.com/search/a/all?query={0}&vertical=all&dd=0&autosuggest[as]=off&autosuggest[as-submittype]=entered&autosuggest[as-grouprank]=0&autosuggest[as-overallrank]=0&autosuggest[orig-query]=&autosuggest[as-shown]=off&Search=%C2%A0&otracker=start&_r=YSWdYULYzr4VBYklfpZRbw--&_l=pMHn9vNCOBi05LKC_PwHFQ--&ref=a2c6fadc-2e24-4412-be6a-ce02c9707310&selmitem=All+Categories'.format(item) | |
response = urllib2.urlopen(link) | |
thePage = response.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path = '/home/rishi/Documents/' | |
fname = 'MyImg' | |
#fname = '' | |
if path: | |
import glob, re, os, tempfile | |
if fname: | |
if os.path.exists(path): | |
if path[-1]!='/': path+='/' | |
gpath = path + fname + "*.png" | |
current_images = glob.glob(gpath) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy.ndimage as ndi | |
import scipy | |
import numpy | |
import Image | |
import math | |
sigma = 1.4 | |
f = 'lena_std.tif' | |
img = Image.open(f).convert('L') #grayscale | |
imgdata = numpy.array(img, dtype = float) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SimpleCV import * | |
import cv2 | |
import cv | |
import numpy as np | |
img1 = Image("s.jpg") | |
img1cv = cv.imread("s.jpg") | |
img2 = Image("t.jpg") | |
img2cv = cv.imread("t.jpg") | |
dst = Image((1600, 1200)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SimpleCV import * | |
import cv2 | |
import cv | |
import numpy as np | |
img1 = Image("s.jpg") | |
img1cv = cv.imread("s.jpg") | |
img2 = Image("t.jpg") | |
img2cv = cv.imread("t.jpg") | |
dst = Image((1600, 1200)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import time | |
from SimpleCV import Color, Image, np, Camera | |
cam = Camera() #initialize the camera | |
quality = 400 | |
minMatch = 0.3 | |
try: | |
password = Image("password.jpg") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from SimpleCV import * | |
import cv2 | |
import cv | |
import numpy as np | |
img1 = Image("t.jpg") | |
img2 = Image("s.jpg") | |
src = img1.copy() | |
dst = Image((1600, 1200)) | |
ofimg = img1.findKeypointMatch(img2) |