Mathematica Asked by Wagm on May 28, 2021
I would like to obtain contours(outline) of the image (black and white thin curve version of the original image). Outline that would just look nice.
I first try using EdgeDetect
however result just doesn’t look very good. The shape of the head and torso looks good, however lips and nose looks quite unnatural.
image = Import[
"https://i.imgur.com/fFmetq6_d.webp?maxwidth=760&fidelity=grand"];
Thinning[EdgeDetect[image]]
I then thought that maybe I should try to detect contour instead first. However ContourDetect
seems to loose a lot of detail even with different delta values.
EdgeDetect[ContourDetect[image, 0.5]]
Do you have any idea how could I obtain pretty looking outline of the image?
Edgedetect gives a binary image. Faces really aren't binary. Perhaps GradientFilter is worth a look:
Manipulate[GradientFilter[image, {s, t}] // ImageAdjust,
{s, {1, 2, 3}}, {t, 0, 5}]
Here I used the Manipulate to find "good" values of the parameters of the gradient.
Answered by bill s on May 28, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP