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

Color decvoluton #1

Open
wahaha98 opened this issue Dec 21, 2021 · 4 comments
Open

Color decvoluton #1

wahaha98 opened this issue Dec 21, 2021 · 4 comments

Comments

@wahaha98
Copy link

Hello, excuse me, I would like to ask you in the calculate_P_hat_from_256RGB.py file, which reference is there for the calculation of the OD value?

@griffincalme
Copy link
Owner

Hi, thanks for asking. Please see https://pubmed.ncbi.nlm.nih.gov/11531144/ for the reference to the OD calculations. Article seems to have a paywall, I don't immediately have access to the PDF anymore, sorry!

For an example using the skimage library https://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_ihc_color_separation.html

@wahaha98
Copy link
Author

wahaha98 commented Dec 21, 2021 via email

@griffincalme
Copy link
Owner

No worries, not my own idea. Was implemented by Scikit-image library.

You can make your own matrix for different colors. The OD values are just the inverse of the RGB values. You essentially can use the color picker in a program like paint.net to get the RGB then take "(255 - value)/255 = OD"

It gets more complicated when stains share similar color space. Skimage also has a different function for only two stains.

@wahaha98
Copy link
Author

wahaha98 commented Dec 21, 2021 via email

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