發表文章

目前顯示的是 12月, 2019的文章

Python- multiple delimiters for string split

圖片
Python - multiple delimiters for string split Google Colab - Multiple patterns for string Split & Line Continuation & String zfill & String Rjust Example

Python3/OpenCV/HoughCircleTransfer Sample

圖片
 #smarties16.png #smarties16A14.png from matplotlib import pyplot as plt import sys import cv2 as cv import numpy as np def main(argv,h):     #k=argv[1] if len(argv[1])>0 else '*'     print('argv,h====',argv,h)     default_file = 'smarties.png' #'smarties.png'     filename = argv if len(argv[0]) > 0 else default_file     #filename=default_file     print("Reading image...",filename,'&\r\n performing CV2.HoughCircle...\n')     #print('filename.....'+filename+'+++++argv[0]='+argv[0],'default_file='+default_file)     #print("111111A",filename)     # Loads an image     #src = cv.imread(cv.samples.findFile(filename), cv.IMREAD_COLOR)     src = cv.imread(filename)#, cv.IMREAD_COLOR)     # Check if image is loaded fine     if src is None:         print ('*Error* opening image fa...