Extract masked colour from image and save with transparent background #128
-
|
I'm trying to detect the edges of a shape within an image and then extract an outline of only the detected edges into a new image with a transparent background. ExampleHere's an example input image to demonstrate the outcome I am trying to acheive, it's a jigsaw piece. First I detect the edges of the jigsaw piece using the Then I want to extract only the outline as a new image with a transparent background. I am able to do this manually using the Preview app in macOS by selecting the green outline with the "instant alpha" tool and copying it into a new image. Unfortunately I have so far been unable to do this last step using either the The purpose of wanting to have the image outlines with a transparent background is to allow them to overlayed for comparison. The actual use case is product comparison, rather than for jigsaw pieces! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
@slashdotdash, not too difficult in The basic idea is to:
There is also a Anyway, I'll work up an example in the next few hours using your test piece. |
Beta Was this translation helpful? Give feedback.
-
|
I've put together a Livebook with an example of what I think you're trying to do. I need to do a a lot more tutorials like this so let me know if (a) it does what you expect and (b) if you have any improvements you would suggest. |
Beta Was this translation helpful? Give feedback.
-
|
Cool, glad you found it helpful. I learn a lot doing these too :-) |
Beta Was this translation helpful? Give feedback.



I've put together a Livebook with an example of what I think you're trying to do. I need to do a a lot more tutorials like this so let me know if (a) it does what you expect and (b) if you have any improvements you would suggest.