Compare commits
No commits in common. "44a828a880894121c3bf08db8e676551b6cc055c" and "29276df9d6464cfea76ac0d64e7057217d6789e7" have entirely different histories.
44a828a880
...
29276df9d6
@ -40,7 +40,7 @@ for file in os.listdir(input_folder):
|
||||
filename = input_folder + '/' + file
|
||||
out_filename = output_folder + '/' + file
|
||||
img = cv2.imread(filename, 0)
|
||||
small_img = cv2.resize(img, (750, 750))
|
||||
small_img = cv2.resize(img, (400, 400))
|
||||
(corners, ids, rejected) = detector.detectMarkers(small_img)
|
||||
new_image = cv2.aruco.drawDetectedMarkers(
|
||||
small_img,
|
||||
@ -73,18 +73,12 @@ for file in os.listdir(input_folder):
|
||||
print("x[%d]: %d"%(i, x[i]))
|
||||
print("y[%d]: %d"%(i, y[i]))
|
||||
print()
|
||||
i += 1
|
||||
|
||||
offset = 20
|
||||
crop_img = new_image[
|
||||
np.min(x+offset):np.max(x-offset),
|
||||
np.min(y+offset):np.max(y-offset)
|
||||
]
|
||||
i += 1
|
||||
|
||||
print("imshape[0]: " + str(small_img.shape[0]))
|
||||
print("imshape[1]: " + str(small_img.shape[1]))
|
||||
cv2.imshow('window', new_image)
|
||||
cv2.imshow('cropped', crop_img)
|
||||
# cv2.imwrite(out_filename, new_image)
|
||||
|
||||
cv2.waitKey(0)
|
||||
|
Loading…
Reference in New Issue
Block a user