问题
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