필터 지우기
필터 지우기

How to code a fixed region of interest?

조회 수: 3 (최근 30일)
Shu Yi Ho
Shu Yi Ho 2019년 7월 24일
편집: Shu Yi Ho 2019년 7월 29일
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
Adam
Adam 2019년 7월 26일
doc rectangle
should work fine for a rectangular ROI

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by