php - 在 PHP 中创建基于边缘检测的图像

标签 php imagemagick edge-detection

我很好奇 - 是否有可能在 PHP 中实现:

1) 发送图像文件到服务器 2)处理图像=检测边缘并根据边缘创建简单的笔画 3)在服务器上保存文件/将其发送到用户的浏览器/任何

这是一些“示例”文件;P(如您所见,它不是使用任何启用边缘检测的程序制作的,而是手工制作的 - 仅作为示例):

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

最佳答案

如果可以使用ImageMagick , 有 --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.

ImageMagick 示例手册展示了另一种方法,其结果看起来更好:

Artist Charcoal Sketch of Image

alt text alt text

关于php - 在 PHP 中创建基于边缘检测的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4058224/

相关文章:

php - 为什么这个函数只返回 5 个数组中的一个(第一个)值?

c# - 如何纠正扫描错误,如旋转?

python - 如何使用 OpenCV houghlines 计算屏幕截图中的选项卡数量?

php - 无需 WURFL 的移动检测

PHP mail() 函数已停止工作

php - 从 PHP 脚本调用 "php"命令导致奇怪的进程行为

image-processing - Graphicsmagick如何删除透明区域并缩小32位图像的 Canvas 大小

imagemagick - 如何使用 ImageMagick 批量添加 Alpha channel ?

c++ - 内核大小 > 7 的 Canny 边缘检测器