Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

See how I visualize my shirts collar edges in a few opencv python lines here https://www.linkedin.com/pulse/new-approach-visualizing-gradient-variations-images-marc-fiammante/ . Compared to other edges filters in the article.

See how I visualize my shirts collar edges in a few opencv python lines here https://www.linkedin.com/pulse/new-approach-visualizing-gradient-variations-images-marc-fiammante/ . Compared to other edges filters in the article.blur = cv2.blur(img,(9,9)) blur2 = cv2.GaussianBlur(img,(3,3),0) absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))

blur = cv2.blur(img,(9,9)) blur2 = cv2.GaussianBlur(img,(3,3),0) cv2.GaussianBlur(img,(3,3),0) absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))

blur = cv2.blur(img,(9,9)) blur2 = cv2.GaussianBlur(img,(3,3),0) absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))

The code below should give you the correct output:

blur = cv2.blur(img,(9,9))
 blur2 = cv2.GaussianBlur(img,(3,3),0) 
    absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))

Good luck!