How to divide an image into different shapes?

2 vues (au cours des 30 derniers jours)
Richa Sarmah
Richa Sarmah le 7 Nov 2019
Modifié(e) : KSSV le 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 commentaires
Richa Sarmah
Richa Sarmah le 8 Nov 2019
Untitled with cutout.png
Richa Sarmah
Richa Sarmah le 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.

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 8 Nov 2019
Modifié(e) : KSSV le 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.

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by