用PHP创建轮廓 [英] Create contour with PHP

查看:81
本文介绍了用PHP创建轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在一个需要从位图图像创建外部轮廓的项目中。例如。请检查下面的图像。有没有可以用来完成此任务的PHP库?我发现了开源库


位图具有轮廓




感谢任何线索。

解决方案

您可以使用imagemagick做到。尽管有ImageMagick的PHP API,但我认为异步生成/执行convert命令并从FS读取输出图像更加容易和安全得多



正在工作的在线演示



我从此讨论


I am working on a project that requires creating an outer contour from a bitmap image. eg. please check the images below. Is there any php library that I can use to achieve this task? I have found open source library http://docs.opencv.org/trunk/d4/d73/tutorial_py_contours_begin.html but this is not on php

bitmap image only

bitmap with contour

Thanks for any clues.

解决方案

You can do it with imagemagick. Although there's a PHP API for ImageMagick, I think it's much easier and safer to just spawn/execute asynchronously the convert command and read the output images from FS

Working online demo

I took that from this discussion

这篇关于用PHP创建轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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