Attributeerror: ‘module ‘obiect has no attribute ‘find blobs“解决方法

项目场景:

使用OpenMv IDE时遇到的一个问题



问题描述:

Attributeerror: 'module 'obiect has no attribute 'find blobs"





原因分析:

属性错误:模块“obiect”没有找到属性“find blobs”


解决方案:

这里是我当时写的代码

for blobs in image.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=False):

猜测原因是因为python版本升级,函数名称已有改变!所以只需要将image.find_blobs改为img.find_blobs即可!如下:

for blobs in img.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=False):

解决方法参考一位大佬的文章成功解决AttributeError: module ‘string’ has no attribute ‘find’

出现K210 AttributeError: 'Image' object has no attribute 'find_blobs'的问题可能是由于Python版本升级导致函数名称发生了变化。解决这个问题的方法是将原来的image.find_blobs改为img.find_blobs。具体操作如下所示: ```python for blobs in img.find_blobs(thresholds, pixels_threshold=200, area_threshold=200, merge=False): # 在此处处理blobs ``` 通过将image替换为img,即可解决该错误。这是因为在K210中,使用img来代表Image对象。这样可以确保代码能够正确调用find_blobs函数。引用提到了这个问题的解决方法,可以参考其中的示例代码进行修改。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Maix Bit 系列心得(3)--- 倒着的图像](https://blog.youkuaiyun.com/qq_43328313/article/details/112606610)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Attributeerror:moduleobiect has no attributefind blobs解决方法](https://blog.youkuaiyun.com/Mr__Jiangxiaobai/article/details/116137672)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [K210(1)解决一些新上手出现的问题](https://blog.youkuaiyun.com/qq_41668705/article/details/124688308)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

忱铭

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值