相关疑难解决方法(0)

MATLAB: how do I crop out a circle from an image

I need to crop a circle in MATLAB.

I need to perform iris segmentation, and I´ve identified the center point and the radius of the iris, and I need to cut it off from the image.

I have a vector ci that ci(1) is X-coordinate ci(2) is Y-coordinate and ci(3) is the radius of the circle.

matlab crop image-processing

8
推荐指数
1
解决办法
1万
查看次数

MATLAB/Octave:从图像中剪切出很多圆圈

我有一个矩阵(图像)和有关圈内有趣部分的信息(给出中心corrdinates和半径).我想为所有圆圈切割矩阵的各个部分,以便为每个圆圈做更多的计算.或者至少我想要一个包含所有圆圈的位掩码.

我使用Octave(但也可以使用MATLAB,但由于许可证的使用会很困难)并且具有以下脚本以及stackoverflow的一些提示.我有20个圆圈的信息,使用Octave在我的Core i5上大约需要0.7秒:

% image
dim_x = 1000;
dim_y = 1000;
A=rand(dim_x,dim_y);

% center positions and ...
c = [222 111; 878 112; 81 718; 89 112; 222 111; 878 112; 81 718; 89 112; 222 111; 878 112; 81 718; 89 112; 222 111; 878 112; 81 718; 89 112; 222 111; 878 112; 81 718; 89 112];
%...  radii of the circles
r = [10 33 55 2 22 10 33 55 2 22 10 33 55 2 …
Run Code Online (Sandbox Code Playgroud)

performance matlab geometry image-processing octave

5
推荐指数
1
解决办法
1261
查看次数

选择像素的4个邻居

如何选择像素的4个邻居matlab

谢谢.

matlab image neighbours pixels

-11
推荐指数
1
解决办法
1163
查看次数