使用Python Pil检测图像中的对象 [英] Detecting Object in an image with Python Pil

查看:76
本文介绍了使用Python Pil检测图像中的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过使用简单的 python pil 代码检测图像中的对象.

I want to Detect objects in an image by using simple python pil codes.

例如,打开一张图像,告诉我图像中有多少个对象,但不太专业.

For example Open an image and tell me how many objects are in the image but not too professional.

有人可以帮忙吗?

推荐答案

我认为PIL/Pillow不是正确的工具.我已经通过使用opencv(安装pyopencv并导入cv2)在图像上成功实现了对象检测.安装不是很简单,但是一旦能够导入cv2,则只需调用

I don't think PIL/Pillow is the correct tool for this. I have successfully implemented object detection on images by using opencv (installing pyopencv and importing cv2). The install was not so straight forward, but once you are able to import cv2 then it is just a matter of calling cv2.matchTemplate with the correct parameters. Hope it helps.

这篇关于使用Python Pil检测图像中的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆