I
I
Ivan Gumenyuk2014-11-15 19:50:32
Graphic arts
Ivan Gumenyuk, 2014-11-15 19:50:32

How to decompose a color image into maximum contrast b/w channels for object recognition?

I am training software for automatic cell recognition. Usually this image is in monochrome channels and it is easily divided into contrasting components:
178802f0c935446bb013f8444bea1a98.png
We decompose into two channels and count the objects:
dd4119fe247a49628dbf6979ef761f0b.pngbb2c5d7d9d7d4d42a4ee956a00c451e3.png
However, recently it has become necessary to count full-color images, where the target object has a color not 0,0,200, but, for example, 90,47,30 - brown dye. For normal recognition, it is necessary to decompose into channels so that the background is maximally absent relative to the object. You can decompose into a black and white image in different channel proportions. But I just can't think of an algorithm to get the maximum possible contrast of objects relative to the background. That is, the resulting value of the brightness delta of the object and background pixels should be maximum. Empirical decomposition into pure RGB gives good results, but I want to improve. Can someone suggest at least a direction in calculating the proportions of the decomposition?
Example:
You need to select brown cells relative to purple ones.
321e03b2acc5481287e0acec4e98174b.jpg
After spreading over the RGB channels respectively:
756f8a5272c8493eb39fb43ec3e9f664.png3bcd1409077349a29c0f42fd74f53711.png7e6027aef2d24ee991903fd0e7ff7089.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Gumenyuk, 2019-01-17
@Meklon

In short, the most promising option is the color deconvolution algorithm. Wrote software for mass processing https://github.com/meklon/morphostain

S
Sergey, 2014-11-15
@begemot_sun

Try to convert an image from RGB to HSL using one of the channels (or 2)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question