Skip to content

Commit

Permalink
updated deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tb-dhk committed Jul 2, 2024
1 parent 0bd3233 commit d962795
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,7 @@ def get_latest_pictures(directory, num_pictures=2):
files = sorted([os.path.join(directory, f) for f in os.listdir(directory) if f.endswith(".jpg")], key=os.path.getmtime, reverse=True)
return files[:num_pictures]

def find_differences(image1_path, image2_path):
image1 = cv2.imread(image1_path)
image2 = cv2.imread(image2_path)
def find_differences(image1, image2):
diff = cv2.absdiff(image1, image2)
gray = cv2.cvtColor(diff, cv2.COLOR_BGR2GRAY)
_, thresh = cv2.threshold(gray, 30, 255, cv2.THRESH_BINARY)
Expand Down

0 comments on commit d962795

Please sign in to comment.