资源简介
网上只有水平或竖直情况的矩形haar-like feature,而这个代码是倾斜情况下,haar-like feature,虽然代码简单,但是要弄懂其中算法要花不少时间。为了节省同道中人的时间,我将这个代码共享。感谢Rainer Lienhart的论文。
代码片段和文件信息
%generate_RSAT.m
%2013.11.16
%by: zhou dongao
%Function:
%Caculate rotate 45 degrees summed area table
%This code is based on the article of Rainer Lienhart‘s algorithm
%See the pdf:
%http://www.multimedia-computing.de/mediawiki//images/5/52/MRL-TR-May02-revised-Dec02.pdf
%All of the parameters‘ names are cited from Rainer‘s article
%Attention: Please read the article first! It‘s very useful to understand
%this code
function [RSAT] = generate_RSAT( image )
%test
% clear all close allclc
% image = double(imread(‘n01-x.PNG‘));
% figure imshow(image) title(‘Input image‘);
%RSAT: rotate 45 degree summed area table which size equal to image‘s
%image: input image
image = double(image);
[HW] = size(image);%width(W) is columnheight(H) is row of the input image
%expand the image‘s size by comple makeup of 0
%a row and two column are increased which valued 0
RSAT_ex = double(zeros(H+2 W+2));%initialize expanded RSAT and named RSAT_ex
image_ex = [zeros(1W); image];
%image_ex = [zeros(H+12) image_ex];
for j = 3 : H+2 %from top to bottom
for i = 2 : W+1 %from left to right
RSAT_ex(j i) = RSAT_ex(j-1 i-1) + RSAT_ex(j-1 i+1)...
-RSAT_ex(j-2 i) + image_ex(j-2 i-1) + image_ex(j-1 i-1);%see algorthm of Rainer
end
end
% for j = 3 : H+1
% for i = 2 : W+1
% RSAT_ex(i j) = RSAT_ex(i-1 j-1) + RSAT_ex(i+1 j-1)...
% -RSAT_ex(i j-2) + image_ex(i j-1) + image_ex(i j);
% end
% end
RSAT = RSAT_ex(3:H+2 2:W+1);%excluding zeros to make it‘s size equal to image‘s
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-16 16:24 rotate_haar_like\
文件 1610 2013-11-16 16:20 rotate_haar_like\generate_RSAT.m
文件 928 2013-11-16 16:20 rotate_haar_like\RRecSum.m
文件 756 2013-11-16 16:17 rotate_haar_like\test.m
相关资源
- CAD图批量打印(可打印倾斜图框)程
- opencv_contrib xfeatures2d boostdesc
- ArcEngine要素编辑
- 添加大量倾斜摄影测量模型
- UIButtonUILabel文字旋转(倾斜)
- 基于co-training的手写数字识别Multiple
- Feature Selection with the Boruta Package
- 车牌倾斜校正
- osgb倾斜摄影数据
- 急倾斜煤层开切眼快速施工
- xfeatures2d编译时提示缺的包
- opencv_contrib xfeatures2d vgg_generated
- 倾斜摄影模型superMap中单体化过程
- DP-Modeler操作流程
- Learning Rich Features for Image Manipulation
- Cesium加载OSGB倾斜摄影数据Demo
- QMA7981数据手册及检测倾斜角度和震动
- 最小二乘法倾斜校正程序
- xfeatures2d.zip
- 倾斜摄影数据
- SW-520D 倾斜角度传感器控制led AODO
- 一种新的车牌定位与倾斜校正方法
-
haarcascades 各种分类器xm
l文件训练好 - 图像倾斜校正
- SVDFeature
评论
共有 条评论