Hi,
I would appreciate if someone can please let me know how to stitch or merge 2 images together based of a reference point or region on each images so that a new image is joined by overlapping or superimposing point or region from each image. This is something like page 10-12 of below document
https://estore.merge.com/na/resources/a ... _guide.pdf
Thanks
Bhim
Stitch two images togather using Fudicial Point in Image Magick
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Stitch two images togather using Fudicial Point in Image Magick
I am not sure I understand your question nor the how it relates to the diagram in your link. But as a guess I would assume it is a -distort Affine. See http://www.imagemagick.org/Usage/distorts/#affine or -distort Perspective. See http://www.imagemagick.org/Usage/distorts/#perspective
Please, always provide your IM version and platform when asking questions, since syntax may differ.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620
For novices, see
viewtopic.php?f=1&t=9620http://http://w ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
Please, always provide your IM version and platform when asking questions, since syntax may differ.
See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620
For novices, see
viewtopic.php?f=1&t=9620http://http://w ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
Re: Stitch two images togather using Fudicial Point in Image Magick
Thanks for the response.
To make my question more clear i have added specific examples below at
https://drive.google.com/drive/folders/ ... sp=sharing.
Each of these shows the 2 input images and 1 output image by following methods
StitchingBySinglePoint
StitchingByTwoPoints
StitchingByLine
StitchingByTwoLines
Also I was not sure what IM version should i use but i am open to any as long as i find a solution. I am on windows platform.
Hope its clear now and will find a solution to this.
Thanks
Bhim
To make my question more clear i have added specific examples below at
https://drive.google.com/drive/folders/ ... sp=sharing.
Each of these shows the 2 input images and 1 output image by following methods
StitchingBySinglePoint
StitchingByTwoPoints
StitchingByLine
StitchingByTwoLines
Also I was not sure what IM version should i use but i am open to any as long as i find a solution. I am on windows platform.
Hope its clear now and will find a solution to this.
Thanks
Bhim
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Stitch two images togather using Fudicial Point in Image Magick
I assume your lines are always straight lines, so only the end points matter.
I'll take the two-line case. This has four points, two on each image. You want to distort one image so that its two points align with the two points on the other image. Is that correct?
Suppose the points on one image (image1.png) are (X1,Y1) and (X2,Y2). The points on the other image (image2.png) are (X3,Y3) and (X4,Y4). X1, Y1 etc must be actual numbers, perhaps floating-point.
For IM v6, Windows BAT syntax:
For IM v7, use "magick" instead of "convert".
If you have only one point on each image, use:
You can do fancy things like making the top image semi-transparent, and so on.
I'll take the two-line case. This has four points, two on each image. You want to distort one image so that its two points align with the two points on the other image. Is that correct?
Suppose the points on one image (image1.png) are (X1,Y1) and (X2,Y2). The points on the other image (image2.png) are (X3,Y3) and (X4,Y4). X1, Y1 etc must be actual numbers, perhaps floating-point.
For IM v6, Windows BAT syntax:
Code: Select all
convert ^
image1.png ^
+distort affine "X1,Y1,X3,Y3 X2,Y2,X4,Y4" ^
image2.png ^
-compose Over composite ^
images_out.png
If you have only one point on each image, use:
Code: Select all
+distort affine "X1,Y1,X2,Y2" ^
snibgo's IM pages: im.snibgo.com
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
Re: Stitch two images togather using Fudicial Point in Image Magick
Thanks You. Let me try this and come back. Hope this will resolve my issue.
Thanks Again.
Bhim
Thanks Again.
Bhim