Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

How to count the edges in a cropped image

$
0
0
![0.png](/upfiles/14794621304994555.png) ![screenshot.png](/upfiles/1479462151536575.png) I have a car park model image and wish to test the capture of an irregular cropped portion to detail how many edges exist. The idea being to advise if a space contains a vehicle in it. Everytime I try this, I just get various errors relating to the image not having the right attributes. The code is below, im = Image.open('0.png') bay1 = image.edge(10,300) image_matrix = bay1.getNumpy().flatten() image_pixel_count = cv2.countNonZero(image_matrix) canny_count[iCol] += image_pixel_count Any help would be appreciated on how to get an edge count of 0.png

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>