How i can crop image with bw roipoly and how to display?

조회 수: 2 (최근 30일)
Riventus AHA
Riventus AHA 2017년 1월 30일
답변: Takuji Fukumoto 2017년 1월 31일
clc;clear;close all;
a = imread('Capture1.png','png'); figure, imshow(a), title(' bearing pompa Tanggal 9 Agustus'); I=uint8(a); h = impoly; position = wait(h); BW = createMask(h); out = gray .* uint8(BW); imshow(out);
why always display like this when i was done with decission of my cropping position? anyone can help me to solve this problem?
Thank you so much :)

채택된 답변

Takuji Fukumoto
Takuji Fukumoto 2017년 1월 31일
If you want to show the segmented image, please try this after creating mask.
out = rgb2gray(I);
out(~BW) =0;
imshow(out);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by