필터 지우기
필터 지우기

Some small trouble with systems objects in Embedded MATLAB functions

조회 수: 2 (최근 30일)
David-Linus Hamann
David-Linus Hamann 2011년 7월 28일
I'm sorry I've been asking alot of questions on the forums it just helps me get more done faster then spending hours sorting through documentation. So I have the following code in an Embedded Matlab functions. In which it takes an images the number of objects in that image and then isolates the individual objects into new seperate images the variables it imports are boxes which are the dimensions of the bbox for each object. Count; the number of objects in the image and baseimage or the core image containing the objects. It outputs a array of images called just plained old images. I'm having some trouble with systems object vision.ShapeInserter and this is the following error I get when running it:
*Reported by vision.ShapeInserter: This System object (or its current configuration) does not support variable input sizes.
Function 'MATLAB Function2' (#41.573.593), line 27, column 17: "step(h, image, Cord)" Launch diagnostic report.*
and
*Code Directory : "C:\Users\Linus\Documents\MATLAB\slprj\_sfprj\Draft1\_self\sfun\src"
Machine (#17): "Draft1" Target : "sfun"*
The line of code it is reffering to is noted below:
function images = fcn(boxes,c,baseimage)
%#codegen
persistent h;
if isempty(h)
h = vision.ShapeInserter('Fill',true,'Opacity',1.0);
end;
count = c(:,1);
image = baseimage(:,:,1);
dim = size(baseimage);
x = dim(1,1);
* y = dim(1,2);
images = zeros(x,y,count);
Pts = zeros(4,(count - 1));
Cord = zeros(4,1);
for g = 1:count
l = 1;
image = baseimage(:,:,1);
for f = 1:count
if(g == f)
continue;
end
Pts(:,l) = (boxes(:,f));
l = l + 1;
end
for s = 1:(count - 1)
Cord = rot90(Pts(:,s));
image = step(h, image, Cord);(This I think its problem with Cord)
end
images(:,:,g) = image;
end
This error only occurs in Simulink and not with Matlab one thing to note is that this simulation is being run in struct with time as it data import export parameters any assistance would be greatly appreciated.
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2011년 7월 28일
See if you can set a breakpoint and examine if one of the inputs is changing size between time-steps?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by