从图像中的行获取颜色索引 [英] Getting Indexes of Colors from rows in Image

查看:91
本文介绍了从图像中的行获取颜色索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这方面工作了一段时间并且搜索谷歌没有运气。我正在尝试扫描图像的每一行,并且foreach像素确定下一个像素是否等于当前,如果是,那么索引(从1开始)应该提前1,直到下一个像素不是当前行的等于或结束。应将当前颜色的最终索引添加到具有行,列和最终索引的集合中,然后将最终索引重置为1并继续当前行,除非在该情况下到达行尾,从下一行开始。

解决方案

让我谷歌那个为你...... [ ^ ]

Ive worked on this for some time and searched google with no luck. What I'm attempting is to scan each row of an image, and foreach pixel in row determine if the next pixel is equal to current, if so then an index(starts at 1) should be advanced by 1 until the next pixel is not equal or end of current row. The final index for the current color should be added to a collection with the row, column, and final index then the final index should be reset to 1 and continue on the current row unless end of row reached in that case start on next row.

解决方案

Let me Google that for you...[^]


这篇关于从图像中的行获取颜色索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆