private Vec3b getColorByTick(int offset) { Point curPoint = getCoordsByTick(offset); // TODO: if y , x is out of range... Vec3b color = FilteredMat.At <Vec3b>(curPoint.Y, curPoint.X); return(color); }
public override List <LedResults.Color> getCurrentColors(List <string> LedIdNames) { List <LedResults.Color> colors = new List <LedResults.Color>(); if (FilteredMat.Width >= LedIdNames.Count) { for (int i = 0; i < LedIdNames.Count; i++) { int LedPercent = (int)((float)100 / (float)LedIdNames.Count * (float)i); if (LedPercent < barPercent) { Vec3b Vec3bColor = FilteredMat.At <Vec3b>(0, i); colors.Add(new LedResults.Color(Vec3bColor[2], Vec3bColor[1], Vec3bColor[0])); } else { colors.Add(new LedResults.Color(0, 0, 0)); } } } return(colors); }