필터 지우기
필터 지우기

Making a ROI and save its coordinates

조회 수: 12 (최근 30일)
Hashir Tanveer
Hashir Tanveer 2020년 2월 20일
답변: Keerthana Chiruvolu 2020년 3월 3일
Hi, I want to create a freehand ROI and crop the ROI part only, and then save the coordinates. Then i want to use the saved coordinate on other similar images to crop the ROI. Any idea how can i do that?

답변 (1개)

Keerthana Chiruvolu
Keerthana Chiruvolu 2020년 3월 3일
Hi,
  1. Kindly use the Image Segmenter App to draw a freehand ROI and create a binary mask. Use this ROI on various images.
  2. In the case of rectangular ROI, use the Blob Analysis block to obtain the dimensions (coordinates, width, height) of the ROI from the binary mask. Use these dimensions in the imcrop() function to crop the ROI.
3. You can also create the mask using poly2mask() function.
Refer to the following links for demo codes:

Community Treasure Hunt

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

Start Hunting!

Translated by