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
 Making 2 images similar

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
AndyColmes Posted - Nov 09 2014 : 14:44:25
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
8   L A T E S T    R E P L I E S    (Newest First)
AndyColmes Posted - Nov 12 2014 : 13:36:35
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.
spetric Posted - Nov 11 2014 : 15:12:46
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.
Uwe Posted - Nov 10 2014 : 16:19:55
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
w2m Posted - Nov 10 2014 : 14:53:48
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
AndyColmes Posted - Nov 10 2014 : 13:36:52
Maybe not to compare, but at least make one image look like the other by resizing, rotating, etc. it.
w2m Posted - Nov 10 2014 : 12:34:14
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
AndyColmes Posted - Nov 10 2014 : 12:31:56
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.
w2m Posted - Nov 10 2014 : 10:39:21
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