Hello guys i am generating mug with Freds imagemagick cylinder script.
Left view in transparent image
Middle view in transparent image
I want to find the NEW and ANOTHER both elements position in the left image.
I also want to find the positions of images in middle view.
Any help would be appreciated.
Sub images and their position
-
- Posts: 4
- Joined: 2015-06-17T07:03:45-07:00
- Authentication code: 6789
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Sub images and their position
Sorry, I do not know what you are asking. Can you explain a bit further? What does your question have to do with the cylinderize script?
-
- Posts: 4
- Joined: 2015-06-17T07:03:45-07:00
- Authentication code: 6789
Re: Sub images and their position
If i have an big transparent image with few texts and images at different position.
How can i find position and size of those texts and images in the main image.
Any help would be appreciated.
How can i find position and size of those texts and images in the main image.
Any help would be appreciated.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Sub images and their position
With "-trim" or "-format %@".
Code: Select all
convert in.png -format %@ info:
snibgo's IM pages: im.snibgo.com
-
- Posts: 4
- Joined: 2015-06-17T07:03:45-07:00
- Authentication code: 6789
Re: Sub images and their position
With trim i can not get the position of the individual elements like this. I am getting whole elemnts position after trimmingsnibgo wrote:With "-trim" or "-format %@".
Code: Select all
convert in.png -format %@ info:
But i want to get it like this
I want to get the position and size of individual elements in the main image
Any help would be appreciated
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Sub images and their position
Then you first need to crop to the individual elements. What defines the separation? Perhaps one element is always in the top half, and the other is in the bottom half. Or perhaps they are always separated by horizontal white.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Sub images and their position
If you can assume that there are rows of text separate by white space between, then you can average the image down to one column, then search to find white between areas of gray. Then crop horizontally on the white spaces and trim to remove excess white.