{"id":503,"date":"2020-07-22T18:03:32","date_gmt":"2020-07-22T17:03:32","guid":{"rendered":"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/?p=503"},"modified":"2021-07-28T11:27:37","modified_gmt":"2021-07-28T10:27:37","slug":"project-computer-vision-image-analysis-of-histopathology-slides","status":"publish","type":"post","link":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/","title":{"rendered":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/wp-content\/uploads\/2020\/07\/whole_slide.png\" alt=\"\" class=\"wp-image-554\" srcset=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/whole_slide.png 640w, https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/whole_slide-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Whole slide image (Level 3, width and height decimation by 32)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/wp-content\/uploads\/2020\/07\/original-1.png\" alt=\"\" class=\"wp-image-580\" srcset=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/original-1.png 640w, https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/original-1-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Central slice of whole slide image (height,width) = (300 , 400)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/wp-content\/uploads\/2020\/07\/Optical_Density-1.png\" alt=\"\" class=\"wp-image-551\" srcset=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/Optical_Density-1.png 640w, https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/Optical_Density-1-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Visualization of stain vector estimation<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Stain de-convolution<\/h4>\n\n\n<h5>Method 1 : least square fitting<\/h5>\n<p>Solve the linear equation Ax = b,<\/p>\n<p>where A is the estimated stain vectors, b is optical density(OD).<\/p>\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"python\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\"># Method 1 : least squared fitting\nA = stainVectors.T\nb = np.reshape(OD,(ROI_height*ROI_width,3)).T\nx, _, _, _ = np.linalg.lstsq(A,b)\nhema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width))\neosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width))<\/pre><\/div>\n\n\n<h5>Method 2 : Moore-Penrose pseudo-inverse<\/h5>\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"python\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\"># Method 2 : Moore-Penrose pseudoinverse\ninv_matx = np.linalg.pinv(np.dot(stainVectors,stainVectors.T))\nresult = np.dot(np.dot(OD,stainVectors.T),inv_matx)\nhema = result[:,:,0]\neosin =result[:,:,1] <\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/wp-content\/uploads\/2020\/07\/seperate_components.png\" alt=\"\" class=\"wp-image-543\" width=\"580\" height=\"435\" srcset=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/seperate_components.png 640w, https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/seperate_components-300x225.png 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption>H&amp;E stain concentration ( both components are clamped at max. level = 1.0)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/jasoninerlangen.myqnapcloud.com:8081\/WordPress\/wp-content\/uploads\/2020\/07\/normalized.png\" alt=\"\" class=\"wp-image-542\" srcset=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/normalized.png 640w, https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/normalized-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Reference<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/towardsdatascience.com\/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268\">https:\/\/towardsdatascience.com\/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/towardsdatascience.com\/microscopy-stain-variations-and-how-to-estimate-them-baca29f57ee9\">https:\/\/towardsdatascience.com\/microscopy-stain-variations-and-how-to-estimate-them-baca29f57ee9<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/DeepPathology\/SlideRunner\">https:\/\/github.com\/DeepPathology\/SlideRunner<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":554,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[2],"tags":[7],"class_list":["post-503","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding","tag-computer-vision"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Jason&#039;s Cookbook - Coding, Cooking and Culture\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason&#039;s Cookbook\" \/>\n\t\t<meta property=\"og:description\" content=\"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-22T17:03:32+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-07-28T10:27:37+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/atm7602001\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@JiaweiJason\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason&#039;s Cookbook\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@JiaweiJason\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#blogposting\",\"name\":\"Project Computer Vision \\u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook\",\"headline\":\"Project Computer Vision \\u2013 Image Analysis and Enhancement of Histopathology Slides\",\"author\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/whole_slide.png\",\"width\":640,\"height\":480},\"datePublished\":\"2020-07-22T18:03:32+01:00\",\"dateModified\":\"2021-07-28T11:27:37+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#webpage\"},\"articleSection\":\"Coding, Computer Vision\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/category\\\/coding\\\/#listItem\",\"name\":\"Coding\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/category\\\/coding\\\/#listItem\",\"position\":2,\"name\":\"Coding\",\"item\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/category\\\/coding\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#listItem\",\"name\":\"Project Computer Vision \\u2013 Image Analysis and Enhancement of Histopathology Slides\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#listItem\",\"position\":3,\"name\":\"Project Computer Vision \\u2013 Image Analysis and Enhancement of Histopathology Slides\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/category\\\/coding\\\/#listItem\",\"name\":\"Coding\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/#organization\",\"name\":\"Jason's Cookbook\",\"description\":\"Coding, Cooking and Culture\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/\",\"telephone\":\"+491779655877\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/atm7602001\",\"https:\\\/\\\/twitter.com\\\/JiaweiJason\",\"https:\\\/\\\/www.instagram.com\\\/atm7602001\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCg7QWN8FjRSxJbQY7eCxO0Q\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/atm7602001\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/author\\\/admin\\\/\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/387f39c6f44916184cc1ce27aa919819cc7d9e92f1a8f5ef312ce50870e94e4e?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#webpage\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/\",\"name\":\"Project Computer Vision \\u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook\",\"description\":\"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/author\\\/admin\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/whole_slide.png\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#mainImage\",\"width\":640,\"height\":480},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/project-computer-vision-image-analysis-of-histopathology-slides\\\/#mainImage\"},\"datePublished\":\"2020-07-22T18:03:32+01:00\",\"dateModified\":\"2021-07-28T11:27:37+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/#website\",\"url\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/\",\"name\":\"Jason's Cookbook\",\"description\":\"Coding, Cooking and Culture\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/jasoninerlangen.myqnapcloud.com\\\/WordPress\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook","description":"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose","canonical_url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#blogposting","name":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook","headline":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides","author":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/whole_slide.png","width":640,"height":480},"datePublished":"2020-07-22T18:03:32+01:00","dateModified":"2021-07-28T11:27:37+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#webpage"},"isPartOf":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#webpage"},"articleSection":"Coding, Computer Vision"},{"@type":"BreadcrumbList","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress#listItem","position":1,"name":"Home","item":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress","nextItem":{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/#listItem","name":"Coding"}},{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/#listItem","position":2,"name":"Coding","item":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/","nextItem":{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#listItem","name":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#listItem","position":3,"name":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides","previousItem":{"@type":"ListItem","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/#listItem","name":"Coding"}}]},{"@type":"Organization","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/#organization","name":"Jason's Cookbook","description":"Coding, Cooking and Culture","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/","telephone":"+491779655877","sameAs":["https:\/\/www.facebook.com\/atm7602001","https:\/\/twitter.com\/JiaweiJason","https:\/\/www.instagram.com\/atm7602001\/","https:\/\/www.youtube.com\/channel\/UCg7QWN8FjRSxJbQY7eCxO0Q","https:\/\/www.linkedin.com\/in\/atm7602001\/"]},{"@type":"Person","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/author\/admin\/#author","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/author\/admin\/","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/387f39c6f44916184cc1ce27aa919819cc7d9e92f1a8f5ef312ce50870e94e4e?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#webpage","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/","name":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook","description":"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/#website"},"breadcrumb":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#breadcrumblist"},"author":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/author\/admin\/#author"},"creator":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/author\/admin\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-content\/uploads\/2020\/07\/whole_slide.png","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#mainImage","width":640,"height":480},"primaryImageOfPage":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/#mainImage"},"datePublished":"2020-07-22T18:03:32+01:00","dateModified":"2021-07-28T11:27:37+01:00"},{"@type":"WebSite","@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/#website","url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/","name":"Jason's Cookbook","description":"Coding, Cooking and Culture","inLanguage":"en-US","publisher":{"@id":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/#organization"}}]},"og:locale":"en_US","og:site_name":"Jason's Cookbook - Coding, Cooking and Culture","og:type":"article","og:title":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook","og:description":"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose","og:url":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/","article:published_time":"2020-07-22T17:03:32+00:00","article:modified_time":"2021-07-28T10:27:37+00:00","article:publisher":"https:\/\/www.facebook.com\/atm7602001","twitter:card":"summary_large_image","twitter:site":"@JiaweiJason","twitter:title":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides - Jason's Cookbook","twitter:description":"Stain de-convolution Method 1 : least square fitting Solve the linear equation Ax = b, where A is the estimated stain vectors, b is optical density(OD). # Method 1 : least squared fitting A = stainVectors.T b = np.reshape(OD,(ROI_height*ROI_width,3)).T x, _, _, _ = np.linalg.lstsq(A,b) hema_lstsq = np.reshape(x[0,:],(ROI_height,ROI_width)) eosin_lstsq = np.reshape(x[1,:],(ROI_height,ROI_width)) Method 2 : Moore-Penrose","twitter:creator":"@JiaweiJason"},"aioseo_meta_data":{"post_id":"503","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-07-02 08:32:46","updated":"2025-06-07 03:04:15","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/\" title=\"Coding\">Coding<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tProject Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress"},{"label":"Coding","link":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/category\/coding\/"},{"label":"Project Computer Vision \u2013 Image Analysis and Enhancement of Histopathology Slides","link":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/project-computer-vision-image-analysis-of-histopathology-slides\/"}],"_links":{"self":[{"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/posts\/503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/comments?post=503"}],"version-history":[{"count":41,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/posts\/503\/revisions"}],"predecessor-version":[{"id":831,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/posts\/503\/revisions\/831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/media\/554"}],"wp:attachment":[{"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/media?parent=503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/categories?post=503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasoninerlangen.myqnapcloud.com\/WordPress\/wp-json\/wp\/v2\/tags?post=503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}