This file contains 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
@ECHO OFF | |
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK | |
if NOT EXIST Private goto MDPrivate | |
:CONFIRM | |
echo Are you sure to lock this folder? (Y/N) | |
set/p "cho=>" | |
if %cho%==Y goto LOCK | |
if %cho%==y goto LOCK | |
if %cho%==n goto END | |
if %cho%==N goto END |
This file contains 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 cv2 | |
import numpy as np | |
img = cv2.imread('road.jpg') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
edges = cv2.Canny(gray,50,150,apertureSize = 3) | |
cv2.imshow('edges', edges) | |
lines = cv2.HoughLinesP(edges,1,np.pi/180,100,minLineLength=100,maxLineGap=10) | |
for line in lines: | |
x1,y1,x2,y2 = line[0] | |
cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2) |
This file contains 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
version: '3.8' | |
services: | |
sql: | |
image: mcr.microsoft.com/azure-sql-edge | |
container_name: sql | |
ports: | |
- "1433:1433" | |
environment: | |
ACCEPT_EULA: "1" |
This file contains 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 cv2 | |
import numpy as np | |
cap = cv2.VideoCapture('vtest.avi') | |
frame_width = int( cap.get(cv2.CAP_PROP_FRAME_WIDTH)) | |
frame_height =int( cap.get( cv2.CAP_PROP_FRAME_HEIGHT)) | |
fourcc = cv2.VideoWriter_fourcc('X','V','I','D') |
This file contains 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 cv2 | |
import numpy as np | |
img = cv2.imread("messi5.jpg") | |
grey_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
template = cv2.imread("messi_face.jpg", 0) | |
w, h = template.shape[::-1] | |
res = cv2.matchTemplate(grey_img, template, cv2.TM_CCORR_NORMED ) | |
print(res) | |
threshold = 0.99; |
This file contains 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 cv2 | |
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') | |
# Read the input image | |
#img = cv2.imread('test.png') | |
cap = cv2.VideoCapture('test.mp4') | |
while cap.isOpened(): | |
_, img = cap.read() |
This file contains 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 cv2 | |
import numpy as np | |
img = cv2.imread('sudoku.png') | |
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
edges = cv2.Canny(gray, 50, 150, apertureSize=3) | |
cv2.imshow('edges', edges) | |
lines = cv2.HoughLines(edges, 1, np.pi / 180, 200) | |
for line in lines: |
This file contains 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 matplotlib.pylab as plt | |
import cv2 | |
import numpy as np | |
def region_of_interest(img, vertices): | |
mask = np.zeros_like(img) | |
#channel_count = img.shape[2] | |
match_mask_color = 255 | |
cv2.fillPoly(mask, vertices, match_mask_color) | |
masked_image = cv2.bitwise_and(img, mask) |
This file contains 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
#define ROW_1 2 | |
#define ROW_2 3 | |
#define ROW_3 4 | |
#define ROW_4 5 | |
#define ROW_5 6 | |
#define ROW_6 7 | |
#define ROW_7 8 | |
#define ROW_8 9 | |
#define COL_1 10 |
This file contains 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 matplotlib.pylab as plt | |
import cv2 | |
import numpy as np | |
image = cv2.imread('road.jpg') | |
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) | |
print(image.shape) | |
height = image.shape[0] | |
width = image.shape[1] |
NewerOlder