在 MATLAB 中绘制形状上下文对数极坐标箱 [英] Drawing shape context logpolar bins in MATLAB

查看:28
本文介绍了在 MATLAB 中绘制形状上下文对数极坐标箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用形状上下文直方图作为特征描述符来编码剪影图像.为了帮助调试,我想查看覆盖在轮廓图像上的形状上下文 logpolar 箱(从边缘图像中获取的样本点).

其中一个点的外观示例如下:

我知道如何显示圆圈(径向分格),但我在生成角度分格(线)时遇到了困难.

给定一组角度,我如何绘制类似于示例图像中所示的线段?

解决方案

这样做:

<上一页>>> 图>> 轴>> 坚持>> 半径 = 1;>> θ = 0:30:360;>> 对于角度 = thetaline([0 半径 * cosd(角度)], [0 半径 * sind(角度)]);结尾

产生这个:

I am using shape context histograms as a feature descriptor to encode silhouette images. To assist with debugging, I would like to view the shape context logpolar bins overlaid on a silhouette image (the sample points taken from the edge image).

An example of what it should look like for one of the points is as follows:

I know how to display the circles (radial bins), but I am having difficulty in producing the angular bins (lines).

Given a set of angles, how can I draw line segments similar to those shown in the example image?

解决方案

Doing this:

>> figure
>> axes
>> hold on
>> radius = 1;
>> theta = 0:30:360;
>> for angle = theta
line([0 radius * cosd(angle)], [0 radius * sind(angle)]);
end

produces this:

这篇关于在 MATLAB 中绘制形状上下文对数极坐标箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆