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 ...
随机推荐
- Yii2 Restful api分页
- Java基础语法(一 )
一.关键字 关键字概述 被Java语言赋予特定含义的单词 关键字特点 组成关键字的字母全部小写 关键字注意事项 goto和const作为保留字存在,目前并不使用 关键字单词 用于定义数据类型的关键字 ...
- Hadoop常用命令总结
一.前述 分享一篇hadoop的常用命令的总结,将常用的Hadoop命令总结如下. 二.具体 1.启动hadoop所有进程start-all.sh等价于start-dfs.sh + start-yar ...
- 转:CTE(公共表表达式)——WITH子句
来自:<Microsoft SQL Server 2008技术内幕:T-SQL语言基础> 一.公共表表达式(CTE,Common Table Expression)是在SQL Server ...
- 深入剖析Kubernetes k8s
深入剖析Kubernetes k8s 毫无疑问,Kubernetes 已经成为容器领域当之无愧的事实标准.除了 Google.Microsoft 等技术巨擘们在容器领域里多年的博弈外,国内的 BAT. ...
- oracle函数,游标,视图使用总结
oracle函数或者叫存储过程,在实际的开发过程中对于复杂的业务需求是非常有用的,非常有效率的也是非常好玩儿的一个技术点. 平常在开发过程中对于CRUD功能较多.一般SQL即可应付,大不了就是长一点而 ...
- 新建git并将本地代码上传到分支
1 查看远程分支 $ git branch -a * br-2.1.2.2 master remotes/origin/HEAD -> origin/master remotes/origin/ ...
- AtCoder Beginner Contest 082 A - Round Up the Mean
题目链接:https://abc082.contest.atcoder.jp/tasks/abc082_a Time limit : 2sec / Memory limit : 256MB Score ...
- Logstash 安装和使用
下载地址 https://artifacts.elastic.co/downloads/logstash/logstash-5.6.8.zip 下载后解压,测试 #将键盘内容输出到控制台 logsta ...
- EDK II之USB主控制器(EHCI)驱动的实现框架
本文简要介绍一下UEFI中EHCI驱动的代码实现框架: 下图是HCDI: 上图是Host驱动程序向上层驱动提供的接口图: 1.大部分接口的最后动作都是去操作主控制器寄存器,ECHI的spec:< ...