How to code a fixed region of interest?

1 vue (au cours des 30 derniers jours)
Shu Yi Ho
Shu Yi Ho le 24 Juil 2019
Modifié(e) : Shu Yi Ho le 29 Juil 2019
How can i hardcode ROI (specific area)? The code below allows me to select ROI with mouse:
rect = getrect(f); % Select ROI with mouse
ori_roi{i} = originalImage( rect(2) : (rect(2)+rect(4)) , rect(1) : (rect(1)+rect(3)) , : ); % store roi in matrix
Solved:
rect = [375.5 581.5 795 363]; % fixed ROI
ori_roi{i} = originalImage( rect(2) : (rect(2)+rect(4)) , rect(1) : (rect(1)+rect(3)) , : ); % store roi in matrix
  1 commentaire
Adam
Adam le 26 Juil 2019
doc rectangle
should work fine for a rectangular ROI

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Geometric Transformation and Image Registration 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