Finding Centroids using text inserter?
Show older comments
Hello everyone, I wanted to ask a question about the vision.TextInserter. The following is some basic codes:
blob = vision.BlobAnalysis('CentroidOutputPort', true, 'AreaOutputPort',...
false,'BoundingBoxOutputPort', false,'MinimumBlobAreaSource', 'Property',...
'MinimumBlobArea', 20000);
textinCentroid = vision.TextInserter('Text', 'X:%4d, Y:%4d', ...
'LocationSource', 'Input port', ...
'Color', [1 0 0], ...
'FontSize', 14);
while ~isDone(videoReader)
frame = step(videoReader);
I = finalimage; %Final result of image after process
centroid = step(blob, I);
result = step(textinCentroid, frame, centroid)
step(videoPlayer, result);
end
So the problem is that I got the following problem:
Error using vision.TextInserter/step
Not enough input arguments; expected 3 (in addition
to the object handle), got 2.
Error in ComputerVision2 (line 64)
result = step(textinCentroid, frame,
centroids);
So can anyone tell me what exactly am I missing here? What do I have to add to make it in such a way that my object detected have a centroid on it? Thank you.
Accepted Answer
More Answers (0)
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!