Select shape from multiple closed borders in Image to obtain cell information/index from cell array B
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
rgbFrame = readFrame(VideoObject) ; % Read video frame in RGB
gFrame = rgb2gray(rgbFrame) ; % Convert frame to Grayscale
bwFrame = imbinarize(gFrame, 'adaptive' ) ; % Convert gFrame to bwFrame
bwFrame = bwareaopen( bwFrame , 100 ) ; % Remove noise from bwFrame
bwFrame = imfill(bwFrame, 'holes') ; % Fill holes
[B,L] = bwboundaries(bwFrame,'noholes') ; % Obtain shape boundaries
Using the code above, I obtain a cell array of B with the borders of several closed shapes in my video frame. I would like to display all of the shapes on an image, select with the cursor (Maybe "ButtonDownFcn"?) the intended shape, and create a new cell array called "Circle" with only the information from the intended shape.
0 comentarios
Respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!