在PHP中创建基于边缘检测的图像 [英] Creation of edge detection based image in PHP

查看:159
本文介绍了在PHP中创建基于边缘检测的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇 - 是否可以在PHP中使用:

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

1)将图像文件发送到服务器
2)处理图像=检测边缘和基于边创建简单的笔划
3)在服务器上保存文件/将其发送到用户的浏览器/无论

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

这是一些样本文件; P(你可以看到它不是使用任何边缘检测启用的程序,而是手动 - 只是作为一个例子):

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
谢谢!

推荐答案

如果您可以使用 ImageMagick ,那么 - charcoal 过滤器

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.

-charcoal运算符在某些方面类似于edge de计算机视觉使用的tection变换。基本上它会尝试将图像中对象的主要边框和边缘转换为铅笔和木炭色调。

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示例手册显示了其结果看起来更好的另一种方式:

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

艺术家木炭素描图像

这篇关于在PHP中创建基于边缘检测的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆