Problem using blockproc for a very large image

I'm trying to outline each cell in a large image.
Here is the relevant piece of code:
function blockanalyze(cells, rings)
fun = @(block_struct) outline(block_struct.data);
size = block_struct.imageSize/9
largesegmentedcells = blockproc(cells, size ,fun);
function outline(cellblock)
I = rgb2gray(cellblock);
threshold = graythresh(I);
bw = im2bw(I,threshold);
[~, threshold] = edge(I, 'sobel');
fudgeFactor = .5;
BW = edge(I,'sobel', threshold * fudgeFactor);
se90 = strel('line', 3, 90);
se0 = strel('line', 3, 0);
BWdilate = imdilate(BW, [se90 se0]);
BWnobord = imclearborder(BWdilate, 4);
BWopen = bwareaopen(BWnobord,500); %this is the filter
BWclose = bwmorph(BWopen,'close');
BWfill = imfill(BWclose, 'holes');
BWoutline = bwperim(BWfill);
segmentedcells(BWoutline) = 255;
end
end
But Matlab returns this error.
The class "block_struct" is undefined. Perhaps Java is not running.
... and I know Java is running.

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by