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
def draw_lines(img, houghLines, color=[0, 255, 0], thickness=2): | |
for line in houghLines: | |
for rho,theta in line: | |
a = np.cos(theta) | |
b = np.sin(theta) | |
x0 = a*rho | |
y0 = b*rho | |
x1 = int(x0 + 1000*(-b)) | |
y1 = int(y0 + 1000*(a)) | |
x2 = int(x0 - 1000*(-b)) |
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 matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
import numpy as np | |
import cv2 | |
image = mpimg.imread("test_images/ppnt.jpg") | |
gray_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) | |
blurred_image = cv2.GaussianBlur(gray_image, (9, 9), 0) | |
edges_image = cv2.Canny(blurred_image, 50, 120) | |
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
using System; | |
namespace GenericsTests1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
ExampleClass example = new ExampleClass(); | |
example.RunAll(); |