Hello! Hope you been well.
I happen to have a slide that has two tumours and have been struggling to grasp [1] multiple contours [2] individually detect tumor/edge detection. Any insights would be really helpful to me.
[1] Task: accurately draw contours for two tumor chunks (1&2)
[2] current limitation in TESLA (1) : only grab big chunk ([2]) and ignore smaller chunk [1].
On detected edge of tumor chunk 2, TESLA tends to detect all surrounding boundary regardless of its biological context. For example, as shown on red arrows, user would not like to have tumour edge detection on either (a): boundary between tumour and empty space or (b, c): continous tumour chunks but limited by visium array window. Any chances one can confine detection take account such biological contexts?
Dear @jianhuupenn,
Hello! Hope you been well. I happen to have a slide that has two tumours and have been struggling to grasp [1] multiple contours [2] individually detect tumor/edge detection. Any insights would be really helpful to me.
[1] Task: accurately draw contours for two tumor chunks (1&2)
[2] current limitation in TESLA (1) : only grab big chunk ([2]) and ignore smaller chunk [1].
![image](https://github.com/jianhuupenn/TESLA/assets/59645310/acfecaa7-babc-46a0-8ed1-f7679bdad26c)
cnt=tesla.cv2_detect_contour(img, apertureSize=5, L2gradient = True, all_cnt_info=True)
binary=np.zeros((img.shape[0:2]), dtype=np.uint8)
for tmp in cnt:
if tmp[2]>100:
cnt=tmp[0]
cv2.drawContours(binary, [cnt], -1, (1), thickness=-1)
#cnt_enlarged = tesla.scale_contour(cnt, 1.05)
#binary_enlarged = np.zeros(img.shape[0:2])
#cv2.drawContours(binary_enlarged, [cnt_enlarged], -1, (1), thickness=-1)
img_new = img.copy()
cv2.drawContours(img_new, [cnt], -1, (255), thickness=50)
img_new=cv2.resize(img_new, ((resize_width, resize_height)))
[3] current limitation in TESLA (2):