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
# by pyimagesearch | |
# import the necessary packages | |
import numpy as np | |
import cv2 | |
def order_points(pts): | |
# initialzie a list of coordinates that will be ordered | |
# such that the first entry in the list is the top-left, | |
# the second entry is the top-right, the third is the | |
# bottom-right, and the fourth is the bottom-left |
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
#include <queue> | |
#include <iostream> | |
#include <opencv2/opencv.hpp> | |
#include "dirent.h" | |
using namespace std; | |
using namespace cv; | |
int main(int, char** argv) | |
{ |
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
var lt = document.getElementsByClassName("floatLeft"); | |
for (var it of lt) | |
{ | |
var link = it.lastElementChild.href; | |
var bkn = /bkn=([^&]*)&/.exec(link)[1]; | |
var fn = /=([^.]*)\.pdf/.exec(link)[1]; | |
it.lastElementChild.href= "/ebooks/"+bkn+"/"+fn+".pdf?bkn="+bkn+"&pdfType=chapter"; | |
} |
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
javascript:(function () { | |
var rl = document.getElementById("results-list"); | |
var tl = rl.getElementsByClassName("text"); | |
for (var t of tl) | |
{ | |
var title = t.getElementsByClassName("title")[0]; | |
var subtitle = t.getElementsByClassName("subtitle")[0]; | |
var year = t.getElementsByClassName("year")[0]; | |
title.innerHTML += " " + subtitle.innerHTML + (subtitle.innerHTML ? " " : "") + year.innerHTML; | |
title.href = title.href.replace(/\/book\//,"/content/pdf/") + ".pdf"; |
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
f=(*.jpg) | |
i=({01..37}) | |
for ((j=0; j<=${#f[@]}; j++)) | |
do | |
mv ${f[j]} ${i[j]}.jpg | |
done |
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
VideoCapture cap(path + "/%d.jpg"); | |
while(cap.isOpened()) | |
{ | |
Mat image; | |
cap >> image; | |
if(image.empty()) | |
break; | |
/* image processing */ | |
} |
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
/* | |
histogram sort, from vlfeat/mser.c | |
*/ | |
/* ----------------------------------------------------------------- | |
* Sort pixels by intensity | |
* -------------------------------------------------------------- */ | |
{ | |
vl_uint buckets [ VL_MSER_PIX_MAXVAL ] ; |
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 vlfeat/mser.c | |
print: | |
-1 -1 -1 | |
0 -1 -1 | |
1 -1 -1 | |
....... | |
-1 1 1 | |
0 1 1 | |
1 1 1 | |
*/ |
NewerOlder