Creation of edge detection based image in PHP

偶尔善良 提交于 2019-11-29 01:15:10

问题


I'm curious - is it possible to ahieve in PHP:

1) Send image file to server 2) Process image = detect edges and create simple strokes basing on the edges 3) Save file on server / send it to user's browser / whatever

Here is some "sample" file ;P (as You can see it wasn't made using any edge detection enabled program, but by hand - just as an example):

http://i51.tinypic.com/5vzo0x.jpg Thanks!


回答1:


If you can use ImageMagick, there is the --charcoal filter:

The charcoal effect is meant to simulate artist's charcoal sketch of the given image.

The "-charcoal" operator is in some respects similar to edge detection transforms used by Computer Vision. Basically it tries to convert the major borders and edges of object in the image into pencil and charcoal shades.

The one argument is supposed to represent the thickness of the edge lines.

The ImageMagick examples manual shows another way whose results look even better:

Artist Charcoal Sketch of Image



来源:https://stackoverflow.com/questions/4058224/creation-of-edge-detection-based-image-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!