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
from matplotlib import animation | |
import matplotlib.pyplot as plt | |
import gym | |
""" | |
Ensure you have imagemagick installed with | |
sudo apt-get install imagemagick | |
Open file in CLI with: | |
xgd-open <filelname> |
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
""" | |
USES OPENCV 4.10, PROBABLY WILL WORK FOR OPENCV 2.70 and up | |
REMEMBER TO CALCULATE THE HSV BOUNDS FOR color1 & color2, use the trackbar: | |
https://gist.github.com/botforge/c6559abd3c48bceb78c2664dcb53cef6 | |
to get these values | |
""" | |
import cv2 | |
import numpy as np | |
import math |
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 as cv | |
import numpy as np | |
# optional argument for trackbars | |
def nothing(x): | |
pass | |
# named ites for easy reference | |
barsWindow = 'Bars' | |
hl = 'H Low' |