3
$\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$

1 Answer 1

5
$\begingroup$

I would use Dilation for this.

im = Import["https://i.sstatic.net/bp3Ci.jpg"]; edges = EdgeDetect[AlphaChannel[RemoveBackground[im]]]; thickerEdges = Dilation[edges, 5] 

this shows the bicycle edges after Dilation is applied

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.