Search found 58 matches

by coloring
2018-12-12T14:35:13-07:00
Forum: Users
Topic: Replace placeholder area with different image
Replies: 8
Views: 122

Re: Replace placeholder area with different image

Is there a faster solution? `compare` takes almost 30 seconds on medium-sized images (1024x768).

Also, I forgot to mention that there can be more than one red rectangle in the source image.
by coloring
2018-12-12T12:45:05-07:00
Forum: Users
Topic: Replace placeholder area with different image
Replies: 8
Views: 122

Re: Replace placeholder area with different image

Thanks snibgo and fmw42. This is exactly what I wanted to do. Is it possible to use the output of `compare` (60,0) inside `convert` within ImageMagick, or will I have to resort to a shell/batch file to extract and format the output of `compare` before inputting it into `convert`? I will be using the...
by coloring
2018-12-12T10:44:43-07:00
Forum: Users
Topic: Replace placeholder area with different image
Replies: 8
Views: 122

Replace placeholder area with different image

Given image X, how can I replace placeholder area Y with image Z using Imagemagick?

- The coordinates of Y within X are not known and can vary.
- X and Z are the same size.


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

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: 2090

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: 2090

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: 2090

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: 2090

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: 2090

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: 4891

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: 4891

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: 4891

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: 4891

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: 4891

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: 4891

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...