how to detect shape in a image with php?

只愿长相守 提交于 2019-12-04 09:53:02

For this particular image would suggest to perform a low amount of lowpass filtering (Gaussian blur) to attenuate those lines. That should work because thin lines have high frequencies at their transistions. And then you can try increasing the contrast and the brightness.

I just did a quick test and the result is something like that

Then just calculate the cross-correlation of your resulting image with images of different stars.

If the star itself isn't scaled or rotated, then you should be able to detect it from the 2D convolution of a clean star image with your source image.

If you are trying to find stars with different scales and rotations, it would probably be better to clean up the image with an erosion filter, then use edge detection and a Hough transform to find the edges.

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