|
中国图象图形学报 2008
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.