path='D: \ Python \ LearnOpenCV \ pics'
For picname in OS. Listdir (path) :
Picpath=path + "\ " + picname
Img=CV. Imread (picpath, 0)
Thresh, img1=CV. Threshold (img, 111255, CV. THRESH_BINARY)
Contours, hierarchy=CV. FindContours (img1, CV. RETR_LIST, CV. CHAIN_APPROX_NONE)
Print (" dimensions: ", contours [0]. Shape)
Print (" outline before three o 'clock: \ n ", contours [0] [3] :)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Because c + + write up trouble, when test algorithm feasibility to use python implementation first,
Find the outline of CV - python is a three dimensional array, stunned,
OpenCV c + + is a two-dimensional array, can directly for matrix transformation,
Presumably CV - python should be behind the c + + a, more than one dimension, specially designed which is really a genius, are?