I have this picture below. I want to separate it into two parts, so I can work independently with every part. I added those black dots to make my algo detect the dots and separate the part but it’s detect all the elements of paper. it doesn’t work as i expected, i do not know the reason why.
I’am new in opencv and image processing
this is my code
import cv2
import numpy as np
image = cv2.imread('18936-model-1.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
blurred = cv2.GaussianBlur(gray, (23, 23), 0)
cv2.imshow("blurred", blurred)
canny = cv2.Canny(blurred, 30, 30)
cnts, _ = cv2.findContours(canny.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)
print(f"Contours in the image, %d" % (len(cnts)))
shape = image.copy()
cv2.drawContours(shape, cnts, -1, (0, 255, 0), 2)
cv2.imwrite('{}.png'.format('sunflower'), shape)
cv2.imshow("Edges", shape)
cv2.waitKey(0)
the left image is the original one. the middle image is what i want to process. the right picture is what i get