ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 how to calculate definition of image?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
liu8670 Posted - Nov 29 2012 : 06:05:51
When I get many image
but I want to get one best image
how to calculate definition of image?
9   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jan 08 2013 : 02:13:51
Please most two sample images to compare, just to know the complexity of the comparison.
andyhill Posted - Jan 03 2013 : 12:57:49
Is there a way to identify similar images in code (not byte for byte identical but original verses say edited version) within reason of course, I tried the code above but it is not suitable for this purpose.



Andy
andyhill Posted - Jan 03 2013 : 12:47:39
thanks

Andy
fab Posted - Jan 03 2013 : 12:42:50
IEGetAverageValues is declared and defined in imageenproc unit.
andyhill Posted - Jan 03 2013 : 12:38:13
Fabrizio, Where can we get the IEGetAverageValues code mentioned above ?

Andy
liu8670 Posted - Dec 17 2012 : 05:24:44
Thanks very much!
fab Posted - Dec 14 2012 : 01:25:29
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.
liu8670 Posted - Nov 29 2012 : 21:24:10
Hi,
When I get many image using different focus,
I want to get the best image in these image.
How can I get it?
Jihong Liu


xequte Posted - Nov 29 2012 : 11:47:49
Hi

Do you mean the dimensions (size) of the image? or DPI?

You can load all information about a file using:

http://www.imageen.com/help/TImageEnIO.ParamsFromFile.html

Then read the details from:

http://www.imageen.com/help/TImageEnIO.Params.html

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com