Skip to content

Instantly share code, notes, and snippets.

View scottanderson42's full-sized avatar

Scott Anderson scottanderson42

View GitHub Profile
import cv2
image = cv2.imread("salon-logo2.jpeg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # grayscale
_, thresh = cv2.threshold(gray, 150, 255, cv2. THRESH_BINARY_INV) # threshold
kernel = cv2.getStructuringElement(cv2.MORPH_CROSS, (3, 3))
dilated = cv2.dilate(thresh, kernel, iterations=13) # dilate
contours, hierarchy = cv2.findContours(dilated, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) # get contours
# for each contour found, draw a rectangle around it on original image
This does not exist: {{ does_not_exist }}
---
- hosts: 127.0.0.1
connection: local
gather_facts: no
vars:
moo: harbles
tasks:
- action:
module: test_params
test_params module:
#!/usr/bin/python
def main():
module = AnsibleModule(
argument_spec=dict(
thing=dict(type='str'),
)
)