Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Box detection

lineWidth = 7
lineMinWidth = 55
kernal1 = np.ones((lineWidth,lineWidth), np.uint8)
kernal1h = np.ones((1,lineWidth), np.uint8)
kernal1v = np.ones((lineWidth,1), np.uint8)

kernal6 = np.ones((lineMinWidth,lineMinWidth), np.uint8)
kernal6h = np.ones((1,lineMinWidth), np.uint8)
kernal6v = np.ones((lineMinWidth,1), np.uint8)
Comment

Box detection

import cv2
import numpy as np
image=cv2.imread('path/to/image.jpg')

### binarising image
gray_scale=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
th1,img_bin = cv2.threshold(gray_scale,150,225,cv2.THRESH_BINARY)
Comment

PREVIOUS NEXT
Code Example
Python :: python namedtuple typename 
Python :: access data in one python function from another 
Python :: pasar tupla a funcion python 
Python :: print e 
Python :: how to take multiple input python 
Python :: python error catching of modules 
Python :: django validate_comma_separated_integer_list 
Python :: c Pythagorean triples 
Python :: telephone number word generator python 
Python :: jupiter output 
Python :: python lane angle detection 
Python :: Pouring 8 litres into 2 empty container of size 3 and 5 to get 4 litre in any container 
Python :: python pipe where 
Python :: filter numbers with bounds filter_bounds python 
Python :: pbcopy stands for 
Python :: how to add sum of range in python 
Python :: error 302 heroku django 
Python :: np where pandas with 3 choices 
Python :: how to install python on visual studio code 
Python :: pandas series add prefix 
Python :: run a python file from another python file 
Python :: recursionerror maximum recursion depth exceeded in comparison 
Python :: extract list from string python 
Python :: render() django 
Python :: convert dictionary to string 
Python :: python boolean 
Python :: for range python 
Python :: python editor online 
Python :: python list tutorial 
Python :: car python program 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =