利用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中非零元
本文转自:http://www.cnblogs.com/mayt/archive/2010/05/20/1740358.html 首先是创建一个类,继承于ActionResult,记住要引用System.Web.Mvc命名空间,如下: public class ImageResult : ActionResult { public ImageFormat ContentType { get; set; } public Image image { get; set; } public strin