用matlab编写:找出矩形的边缘并且计算它的面积

来源:百度知道 编辑:UC知道 时间:2024/06/06 11:32:52
find the edges of a rectangle in an image and compute its area
follow these steps
1 generate a rectangle of a reasonable size
2 find the four edges using either 'sobel' or 'canny'
you may want to use the matlab function 'edge'
3 find the line equations for the four edge lines of the rectangle
4 find the four corner points of the rectangle
5 compute the area of the rectangle

requirement:
1 your program can handle any 8-bit gray level image or 1-bit binary image
2 show the intermediate steps such as detected edges,hough transform,line equations and the coordinates of the corner points
3 output the value of the area

上面的英文翻译下来就是:
找到图像中的一个矩形的边缘,并计算它的面积
请按照下列步骤
1生成一个合理的规模矩形
2使用'sobel'或'canny'找到矩形的四个边缘
您可能需要使用MATLAB'边缘'函数
3找到矩形的四个边缘线的线方程
4找到四个矩形角点
5计算矩形的面积
要求:
1您的程序可以处理任何8位灰度图像或1位二进制图像
2显示,如检测边缘,Hough变换,线方程和对角点坐标的中间

一个矩形 ,使用MATLAB'边缘'函数
用'sobel'或'canny'找到矩形的四个边缘
找到四个矩形角点。通过边缘求得面积
问:计算矩形的面积

我不太明白你的意思— —·