A simple image edge detection method
General steps:
- Zoom pictures to improve efficiency
- Picture grayscale
- Calculate edges based on brightness
The third step is the most critical. Many methods are used here to directly contrast the adjacent brightness.
Instructions:
installation
composer require lizhichao/one-img
use
$img_path = '1.jpg';
$img = new \OneImg\Border();
$img->setImg($img_path)
->scale(300, 300)
->outline()
->save(); //输出到浏览器
effect
Code warehouse
https://github.com/lizhichao/doImg
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。