Speed limit sign selector Get link Facebook X Pinterest Email Other Apps March 17, 2017 Speed limit sign selector Speed limit sign We chose this sign pattern as a speed limit sign for our project and this sign used globally. Get link Facebook X Pinterest Email Other Apps Comments
Flow Chart for Car Tracking June 01, 2017 Flow Chart for Car Tracking Code: import numpy as np import cv2 import glob import covEX import math import datetime # termination criteria criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((6*8,3), np.float32) objp[:,:2] = np.mgrid[0:6,0:8].T.reshape(-1,2) # Arrays to store object points and image points from all the images. objpoints = [] # 3d point in real world space imgpoints = [] # 2d points in image plane. images = glob.glob('./Calibrate_image/*.jpg') tests = glob.glob('./test_image/*.jpg') samples = glob.glob('./sample_image/*.jpg') w = 1920 h = 1080 cap = cv2.VideoCapture(1) cap.set(3, 1920) cap.set(4, 1080) cap.set(cv2.CAP_PROP_AUTOFOCUS, 0) offset_crop = 15 # Font thickness_val = 1 font_scale_val = 1.5 text_color = (255,255,255) font_face = cv2.FONT_HERSHEY_PLAI... Read more
Flow Chart for OCR Training June 01, 2017 Flow Chart for OCR Training Code: import sys import numpy as np import cv2 import glob images = glob.glob('./train_image/*.jpg') #im = cv2.imread('sign_train.png') #im3 = im.copy() samples = np.empty((0,100)) responses = [] keys = [i for i in range(48,58)] offset = 2 for fname in images: im = cv2.imread(fname) [depth, width, height] = im.shape[::-1] im_def = im.copy() ########### Sign Detect New One 2.21 sign_finding = 2.21*im[:,:,2] - im[:,:,1] - im[:,:,0] sign_finding = np.where(sign_finding > 60, sign_finding, 0) sign_finding = np.uint8(np.abs(sign_finding)) sign_t,sign_contours,sign_hierarchy = cv2.findContours(sign_finding,cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE) max_x = 0 max_y = 0 min_x = width mi... Read more
Flow Chart for OCR Detection June 01, 2017 Flow Chart for OCR Detection Code: from picamera.array import PiRGBArray from picamera import PiCamera import socket import sys import cv2 import numpy as np import time import pickle from io import StringIO from multiprocessing.connection import Client import serial front_left = 0 front_center = 0 front_right = 0 back_left = 0 back_center = 0 back_right = 0 compass = 0 speed = 0 i = 0 speed_limit = "50" # Initialize Camera #camera = cv2.VideoCapture(0) camera = PiCamera() camera.resolution = (320, 240) camera.framerate = 90 rawCapture = PiRGBArray(camera, size=(320, 240)) # Create a TCP/IP socket #sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Connect the socket to the port where the server is listening server_address = ('192.168.0.101', 10000) print('connecting to {} port {}'.format(*server_address)) #sock.connect(server_address) client = Client(server_address) ... Read more
Comments
Post a Comment