Is it possible to get solid shape with adaptive threshold? In my case (A) I can only get hollow shape, but it seems like in some cases (B) it is possible to get solid shape. (see picture below)
What is the requirement of the input to achieve solid shape?
Below is my code for A
import cv2 as cv
import numpy as np
from matplotlib import pyplot as plt
img_path = 'F:\\Coding Stuff\\Python\\Projects\\Open CV\\'
img = cv.imread(img_path + 'test_1.jpg')
img_gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
thresh = cv.adaptiveThreshold(img_gray, 255, cv.ADAPTIVE_THRESH_GAUSSIAN_C, cv.THRESH_BINARY, 11,2)
cv.imwrite('output.jpg', thresh)