simulink use imcrop problem

8 views (last 30 days)
KAI XUN CAI
KAI XUN CAI on 1 Mar 2018
Answered: KAI XUN CAI on 1 Mar 2018
if true
function y = fcn(area,bbox,img_1,img_2,img_3)
img = uint8(zeros(1932,2576,3)); %%%原圖
BW_2 = uint8(zeros(510,474,3));
img(:,:,1) = img_1;
img(:,:,2) = img_2;
img(:,:,3) = img_3;
c = cat(2,area,bbox); [~,ind] = max(c(:,1)); d = c(ind,2:5); BW_2 = imcrop(img,d); y = BW_2; end i use the imcrop on simulink but the output show the error how the set the output size by the way i upload my simulink image

Answers (1)

KAI XUN CAI
KAI XUN CAI on 1 Mar 2018
and i use the S = regionprops(bw3,'BoundingBox','Area'); a = [S.Area]; b = [S.BoundingBox]; the matrix is 5*5 why on the simulink change 50*5

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!