问题描述
我想测试图像中的每个像素,并检查它的颜色,如果它是白色的,那么我必须显示
该像素的相应(x,Y),但直到现在我还没有找到一个帮助我
做类似的事情。所以如果你有这样的功能请告诉我。
I want to test each pixel in an image and check it's color if it is white then I must displaythe corresponding (x,Y) for that pixel but I didn't find until now a function that help me do something like that. So please if you have such function tell me.
感谢所有
thanks at all
推荐答案
我不知道是否有这样的功能。也许在一些深度图形工具包?它肯定不会是基本语言框架的一部分(例如,在objc或c#系统中的核心内容)。
I don't know if there is such a function. maybe in some deep graphics toolkit? it'll certainly not be part of a basic language framework (i.e. core stuff in objc or system in c#).
你可能不得不咬紧牙关,只是努力工作
you might have to bite the bullet and just work your way through all of the pixels manually in o(n^2).
foreach horizontal pixel
foreach vertical pixel
if(pixel at (horizontal,vertical) is white)
return (horizontal, vertical)
这篇关于我需要一个函数来检查每个像素,然后返回该像素的x和y的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!