Ver Mensaje Individual
  #8  
Antiguo 15-08-2007
Avatar de seoane
[seoane] seoane is offline
Miembro Premium
 
Registrado: feb 2004
Ubicación: A Coruña, España
Posts: 3.717
Reputación: 26
seoane Va por buen camino
Podemos empezar por contar cuantos píxeles de cada color hay en la imagen:
Código Delphi [-]
var
  i,j: Integer;
  Histograma: Array[0..255] of Integer;
begin
  FillChar(Histograma,Sizeof(Histograma),#0);
  for j:= 0 to Image1.Picture.Bitmap.Height - 1 do
    for i:= 0 to Image1.Picture.Bitmap.Width - 1 do
      inc(Histograma[Image1.Picture.Bitmap.Canvas.Pixels[i,j] and $FF]);
end;
Responder Con Cita