vic
Posted on June 15, 2021
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. There are many ways to directly contrast the adjacent brightness.
Instructions:
Install
composer require lizhichao/one-img
Example
$img_path = '1.jpg';
$img = new \OneImg\Border();
$img->setImg($img_path)
->scale(300, 300)
->outline()
->save(); //Output to browser
effect
Code warehouse
https://github.com/lizhichao/doImg
My other warehouse welcome star
💖 💪 🙅 🚩
vic
Posted on June 15, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.