protected function computeBucket(Color $_color) { if ($this->useGreyscale) { return ["grey" => (int) ($_color->getGrey() / $this->bucketQuantity)]; } return ["red" => (int) ($_color->getRed() / $this->bucketQuantity), "green" => (int) ($_color->getGreen() / $this->bucketQuantity), "blue" => (int) ($_color->getBlue() / $this->bucketQuantity)]; }
protected function compareGreyPixels(Color $_a, Color $_b) { return pow($_a->getGrey() - $_b->getGrey(), 2); }
protected function compareGreyPixels(Color $_a, Color $_b) { // jesli napotkalismy na rozne pixele - konczymy porownywanie obrazow $this->wasCompared = $_a->getGrey() !== $_b->getGrey(); }
protected function compareGreyPixels(Color $_a, Color $_b) { return (int) ($_a->getGrey() !== $_b->getGrey()); }