Search found 42 matches
- 2018-10-19T17:51:01-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
Re: Get coordinates Top, Left, size of some areas
My best guess is that your sort does not work the same as mine. Test this: 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 -g -t "+"...
- 2018-10-19T16:42:08-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
Re: Get coordinates Top, Left, size of some areas
Yes. I have all those tools.
I'll try to test on a ubuntu machine, but at the end the final solution I will need to run it on cygwin. So. I'll need understand the logic in your code.
I'll try to test on a ubuntu machine, but at the end the final solution I will need to run it on cygwin. So. I'll need understand the logic in your code.
- 2018-10-19T16:24:20-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Thanks snibgo.
It seems to work pretty fine. Only some few pixel are still green. I remove the fuzz and more pixel become green, so is not the fix needed.
Besides that, how mix both commands to have a a single command to do this?
Thanks again.
It seems to work pretty fine. Only some few pixel are still green. I remove the fuzz and more pixel become green, so is not the fix needed.
Besides that, how mix both commands to have a a single command to do this?
Thanks again.
- 2018-10-19T15:55:32-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
I've sent the first part in this way convert in.png \ -fuzz 20%% \ -transparent '#4CFE00' \ -alpha extract -negate \ -threshold 50%% \ ( +clone \ -define morphology:compose=Lighten \ -morphology HMT 2x3+0+1:0,0,1,-,0,0 \ -morphology HMT 2x3+1+1:0,0,-,1,0,0 \ -negate \ ) \ -compose Darken -composite ...
- 2018-10-19T13:39:55-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
I've been able to do the first 3 steps snibgo suggested. Now, I dont know how to do the last step. A masked composite over the input. A way to approach the problem is: 1. Convert green pixels to white, and everything else to black. 2. From that, turn black all white pixels that have a black pixel ab...
- 2018-10-19T13:34:31-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
- 2018-10-19T12:41:13-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Yes. Snibgo told me to attach the input PNG ensuring that was not a JPEG. I'm confused what you need.
- 2018-10-19T12:24:33-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
Re: Get coordinates Top, Left, size of some areas
$ convert -version
Version: ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org
And testing on Cygwin.
Version: ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08 https://www.imagemagick.org
And testing on Cygwin.
- 2018-10-19T12:22:10-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Attached again
- 2018-10-19T12:04:30-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Attaching again input.png from Dropbox. I hope this time has the correct format.
- 2018-10-19T11:49:42-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
Re: Get coordinates Top, Left, size of some areas
Below you see that I have the BW.JPEG and input.JPEG and the images generated are different than yours. For example Box1 is not joined with Box2 https://ai8fqg.ch.files.1drv.com/y4mmBzZ9F0olPampFoi9qCEJnifgtAexzhc8igyDYKTLhjs9SOO3jk3A-pogyAPTNVQJbNgDCB7Mi3X3012rzBb56Czlna8uwIMs_BYJMHqzMWWj28_hhFb5CD...
- 2018-10-19T10:21:44-07:00
- Forum: Users
- Topic: Get coordinates Top, Left, size of some areas
- Replies: 46
- Views: 32227
Re: Get coordinates Top, Left, size of some areas
Thank yout for help and time fmw42 and that great script., but I;m not sure why for me is not working correctly. The image0 is the same as yours. Your image1 is created as image3 in my side. and the boxes are generated in individual images (image1, 2, 4 and 5). Additionally is creating the images wi...
- 2018-10-19T10:07:13-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
I have saved as PNG. How can be sure not a JPEG?
- 2018-10-19T09:07:29-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Hi snibgo, Thanks for the ideas. I was able to reach the step 3 of your suggestion, changing to purple only those regions I want and rest is black. Now from here how can I do the mask to mix this purple and black image with the original input? This is what I have so far: areas=$(convert input.png \ ...
- 2018-10-18T14:44:56-07:00
- Forum: Users
- Topic: Replace color but only in some regions
- Replies: 18
- Views: 24446
Re: Replace color but only in some regions
Hi Bonzo, The green areas are not only on the top. The green lines I want to isolate have 1 pixel heigth. If there is way to identify these lines to change the colors only tho the lines to diferentiate from the rest of green areas, or replace colors of green areas except the 1 pixel lines. A more re...