Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contour issue #11

Open
jinyeong1316 opened this issue Feb 1, 2024 · 1 comment
Open

contour issue #11

jinyeong1316 opened this issue Feb 1, 2024 · 1 comment

Comments

@jinyeong1316
Copy link

Hi,

I am currently working with biopsy samples in Xenium. In my FFPE slides, I have 3-4 masses for each sample. After using the cv2_detect_contour function, I noticed that only one mass was successfully detected and contoured, while the others were not.

I know you suggested for contouring using coordinates, but unfortunately, the Xenium data does not include information about x-array and y-arrays.

Could you help me to handle this?

@jianhuupenn
Copy link
Owner

You can try this:

cnt_info=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_info:
	if tmp[2]>100:
		cnt=tmp[0]
		cv2.drawContours(binary, [cnt], -1, (1), thickness=-1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants