フィルターのクリア

is paddedsize the matlab command?

8 ビュー (過去 30 日間)
Halil arifoglu
Halil arifoglu 2012 年 7 月 20 日
編集済み: Walter Roberson 2016 年 11 月 16 日
Dear Sir, is "paddedsize" a matlab command. If The answer is okey, What is the command used for?
  1 件のコメント
Halil arifoglu
Halil arifoglu 2013 年 9 月 21 日
Dear Sajid Khan, I have not send the question to you about the answer.
sincerely Prof.Dr.Uğıur Arifoglu

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

採用された回答

Sajid Khan
Sajid Khan 2013 年 9 月 21 日
編集済み: Walter Roberson 2016 年 11 月 16 日
isn't a matlab command, it's a function which was propsed by gonzalez in his book "Image Processing using Matlab", the source code of it is given below
function PQ = paddedsize(AB, CD, PARAM)
%PADDEDSIZE Computes padded sizes useful for FFT-based filtering.
% PQ = PADDEDSIZE(AB), where AB is a two-element size vector, computes the
% two-element size vecter PQ = 2*AB.
%
% PQ = PADDEDSIZE(AB, 'PWR2') computes the vector PQ such that PQ(1) =
% PQ(2) = 2^nextpow2(2*m), where m is MAX(AB).
%
% PQ = PADDEDSIZE(AB, CD), where AB and CD are two-element size vectors,
% computes the two-element size vector PQ. The elements of PQ are the
% smallest even integers greater than or equal to AB + CD -1.
%
% PQ = PADDEDSIZE(AB, CD, 'PWR2') computes the vector PQ such that PQ(1) =
% PQ(2) = 2^nextpow2(2*m), where m is MAX([AB CD]).
%
% Function rewritten from Gonzalez, Woods, Eddins; Digital Image Processing using Matlab
% Prentice Hall, 2004
if nargin ==1
PQ = 2*AB;
elseif nargin == 2 & ~ischar(CD)
PQ = AB +CD -1;
PQ = 2*ceil(PQ/2);
elseif nargin ==2
m= max(AB); %Maximum dimension
%Find power-of-2 at least twice m.
P = 2^nextpow2(2*m);
PQ = [P, P];
elseif nargin == 3
m=max([AB CD]); % Maximum dimension.
P = 2^nextpow2(2*m);
PQ = [P, P];
else
error('Wrong number of inputs')
end

その他の回答 (2 件)

Jan
Jan 2012 年 7 月 20 日
編集済み: Jan 2012 年 7 月 20 日
You can simply try it:
help paddedsize
doc paddedsize
which paddedsize -all % [EDITED, thanks Daniel]
If Matlab tells, that the command cannot be found, it is not available.
If the function is published in the FileExchange, searching there would help. Otherwise asking your favorite search engine for "Matlab paddedsize" is promissing.
  3 件のコメント
Greg Heath
Greg Heath 2012 年 7 月 20 日
Jan
Jan 2012 年 7 月 20 日
lookfor searchs the H1-lines. While Matlab's built-in commands repeate the name of a function in the H1-line, I do not think that this is really useful. docsearch has much more power. And especially the submissions in the FEX support H1-lines partially only.

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


Walter Roberson
Walter Roberson 2012 年 7 月 20 日
No, paddedsize() is not a MATLAB command. It could be the name of a third-party routine.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by