Hello. Vision.ForegroundDetector is so amazing!
Could you let me know how to get several images inbox as a matrix?
I want to save these images as matrix.
I want to use several images like this. How can I crop this like image?
I am using this code.
videoSource = VideoReader('shahar_run.avi');detector = vision.ForegroundDetector(... 'NumTrainingFrames', 5, ... 'InitialVariance', 30*30);blob = vision.BlobAnalysis(... 'CentroidOutputPort', false, 'AreaOutputPort', false, ... 'BoundingBoxOutputPort', true, ... 'MinimumBlobAreaSource', 'Property', 'MinimumBlobArea', 250);shapeInserter = vision.ShapeInserter('BorderColor','White');videoPlayer = vision.VideoPlayer();while hasFrame(videoSource) frame = readFrame(videoSource); fgMask = detector(frame); bbox = blob(fgMask); out = shapeInserter(fgMask,bbox); videoPlayer(out); pause(0.1);end
Best Answer