图像中框物体selectivesearch库的使用
来源:互联网 发布:mac照片u盘导入win7 编辑:程序博客网 时间:2024/06/03 15:42
一、Git地址:
https://github.com/AlpacaDB/selectivesearch
二、使用selectivesearch:
进入到example文件中运行脚本 example.py
# -*- coding: utf-8 -*-from __future__ import ( division, print_function,)import tensorflow as tfimport skimage.dataimport matplotlib.pyplot as pltimport matplotlib.patches as mpatchesimport selectivesearchimport numpy as npimport cv2def main(): #imgCV2 = cv2.imread("mayun.jpg") # loading astronaut image img = skimage.data.astronaut() print("shape2 = "+str(img.shape[2])) # perform selective search img_lbl, regions = selectivesearch.selective_search( img, scale=200, sigma=0.9, min_size=10) candidates = set() for r in regions: # excluding same rectangle (with different segments) if r['rect'] in candidates: continue # excluding regions smaller than 2000 pixels if r['size'] < 2000: continue # distorted rects x, y, w, h = r['rect'] if w / h > 1.2 or h / w > 1.2: continue candidates.add(r['rect']) # draw rectangles on the original image fig, ax = plt.subplots(ncols=1, nrows=1, figsize=(6, 6)) ax.imshow(img) for x, y, w, h in candidates: print(x, y, w, h) rect = mpatches.Rectangle( (x, y), w, h, fill=False, edgecolor='red', linewidth=1) ax.add_patch(rect) plt.show()if __name__ == "__main__": main()
阅读全文
0 0
- 图像中框物体selectivesearch库的使用
- 利用图像中物体轮廓做简单的图像匹配
- 学习opencv,使用反向块投影搜索图像中物体的位置cvCalcBackProjectPatch
- 使用YOCOv2 处理bounding ,以跟踪图像中某些类物体的移动
- 使用selectivesearch工具进行目标检测
- 使用selectivesearch工具进行目标检测
- OpenCV在图像中寻找轮廓和计算图像中物体的凸包
- RCNN用到的SelectiveSearch的理解笔记
- 图像物体分类和物体检测算法的概括
- 学习opencv 使用反向块投影搜寻图像中的物体的位置 cvCalcBackProjectPatch
- 学习opencv 使用反向块投影搜寻图像中的物体的位置 cvCalcBackProjectPatch()
- 学习opencv 使用反向块投影搜寻图像中的物体的位置 cvCalcBackProjectPatch
- Unity3d中使用鼠标控制物体的平移旋转缩放
- OSG中添加多个物体, OSG::Group的使用
- unity3D中使用鼠标控制物体移动的方法
- 对图像横向和纵向像素均值求一阶导数,进行图像中物体的边缘检测
- maya中使用python改变选中物体线框颜色
- opencv中利用图像相减识别物体运动
- Linux USB gadget设备驱动解析(2)---驱动调试
- 翻译 PyMongo 文档
- 梳理
- python3 爬取糗事百科
- android studio 3.0版本升级问题
- 图像中框物体selectivesearch库的使用
- PHP Trait特性
- Docker可持续集成研究
- 关于PDF转Word转出来是图片及乱码多的解决方法分享
- 简单易用的轮播图控件Banner
- 分布式事务
- 微信 macOS 客户端撤回拦截与多开
- 133. Clone Graph
- 对比Oracle中truncate和delete的区别及性能