如何理解频图像描述的平均像素数? [英] How to understand the average pixel number described in the frequency image?

查看:209
本文介绍了如何理解频图像描述的平均像素数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现提出的<一个广泛使用的指纹图像增强算法href="https://www.google.com.tr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&sqi=2&ved=0CCAQFjAA&url=http%3A%2F%2Ftecbio2012.google$c$c.com%2Fsvn%2Ftrunk%2FFilipeRuiPedro%2Fartigos%2F15.Fingerprint%2520image%2520enhancement%2520Algorithm%2520and%2520performance%2520evaluation.pdf&ei=ECjLVMzOC8evU73-geAD&usg=AFQjCNFR4SsL74GcnyNeqy6YLfY276mrIQ&bvm=bv.84607526,d.d24"相对=nofollow>阿尼尔耆那教等。在实施第2.5节的步骤脊频图像计算,我在理解一些描述的困难。步骤被描述如下:

  1. 在获得标准化图像G。
  2. 在分割G成形尺寸WXW(16×16)的块。
  3. 对于中心在像素(i,j)条的每个块,计算尺寸长x宽(32x16),其在所述脊定义的坐标系统的定向窗口。
  4. 对于中心在像素(i,j)条的每个块,计算在x签名中,X [0]中,X <一href="https://www.google.com.tr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&sqi=2&ved=0CCAQFjAA&url=http%3A%2F%2Ftecbio2012.google$c$c.com%2Fsvn%2Ftrunk%2FFilipeRuiPedro%2Fartigos%2F15.Fingerprint%2520image%2520enhancement%2520Algorithm%2520and%2520performance%2520evaluation.pdf&ei=ECjLVMzOC8evU73-geAD&usg=AFQjCNFR4SsL74GcnyNeqy6YLfY276mrIQ&bvm=bv.84607526,d.d24"相对=nofollow> 1 时,......,X [1- 1],取向窗口内的脊和谷,其中

如果没有细节和奇异点出现在定向窗口中,x签名形成的离散正弦形波,其具有相同的频率,该脊和谷的诠释,他面向窗口。因此,脊和谷的频率可以从x签名来估计。设T(I,J)是连续的两个峰在x-签名之间的像素的平均数目,则频率计算为:

我的问题是,: 我不明白如何让连续两峰之间的像素平均数,因为该文件没有提及如何在算法中区分峰。那么,如何确定这些高峰像素数得过来?有人能解释我是什么我错过这里?

另外,我实现了台阶,到这里使用OpenCV的这个样子,我真的AP preciate,如果有人能够通过我的步骤来帮助我,我正确地实现双重检查:

 无效增强::频率(CV ::垫inputImage的简历::垫orientationMat)
{
    INT块大小= 16;
    INT windowSize = 32;

    //计算x签名
    的for(int i =块大小/ 2; I&LT; inputImage.rows  - 块大小/ 2; I + =块大小)
    {
        对于(INT J =块大小/ 2; J&LT; inputImage.cols  - 块大小/ 2; J + =块大小)
        {
            INT U = 0;
            INT V = 0;
            的std ::矢量&lt;浮动&GT; xSignature;

            对于(INT K = 0; K&LT; windowSize; k ++)
            {
                浮总和= 0.0;

                对于(INT D = 0; D&LT;块大小; d ++)
                {
                    浮像素= orientationMat.at&所述漂浮&GT;(I,J);

                    U = 1 +(D  -  0.5 *块大小)* COS(像素)+(K  -  0.5 * windowSize)*罪(像素);
                    V = J +(D  -  0.5 *块大小)*罪(像素)+(0.5  -  windowSize)* COS(像素);
                    总和+ =的static_cast&LT;浮动&GT;(inputImage.at&LT; UCHAR&GT;(U,V));
                }

                xSignature.push_back(总和);
            }
        J-循环} //结束
    I-循环} //结束

}
 

更新

在搜索一些文章后,我发现有人提到有关如何确定是否像这样的峰值像素:

  1. 在每个块上执行的灰度扩张
  2. 找到那里的扩张等于原始值

不过,我仍然不明白清楚。这是否意味着我可以利用我的灰度图像逐块形态膨胀运算(我已经将我的形象从RGB之前进一步处理中的OpenCV到灰阶)? 这个词扩张等于原始值办法形态膨胀后的像素强度等于其初始值?我在这里丢失。

解决方案

我不知道具体的算法,你在说什么,但也许我可以提供一些一般性的建议。

我想这个问题的核心是区别什么是一个高峰,什么是公正的噪音,在嘈杂的信号(因为RL输入图像总是吵闹在一定意义上,我认为峰值检测在相应的输入向量您的code是xSignature)。一旦你确定了峰值,计算平均峰值距离应该是相当简单。

至于峰值检测,有吨的论文描述了相当复杂的算法,但我将概述我用我的图像处理工作的一些尝试和真正的方法。

平滑

如果您知道预期峰宽的是W 的,可以作为第一步,应用一些平滑,获取由刚刚总结过的一个窗口对预期峰宽去除噪声对规模较小(从x轴的瓦特的/ 2到x + 瓦特的/ 2)。你实际上并不需要(通过的除法瓦特的)来计算滑动窗的平均值,由于峰值检测的绝对尺度是无关紧要的,总和成正比的平均值。

最小 - 最大识别

您可以运行在你的(潜在的平滑)轮廓矢量,并确定最小和最大的指数(例如,通过简单的斜率符号改变)。保存在这些位置的地图&LT; INT(坐标),布尔(isMax)&GT; 地图&LT; INT(坐标),坐标为双(价值)&GT; 。或使用包含所有相关信息的结构体的值(布尔isMax,双重价值,布尔isAtBoundary,...)

评估的检测到的峰值质量

有关你在previous步骤中找到的每个最大值,确定所述高度差和可能的斜率两者previous和以下最低,产生了质量。这一步取决于你的问题域。也许峰不需要通过双方的最小值框架(在这种情况下,你的最低探上面就必须比坡度变化更复杂)。也许有上峰最小或最大宽度的限制。等等。

计算基于每个最大位置上述问题一个质量值。我经常使用类似Q_max =(平均高度为最大差异邻国分钟)/(最大值 - 最小值轮廓)。然后,峰值候选者最多可以有一个质的1,并至少为0。

遍历所有的极大值,计算出它们的质量和把它们放入一个多重映射或其他容器中,可以进行排序,这样可以在以后迭代的峰值降质量。

区分来自非峰的峰

迭代的质量递减的峰值。可能理清所有不符合以更高的质量最小或最大宽/高/质量/距离最近的峰值/ ......他们的要求是在你的问题域峰。保持休息。完成。

在你的情况,你会再重新排序协调峰,并计算它们之间的平均距离。

我知道这是模糊的,但目前还没有普遍适用的答案峰值检测。也许在纸上您正在使用有特定的prescription隐藏在某处,但大多数作者省略了这样的纯粹技术性(与通常情况下,如果你通过电子邮件与他们联系,他们不记得或以其他方式复制他们是如何做到的,这使得它们的结果基本上是不可复制)。

I'm trying to implement the widely used fingerprint image enhancement algorithm proposed by Anil Jain et al. While implementing the steps for ridge frequency image calculation in Section 2.5, I have difficulties in understanding some description. The steps are described as follows:

  1. Obtain normalized image G.
  2. Divide G into blocks of size w x w (16 x 16).
  3. For each block centered at the pixel (i, j), compute an oriented window of size l x w (32x16) that is defined in the ridge coordinate system.
  4. For each block centered at pixel (i,j), compute the x-signature, X[0], X1, ..., X[l-1], of the ridges and valleys within the oriented window, where

If no minutiae and singular points appear in the oriented window, the x-signature forms a discrete sinusoidal-shape wave, which has the same frequency as that of the ridges and valleys int he oriented window. Therefore, the frequency of ridges and valleys can be estimated from the x-signature. Let T(i,j) be the average number of pixels between two consecutive peaks in the x-signature, then the frequency is computed as:

My question is: I don't understand how to get the average number of pixels between two consecutive peaks, since the paper didn't mention how to differentiate peaks within the algorithm. So, how to decide those peak pixels to count them? Could someone explain me what did I miss here?

Besides, I implemented the steps up-to-here using OpenCV like this, I would really appreciate if someone could go through my steps to help me double check that I am implementing correctly:

void Enhancement::frequency(cv::Mat inputImage, cv::Mat orientationMat)
{
    int blockSize = 16;
    int windowSize = 32;

    //compute x-signature
    for (int i = blockSize / 2; i < inputImage.rows - blockSize / 2; i += blockSize)
    {
        for (int j = blockSize / 2; j < inputImage.cols - blockSize / 2; j += blockSize)
        {
            int u = 0; 
            int v = 0;
            std::vector<float> xSignature;

            for (int k = 0; k < windowSize; k++)            
            {
                float sum = 0.0;

                for (int d = 0; d < blockSize; d++)
                {
                    float pixel = orientationMat.at<float>(i, j);

                    u = i + (d - 0.5 * blockSize) * cos(pixel) + (k - 0.5 * windowSize) * sin(pixel);
                    v = j + (d - 0.5 * blockSize) * sin(pixel) + (0.5 - windowSize) * cos(pixel);
                    sum += static_cast<float>(inputImage.at<uchar>(u, v));
                }

                xSignature.push_back(sum);
            }
        } // end of j-loop
    } // end of i-loop

}

Update

After searching some articles, I found someone mentioned about how to determine whether a peak pixel like this:

  1. Perform grayscale dilation on each block
  2. Find where the dilation equals original values

But still, I didn't understand it clearly. Does that mean I can employ block-wise morphological dilation operation on my grayscale image (I've already converted my image from RGB to Grayscale in OpenCV before further processing) ? Does the word dilation equals original values means the pixel intensity after morphological dilation equals its original value? I'm lost here.

解决方案

I do not know the specific algorithm you are talking about, but maybe I can offer some general advice.

I guess the core of the problem is the distinction "what is a peak, what is just noise" in a noisy signal (since RL input images are always noisy in some sense; I think the relevant input vector for peak detection in your code is xSignature). Once you have determined the peaks, calculating an average peak distance should be fairly straightforward.

As for peak detection, there are tons of papers describing quite sophisticated algorithms, but I'll outline some tried and true methods I'm using in my image processing job.

Smoothing

If you know the expected peak width w, you can as a first step apply some smoothing that gets rid of noise on a smaller scale by just summing over a window of about the expected peak width (from x-w/2 to x+w/2). You don't actually need to calculate the average value of the sliding window (divide by w), since for peak detection the absolute scale is irrelevant and the sum is proportional to the average value.

Min-Max-Identification

You can run over your (potentially smoothed) profile vector and identify minimum and maximum indices (e.g. by simple slope sign change). Store these positions in a map<int (coordinate), bool (isMax)> or map<int (coordinate), double (value at coordinate)>. Or use a struct as value that holds all the relevant info (bool isMax, double value, bool isAtBoundary, ...)

Evaluate quality of detected peaks

For each maximum you found in the previous step, determine the height difference and maybe the slope to both the previous and the following minimum, resulting in a quality. This step depends on your problem domain. Maybe "peaks" need not be framed by a minimum value on both sides (in that case, your minimum detection above would have to be more sophisticated than slope change). Maybe there are min or max width restrictions on peaks. And so on.

Calculate a quality value based on the above questions for each maximum position. I often use something like Q_max = (average height difference from max to neighboring mins) / (max-min of profile). A peak candidate can then at most have a "quality" of 1, and at least 0.

Iterate over all your maxima, calculate their qualities and put them into a multimap or some other container, that can be sorted so that you can later iterate over your peaks in descending quality.

Distinguish peaks from non-peaks

Iterate over your peaks in descending quality. Possibly sort out all that do not fulfill minimum or maximum width/height/quality/distance to nearest peak with higher quality/... requirements for them to be peaks in your problem domain. Keep the rest. Done.

In your case, you would then reorder the peaks by coordinate and calculate the average distance between them.

I know this is vague, but there are no universally true answers for peak detection. Maybe in the paper you are working with there is a specific prescription hidden somewhere, but most authors omit such "mere technicalities" (and typically, if you contact them via email they can't remember or otherwise reproduce how they did it, which renders their results basically irreproducible).

这篇关于如何理解频图像描述的平均像素数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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