-1
我的問題:如何識別下面照片上每塊石頭的邊界?大小計算將是一件容易的事。識別照片上每塊石頭的邊界
我必須告訴你,我在圖像識別新的孩子,我會爲任何感激的第一:
- 命題
- 有用的鏈接
- 書名的在章節它
- 算法
- 框架(特別是C++)
- 等
所以..
我有小石塊的圖像。我必須測量它們的大小(以像素爲單位)。
我已經打了任何像素的RGB值,並強調像素RGB巫值是由我定義的常量之間。我不喜歡有些石頭是粘在一起的,有些邊界應該是更寬的。
for (y=0; y<height; y++,pixelIndex = width*y<<2)
for (x=0; x<width; x++,pixelIndex+=4)
if (pixelsData[pixelIndex ]>self.minRedSlider.integerValue && pixelsData[pixelIndex ]<self.maxRedSlider.integerValue &&
pixelsData[pixelIndex+1]>self.minGreenSlider.integerValue && pixelsData[pixelIndex+1]<self.maxGreenSlider.integerValue &&
pixelsData[pixelIndex+2]>self.minBlueSlider.integerValue && pixelsData[pixelIndex+2]<self.maxBlueSlider.integerValue) {
resultData[pixelIndex] = 255;
resultData[pixelIndex+1] = 255;
resultData[pixelIndex+2] = 255;
} else {
resultData[pixelIndex] = 0;
resultData[pixelIndex+1] = 0;
resultData[pixelIndex+2] = 0;
}
這是我的測試應用程序看起來像此刻:
PS: 我知道,我的問題是很模糊的,但我已經開始,並不能找到或猜測一個合適的方向。無論如何,謝謝你已經花費在它上面的時間。
非常感謝!我會盡力讓你知道結果。 – ZevsVU