Search found 42 matches

by cgkas
2018-11-12T22:47:41-07:00
Forum: Users
Topic: Add top header to final generated image
Replies: 0
Views: 11284

Add top header to final generated image

Hello to all, Please some help here. I´m using IM 6.9.10-11 Q16 x86_64 After several people that have helped me, I have this coordinates and this script. The coordinates correlative are related with the box number in input image. The first 3 lines creates a header text "Left - Right" that ...
by cgkas
2018-10-25T11:38:30-07:00
Forum: Users
Topic: How to use subshell to crop several coordinates in a single process
Replies: 2
Views: 4988

Re: How to use subshell to crop several coordinates in a single process

Hi GeeMack. Thanks for your answer. Certainly works for me too in my ImageMagick 6.9.10-11 Q16 x86_64 on Cygwin/Windows7. The thing here is I have stored the coordinates in a variable that comes from a previous process, then in this case there are 11 coordinates and the first 5 make the first output...
by cgkas
2018-10-25T09:29:04-07:00
Forum: Users
Topic: How to use subshell to crop several coordinates in a single process
Replies: 2
Views: 4988

How to use subshell to crop several coordinates in a single process

Hello to all, I have these coordinates and the input image below. coords="110x16+255+175 178x59+29+65 178x59+223+65 178x59+417+65 178x59+611+65 240x151+462+176 240x151+87+257 240x151+366+355 240x151+77+448 240x151+468+542 240x151+140+624" areas.png https://www.dropbox.com/s/8nznauaszs4qegh...
by cgkas
2018-10-24T16:09:37-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

Excellent fmw42. Thanks a lot for the explanation, your help, time and kind support for help me and others in this and many other posts.

Best regards
by cgkas
2018-10-24T12:37:23-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

Excellent fmw42. It works perfect. I'm trying to understand your code and have some doubts, I hope you have some time to explain a bit how it works. About the code below: convert areas.png +repage -crop $coord +repage -bordercolor green1 -border 2x2 miff:- 1- I understand crop crops each region from...
by cgkas
2018-10-24T10:27:12-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

Does this do what you want? Note that when you put a border of 1 around each object and then append, the result will have 2 pixel border between the two but only 1 pixel border outside the other sides. If you need something else, the please explain. It should be possible to get the same borders aro...
by cgkas
2018-10-24T08:55:05-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

try the following: The ( ... ) means do it in a subshell and do a for loop to crop every coord into one multipage miff in memory I didn't know about the "subshell" concept. We always learn, thank you. Your code it works pretty nice, my issue is I almost don't understand the logic to make ...
by cgkas
2018-10-23T20:36:52-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

What is your scheme for organizing the output? What should happen if the larger 4 images are not the same size or if you have more smaller or larger images? How did you determine the -repage coordinates? Please clarify enough so we understand what your goal actually is. The mode to organize the 4 l...
by cgkas
2018-10-23T19:58:45-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

Re: How to include a loop instead of several clone/crop commands

I'm not sure what you are asking. Does your command do what you want? If you want to write a shell script that creates the command from the lines in "coords", you can, but where do the "-repage" numbers come from? Actually I have this image. https://www.dropbox.com/s/u2cng90xxsi...
by cgkas
2018-10-23T17:17:23-07:00
Forum: Users
Topic: How to include a loop instead of several clone/crop commands
Replies: 13
Views: 11792

How to include a loop instead of several clone/crop commands

Hello to all, if I have some coordinates in a variable like this: coords=$(echo "264x40+1609+111 423x145+69+203 423x145+990+203 423x145+529+203 423x145+1450+203") How can I do a loop to join these five images in a singles one without to send 5 clone/crop commands like this. convert input.p...
by cgkas
2018-10-20T19:47:52-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 46
Views: 30152

Re: Get coordinates Top, Left, size of some areas

I was able to remove the unwanted regions of big boxes filtering first all those regions that have 45 pixel height and changing those regions to black. Now my script looks like this: Maybe if you have time, you can help me to optimize my script to avoid the use of temporal images that are not needed...
by cgkas
2018-10-20T15:04:24-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 46
Views: 30152

Re: Get coordinates Top, Left, size of some areas

They way I saw was to convert first to black and white and then extract the white boxes and black boxes that are surrounded by white line.

Image
by cgkas
2018-10-20T13:46:09-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 46
Views: 30152

Re: Get coordinates Top, Left, size of some areas

@cgkas. I do not think we can help until you post your original input.png (in PNG format). Posting as JPG changes the colors and so your command to process the image won't work. Hello fmw42. I´m uploading again input.png from dropbox. I hope this time doesn´t affect the quality of image. Below is t...
by cgkas
2018-10-20T08:07:38-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 46
Views: 30152

Re: Get coordinates Top, Left, size of some areas

For me it works when I put sort in this way as mentioned in previous post. sort -t "+" -k3n -k2n My only issue is in output the boxes that are been taken are bigger than those I would like to. The output shows the size of green boxes and I would like the size of red boxes. Maybe you can he...
by cgkas
2018-10-20T00:51:32-07:00
Forum: Users
Topic: Get coordinates Top, Left, size of some areas
Replies: 46
Views: 30152

Re: Get coordinates Top, Left, size of some areas

Perhaps your sort does not know about -g. So try -n convert BW.jpeg -threshold 50% -type bilevel \ -define connected-components:verbose=true \ -define connected-components:area-threshold=2000 \ -connected-components 4 \ null: | awk 'NR>2 {print $2}' | sort -n -t "+" -k 3,2 264x40+680+109 ...