MATLAB Answers

Isolating Scissors in a binary image

1 view (last 30 days)
Adam Kelly
Adam Kelly on 25 Aug 2020
Answered: Abhishek Gupta on 27 Aug 2020
Hey so I am stuck on this problem and would love any advice on how to start to solve it.
I have this binary image and I want to isolate the scissors from the rest of the objects in the image. My problem is I am not sure how to start.
Any help would be great!


Sign in to comment.

Answers (1)

Abhishek Gupta
Abhishek Gupta on 27 Aug 2020
Hi Adam,
This is similar to extracting a class of objects from a binary image using properties.
Find the code below for detecting the scissors using area property: -
Img = imread('data.png'); % read original image
complementImg = imcomplement(Img); % complement image
grayImg = rgb2gray(complementImg); % convert to grayscale
binImg = imbinarize(grayImg); % binarize
% Extract scissors using area property
outImg = bwpropfilt(binImg, 'area', [1200 1500]);
% display original & output image
Output: -


Sign in to comment.




Community Treasure Hunt

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

Start Hunting!