Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用数字填充了这个数组:
Image<Gray, Byte> imgHue = channels[0];
我需要以某种方式获取数组中 100-105 范围内的数字数量。
知道如何实施吗?
someArray.Count(x => x >= 100 && x <= 105)
这取决于什么类型是Image Value(第二个参数),如果是IEnumerable<Byte>,你可以这样做:
Image
IEnumerable<Byte>
var rangeofBytes = imgHue.Values.Count(b => b >= 100 && b <= 105)