Search found 55 matches

by coloring
2018-03-04T12:50:45-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Re: Write-mask not working with define connected components?

My solution Line 1, create mask from image, do morphology edgeout 2, replace the background black with transparent on the mask 3, combine the mask with the edgeout in order to show only holes that shouldn't be there 4, fill the entire background with white to reveal only the holes to fill in (which ...
by coloring
2018-03-03T16:22:48-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Re: Write-mask not working with define connected components?

Forgive me, I've never done any image work, ever, and I'm also completely new to IM. Still trying to explain it best I can and figure it out. Start image https://image.ibb.co/cMWof7/bitmoji432844786.png End current result (see the gap inside?) https://preview.ibb.co/msHmHn/bitmoji432844786_png.gif W...
by coloring
2018-03-03T15:36:45-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Re: Write-mask not working with define connected components?

From my limited understanding and what I've read in the docs, it seems that I need to do a morphology close on a extracted alpha copy (not sure what to call that). So I still need to: 1, figure out how to first combine the alpha extracted copy with the edge image to create a complete white mask (exc...
by coloring
2018-03-03T13:30:02-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Re: Write-mask not working with define connected components?

This is an image from later in the process, but you can see that the edgeout effect from earlier had created an enclosed area, and thus created an unintended "hole" (depending on the image, it can be much worse than this), which is left in the image's final result (as you can see, we can find and re...
by coloring
2018-03-03T12:33:02-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Re: Write-mask not working with define connected components?

Yes, it seems to not be compatible. Write mask works for me in other areas My other idea to pursue is to overlay the mask image onto the edgeout (which will leave only the unwanted holes), use define to remove the holes, then use the mask again to cut out the original part in the edgeout. Is it viab...
by coloring
2018-03-03T09:59:15-07:00
Forum: Users
Topic: Write-mask not working with define connected components?
Replies: 10
Views: 1473

Write-mask not working with define connected components?

Hi, I have a mask, and also morphology edgeout from the mask. I want to remove unwanted black holes inside the edgeout, but since there may be holes I need to keep, I am trying to use a write-mask using the original alpha mask to keep the connected components code from removing parts I want to keep....
by coloring
2018-03-02T16:59:49-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: [SOLVED] Imagemagick transparent background and white image outlines

Here is my final code. Removes all the gaps inside, and trims the final image. Works great, thank you very much! :) Edit: gah, actually, trim isn't working! I can't figure it why magick \( image.png +repage -bordercolor white -border 1x1 \ -fuzz 10% -fill transparent -floodfill +0+0 white -shave 1x1...
by coloring
2018-03-01T20:24:03-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: [SOLVED] Imagemagick transparent background and white image outlines

I mean the code above. (Your script is really nice by the way) This is an example of the edges clipped (not enough room for expansion of edgeout and dilation) https://image.ibb.co/dmFMDH/result1.png And here I increased the image size a little to account for expansion (unfortunately, I wasn't able t...
by coloring
2018-03-01T19:23:56-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: [SOLVED] Imagemagick transparent background and white image outlines

Is there a way to create some extra working space and trim it afterwards so that the edgeout and dilation don't get clipped if they go beyond the previous image bounds? (I'm trying to figure out how to do that right now)
by coloring
2018-03-01T15:48:06-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

That's exactly my intended result, thank you very much! I will study the steps carefully :)
by coloring
2018-03-01T11:47:06-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

So far this is what I have. 1st, I remove all white on the outside border. (I decided not to mess with the white inside the image) 2, get the alpha mask 3, enlarge the border (to create room for extra working space), dilate the edges (so I can create a white outline in the final result), and trim of...
by coloring
2018-02-28T18:18:50-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

I do not see any Bug report on this forum regarding this issue. I believe the problem is with the Linux package in the repository, not your program, so I filed the bug with the package maintainer. Others have filed similar bug reports to this one there as well. https://github.com/termux/termux-pack...
by coloring
2018-02-28T16:51:26-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

Note in IM 7 the correct command is magick, not magick convert. Try magick alone and see if that helps. magics image.png -transparent white tmp.png magics tmp.png -alpha extract tmp2.png magick tmp2.png \ -define connected-components:mean-color=true \ -define connected-components:area-threshold=30 ...
by coloring
2018-02-28T15:58:48-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

I do not get that corruption for your new image using IM 7.0.7.23 Q16 Mac OSX. What is your platform/OS? What version of libpng are you using? convert -list format PNG* PNG rw- Portable Network Graphics ( libpng 1.6.34 ) PNG* rw- Portable Network Graphics (libpng 1.6.34) I'm using an Android ARM aa...
by coloring
2018-02-28T11:54:53-07:00
Forum: Users
Topic: [SOLVED] Imagemagick transparent background and white image outlines
Replies: 24
Views: 2644

Re: Imagemagick transparent background and white image outlines

Do you know what's happening? Please post a reproducible example: the input, the output with unwanted lines or whatever, and the command that made it. Source image: https://image.ibb.co/mR372c/bitmoji2003792811.png Commands: $ magick convert image.png -transparent white tmp.png $ magick convert tmp...