How to divide an image into different shapes?

1 view (last 30 days)
Richa Sarmah
Richa Sarmah on 7 Nov 2019
Edited: KSSV on 8 Nov 2019
I have imported a jpg file to MATLAB using function imread and now i want to cut that image into different shapes defined by user. How can i do that in MATLAB?
  3 Comments
Richa Sarmah
Richa Sarmah on 8 Nov 2019
As shown in the above figure, I imported an image shape to matlab and then want to make cavity at that background. Here, the shape and dimensions of that cavity must be user defined.

Sign in to comment.

Answers (1)

KSSV
KSSV on 8 Nov 2019
Edited: KSSV on 8 Nov 2019
doc imcrop
doc impoly
doc imfreehand
YOu can also define your locations in the shape you want......use inpoly and pick only inside pixels.

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!