5

I have an int array full of values (0-255) and I need to extract two indexes.

The indexes to be found will represent the Interesting Area I want to focus on.

The values of this area are always higher than the others but sometimes the difference is very low.

Like this example:

enter image description here

My interest area is this:

enter image description here

My current approach is to get the Max value and Average value. Then I will get:

  • the first index greater than "Max - (Max - Average)".
  • the last index greater than "Max - (Max - Average)".

But sometimes, like in this case my method gets the Junk part. (The fifth "column", on the right)

Anyone can suggest a better approach?

Note: The interest area has always 4 "columns" like the example image

4

2 回答 2

0

也许我假设太多了。但是您的数据使 4 座“山”周围看起来有很强的“边缘”。所以你应该看看那些边缘/脊线检测算法组的想法。

我最简单的答案是先尝试阈值。看看这是否有效。

如果没有,可能会应用一维版本的过滤器,例如Sobel 过滤器。它们应该突出显示数据中二阶导数较大的重要点。

于 2013-05-21T19:40:24.167 回答
0

您可以对直方图应用简单的脉冲响应滤波器(如 Boxcar)或任何其他平滑方法,以减少高频分量。之后,您可以计算局部最小值和最大值,并在有助于缩小 ROI 的带宽内精确定位各个峰值(每个峰值的最大-最小-最大-最小)。

这是我的一个简单的Boxcar过滤器实现。

于 2013-05-21T15:27:44.350 回答