2
$\begingroup$

I import a jpg image in my notebook. The result is like this:

enter image description here

I'm interested in the outline so I wrote this code: ColorNegate[ EdgeDetect[ColorNegate[AlphaChannel[RemoveBackground[test]]]]]

The result is:

enter image description here

The outline is 1 pixel. I want to make the outline thicker, for example 2 pixels. How can I do that?

$\endgroup$
4
$\begingroup$

I would use Dilation for this.

im = Import["https://i.stack.imgur.com/bp3Ci.jpg"];

edges = EdgeDetect[AlphaChannel[RemoveBackground[im]]];

thickerEdges = Dilation[edges, 5]

this shows the bicycle edges after Dilation is applied

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.