且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将图像分成具有相同像素数据的多个图像

更新时间:2021-10-16 23:27:10

你原来的问题很难。但是,看看你发表的评论,我认为这是一个简单的问题。您可以从上到下扫描图像,并对像素求和。当总和达到sum_all_pixels / 5时,您就找到了第一个区域。将总和重置为零,然后继续扫描第二个区域。我希望你明白我的意思。

Your original problem is a hard one. But, looking at the comments you made, I think it is a simple problem. You can scan the image from top to bottom, and sum the pixels. When the sum reaches the sum_all_pixels/5, then you have found the first area. Reset the sum to zero, and continue scanning for the second area. I hope you understand what I mean.