フィルターのクリア

coding for implementing gaussian filter in iris recognition system

2 ビュー (過去 30 日間)
Tharini
Tharini 2011 年 9 月 6 日
回答済み: Kavita NARGULLA 2017 年 8 月 30 日
Hi.. help me with the code mentioned above.

回答 (4 件)

David Young
David Young 2011 年 9 月 6 日
Provided you have the Image Processing Toolbox, code for Gaussian filtering of an image looks like this:
sigma = 2; % set sigma to the value you need
sz = 2*ceil(2.6 * sigma) + 1; % See note below
mask = fspecial('gauss', sz, sigma);
newImage = conv2(Image, mask, 'same');
The choice of the size of the mask (or kernel) array is a trade-off between truncation errors and computation time. The formula above is a reasonable compromise which also makes the mask size odd, so that the mask has a definite centre.
The 'same' option in conv2 makes newImage the same size as Image, which is convenient, but it assumes that Image is surrounded by zeros, so pixels near the boundary of newImage will be pulled towards zero.
If you are doing a lot of this, you may find that convolve2 (in the file exchange) saves time, as it is faster than conv2 for masks above a certain size. convolve2 also offers a 'reflect' option which produces output which often displays better than conv2(..., 'same') by making a symmetry assumption at the boundaries. filter2 should also be fast, but does not have the 'reflect' boundary option.
  3 件のコメント
David Young
David Young 2011 年 9 月 22 日
I've given a reply to the question you asked. Normalisation is a different matter, so perhaps you should ask a new question, but you will need to explain what you mean by normalisation.
Also, if this answer was useful, you could accept it, or if it was not, you should explain what is wrong.
Tharini
Tharini 2011 年 9 月 23 日
Iris normalisation means to extract iris patterns from the eye and to scale it to a predefined size. I need code for the above mentioned problem.

サインインしてコメントする。


haris zafar
haris zafar 2011 年 10 月 15 日
hey david!!!
why you have used ceil function???
sz = 2*ceil(2.6 * sigma) + 1;
explain this statement
regards
  1 件のコメント
David Young
David Young 2011 年 10 月 15 日
The size has to be a positive integer. It's convenient if it's an odd integer. I use ceil because rounding up makes the truncation error smaller rather than bigger - but it's not important.

サインインしてコメントする。


Suba thangaraj
Suba thangaraj 2016 年 3 月 16 日
can you give me enhancement code for mammogram

Kavita NARGULLA
Kavita NARGULLA 2017 年 8 月 30 日
I want Iris recognition code in matlab

カテゴリ

Help Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by