Hi,
I'm not sure I understood the question. Anyway, to detect a blurred image I have a simple idea (may not work for all types of image...). Calculate the standard deviation of the image, and get the image with the highest value.
This is an example for RGB images:
function IEGetStandardDeviation(bitmap:TIEBitmap):double;
var
avg, stddev: array [0..2] of double;
c, row, col:integer;
px: pbyte;
begin
IEGetAverageValues(bitmap, avg);
for row := 0 to bitmap.Height-1 do
begin
px := bitmap.Scanline[row];
for col:=0 to bitmap.Width-1 do
for c:=0 to 2 do
begin
stddev[c] := stddev[c] + sqr(px^ - avg[c]);
inc(px);
end;
end;
for c:=0 to 2 do
stddev[c]:=sqrt( stddev[c]/(bitmap.Width*bitmap.Height-1) );
result := (stddev[0] + stddev[1] + stddev[2]) / 3.0;
end;
...now you can write:
ImageEnView1.IO.LoadFromFile('image1.jpg');
d1 := IEGetStandardDeviation(ImageEnView1.IEBitmap);
ImageEnView1.IO.LoadFromFile('image2.jpg');
d2 := IEGetStandardDeviation(ImageEnView1.IEBitmap);
if (d1 > d2)
...image1 should be "less-blurred" than image2
Of course this is not possible for black/white images.