フィルターのクリア

calling one function from another

2 ビュー (過去 30 日間)
divya
divya 2013 年 5 月 22 日
here is a program which calculates the image integral
function IntegralImages = GetIntergralImages(Picture)
% Make integral image from a Picture
% Convert the Picture to double
% double instead of im2double can also be used)
Picture=double(Picture);
% Make the integral image for fast region sum look up
IntegralImages.ii=cumsum(cumsum(Picture,1),2);
IntegralImages.ii=padarray(IntegralImages.ii,[1 1], 0, 'pre');
% Make integral image to calculate fast a local standard deviation of the % pixel data
IntegralImages.ii2=cumsum(cumsum(Picture.^2,1),2);
IntegralImages.ii2=padarray(IntegralImages.ii2,[1 1], 0, 'pre');
% Store other data
IntegralImages.width = size(Picture,2);
IntegralImages.height = size(Picture,1);
Mean4=OneScaleObjectDetection( IntegralImages,1, 1, 1,1)
i WANT TO CALL FUNCTION *OneScaleObjectDetection FROM THIS PROGRAM BUT ITS GIVES ME ERROR *
Undefined function 'GetSumRect' for input arguments of type 'struct'.
*_Error in OneScaleObjectDetection (line 6)
mean = GetSumRect(IntegralImages,x,y,w,h);
Error in GetIntergralImages (line 40)
Mean4=OneScaleObjectDetection( IntegralImages,1, 1, 1,1)_*
THE FUNCTION OneScaleObjectDetection IS AS FOLLOWS
function [x,y]=OneScaleObjectDetection( IntegralImages,x, y, w,h)
% Calculate the mean
InverseArea = 1 / (w*h);
mean = GetSumRect(IntegralImages.i1,x,y,w,h);
% Use the mean and squared integral image to calculate the grey-level
% Varianceiance, of every search window
Variance = GetSumRect(IntegralImages.i2,x,y,w,h)*InverseArea - (mean.^2);
% Convert the Varianceiation to Standard Deviation
Variance(Variance<1)=1; StandardDeviation =sqrt(Variance);
CAN ANYBODY HELP TO RESOLVE THE ERROR

採用された回答

John Petersen
John Petersen 2013 年 5 月 22 日
You're calling a function GetSumRect(...) that is not defined.
  2 件のコメント
divya
divya 2013 年 5 月 22 日
how to define this function...please explain in detail
Image Analyst
Image Analyst 2013 年 5 月 23 日
We don't why you're calling these functions, or if you ever got them somehow. We have no idea if a friend wrote them for you, or if you wrote them, or if you downloaded then, or where they reside if you even do have them. And if they do exist, are they on your search path. Why don't you search your entire hard drive for those function names, both in filenames and inside m-files?
I don't even know if the misspelling of GetIntergralImages is intentional or not.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by