Create contour with PHP

旧巷老猫 提交于 2020-01-03 07:09:10

问题


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.


回答1:


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




回答2:


Found OpenCV for PHP I now need to install OpenCV module on server. testing... I hope it works.



来源:https://stackoverflow.com/questions/42945964/create-contour-with-php

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