Here, I will be writing details about how to approach a new algorithm for image-based color detection. How they will differ from the previously used approaches. How can this method be compared to other methods -- using what evaluation parameters. In general, it will include ideas and approaches in a structured manner.
Some methods to try: linear regression, random forest, SVM, neural network.
But, preprocessing is equally important to reduce variance due to illumination change. (need to explore)
Some steps:
- Obtain the image of a paper assay that constitutes two circular zones one for reference and the other for the sample.
- Select and crop only the circular region, probably hough circle transform might work fine or may have to use some edge detection techniques.
- Extract RGB values from the image. From that try to obtain the different color space components. Can HSV, a combination of RGB and HSV, log chromaticity, or obtain absorbance component using Lambert-Beer Law.
- Using the above information as the features we can train a machine learning model. the training set will constitute a lookup table that correlates the color based features with the analyte concentration.
1st start with the image background and foreground separation.
2nd localize the two circular zones with a contour and abstract the color values for RGB channels.
A Simple Linear Regression Using RGB values:
Using the food color dataset (144 rows with dilution factor and RGB values), I am building a simple linear regression model. I am using python sklearn LinearRegression for this purpose.