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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Making 2 images similar
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

AndyColmes

USA
351 Posts

Posted - Nov 09 2014 :  14:44:25  Show Profile  Reply
I am looking to create a tool that can rotate, resize, deskew, etc. an image to match another preferably intelligently based on the "master" image properties.

Before I re-invent the wheel, is there something out there that someone has already created with ImageEn and that I can purchase?

If not, are there any resources that can prove useful for me to start? I am also interested in outsourcing this project to someone who is interested for a fee.

Thank you.

Andy

w2m

USA
1990 Posts

Posted - Nov 10 2014 :  10:39:21  Show Profile  Reply
Andy. Please take the time to describe exactly what you are trying to do. Your explanation is too vague to assess your needs.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Nov 10 2014 :  12:31:56  Show Profile  Reply
Hello Bill. I am looking to match 2 images horizontally and vertically as best as possible. And to do that, I need an intelligent way to detect and change the rotation, resampling, deskewing of one image to match the other. Obviously, there is a need to "read" the contents of the image pixels and somehow find a way to manipulate them to match the other image.

Hope this makes sense.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 10 2014 :  12:34:14  Show Profile  Reply
Are you thinking of comparing 2 bitmaps pixel by pixel? If so, I don't think it is possible.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Nov 10 2014 :  13:36:52  Show Profile  Reply
Maybe not to compare, but at least make one image look like the other by resizing, rotating, etc. it.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Nov 10 2014 :  14:53:48  Show Profile  Reply
You can resample two bitmaps to be the same size, and possibly use SkewDetection but you can not detect rotation because there is no way to know how much a bitmap has been rotated. What else do you want to do other than rotate, resample and deskew?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

Uwe

284 Posts

Posted - Nov 10 2014 :  16:19:55  Show Profile  Reply
Hi Bill,

quote:
you can not detect rotation

Theoretically you could by comparing the two images row by row and detect the differences. Example:

http://www.tek-tips.com/viewthread.cfm?qid=1626211

-Uwe
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Nov 11 2014 :  15:12:46  Show Profile  Reply
Hi Andy,

I'll try to guess what you want to achieve:
Let's say you have some portrait as "master" image. As a "test" image
you have some other portrait and head is not of the same size as head of "master" image. Also, head can be inclined by some angle as well.

So, the task is to resize and rotate the head from "test" image to fit the size and inclination of "master" image head.

This is not a trivial task. It can be achieved using statistical moments (search keywords: image similarity moments), Hough transform (search keywords: hough transform image similarity) and various other approaches(composition, SIFT, histogram, Jaccard coefficient, etc...)...a huge topic.

Here is a SIFT approach: http://web.eecs.umich.edu/~silvio/teaching/EECS598/lectures/lecture10_1.pdf

To adjust image to some master image (template image) I would recommend the use of image moments (especially Zernike moments: http://liris.cnrs.fr/Documents/Liris-3433.pdf).

I have used image moments to calculate automatic stroke placement inside image following the ideas of this paper: http://www.visgraf.impa.br/Courses/ip00/papers/siggraph99.pdf using Intel's IPL together with ImageEn and it's quite a piece of code...and paper has only two pages.

Similar method can be used to calculate angle difference between parts of test and master image to get some average angle needed for rotation of test image to suite master image, but resizing will not be covered by this method.

Edit: this can be also very useful for your task:
http://www.ipol.im/pub/art/2011/my-asift/

You can find code and demo on this page and I think it's just what you need.
Go to Top of Page

AndyColmes

USA
351 Posts

Posted - Nov 12 2014 :  13:36:35  Show Profile  Reply
Hi spetric, thank you very much for the great resources. They are exactly what I need. I have sent you a personal email on this. Hope to hear from you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: