Hi community,
I’ve implemented the following code to find contours on my image:
_, thres_image =cv2.threshold(imageGray,125,255,cv2.THRESH_BINARY)
contours, hierarchy = cv2.findContours(thres_image, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
print(“Number of contours found = {}”.format(len(contours)))
print(“\nHierarchy : \n{}”.format(hierarchy))
cv2.drawContours(image, contours, -1, (0,255,0), 1);
plt.imshow(image[:,:,::-1])
the Isue I have is that it’s recongizing contours for everything and this involve room texts, furnitures, among other useless things. Do you recommend any other filter or some insights on how to identify contours of objects with rectangular shapes or filled regions?
All the best