Using a user defined fucntion with blockproc

조회 수: 2(최근 30일)
Jason 2015년 1월 15일
댓글: Jason 2015년 1월 15일
Is there a mistake in my syntax using blocproc:
Binary1=blockproc(OrigImage,[tileRowSize, tileColSize],@(x) myOperation(hObject, eventdata, handles,;
the function I use "myOperation" is as follows:
function myOperation(hObject, eventdata, handles,tile)
[thresh1, thresh2] = Threshold(hObject, eventdata, handles,tile); %my personal thresholding function
%Create Binary Image
Im getting
Binary1 =


Image Analyst
Image Analyst 2015년 1월 15일
I don't have time to look at it now, but in the meantime, see my blockproc demos, attached.

Iain 2015년 1월 15일
What does your "myfunction" function output? It looks like it's not producing any output.
  댓글 수: 4
Jason 2015년 1월 15일
Yes that makes sense.
Is it possible to return also the mean intensity of each sub image using blockproc, I thought I could just add an extra output variable from my function such as:
function [BI, mn] = myOperation(hObject, eventdata, handles,tile)
%then the rest of the code.
and then obtain a matrix of mean values via:
[Binary1, mn]=blockproc(OrigImage,[tileRowSize, tileColSize],@(x) myOperation(hObject, eventdata, handles,;
But it complains about too many output arguments for Blockproc.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by