2D meshes example
Afficher commentaires plus anciens
Hi everybody, I hope you can help me here. I'm looking for files examples of 2D coordinates of any object (or mat files for matlab). for example the cat attached. I'm looking for a long time and didn't find anything. it doesn't need to be accurate, just to be a nice closed curve of the object that I can load and draw in matlab. any links/ideas?
Edit: That is NOT a do it for me question!!! why did you close my question??? I just asked for a link of 2d files (files of x,y coordinates). I didn't ask for any code!

2 commentaires
DAVID COHEN
le 29 Nov 2016
Sanjana Ramakrishnan
le 13 Déc 2016
You can obtain the boundary of any grayscale image after converting it to a binary image(2 dimensional array of zeroes and ones representing black and white), which would automatically form a closed loop.The following is an example code to obtain the the boundary of a grayscale image in the form of binary image. You can use 'imshow' function to plot the binary image.
% Read grayscale image into the workspace.
>>I = imread('rice.png');
%% % Convert grayscale image to binary image using local adaptive % thresholding.
>>BW = imbinarize(I);
Calculate the perimeters of objects in the image.
>>BW2 = bwperim(BW,8);
Display the original image and the perimeters side-by-side.
>>imshowpair(BW,BW2,'montage')
Please refer the below links for more information:
https://www.mathworks.com/help/images/ref/bwboundaries.html https://www.mathworks.com/help/images/ref/bwperim.html https://www.mathworks.com/matlabcentral/answers/167306-find-the-coordinates-of-an-image
Réponses (0)
Catégories
En savoir plus sur Basic Display dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!