Skip to content

Commit b238f97

Browse files
committed
add password generator part 1
1 parent cc40720 commit b238f97

18 files changed

+82
-2
lines changed

Marker_detection/arp.mp4

571 KB
Binary file not shown.

Marker_detection/marker_detection.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# owner2plusai YouTube : http://www.youtube.com/@owner2plusai
2+
3+
import cv2 as cv
4+
from cv2 import aruco
5+
import numpy as np
6+
7+
marker_dic = aruco.getPredefinedDictionary(aruco.DICT_6X6_250)
8+
param_markers = aruco.DetectorParameters()
9+
cap = cv.VideoCapture(0)
10+
11+
12+
13+
while True:
14+
success , img = cap.read()
15+
# break
16+
if not success:
17+
break
18+
19+
gray_img = cv.cvtColor(img ,cv.COLOR_BGR2GRAY)
20+
marker_corners , marker_ID , reject = aruco.detectMarkers(
21+
gray_img, marker_dic,parameters=param_markers)
22+
23+
if marker_corners:
24+
25+
for ids,corners in zip(marker_ID,marker_corners):
26+
27+
cv.polylines(img ,[corners.astype(np.int32)],True ,(0,255 ,255),
28+
4, cv.LINE_AA)
29+
30+
corners = corners.reshape(4,2)
31+
corners = corners.astype(int)
32+
top_right = corners[0].ravel()
33+
# num IDs
34+
cv.putText(img ,f"ID : {ids[0]}" ,top_right-5 ,
35+
cv.FONT_HERSHEY_COMPLEX ,1,(0,255 ,255),2,cv.LINE_AA)
36+
37+
38+
cv.imshow("img", img)
39+
key = cv.waitKey(1)
40+
if key == ord("q"):
41+
break

Marker_generator/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# **Generate Marker**
2+
# ** Generate Marker **
33
## best for AR and VR and job describtion
44
## ![txt2img-stable2](marker_image/marker_image0.png)
55

2.9 KB
Loading
3.19 KB
Loading
2.6 KB
Loading
3.16 KB
Loading
3.19 KB
Loading
3.16 KB
Loading
2.63 KB
Loading

0 commit comments

Comments
 (0)