to jest obrazek wyjsciowy:
http://img90.imageshack.us/my.php?image=recruiteron6.jpg
teraz jak znalesc x i y slowa ktore sie powtarza

narazie malo mam:
<? function getcolor( $img , $x , $y ) { $rgb = imagecolorat($img , $x, $y); $c['r'] = ($rgb >> 16) & 0xFF; $c['g'] = ($rgb >> 8) & 0xFF; $c['b'] = $rgb & 0xFF; return $c; } function filtr( $img , $w , $h ) { $im = imagecreate($w , $h ); $color = imagecolorallocate($im, 255,255,255); $color2 = imagecolorallocate($im, 0,0,0 ); //var_dump( $height ); for ( $y = 0 ; $y <= $h ; $y ++ ) { for ( $x = 0 ; $x <= $w ; $x ++ ) { $c = getcolor( $img , $x , $y ); $c2 = getcolor( $img , $x , $y+1 ); $c3 = getcolor( $img , $x , $y+2 ); $c4 = getcolor( $img , $x-2 , $y ); $c5 = getcolor( $img , $x-1 , $y ); if ( $c['r'] > 70 && ($c2['r'] > 70 || $c3['r'] > 70) && ($c4['r'] > 70 || $c5['r'] > 70) ) { //var_dump( $c ); imagesetpixel($im,$x,$y, $color2); } } } return $im; } $img = imagecreatefromjpeg( 'r.jpg' ); $im = filtr( $img , $width , $height ); //$im = filtr2( $im , $width , $height ); imagepng($im ); imagedestroy($im); ?>
http://img132.imageshack.us/my.php?image=pomocya8.jpg
ktos wie jak to rozkminic
