Current Issue Cover
一种高效检测图像中是否有三角形的算法

黎海兵1, 易卫东1(中国科学院研究生院信息学院,北京 100049)

摘 要
在停车场的停车位检测系统中,要识别停车位是否空闲,就必须对检测系统获取的图像中的任何可能停靠在停车场中的汽车进行识别,但由于汽车种类、形状、大小等千变万化,因此通过识别图像中是否有汽车来判断停车位是否空闲是不现实的。由于可以先在每个停车位上画上一个实心黑三角形,然后通过识别图像中是否包含有三角形来判断停车位是否空闲,如果图像中没有实心黑三角形,则表明该停车位已经被汽车所占据;否则表明停车位空闲,因此,对空闲停车位的检测就转换为检测图像中是否有三角形,这要比识别所有的汽车容易得多。而传统的Hough变换则不
关键词
An Effective Algorithm to Detect Triangles in Image

()

Abstract
In the parking space detecting system, it must recognize all kinds of cars which may park on the parking plot to decide is a parking space is free or not. But vaviable shapes of cars make it difficult for computer to make decision. After drawing a black solid triangle on a parking space and detecting whether there is a solid triangle in image, it shows that whether the parking space is free. If there is no triangle in image,it shows that the parking space is taken by a car. The problem of detecting free parking space is transformed into detecting whether there is a triangle in image. It is easier to detect whether there is a triangle in image than to detect a car. Traditional Hough transform cannot effective detect whether there are triangles in image. The algorithm presented in this paper proposes an effective algorithm to detect whether there are triangles in image. It first detects the edges of image by sobel algorithm, then extracts connected edges and fills the area enclosed by the edge extracted just now. Finnaly a judgement can be made that the area filled just now is a triangle or not by the relationship of its area and its edges. When the edge extracted just now has been analyzed, it continues to extract next edges in the image until all edges in the image are extracted. If there are triangles in the image, it outputs the number of triangles in the image otherwise,it outputs zere.Exper imental results, it show that the algorithm presented in the paper has little mathematical calculation and it is fast and with small memory cost .
Keywords

订阅号|日报