Skip to content

Commit 5d7737f

Browse files
committed
initial commit
0 parents  commit 5d7737f

File tree

80 files changed

+48
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+48
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Untitled1.py.bak

README.md

+1

main.py

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
4+
from selenium import webdriver
5+
from selenium.webdriver.common.keys import Keys
6+
from selenium.webdriver.common.by import By
7+
import pandas as pd
8+
import pdfkit
9+
10+
browser = webdriver.Chrome('~/Downloads/chromedriver_linux64/chromedriver')
11+
12+
start_url = f'https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html'
13+
browser.get(start_url)
14+
all_links = []
15+
16+
def crawler():
17+
18+
_ = browser.find_elements(by=By.CSS_SELECTOR, value='body > div.contents > div > ul > li > p > a')
19+
links = [ (i.get_property('text'), i.get_property('href')) for i in _]
20+
for name, link in links:
21+
print(name, ' ==> ', link)
22+
all_links.append((name, link))
23+
browser.get(link)
24+
crawler()
25+
26+
crawler()
27+
28+
for i, (name, link) in enumerate(all_links):
29+
30+
fname = f'opencv/{i:04d}--{name.replace(" ", "-")}.pdf'
31+
pdfkit.from_url(link, fname)
32+

merge_pdfs.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from PyPDF2 import PdfMerger
2+
import glob
3+
4+
5+
6+
pdfs = sorted(glob.glob("opencv/*.pdf") )
7+
8+
merger = PdfMerger()
9+
10+
for pdf in pdfs:
11+
merger.append(pdf)
12+
13+
merger.write("opencv-book.pdf")
14+
merger.close()

opencv-book.pdf

7.77 MB
Binary file not shown.
27.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
57.1 KB
Binary file not shown.
46.7 KB
Binary file not shown.
28.8 KB
Binary file not shown.
60.4 KB
Binary file not shown.
64.6 KB
Binary file not shown.
72.2 KB
Binary file not shown.
48.5 KB
Binary file not shown.
64.4 KB
Binary file not shown.

opencv/0011--Core-Operations.pdf

28.1 KB
Binary file not shown.
160 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
33.8 KB
Binary file not shown.

opencv/0016--Changing-Colorspaces.pdf

62.7 KB
Binary file not shown.
Binary file not shown.

opencv/0018--Image-Thresholding.pdf

235 KB
Binary file not shown.

opencv/0019--Smoothing-Images.pdf

254 KB
Binary file not shown.
120 KB
Binary file not shown.

opencv/0021--Image-Gradients.pdf

182 KB
Binary file not shown.

opencv/0022--Canny-Edge-Detection.pdf

98.9 KB
Binary file not shown.

opencv/0023--Image-Pyramids.pdf

255 KB
Binary file not shown.

opencv/0024--Contours-in-OpenCV.pdf

28.3 KB
Binary file not shown.
56.1 KB
Binary file not shown.

opencv/0026--Contour-Features.pdf

148 KB
Binary file not shown.

opencv/0027--Contour-Properties.pdf

65.2 KB
Binary file not shown.
72.7 KB
Binary file not shown.

opencv/0029--Contours-Hierarchy.pdf

118 KB
Binary file not shown.

opencv/0030--Histograms-in-OpenCV.pdf

28.8 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.3 KB
Binary file not shown.
Binary file not shown.
25.6 KB
Binary file not shown.

opencv/0036--Template-Matching.pdf

273 KB
Binary file not shown.

opencv/0037--Hough-Line-Transform.pdf

3.32 KB
Binary file not shown.
60.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
115 KB
Binary file not shown.
152 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

opencv/0050--Feature-Matching.pdf

190 KB
Binary file not shown.
Binary file not shown.
26.2 KB
Binary file not shown.
Binary file not shown.

opencv/0054--Camera-Calibration.pdf

214 KB
Binary file not shown.

opencv/0055--Pose-Estimation.pdf

172 KB
Binary file not shown.

opencv/0056--Epipolar-Geometry.pdf

202 KB
Binary file not shown.
86.3 KB
Binary file not shown.

opencv/0058--Machine-Learning.pdf

27.6 KB
Binary file not shown.

opencv/0059--K-Nearest-Neighbour.pdf

27.1 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

opencv/0063--Understanding-SVM.pdf

105 KB
Binary file not shown.
Binary file not shown.

opencv/0065--K-Means-Clustering.pdf

26.6 KB
Binary file not shown.
Binary file not shown.
183 KB
Binary file not shown.
28.2 KB
Binary file not shown.

opencv/0069--Image-Denoising.pdf

155 KB
Binary file not shown.

opencv/0070--Image-Inpainting.pdf

114 KB
Binary file not shown.
453 KB
Binary file not shown.
Binary file not shown.
26.3 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)