Tutorial: Generate BBox or Rectangle to locate the target obejct
Tutorial: Generate BBox or Rectangle to locate the target obejct
clc;close all;clear all;
Img=imread('/home/wangxiao/Documents/files/Visual_Tracking/MDNet-CVPR2016/MDNet-master/attentionMap/Basketball/0001.png');
if ndims(Img)==
I=rgb2gray(Img);
else
I=Img;
end
I=im2bw(I,graythresh(I));
[m,n]=size(I);
imshow(I);title('binary image');
txt=get(gca,'Title');
set(txt,'fontsize',);
L=bwlabel(I);
stats=regionprops(L,'all');
set(gcf,'color','w');
set(gca,'units','pixels','Visible','off');
q=get(gca,'position');
q()=;%设置左边距离值为零
q()=;%设置右边距离值为零
set(gca,'position',q);
for i=:length(stats)
hold on;
rectangle('position',stats(i).BoundingBox,'edgecolor','y','linewidth',);
temp = stats(i).Centroid;
plot(temp(),temp(),'r.');
drawnow;
end
frame=getframe(gcf,[,,n,m]);
im=frame2im(frame);
imwrite(im,'a.jpg','jpg');%可以修改保存的格式

Reference:
1. http://blog.sina.com.cn/s/blog_4d633dc70100o0r0.html
Tutorial: Generate BBox or Rectangle to locate the target obejct的更多相关文章
- [Network Architecture]Mask R-CNN论文解析(转)
前言 最近有一个idea需要去验证,比较忙,看完Mask R-CNN论文了,最近会去研究Mask R-CNN的代码,论文解析转载网上的两篇博客 技术挖掘者 remanented 文章1 论文题目:Ma ...
- selenium docs
Note to the Reader - Docs Being Revised for Selenium 2.0! Introduction Test Automation for Web Appli ...
- BumpMapping [转]
http://fabiensanglard.net/bumpMapping/index.php Fabien Sanglard's Website Home About FAQ Email Rss T ...
- Chapter 6 — Improving ASP.NET Performance
https://msdn.microsoft.com/en-us/library/ff647787.aspx Retired Content This content is outdated and ...
- Beautifulsoup 和selenium 的查询
Selenium There are vaious strategies to locate elements in a page. You can use the most appropriate ...
- widerface---VOC
import os, h5py, cv2, sys, shutil import numpy as np from xml.dom.minidom import Document rootdir = ...
- face detection[Multi-view face detection&& MTCNN]
因为这两篇论文感觉内容较短,故而合并到一个博文中. Multi-view face detection 本文来自<Multi-view Face Detection Using Deep Con ...
- 『计算机视觉』Mask-RCNN_从服装关键点检测看KeyPoints分支
下图Github地址:Mask_RCNN Mask_RCNN_KeyPoints『计算机视觉』Mask-RCNN_论文学习『计算机视觉』Mask-RCNN_项目文档翻译『计算机视觉』Mas ...
- 『计算机视觉』Mask-RCNN_训练网络其二:train网络结构&损失函数
Github地址:Mask_RCNN 『计算机视觉』Mask-RCNN_论文学习 『计算机视觉』Mask-RCNN_项目文档翻译 『计算机视觉』Mask-RCNN_推断网络其一:总览 『计算机视觉』M ...
随机推荐
- Yii ActiveRecord生命周期
- Born Slippy (超大背包问题 + 树形DP)
首先是需要我们知道的是假设又一条链给你让你求最大值,你会求吗?当然会,就是时间有点爆炸O(n2).那不行,要是如果我把到达每个点的最大值以及他对后面的贡献情况都求出来后放在数组里面,然后到了新的节点直 ...
- codeforces 768c Jon Snow And His Favourite Number
题意: 给出一个数列,和一种操作,以及两个数x和k. 这个操作有两个步骤: 首先把这个数列按照升序排序,然后把所有奇数位上的数字与x异或. 问执行k次操作之后,这个数列的最大值和最小值是多少. 思路: ...
- 如何用新安装的jdk替换掉Linux系统默认jdk
版主写的非常棒: http://blog.csdn.net/u011364306/article/details/48375653
- edis配置文件-转
# redis 配置文件示例 # 当你需要为某个配置项指定内存大小的时候,必须要带上单位, # 通常的格式就是 1k 5gb 4m 等酱紫: # # 1k => 1000 bytes # 1kb ...
- JAVA基础3---运算符大全
Java中的运算符有以下种类:算术运算符.关系运算符.位运算符.逻辑运算符.赋值运算符.其他的运算符 现在假设定义 int A = 10,B = 5: 一.算术运算符 运算符 描述 案例 + 等同于数 ...
- python自定义方法处理日志文件
从命令行界面拷贝的内容包含过个">>>",函数的作用是用正则把每两个">>>"之间的字符取出来,然后把包含“Tracebac ...
- Linux服务器---邮件服务postfix安装
安装postfix postfix是一个快速.易于管理.安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器. 1.安装postfix [root@localhost ~]# rpm ...
- golang学习笔记14 golang substring 截取字符串
golang学习笔记14 golang substring 截取字符串golang 没有java那样的substring函数,但支持直接根据 index 截取字符串mystr := "hel ...
- 使用nosql实现页面静态化的一个小案列
页面静态化,其实就是将动态生成的php页面,变成静态的HTML页面,让用户直接访问.有一下几方面好处: 1,首先就是访问速度,不需要去访问数据库,或者缓存来获取哪些数据,浏览器直接加载渲染html页即 ...