MATLAB: How to perform colour segmentation on resistor color band and calculate the value?

color classificationImage Processing Toolboxresistorresistorcalculator

Hi, I am currently performing color segmentation on resistor color band and calculate the resistor value. I have segmented the codes and I am stucked at the calculator part. How do I use the color band segmented into useful variables in calculation? Thanks in advance!
Related Question