利用edge()函数提取图像轮廓,绘制出对象的边界和提取边界坐标信息,matlab实现代码如下: close all;clear all;clc; % 提取图像轮廓,提取图像边缘 I = imread('yifu.jpg'); c = im2bw(I,graythresh(I)); figure; subplot(131);imshow(I); c = flipud(c); %实现矩阵c上下翻转 b = edge(c,'canny'); [u,v] = find(b); %返回边界矩阵b中非零元
目标文件夹: 文件内容: 实现代码: # -*- coding:utf-8 -*- # __author__ :kusy # __content__:get ssr info from html files # __date__:2018/10/29 14:43 import os import re def getssr(): srcdir = os.path.abspath('src') files = os.listdir(srcdir) filestr = '' for file in