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 | |
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 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
This does not exist: {{ does_not_exist }} |
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
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
gather_facts: no | |
vars: | |
moo: harbles | |
tasks: | |
- action: | |
module: test_params |
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
test_params module: | |
#!/usr/bin/python | |
def main(): | |
module = AnsibleModule( | |
argument_spec=dict( | |
thing=dict(type='str'), | |
) | |
) |