How to find x and y coordinates in a black and white image?

조회 수: 2 (최근 30일)
Ahmad Hasnain
Ahmad Hasnain 2020년 3월 13일
답변: Ameer Hamza 2020년 3월 13일
I have a black and white image. I want to find the coordinates of the outline of the black blob. I want these coordinates so that I can draw the same shape in the CAD software.
How can I do that?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 3월 13일
Try this. It give coordinates of image pixels on the edge
im = rgb2gray(imread('map_phydesign_Celest_65_M04_W800_H1000_Close_new.png'));
im_edge = edge(im);
[x, y] = find(im_edge==1);
coordinates = [x y];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by