简体   繁体   English

如何找到图像中某一点所有方向的最大开口?

[英]How to find the maximum of opening in all orientations at a point in an image?

I need a bit of help. 我需要一点帮助。 I am trying to segment out sort of zig-zag patterns in an image. 我正在尝试将图像中的锯齿形图案进行细分。 I've an algorithm for this. 我有一个算法。 For that I'm opening the image with a line structuring element. 为此,我使用线结构元素打开图像。 I want to perform repeated opening of the image using the line strel at various angles and find maximum of them at each pixel. 我想使用各种角度的线条来重复打开图像,并在每个像素处找到它们的最大值。

Following is a code snippet: 以下是代码段:

    while(i<360)
         se=strel('line',17,i);
         i=i+15;
         img=imopen(img,se);
    end;

Any help with the implementation will be appreciated. 实施方面的任何帮助将不胜感激。

From what I understand, you want to get maximum for each pixel from a stack of "opened" images? 据我了解,您想从一堆“打开的”图像中获得每个像素的最大值?

% I assume the img is a 2D image (e.g. gray-scale one)
stack = [];

while(i<360)
         se=strel('line',17,i);
         i=i+15;
         stack(:,:, end+1) =imopen(img,se);
end;

The opened images will stack up in the stack matrix. 打开的图像将堆叠在堆叠矩阵中。 Then to find maximum at each pixel, you can just search for maximum in 3th dimension: 然后,要在每个像素处找到最大值,您可以在第三维中搜索最大值:

max_pixels = max(stack, 3);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在不清晰的点云中找到强未封闭边缘的边缘方向 - Find edge orientations of strongly unclosed edges in unsharp point clouds 在Matlab矩阵中从各个方向的中心找出最大强度点 - Find maximum intensity point from center in all directions in matlab matrix 如何在Matlab中找到数据点周围的最大梯度? - How can I find the maximum gradient around a data point in Matlab? 我在图像中设置了一个点,如何通过Matlab找到围绕所有点的外部不规则形状 - I have a point set in image,how to find the External irregular shape circling all the points by Matlab 如何找到此 OCT 图像中特定点的高度? - How to find height of the specific point in this OCT image? 旋转后如何在图像上找到一个点? - How to find a point on image after rotation? 在二维图像(二进制)中找到x轴上像素值为1的最大坐标点(二进制)(Matlab) - Find Maximum Coordinate Point where Pixel value is 1 on x-axis, in 2-D image (Binary) (Matlab) 如何从点集中找到大于最大值的值? (Matlab求三次样条插值的函数) - How to find a value which is bigger than the maximum point from point set? (Function to find Cubic Spline Interpolation by Matlab) 从图/图中找到最大点 - to find maximum point from the graph/plot 提取图像的轮廓位置和方向 - Extraction of contour positions and orientations of an image
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM