%%html
<style>
div.input {
display:none;
}
</style>
from IPython.display import IFrame
IFrame('./contract-page-example.png', width="100%", height=800)
import cv2
import numpy as np
from matplotlib import pyplot as plt
import pytesseract
import imutils
from imutils import contours
from imutils.perspective import four_point_transform
from skimage.filters import threshold_local
def displayColorImage(image, title):
plt.imshow(cv2.cvtColor(image, cv2.COLOR_BGR2RGB), interpolation="nearest")
plt.title(title)
plt.show()
def displayGrayScaleImage(image, title):
plt.imshow(image, cmap='gray', vmin = 0.0, vmax = 255.0)
plt.title(title)
plt.show()
## clean ol files
import os
os.system('rm -r boxes.png numbers.png')
256
#orig = cv2.imread("receipt05.jpg")
#orig = cv2.imread("IMG_20200908_181359.jpg")
orig = cv2.imread("contract-page-example.png")
displayColorImage(orig, "original")
image = orig.copy()
ratio = image.shape[0]/500.0
image = imutils.resize(image, height=500)
displayColorImage(image,"resized")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
displayGrayScaleImage(gray,"grayscale image")
gray = cv2.GaussianBlur(gray, (5,5),0)
displayGrayScaleImage(gray,"after removing noise")
edged = cv2.Canny(gray, 75, 200)
displayGrayScaleImage(edged,"edges")
cnts = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
cnts = imutils.grab_contours(cnts)
cnts = sorted(cnts, key = cv2.contourArea, reverse = True)[:4]
for c in cnts:
peri = cv2.arcLength(c, True)
approx = cv2.approxPolyDP(c, 0.02*peri, True)
if len(approx) == 4 :
screenCnt = approx
break
cv2.drawContours(image, [screenCnt], -1, (0,255,0),2)
displayColorImage(image, "with contours")
print(screenCnt)
print(screenCnt.reshape(4,2))
[[[ 42 43]] [[ 42 456]] [[334 456]] [[334 43]]] [[ 42 43] [ 42 456] [334 456] [334 43]]
warped = four_point_transform(orig, screenCnt.reshape(4,2) * ratio)
warped = cv2.cvtColor(warped, cv2.COLOR_BGR2GRAY)
displayGrayScaleImage(warped, "warped grayscale")
cv2.imwrite('DR.png', warped)
overlay = warped.copy()
#warped = cv2.adaptiveThreshold(warped, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 35, 7)
#displayGrayScaleImage(warped, "warped post adpative threshold")
##img = cv2.cvtColor(warped,cv2.COLOR_BGR2RGB)
##cv2.imshow('Result',img)
print(pytesseract.image_to_string(warped))
12|35 — John C. Malone, 30.06%; relating to shares (i) subject to certain options, (ii) held directly or through Columbus Holding LLC (an entity controlled by Mr. Malone), (iii) held by Mr. Malone's spouse, and (iv) held by two trusts managed by an independent trustee, of which the beneficiaries are Mr. Malone's adult children and a trust with respect to which Mr. Malone is the sole trustee and, with his spouse, retains a unitrust interest in the trust; — Berkshire Hathaway Inc., 6.27%; based upon the Form 4, filed with the SEC on July 10, 2020, by Berkshire Hathaway Inc.; — Dodge & Cox, 5.67%; relating to shares mostly held by Dodge & Cox International Stock Fund; based upon the Schedule 13G/A (Amendment No. 4) for the year ended December 31, 2019, filed with the SEC on February 13, 2020, by Dodge & Cox; and — Harris Associates L.P., 12%; based upon the Schedule 13G/A (Amendment No. 4) for the year ended December 31, 2019, filed with the SEC on February 14, 2020, by Harris Asso- ciates Inc. on behalf of itself and as general partner of Harris Associates L.P. In addition to the above, as of August 25, 2020, based upon the number of Liberty Global shares outstanding as described above, to the extent known by Liberty Global or ascertainable from filings made by such persons or entities with the SEC, the following persons and entities have been reported as direct or indirect shareholders holding 3% or more of the voting rights of Liber- ty Global: (i) Robert R. Bennett, 3.23% (based upon a Form 8.3 dated November 4, 2015, sub- mitted by Mr. Bennett pursuant to the U.K. Takeover Code); (ii) William H. Gates Ill, 3.53% (based upon a Schedule 13G filed with the SEC on May 18, 2018, by William H. Gates Ill, Cas- cade Investment, L.L.C., the Bill and Melinda Gates Foundation Trust and Melinda French Gates); and (iii) Route One Investment Company, L.P., 3.03% (based upon a Schedule 13G filed with the SEC on February 14, 2020, jointly by Route One Investment Company, L.P., Route One Investment Company, LLC, ROIC, LLC, William F. Duhamel, Jr. and Jason E. Moment). 2. Persons Acting in Concert with the Offeror In connection with the Offer, all companies and persons (directly or indirectly) controlled by Lib- erty Global as well as from August 12, 2020, the date on which Liberty Global and Sunrise en- tered into the Transaction Agreement, Sunrise and all companies and persons (directly or indi- rectly) controlled by Sunrise are deemed to be acting in concert with the Offeror. 3. Annual Report As a private company and an indirect wholly-owned Subsidiary of Liberty Global, the Offeror has never published an annual report. The annual report of the Liberty Global Group for the business year ended December 31, 2019 and the financial results for the business quarter ended June 30, 2020, are available on the website of Liberty Global at https://www.libertyglobal.com/investors/financials/. 4. Participations in Sunrise As of August 11, 2020 (the last Trading Day prior to the Pre-Announcement), the Offeror and the persons acting in concert with it (excluding Sunrise and its direct and indirect Subsidiaries) held no Sunrise Shares and no financial instruments with respect to Sunrise Shares. As of the same
rst = pytesseract.image_to_string(warped)
f = open("result.txt", "w")
f.write(rst)
f.close()
import time
img = warped
#############################################
#### Detecting Words ######
#############################################
#[ 0 1 2 3 4 5 6 7 8 9 10 11 ]
#['level', 'page_num', 'block_num', 'par_num', 'line_num', 'word_num', 'left', 'top', 'width', 'height', 'conf', 'text']
sortfile = 'names-sorted-uniq.txt' ## file coming from Notebook name-extract-00.ipynb
boxes = pytesseract.image_to_data(img)
for a,b in enumerate(boxes.splitlines()):
print(b)
if a!=0:
b = b.split()
if len(b)==12:
if b[11] in open(sortfile).read():
x,y,w,h = int(b[6]),int(b[7]),int(b[8]),int(b[9])
#cv2.putText(img,b[11],(x,y-5),cv2.FONT_HERSHEY_SIMPLEX,1,(50,50,255),2)
cv2.rectangle(img, (x,y), (x+w, y+h), (50, 50, 255), 18)
level page_num block_num par_num line_num word_num left top width height conf text 1 1 0 0 0 0 0 0 1189 1681 -1 2 1 1 0 0 0 0 0 1189 1 -1 3 1 1 1 0 0 0 0 1189 1 -1 4 1 1 1 1 0 0 0 1189 1 -1 5 1 1 1 1 1 0 0 1189 1 95 2 1 2 0 0 0 0 0 2 1681 -1 3 1 2 1 0 0 0 0 2 1681 -1 4 1 2 1 1 0 0 0 2 1681 -1 5 1 2 1 1 1 0 0 2 1681 95 2 1 3 0 0 0 962 94 45 14 -1 3 1 3 1 0 0 962 94 45 14 -1 4 1 3 1 1 0 962 94 45 14 -1 5 1 3 1 1 1 962 94 45 14 82 12|35 2 1 4 0 0 0 185 187 823 126 -1 3 1 4 1 0 0 185 187 823 126 -1 4 1 4 1 1 0 185 187 822 18 -1 5 1 4 1 1 1 185 195 19 2 75 — 5 1 4 1 1 2 239 187 40 14 93 John 5 1 4 1 1 3 289 187 17 14 92 C. 5 1 4 1 1 4 315 187 66 16 96 Malone, 5 1 4 1 1 5 390 187 63 14 96 30.06%; 5 1 4 1 1 6 455 187 73 18 96 relating 5 1 4 1 1 7 536 188 15 13 96 to 5 1 4 1 1 8 559 187 46 14 96 shares 5 1 4 1 1 9 607 187 32 18 96 (i) 5 1 4 1 1 10 647 187 60 18 96 subject 5 1 4 1 1 11 715 188 14 13 96 to 5 1 4 1 1 12 737 187 57 14 96 certain 5 1 4 1 1 13 802 187 60 18 96 options, 5 1 4 1 1 14 865 187 31 18 95 (ii) 5 1 4 1 1 15 904 187 35 14 97 held 5 1 4 1 1 16 947 187 60 18 95 directly 4 1 4 1 2 0 239 214 768 18 -1 5 1 4 1 2 1 239 217 17 11 96 or 5 1 4 1 2 2 267 214 63 18 96 through 5 1 4 1 2 3 344 214 85 14 96 Columbus 5 1 4 1 2 4 441 214 62 18 96 Holding 5 1 4 1 2 5 517 214 32 14 96 LLC 5 1 4 1 2 6 561 214 26 18 95 (an 5 1 4 1 2 7 600 215 45 17 96 entity 5 1 4 1 2 8 656 214 82 14 96 controlled 5 1 4 1 2 9 750 214 20 18 96 by 5 1 4 1 2 10 781 214 25 14 96 Mr. 5 1 4 1 2 11 819 214 68 18 96 Malone), 5 1 4 1 2 12 890 214 39 18 89 (iii) 5 1 4 1 2 13 941 214 34 14 95 held 5 1 4 1 2 14 988 214 19 18 95 by 4 1 4 1 3 0 240 241 768 18 -1 5 1 4 1 3 1 240 241 26 14 96 Mr. 5 1 4 1 3 2 273 241 75 14 94 Malone's 5 1 4 1 3 3 356 244 61 15 96 spouse, 5 1 4 1 3 4 419 244 31 13 96 and 5 1 4 1 3 5 452 241 44 18 96 (iv) 5 1 4 1 3 6 503 241 35 14 96 held 5 1 4 1 3 7 547 241 19 18 97 by 5 1 4 1 3 8 574 242 29 13 96 two 5 1 4 1 3 9 611 242 45 13 96 trusts 5 1 4 1 3 10 665 241 78 18 96 managed 5 1 4 1 3 11 752 241 9 14 96 by 5 1 4 1 3 12 763 244 36 15 96 an 5 1 4 1 3 13 808 241 99 18 96 independent 5 1 4 1 3 14 907 242 76 15 96 trustee, 5 1 4 1 3 15 992 241 16 14 97 of 4 1 4 1 4 0 239 268 767 18 -1 5 1 4 1 4 1 239 268 48 14 96 which 5 1 4 1 4 2 296 268 26 14 96 the 5 1 4 1 4 3 331 268 106 14 96 beneficiaries 5 1 4 1 4 4 445 271 27 11 96 are 5 1 4 1 4 5 481 268 24 14 96 Mr. 5 1 4 1 4 6 516 268 73 14 95 Malone's 5 1 4 1 4 7 598 268 41 14 96 adult 5 1 4 1 4 8 647 268 66 14 96 children 5 1 4 1 4 9 722 268 30 14 96 and 5 1 4 1 4 10 761 271 9 11 95 a 5 1 4 1 4 11 779 269 36 13 96 trust 5 1 4 1 4 12 823 268 33 14 96 with 5 1 4 1 4 13 865 269 62 17 96 respect 5 1 4 1 4 14 935 269 15 13 96 to 5 1 4 1 4 15 958 268 48 14 96 which 4 1 4 1 5 0 240 295 751 18 -1 5 1 4 1 5 1 240 295 26 14 96 Mr. 5 1 4 1 5 2 273 295 50 14 96 Malone 5 1 4 1 5 3 325 295 19 14 96 is 5 1 4 1 5 4 346 295 40 14 96 the 5 1 4 1 5 5 392 295 35 14 96 sole 5 1 4 1 5 6 433 296 58 13 96 trustee 5 1 4 1 5 7 497 295 35 16 96 and, 5 1 4 1 5 8 540 295 32 14 96 with 5 1 4 1 5 9 579 295 23 14 96 his 5 1 4 1 5 10 609 298 60 15 96 spouse, 5 1 4 1 5 11 672 295 66 16 96 retains 5 1 4 1 5 12 745 298 9 11 93 a 5 1 4 1 5 13 761 295 56 14 93 unitrust 5 1 4 1 5 14 819 295 72 14 94 interest 5 1 4 1 5 15 898 295 13 14 96 in 5 1 4 1 5 16 917 295 26 14 96 the 5 1 4 1 5 17 949 295 42 16 96 trust; 2 1 5 0 0 0 185 348 821 45 -1 3 1 5 1 0 0 185 348 821 45 -1 4 1 5 1 1 0 185 348 821 19 -1 5 1 5 1 1 1 185 357 19 2 66 — 5 1 5 1 1 2 240 349 80 14 96 Berkshire 5 1 5 1 1 3 329 349 73 14 93 Hathaway 5 1 5 1 1 4 404 349 52 18 92 Inc., 5 1 5 1 1 5 464 348 57 17 96 6.27%; 5 1 5 1 1 6 531 349 51 14 96 based 5 1 5 1 1 7 591 352 41 15 96 upon 5 1 5 1 1 8 641 349 25 14 96 the 5 1 5 1 1 9 676 349 42 14 96 Form 5 1 5 1 1 10 724 349 10 14 96 4, 5 1 5 1 1 11 737 348 45 17 96 filed 5 1 5 1 1 12 790 349 33 14 96 with 5 1 5 1 1 13 832 349 25 14 96 the 5 1 5 1 1 14 866 348 38 15 96 SEC 5 1 5 1 1 15 913 352 20 11 96 on 5 1 5 1 1 16 942 349 33 18 95 July 5 1 5 1 1 17 982 349 24 16 95 10, 4 1 5 1 2 0 239 375 291 18 -1 5 1 5 1 2 1 239 375 47 16 96 2020, 5 1 5 1 2 2 294 375 19 18 97 by 5 1 5 1 2 3 319 375 80 14 96 Berkshire 5 1 5 1 2 4 406 375 73 14 93 Hathaway 5 1 5 1 2 5 481 375 49 18 84 Inc.; 2 1 6 0 0 0 185 428 823 72 -1 3 1 6 1 0 0 185 428 823 72 -1 4 1 6 1 1 0 185 428 821 19 -1 5 1 6 1 1 1 185 436 19 2 92 — 5 1 6 1 1 2 240 428 55 19 12 Dodge 5 1 6 1 1 3 303 428 12 15 93 & 5 1 6 1 1 4 323 428 37 17 96 Cox, 5 1 6 1 1 5 369 428 53 15 96 5.67%; 5 1 6 1 1 6 424 429 72 18 96 relating 5 1 6 1 1 7 504 429 16 14 96 to 5 1 6 1 1 8 527 429 56 14 96 shares 5 1 6 1 1 9 592 429 55 18 96 mostly 5 1 6 1 1 10 654 429 34 14 96 held 5 1 6 1 1 11 697 429 19 18 96 by 5 1 6 1 1 12 724 428 55 19 91 Dodge 5 1 6 1 1 13 787 428 11 15 91 & 5 1 6 1 1 14 806 428 23 15 96 Cox 5 1 6 1 1 15 831 428 120 15 96 International 5 1 6 1 1 16 960 428 46 15 96 Stock 4 1 6 1 2 0 240 455 768 19 -1 5 1 6 1 2 1 240 455 47 17 96 Fund; 5 1 6 1 2 2 295 456 50 14 96 based 5 1 6 1 2 3 354 459 40 14 96 upon 5 1 6 1 2 4 401 456 26 14 96 the 5 1 6 1 2 5 435 455 79 15 93 Schedule 5 1 6 1 2 6 521 455 53 15 92 13G/A 5 1 6 1 2 7 581 455 109 18 96 (Amendment 5 1 6 1 2 8 698 456 22 14 96 No. 5 1 6 1 2 9 722 456 20 14 96 4) 5 1 6 1 2 10 744 455 34 18 96 for 5 1 6 1 2 11 784 455 25 15 96 the 5 1 6 1 2 12 817 459 37 15 95 year 5 1 6 1 2 13 860 455 52 15 95 ended 5 1 6 1 2 14 920 455 88 15 94 December 4 1 6 1 3 0 240 482 618 18 -1 5 1 6 1 3 1 240 482 25 17 96 31, 5 1 6 1 3 2 271 482 42 15 96 2019, 5 1 6 1 3 3 315 482 44 17 96 filed 5 1 6 1 3 4 366 482 32 15 96 with 5 1 6 1 3 5 405 482 26 15 96 the 5 1 6 1 3 6 438 482 38 15 96 SEC 5 1 6 1 3 7 482 486 20 11 96 on 5 1 6 1 3 8 510 482 75 18 96 February 5 1 6 1 3 9 592 482 23 16 96 13, 5 1 6 1 3 10 623 482 46 17 96 2020, 5 1 6 1 3 11 676 482 21 18 96 by 5 1 6 1 3 12 703 482 54 18 93 Dodge 5 1 6 1 3 13 764 482 11 15 92 & 5 1 6 1 3 14 782 482 38 17 96 Cox; 5 1 6 1 3 15 827 482 31 15 96 and 2 1 7 0 0 0 185 536 821 72 -1 3 1 7 1 0 0 185 536 821 72 -1 4 1 7 1 1 0 185 536 821 18 -1 5 1 7 1 1 1 185 544 19 2 63 — 5 1 7 1 1 2 240 536 50 15 95 Harris 5 1 7 1 1 3 297 536 92 15 93 Associates 5 1 7 1 1 4 397 536 37 16 91 L.P., 5 1 7 1 1 5 443 536 40 16 96 12%; 5 1 7 1 1 6 492 536 50 15 96 based 5 1 7 1 1 7 549 540 41 14 96 upon 5 1 7 1 1 8 598 536 25 15 96 the 5 1 7 1 1 9 631 536 78 15 93 Schedule 5 1 7 1 1 10 718 536 53 15 92 13G/A 5 1 7 1 1 11 777 536 104 18 96 (Amendment 5 1 7 1 1 12 882 536 35 15 96 No. 5 1 7 1 1 13 919 536 20 14 96 4) 5 1 7 1 1 14 940 536 35 18 96 for 5 1 7 1 1 15 980 536 26 15 96 the 4 1 7 1 2 0 239 563 767 18 -1 5 1 7 1 2 1 239 567 37 14 96 year 5 1 7 1 2 2 282 563 52 15 96 ended 5 1 7 1 2 3 342 563 81 15 96 December 5 1 7 1 2 4 425 563 36 16 96 31, 5 1 7 1 2 5 468 563 42 15 96 2019, 5 1 7 1 2 6 512 563 44 16 96 filed 5 1 7 1 2 7 563 563 32 15 96 with 5 1 7 1 2 8 603 563 25 15 96 the 5 1 7 1 2 9 635 563 38 15 96 SEC 5 1 7 1 2 10 680 567 20 11 96 on 5 1 7 1 2 11 708 563 75 18 96 February 5 1 7 1 2 12 791 563 23 17 97 14, 5 1 7 1 2 13 822 563 46 17 96 2020, 5 1 7 1 2 14 876 563 19 18 97 by 5 1 7 1 2 15 902 563 49 15 93 Harris 5 1 7 1 2 16 958 563 48 15 92 Asso- 4 1 7 1 3 0 239 590 650 18 -1 5 1 7 1 3 1 239 590 40 15 93 ciates 5 1 7 1 3 2 281 590 43 15 96 Inc. 5 1 7 1 3 3 331 594 20 11 96 on 5 1 7 1 3 4 359 590 45 15 90 behalf 5 1 7 1 3 5 405 590 21 15 95 of 5 1 7 1 3 6 426 590 50 15 95 itself 5 1 7 1 3 7 482 590 30 15 95 and 5 1 7 1 3 8 519 594 20 11 95 as 5 1 7 1 3 9 545 590 63 18 96 general 5 1 7 1 3 10 614 591 53 17 96 partner 5 1 7 1 3 11 669 590 27 15 96 of 5 1 7 1 3 12 703 590 49 15 96 Harris 5 1 7 1 3 13 758 590 92 15 93 Associates 5 1 7 1 3 14 857 590 32 14 91 L.P. 2 1 8 0 0 0 185 644 822 287 -1 3 1 8 1 0 0 185 644 822 287 -1 4 1 8 1 1 0 186 644 820 18 -1 5 1 8 1 1 1 186 644 13 14 94 In 5 1 8 1 1 2 206 644 66 14 96 addition 5 1 8 1 1 3 279 645 16 13 97 to 5 1 8 1 1 4 301 644 26 14 96 the 5 1 8 1 1 5 333 644 52 14 96 above, 5 1 8 1 1 6 387 648 29 12 96 as 5 1 8 1 1 7 422 644 17 14 96 of 5 1 8 1 1 8 444 644 59 18 96 August 5 1 8 1 1 9 509 644 25 16 96 25, 5 1 8 1 1 10 542 644 45 16 96 2020, 5 1 8 1 1 11 595 644 51 14 96 based 5 1 8 1 1 12 653 648 41 14 96 upon 5 1 8 1 1 13 701 644 25 14 96 the 5 1 8 1 1 14 733 644 58 14 96 number 5 1 8 1 1 15 793 644 27 14 96 of 5 1 8 1 1 16 826 644 56 18 96 Liberty 5 1 8 1 1 17 889 644 53 14 96 Global 5 1 8 1 1 18 950 644 56 15 93 shares 4 1 8 1 2 0 185 671 821 18 -1 5 1 8 1 2 1 185 671 98 18 96 outstanding 5 1 8 1 2 2 293 675 19 10 96 as 5 1 8 1 2 3 321 671 82 14 96 described 5 1 8 1 2 4 413 671 56 16 96 above, 5 1 8 1 2 5 479 672 15 13 96 to 5 1 8 1 2 6 503 671 26 14 96 the 5 1 8 1 2 7 538 672 52 13 96 extent 5 1 8 1 2 8 599 671 54 14 95 known 5 1 8 1 2 9 663 671 9 14 95 by 5 1 8 1 2 10 674 671 75 18 96 Liberty 5 1 8 1 2 11 757 671 54 14 96 Global 5 1 8 1 2 12 821 675 17 10 96 or 5 1 8 1 2 13 847 671 112 14 96 ascertainable 5 1 8 1 2 14 968 671 38 14 96 from 4 1 8 1 3 0 185 698 821 18 -1 5 1 8 1 3 1 185 698 48 18 96 filings 5 1 8 1 3 2 242 698 47 14 96 made 5 1 8 1 3 3 297 698 20 18 96 by 5 1 8 1 3 4 324 698 39 14 96 such 5 1 8 1 3 5 373 702 56 14 96 persons 5 1 8 1 3 6 431 702 27 10 96 or 5 1 8 1 3 7 459 698 73 14 95 entities 5 1 8 1 3 8 540 698 32 14 96 with 5 1 8 1 3 9 581 698 26 14 96 the 5 1 8 1 3 10 615 698 38 14 96 SEC, 5 1 8 1 3 11 656 698 36 16 97 the 5 1 8 1 3 12 700 698 74 18 96 following 5 1 8 1 3 13 783 702 67 14 96 persons 5 1 8 1 3 14 859 702 19 10 96 and 5 1 8 1 3 15 880 698 77 14 96 entities 5 1 8 1 3 16 966 698 40 14 96 have 4 1 8 1 4 0 186 725 821 18 -1 5 1 8 1 4 1 186 725 30 14 96 been 5 1 8 1 4 2 218 725 85 18 96 reported 5 1 8 1 4 3 311 729 20 10 96 as 5 1 8 1 4 4 337 725 41 14 96 direct 5 1 8 1 4 5 379 726 28 13 96 or 5 1 8 1 4 6 414 725 61 14 96 indirect 5 1 8 1 4 7 481 725 110 14 96 shareholders 5 1 8 1 4 8 598 725 61 18 96 holding 5 1 8 1 4 9 666 725 26 15 96 3% 5 1 8 1 4 10 700 729 16 10 96 or 5 1 8 1 4 11 722 729 33 10 96 more 5 1 8 1 4 12 756 725 32 14 96 of 5 1 8 1 4 13 793 725 26 14 96 the 5 1 8 1 4 14 826 725 50 18 96 voting 5 1 8 1 4 15 884 725 45 18 96 rights 5 1 8 1 4 16 937 725 16 14 92 of 5 1 8 1 4 17 959 725 48 14 92 Liber- 4 1 8 1 5 0 185 751 821 18 -1 5 1 8 1 5 1 185 752 15 17 96 ty 5 1 8 1 5 2 207 751 59 14 96 Global: 5 1 8 1 5 3 275 751 15 18 83 (i) 5 1 8 1 5 4 298 751 57 14 93 Robert 5 1 8 1 5 5 363 751 17 14 93 R. 5 1 8 1 5 6 389 751 69 16 96 Bennett, 5 1 8 1 5 7 466 751 53 15 96 3.23% 5 1 8 1 5 8 527 751 57 18 96 (based 5 1 8 1 5 9 592 755 41 14 96 upon 5 1 8 1 5 10 641 755 9 10 96 a 5 1 8 1 5 11 659 751 42 14 96 Form 5 1 8 1 5 12 710 751 25 14 95 8.3 5 1 8 1 5 13 743 751 47 14 96 dated 5 1 8 1 5 14 798 751 81 14 96 November 5 1 8 1 5 15 880 751 27 17 97 4, 5 1 8 1 5 16 916 751 45 17 93 2015, 5 1 8 1 5 17 970 751 36 14 93 sub- 4 1 8 1 6 0 186 778 820 18 -1 5 1 8 1 6 1 186 778 50 14 96 mitted 5 1 8 1 6 2 247 778 19 18 96 by 5 1 8 1 6 3 276 778 26 14 96 Mr. 5 1 8 1 6 4 313 778 65 14 96 Bennett 5 1 8 1 6 5 388 779 74 17 96 pursuant 5 1 8 1 6 6 471 779 15 13 96 to 5 1 8 1 6 7 496 778 26 14 96 the 5 1 8 1 6 8 533 778 34 14 96 U.K. 5 1 8 1 6 9 578 778 80 14 95 Takeover 5 1 8 1 6 10 667 778 55 18 87 Code); 5 1 8 1 6 11 734 778 20 18 93 (ii) 5 1 8 1 6 12 764 778 60 14 92 William 5 1 8 1 6 13 835 778 17 14 92 H. 5 1 8 1 6 14 863 778 40 14 96 Gates 5 1 8 1 6 15 905 778 37 17 58 Ill, 5 1 8 1 6 16 954 778 52 15 96 3.53% 4 1 8 1 7 0 186 805 820 18 -1 5 1 8 1 7 1 186 805 56 18 96 (based 5 1 8 1 7 2 251 809 40 14 96 upon 5 1 8 1 7 3 299 809 10 10 96 a 5 1 8 1 7 4 317 805 78 14 93 Schedule 5 1 8 1 7 5 404 805 19 14 92 13G 5 1 8 1 7 6 423 805 55 14 96 filed 5 1 8 1 7 7 486 805 32 14 96 with 5 1 8 1 7 8 526 805 26 14 96 the 5 1 8 1 7 9 559 805 38 14 95 SEC 5 1 8 1 7 10 605 809 20 10 96 on 5 1 8 1 7 11 633 805 35 18 96 May 5 1 8 1 7 12 676 805 23 16 96 18, 5 1 8 1 7 13 708 805 41 14 96 2018, 5 1 8 1 7 14 752 805 30 18 97 by 5 1 8 1 7 15 788 805 61 14 93 William 5 1 8 1 7 16 857 805 17 14 93 H. 5 1 8 1 7 17 882 805 40 14 96 Gates 5 1 8 1 7 18 924 805 35 16 75 Ill, 5 1 8 1 7 19 967 805 39 14 92 Cas- 4 1 8 1 8 0 185 832 821 16 -1 5 1 8 1 8 1 185 832 41 14 94 cade 5 1 8 1 8 2 238 832 97 16 93 Investment, 5 1 8 1 8 3 348 832 54 16 91 L.L.C., 5 1 8 1 8 4 413 832 26 14 96 the 5 1 8 1 8 5 451 832 24 14 96 Bill 5 1 8 1 8 6 486 832 31 14 96 and 5 1 8 1 8 7 529 832 65 14 96 Melinda 5 1 8 1 8 8 606 832 50 14 96 Gates 5 1 8 1 8 9 669 832 93 14 96 Foundation 5 1 8 1 8 10 773 832 45 14 96 Trust 5 1 8 1 8 11 828 832 31 14 96 and 5 1 8 1 8 12 871 832 65 14 95 Melinda 5 1 8 1 8 13 948 832 58 14 95 French 4 1 8 1 9 0 186 859 820 18 -1 5 1 8 1 9 1 186 859 61 18 96 Gates); 5 1 8 1 9 2 257 859 30 14 96 and 5 1 8 1 9 3 298 859 24 18 94 (iii) 5 1 8 1 9 4 332 859 50 14 96 Route 5 1 8 1 9 5 391 859 36 14 96 One 5 1 8 1 9 6 437 859 93 14 96 Investment 5 1 8 1 9 7 539 859 84 18 93 Company, 5 1 8 1 9 8 635 859 36 16 90 L.P., 5 1 8 1 9 9 682 859 53 15 94 3.03% 5 1 8 1 9 10 745 859 57 18 96 (based 5 1 8 1 9 11 812 863 42 14 96 upon 5 1 8 1 9 12 864 863 9 10 96 a 5 1 8 1 9 13 883 859 78 14 93 Schedule 5 1 8 1 9 14 973 859 33 14 78 13G 4 1 8 1 10 0 185 886 821 18 -1 5 1 8 1 10 1 185 886 33 14 96 filed 5 1 8 1 10 2 226 886 32 14 96 with 5 1 8 1 10 3 266 886 26 14 96 the 5 1 8 1 10 4 299 886 38 14 96 SEC 5 1 8 1 10 5 343 890 20 10 96 on 5 1 8 1 10 6 371 886 76 18 96 February 5 1 8 1 10 7 454 886 24 16 96 14, 5 1 8 1 10 8 485 886 42 14 96 2020, 5 1 8 1 10 9 529 886 59 18 96 jointly 5 1 8 1 10 10 594 886 20 18 96 by 5 1 8 1 10 11 621 886 48 14 96 Route 5 1 8 1 10 12 677 886 34 14 96 One 5 1 8 1 10 13 720 886 92 14 96 Investment 5 1 8 1 10 14 818 886 82 18 93 Company, 5 1 8 1 10 15 901 886 48 16 91 L.P., 5 1 8 1 10 16 957 886 49 14 96 Route 4 1 8 1 11 0 186 913 784 18 -1 5 1 8 1 11 1 186 913 23 14 95 One 5 1 8 1 11 2 211 913 109 14 96 Investment 5 1 8 1 11 3 327 913 85 18 96 Company, 5 1 8 1 11 4 420 913 38 16 93 LLC, 5 1 8 1 11 5 466 913 50 16 92 ROIC, 5 1 8 1 11 6 525 913 33 14 96 LLC, 5 1 8 1 11 7 560 913 70 16 93 William 5 1 8 1 11 8 638 913 14 14 92 F. 5 1 8 1 11 9 661 913 78 16 96 Duhamel, 5 1 8 1 11 10 747 913 19 14 96 Jr. 5 1 8 1 11 11 774 913 30 14 96 and 5 1 8 1 11 12 811 913 50 14 93 Jason 5 1 8 1 11 13 868 913 16 14 93 E. 5 1 8 1 11 14 891 913 79 18 95 Moment). 2 1 9 0 0 0 185 967 444 18 -1 3 1 9 1 0 0 185 967 444 18 -1 4 1 9 1 1 0 185 967 444 18 -1 5 1 9 1 1 1 185 967 15 14 95 2. 5 1 9 1 1 2 240 967 63 14 96 Persons 5 1 9 1 1 3 305 967 73 18 96 Acting 5 1 9 1 1 4 387 967 14 14 96 in 5 1 9 1 1 5 408 967 73 14 96 Concert 5 1 9 1 1 6 486 967 37 14 96 with 5 1 9 1 1 7 530 967 28 14 96 the 5 1 9 1 1 8 564 967 65 14 96 Offeror 2 1 10 0 0 0 185 1021 821 98 -1 3 1 10 1 0 0 185 1021 821 98 -1 4 1 10 1 1 0 186 1021 820 18 -1 5 1 10 1 1 1 186 1021 13 14 81 In 5 1 10 1 1 2 208 1021 91 14 96 connection 5 1 10 1 1 3 307 1021 32 14 96 with 5 1 10 1 1 4 347 1021 26 14 96 the 5 1 10 1 1 5 380 1021 47 16 96 Offer, 5 1 10 1 1 6 435 1021 18 14 96 all 5 1 10 1 1 7 461 1021 92 18 96 companies 5 1 10 1 1 8 560 1021 30 14 96 and 5 1 10 1 1 9 599 1025 57 14 96 persons 5 1 10 1 1 10 657 1021 83 18 96 (directly 5 1 10 1 1 11 747 1025 9 10 96 or 5 1 10 1 1 12 758 1021 93 18 96 indirectly) 5 1 10 1 1 13 859 1021 82 14 96 controlled 5 1 10 1 1 14 949 1021 19 18 93 by 5 1 10 1 1 15 976 1021 30 14 92 Lib- 4 1 10 1 2 0 185 1048 821 18 -1 5 1 10 1 2 1 185 1049 32 17 96 erty 5 1 10 1 2 2 225 1048 53 14 96 Global 5 1 10 1 2 3 286 1052 20 10 96 as 5 1 10 1 2 4 313 1048 32 14 96 well 5 1 10 1 2 5 353 1052 20 10 96 as 5 1 10 1 2 6 380 1048 38 14 96 from 5 1 10 1 2 7 425 1048 60 18 96 August 5 1 10 1 2 8 494 1048 22 16 97 12, 5 1 10 1 2 9 526 1048 45 16 96 2020, 5 1 10 1 2 10 581 1048 24 14 97 the 5 1 10 1 2 11 614 1048 36 14 96 date 5 1 10 1 2 12 658 1052 20 10 96 on 5 1 10 1 2 13 686 1048 48 14 96 which 5 1 10 1 2 14 742 1048 58 18 96 Liberty 5 1 10 1 2 15 807 1048 53 14 96 Global 5 1 10 1 2 16 869 1048 31 14 96 and 5 1 10 1 2 17 908 1048 64 14 93 Sunrise 5 1 10 1 2 18 980 1052 26 10 91 en- 4 1 10 1 3 0 185 1074 821 18 -1 5 1 10 1 3 1 185 1074 42 14 96 tered 5 1 10 1 3 2 237 1074 29 14 96 into 5 1 10 1 3 3 274 1074 26 14 96 the 5 1 10 1 3 4 307 1074 99 14 96 Transaction 5 1 10 1 3 5 415 1074 97 18 96 Agreement, 5 1 10 1 3 6 521 1074 64 14 96 Sunrise 5 1 10 1 3 7 593 1074 31 14 96 and 5 1 10 1 3 8 633 1074 18 14 96 all 5 1 10 1 3 9 659 1074 91 18 96 companies 5 1 10 1 3 10 759 1074 30 14 96 and 5 1 10 1 3 11 798 1078 57 14 96 persons 5 1 10 1 3 12 856 1074 83 18 96 (directly 5 1 10 1 3 13 948 1078 16 10 92 or 5 1 10 1 3 14 972 1074 34 14 92 indi- 4 1 10 1 4 0 186 1101 678 18 -1 5 1 10 1 4 1 186 1101 51 18 96 rectly) 5 1 10 1 4 2 243 1101 81 14 96 controlled 5 1 10 1 4 3 332 1101 19 18 96 by 5 1 10 1 4 4 358 1101 64 14 96 Sunrise 5 1 10 1 4 5 428 1105 27 10 96 are 5 1 10 1 4 6 461 1101 58 14 96 deemed 5 1 10 1 4 7 520 1101 31 14 96 to 5 1 10 1 4 8 557 1101 20 14 96 be 5 1 10 1 4 9 583 1102 50 17 96 acting 5 1 10 1 4 10 640 1105 14 10 96 in 5 1 10 1 4 11 661 1102 61 13 96 concert 5 1 10 1 4 12 728 1101 33 14 96 with 5 1 10 1 4 13 767 1101 26 14 96 the 5 1 10 1 4 14 800 1101 64 14 96 Offeror. 2 1 11 0 0 0 186 1155 185 18 -1 3 1 11 1 0 0 186 1155 185 18 -1 4 1 11 1 1 0 186 1155 185 18 -1 5 1 11 1 1 1 186 1155 14 14 88 3. 5 1 11 1 1 2 239 1155 64 14 96 Annual 5 1 11 1 1 3 311 1155 60 18 96 Report 2 1 12 0 0 0 185 1209 823 126 -1 3 1 12 1 0 0 185 1209 823 126 -1 4 1 12 1 1 0 185 1209 823 18 -1 5 1 12 1 1 1 185 1209 12 14 95 As 5 1 12 1 1 2 199 1212 27 11 95 a 5 1 12 1 1 3 236 1209 56 18 96 private 5 1 12 1 1 4 301 1212 78 15 96 company 5 1 12 1 1 5 388 1209 30 14 96 and 5 1 12 1 1 6 429 1212 9 11 95 an 5 1 12 1 1 7 440 1209 80 14 95 indirect 5 1 12 1 1 8 529 1209 115 18 96 wholly-owned 5 1 12 1 1 9 654 1209 89 18 96 Subsidiary 5 1 12 1 1 10 752 1209 16 14 96 of 5 1 12 1 1 11 777 1209 56 18 96 Liberty 5 1 12 1 1 12 843 1209 59 16 96 Global, 5 1 12 1 1 13 912 1209 26 14 97 the 5 1 12 1 1 14 948 1209 60 14 96 Offeror 4 1 12 1 2 0 186 1236 821 18 -1 5 1 12 1 2 1 186 1236 29 14 92 has 5 1 12 1 2 2 228 1239 47 11 92 never 5 1 12 1 2 3 287 1236 80 18 96 published 5 1 12 1 2 4 379 1239 20 11 95 an 5 1 12 1 2 5 412 1236 56 14 95 annual 5 1 12 1 2 6 481 1237 53 17 96 report. 5 1 12 1 2 7 547 1236 31 14 96 The 5 1 12 1 2 8 591 1236 57 14 95 annual 5 1 12 1 2 9 660 1237 49 17 95 report 5 1 12 1 2 10 721 1236 16 14 96 of 5 1 12 1 2 11 748 1236 25 14 96 the 5 1 12 1 2 12 786 1236 56 18 96 Liberty 5 1 12 1 2 13 854 1236 54 14 96 Global 5 1 12 1 2 14 921 1236 52 18 96 Group 5 1 12 1 2 15 984 1236 23 14 96 for 4 1 12 1 3 0 185 1262 821 19 -1 5 1 12 1 3 1 185 1263 26 14 96 the 5 1 12 1 3 2 225 1263 75 14 96 business 5 1 12 1 3 3 314 1266 36 15 96 year 5 1 12 1 3 4 364 1263 51 14 96 ended 5 1 12 1 3 5 431 1263 87 14 96 December 5 1 12 1 3 6 524 1263 24 16 96 31, 5 1 12 1 3 7 564 1263 42 14 96 2019 5 1 12 1 3 8 619 1263 31 14 96 and 5 1 12 1 3 9 664 1263 25 14 96 the 5 1 12 1 3 10 703 1262 69 15 96 financial 5 1 12 1 3 11 787 1263 55 14 96 results 5 1 12 1 3 12 856 1262 23 15 96 for 5 1 12 1 3 13 891 1263 26 14 96 the 5 1 12 1 3 14 932 1263 74 14 96 business 4 1 12 1 4 0 185 1289 822 19 -1 5 1 12 1 4 1 185 1290 60 18 88 quarter 5 1 12 1 4 2 264 1290 52 14 95 ended 5 1 12 1 4 3 337 1290 41 14 51 June 5 1 12 1 4 4 385 1290 24 16 51 30, 5 1 12 1 4 5 429 1290 46 16 96 2020, 5 1 12 1 4 6 496 1293 27 11 96 are 5 1 12 1 4 7 542 1290 75 14 95 available 5 1 12 1 4 8 637 1293 20 11 96 on 5 1 12 1 4 9 677 1290 25 14 96 the 5 1 12 1 4 10 722 1290 64 14 96 website 5 1 12 1 4 11 807 1289 15 15 96 of 5 1 12 1 4 12 841 1290 57 18 96 Liberty 5 1 12 1 4 13 918 1289 53 15 96 Global 5 1 12 1 4 14 992 1290 15 14 95 at 4 1 12 1 5 0 186 1316 424 19 -1 5 1 12 1 5 1 186 1316 424 19 74 https://www.libertyglobal.com/investors/financials/. 2 1 13 0 0 0 185 1369 821 74 -1 3 1 13 1 0 0 185 1369 821 74 -1 4 1 13 1 1 0 185 1369 279 19 -1 5 1 13 1 1 1 185 1369 15 15 86 4. 5 1 13 1 1 2 240 1369 126 19 92 Participations 5 1 13 1 1 3 373 1369 14 15 96 in 5 1 13 1 1 4 394 1369 70 15 96 Sunrise 4 1 13 1 2 0 185 1424 821 19 -1 5 1 13 1 2 1 185 1424 13 15 96 As 5 1 13 1 2 2 199 1424 31 15 96 of 5 1 13 1 2 3 235 1424 59 19 96 August 5 1 13 1 2 4 302 1425 23 16 96 11, 5 1 13 1 2 5 332 1424 42 15 96 2020 5 1 13 1 2 6 381 1424 32 18 96 (the 5 1 13 1 2 7 420 1425 29 14 96 last 5 1 13 1 2 8 455 1424 63 19 96 Trading 5 1 13 1 2 9 526 1424 22 15 96 Day 5 1 13 1 2 10 550 1424 53 19 96 prior 5 1 13 1 2 11 609 1425 15 14 96 to 5 1 13 1 2 12 631 1424 25 15 93 the 5 1 13 1 2 13 664 1424 174 18 89 Pre-Announcement), 5 1 13 1 2 14 846 1424 25 15 96 the 5 1 13 1 2 15 878 1424 60 15 96 Offeror 5 1 13 1 2 16 944 1424 30 15 96 and 5 1 13 1 2 17 980 1424 26 15 96 the 2 1 14 0 0 0 186 1451 821 44 -1 3 1 14 1 0 0 186 1451 821 44 -1 4 1 14 1 1 0 186 1451 820 19 -1 5 1 14 1 1 1 186 1455 56 14 96 persons 5 1 14 1 1 2 245 1452 64 18 96 acting 5 1 14 1 1 3 318 1452 13 13 96 in 5 1 14 1 1 4 338 1452 63 14 96 concert 5 1 14 1 1 5 408 1451 32 15 96 with 5 1 14 1 1 6 450 1451 8 15 96 it 5 1 14 1 1 7 464 1451 87 19 96 (excluding 5 1 14 1 1 8 559 1451 63 15 96 Sunrise 5 1 14 1 1 9 630 1455 20 11 96 and 5 1 14 1 1 10 652 1451 34 15 96 its 5 1 14 1 1 11 694 1451 46 15 96 direct 5 1 14 1 1 12 748 1451 30 15 96 and 5 1 14 1 1 13 786 1451 61 15 96 indirect 5 1 14 1 1 14 854 1451 110 18 96 Subsidiaries) 5 1 14 1 1 15 972 1451 34 15 95 held 4 1 14 1 2 0 186 1477 821 18 -1 5 1 14 1 2 1 186 1481 20 11 96 no 5 1 14 1 2 2 214 1477 63 15 96 Sunrise 5 1 14 1 2 3 285 1477 59 15 96 Shares 5 1 14 1 2 4 351 1478 31 14 96 and 5 1 14 1 2 5 391 1481 8 10 96 no 5 1 14 1 2 6 401 1477 86 15 96 financial 5 1 14 1 2 7 495 1477 97 15 96 instruments 5 1 14 1 2 8 600 1477 33 15 95 with 5 1 14 1 2 9 641 1478 61 17 96 respect 5 1 14 1 2 10 710 1478 15 14 96 to 5 1 14 1 2 11 733 1477 63 15 96 Sunrise 5 1 14 1 2 12 804 1477 64 15 96 Shares. 5 1 14 1 2 13 876 1477 22 15 96 As 5 1 14 1 2 14 905 1477 16 15 96 of 5 1 14 1 2 15 928 1477 25 15 96 the 5 1 14 1 2 16 961 1481 46 11 96 same
#displayColorImage(img, "original")
cv2.imwrite('boxes.png', img)
True
##############################################
##### Detecting ONLY Digits ######
##############################################
#hImg, wImg = overlay.shape
#conf = r'--oem 3 --psm 6 outputbase digits'
#boxes = pytesseract.image_to_boxes(overlay,config=conf)
#for b in boxes.splitlines():
# print(b)
# b = b.split(' ')
# print(b)
# x, y, w, h = int(b[1]), int(b[2]), int(b[3]), int(b[4])
# #cv2.rectangle(img, (x,hImg- y), (w,hImg- h), (50, 50, 255), 2)
# cv2.putText(overlay,b[0],(x,hImg- y+20),cv2.FONT_HERSHEY_SIMPLEX,1,(50,50,255),2)
#cv2.imwrite('numbers.png', overlay)
import imageio
import matplotlib.pyplot as plt
%matplotlib inline
picBox = imageio.imread('boxes.png')
plt.figure(figsize = (25,25))
plt.imshow(picBox)
<matplotlib.image.AxesImage at 0x7f0497d04a20>
#picNum = imageio.imread('numbers.png')
#plt.figure(figsize = (25,25))
#plt.imshow(picNum)
from IPython.display import IFrame
IFrame('./boxes.png', width="100%", height=800)