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/stepNot enough input arguments; expected 3 (in additionto 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.
Best Answer