필터 지우기
필터 지우기

How to divide an image into upper and lower regions

조회 수: 1 (최근 30일)
Elysi Cochin
Elysi Cochin 2017년 2월 2일
답변: Vandana Rajan 2017년 2월 2일
How to divide an image into upper and lower regions and get those into separate variables, based on the centroid point, so that i need to compute the area, separately.

채택된 답변

KSSV
KSSV 2017년 2월 2일
I = imread('your image'); % read image
Ibw = im2bw(I);
Ilabel = bwlabel(Ibw);
stat = regionprops(Ilabel,'centroid'); % get centroid
imshow(I); hold on;
plot(stat.Centroid(1),stat.Centroid(2),'ro');
%%dive the image
c = fix(stat.Centroid) ;
I1 = I(1:c(1),:,:) ;
I2 = I(c(1)+1:end,:,:) ;
figure ; imshow(I1) ;
figure ; imshow(I2) ;

추가 답변 (1개)

Vandana Rajan
Vandana Rajan 2017년 2월 2일
Hi,
These links might be useful for you.
https://www.mathworks.com/help/images/examples/measuring-regions-in-grayscale-images.html

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by