1 Star 1 Fork 0

sean/voc-release4.01

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
croppos.m 552 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ross Girshick 提交于 2011-12-21 20:01 . initial check in of voc-release4.01
function [im, box] = croppos(im, box)
% [newim, newbox] = croppos(im, box)
% Crop positive example to speed up latent search.
% crop image around bounding box
%pad = 0.5*((box(3)-box(1)+1)+(box(4)-box(2)+1));
%padx = pad;
%pady = pad;
padx = 0.5*(box(3)-box(1)+1);
pady = 0.5*(box(4)-box(2)+1);
x1 = max(1, round(box(1) - padx));
y1 = max(1, round(box(2) - pady));
x2 = min(size(im, 2), round(box(3) + padx));
y2 = min(size(im, 1), round(box(4) + pady));
im = im(y1:y2, x1:x2, :);
box([1 3]) = box([1 3]) - x1 + 1;
box([2 4]) = box([2 4]) - y1 + 1;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/seanx02/voc-release4.01.git
git@gitee.com:seanx02/voc-release4.01.git
seanx02
voc-release4.01
voc-release4.01
master

搜索帮助