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

How to plot tissue regions returned by locate_tissue_cnts #5

Closed
fgfmds opened this issue Apr 26, 2020 · 2 comments
Closed

How to plot tissue regions returned by locate_tissue_cnts #5

fgfmds opened this issue Apr 26, 2020 · 2 comments

Comments

@fgfmds
Copy link

fgfmds commented Apr 26, 2020

Hello,

I am wondering if you can help me. Trying to understand how your tissue locator works. It looks like the locate_tissue_cnts function returns a list of coordinates for the various detected tissue region and the down-sampling level which is clear.

For your test image, the function returns 3 regions. How do you plot these coordinates? Do you have any pointers how i can overlay the coordinates on the image to check the accuracy?

I ran your function on one of my test images and I got 16 tissue regions. I am trying to figure out how to plot these coordinates.

Thank you kindly!

@fgfmds
Copy link
Author

fgfmds commented Apr 26, 2020

Ok. I have made some progress since last night. I suppose i can create a zero numpy array that corresponds to the image dimensions, then load your region coordinates to create a mask using that zero array as a template or starting point. Close?

I also noticed that the 16 regions in my test images were mostly tiny areas that i want to discard, so by increasing the "min_tissue_size", i was able to get the regions I want. The next challenge is to automate this tissue size tweaking process for when i run this on my whole dataset which has a bout 50 slides.

@PingjunChen
Copy link
Owner

@fgfmds Sorry for the late reply. Thanks for your interest in this repo. You might consider using cv2.drawContours to overlay the located contour over the image. This code gist can be taken as an example.

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