필터 지우기
필터 지우기

finding overlapping area between two random contours

조회 수: 6 (최근 30일)
KalMandy
KalMandy 2017년 3월 24일
댓글: KalMandy 2017년 3월 25일
Hi all, I have x and y coordinates of closed contours with random shapes. I want to find the overlapping area in between any of the contours (If they overlap). Can you suggest a method to do this? Thank you.

답변 (1개)

Image Analyst
Image Analyst 2017년 3월 24일
You could make digital images with poly2mask() and then AND them and sum them or use bwarea():
overlapImage = bwarea(poly2mask(x1,y1,rows, columns) & poly2mask(x2,y2,rows, columns))
It's a digital approximation, not a 100% accurate analytical answer. The more pixels you use the more accurate it will be. What is the range of your numbers? Any negative values in there?
  댓글 수: 1
KalMandy
KalMandy 2017년 3월 25일
Hi, thanks for the reply. This is how a contour may look like. And there can be overlaps between many contours like this. I want to find the area/ or even the coordinates of points in the overlapping areas.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by