Code Monkey home page Code Monkey logo

colordeconvolutionmatlab's Introduction

Color deconvolution in MATLAB

Background

Color deconvolution was introduced by Ruifrok et al. in 2001 [1] and describes a method to extract stain intensities from RGB images of histological slides. Color deconvolution is widely used for image processing in histology and there are very efficient Fiji and Python implementation available (see below, [2]). This repository provides an efficient Matlab implementation of color deconvolution. The code is partly based on the python implementation in scikit-image.

Example

Original image preview

Original image thumbnail

Fiji Output

Fiji Output Panels: Original - Hematoxylin - DAB - residual

The source image is stained with Hematoxylin and DAB. The third channel represents the residual and should be empty. Here, the standard values for the deconvolution matrix fit pretty well and the residual is small.

Output of my code

my Output The output is similar to Fiji's output (note that the contrast is enhanced by stretching the histograms). The residual's histogram is also stretched and it can be appreciated that the residual is essentially random noise, so it does not contain a lot of information.

To do

  • fix contrast scaling in inverse color deconvolution function (RecombineStains)

More resources on color deconvolution

  • Fiji implementation explained on the Fiji website
  • python scikit-image implementation on GitHub
  • in-depth explanation of the fiji implementation on mecourse.com
  • another Matlab implementation by Antony Chan on web.hku.hk (slower because of two nested for loops)
  • yet another Matlab implementation: imagenebula

References

[1] Ruifrok AC, Johnston DA. Quantification of histochemical staining by color deconvolution. Anal Quant Cytol Histol. 2001 Aug;23(4) 291-299. PubMed PMID: 11531144.

[2] van der Walt S, Schönberger JL, Nunez-Iglesias J, Boulogne F, Warner JD, Yager N, Gouillart E, Yu T, scikit-image contributors. scikit-image: image processing in Python. PeerJ. 2014;2 e453. doi:10.7717/peerj.453. PubMed PMID: 25024921; PubMed Central PMCID: PMC4081273.

[3] Pontén F, Jirström K, Uhlen M. The Human Protein Atlas--a tool for pathology. J Pathol. 2008 Dec;216(4) 387-393. doi:10.1002/path.2440. PubMed PMID: 18853439.

colordeconvolutionmatlab's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

colordeconvolutionmatlab's Issues

code about 'Backgrounds' parameter

Hi, I want try the new color visualization code for my mpMRI(T1-w, T2-w, DWI)data. but I have some not understand

Dataset.Backgrounds1.Dir = 't1_resampled_5334/'; % t2_tse_tra_320_p2_5 t1_resampled_5334
Dataset.Backgrounds2.Dir = 't2_tse_tra_320_p2_5/'; % t2_tse_tra_320_p2_5 t1_resampled_5334
Dataset.SampleImageNumber = 12;
Dataset.extraMode = 'Backgrounds';

what's the meaning of the four parameter , especially 'Backgrounds',
In main_reColorMRI.m, About "isfield(Dataset,'Backgrounds1')" represent ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.