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 | |
import numpy as np | |
#create window | |
#define pulles | |
# Configuration Variables | |
WINDOW_SIZE = (2000, 4096) | |
width = WINDOW_SIZE[1] |
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 | |
import numpy as np | |
import random | |
numSnowflakes = 2000 | |
xSize, ySize = 1080, 1920 | |
#cv2.namedWindow("window", cv2.WND_PROP_FULLSCREEN) | |
#cv2.setWindowProperty("window",cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN) |
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 | |
import numpy as np | |
import math | |
imgSize = 600,600, 3 | |
coreCenter = 300,300 | |
coreSize = 50 | |
beltThickness = .045 | |
beltLength = 5025 | |
segmentStart = coreCenter[0], coreCenter[1] + coreSize |
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 numpy as np | |
import cv2 | |
import pandas as pd | |
import numpy.polynomial.polynomial as poly | |
import math | |
# Read Source Data | |
cap = cv2.VideoCapture('/home/stephen/Desktop/ss5_id_412.MP4') | |
df = pd.read_csv('/home/stephen/Desktop/ss5_id_412.csv') | |
#Write Video Out |
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 | |
import numpy as np | |
# Define the multiverse parameter | |
multiverse_parameter = 3 | |
# Define the temporal seperation in frames | |
temporal_seperation = 24 | |
# Define path to source video |
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 | |
import numpy as np | |
# Read in image | |
img = cv2.imread('/home/stephen/Desktop/test.png',0) | |
img = 255 - img | |
img = cv2.resize(img, (6000,6000)) | |
h,w = img.shape | |
cutter_size = 20 | |
buffer = int(cutter_size * 1.25) |
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 mrcnn.config import Config | |
from mrcnn import model as modellib | |
from mrcnn import visualize | |
import cv2, os, numpy as np | |
# Make Model: https://github.com/matterport/Mask_RCNN/blob/master/samples/demo.ipynb | |
class Config(Config): | |
NAME = "deep_segment" | |
GPU_COUNT = 1 | |
IMAGES_PER_GPU = 1 |
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 numpy as np | |
import cv2 | |
from matplotlib import pyplot as plt | |
# Load image and mask | |
img = cv2.imread('/home/stephen/Downloads/bird.jpg') | |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) | |
h,w,_ = img.shape | |
deep_mask = cv2.imread('/home/stephen/Downloads/bird_mask.png',0) | |
deep_mask = cv2.resize(deep_mask, (w,h)) |
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 script will only work if the post it | |
# notes are on a really white background. | |
# | |
# You will have to change the paths to: | |
# 1. Path to source image | |
# 2. Path to desktop (or folder to save images) | |
# https://stackoverflow.com/questions/55832414/extract-a-fixed-number-of-squares-from-an-image-with-python-opencv/55834299?noredirect=1#comment98366082_55834299 | |
import cv2 | |
import numpy as np |
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 | |
import numpy as np | |
src = 255 - cv2.imread('/home/stephen/Desktop/I7Ykpbs.jpg',0) | |
scores = [] | |
h,w = src.shape | |
small_dimention = min(h,w) | |
src = src[:small_dimention, :small_dimention] |
NewerOlder