The present invention relates to methods of speeding up image detection and, more particularly, to a method of speeding up image detection, characterized in that efficiency of image detection is enhanced by reducing the number of required sampling regions with an importance sampling algorithm based on image characteristic points.
Conventional image detection techniques require scanning a picture in its entirety to detect a target image therein. However, the conventional image detection techniques necessitate a large number of scan windows and thus render the system busier to the detriment of its performance, not to mention that it is a waste of time detecting for non-target images. Referring to
In an attempt to overcome the aforesaid drawback of the prior art, a speeded up robust features (SURF) algorithm was invented and involves retrieving characteristic points from a picture and then performing a block scan on the retrieved characteristic points to detect for a target image. SURF has an advantage: it speeds up image detection, because it does not require scanning the picture in its entirety. However, SURF has a drawback: the block scan performed on the retrieved characteristic points is disadvantaged by the presence of non-target image blocks. As a result, SURF still has room for improvement in terms of efficiency.
It is an objective of the present invention to enhance efficiency of image detection. A full-field scan is performed on a picture in whole at the cost of image detection efficiency. Characteristic points contained in a typical picture are seldom identical; hence, target images contained in a picture can be accurately located by verifying the vicinity of characteristic points in the picture instead of performing a full-field scan on the picture in whole. In view of this, the present invention provides a method of speeding up image detection. The method of the present invention is based on a SURF algorithm and involves retrieving image characteristic points and then reducing the number of required sampling regions with an importance sampling algorithm based on the image characteristic points, so as to render the system less busy, speed up detection, and enhance detection efficiency, without deteriorating detection accuracy.
In order to achieve the above and other objectives, the present invention provides a method of speeding up image detection, adapted to increase a speed of detecting a target image, comprising the steps of: (1) capturing an image; (2) retrieving a plurality of characteristic points of the image; (3) creating a region of interest (ROI) centered at the characteristic points each; (4) creating a plurality of search point scan windows corresponding to the ROIs, respectively; (5) calculating target hit scores of the characteristic points and the search point scan windows; (6) comparing the target hit scores of the characteristic points and the search point scan windows to obtain an ROI which has a target image; (7) calculating centroid coordinates of the ROI by a centroid shift weight equation; and (8) narrowing a scope of ROI search according to a location of the centroid coordinates and reducing a displacement between the search points.
Regarding the method of speeding up image detection, the step (2) of retrieving a plurality of characteristic points of the image is performed by a speeded up robust features (SURF) algorithm.
Regarding the method of speeding up image detection, the step (5) of calculating the target hit scores of the characteristic points and the search point scan windows is performed by a support vector machine (SVM) algorithm.
Regarding the method of speeding up image detection, the step (7) of calculating centroid coordinates of the ROI by the centroid shift weight equation is performed in accordance with the target hit scores of the characteristic points and the search point scan windows and center coordinates of the characteristic points and the search point scan windows, so as to calculate the centroid coordinates by the centroid shift weight equation.
Objectives, features, and advantages of the present invention are hereunder illustrated with specific embodiments in conjunction with the accompanying drawings, in which:
Referring to
Step S11 involves capturing an image.
Step S12 involves retrieving a plurality of characteristic points of the image by a speeded up robust features (SURF) algorithm.
Step S13 involves creating a region of interest (ROI) centered at the characteristic points each. Referring to
Step S14 involves creating a plurality of search point scan windows corresponding to the ROIs, respectively. Referring to
Step S15 involves calculating target hit scores of the characteristic points and the search point scan windows by an SVM algorithm. Referring to
Step S16 involves comparing the target hit scores of the characteristic points and the search point scan windows to obtain an ROI most likely to have a target image. Referring to
Step S17 involves calculating centroid coordinates of an ROI by a centroid shift weight equation, wherein the centroid coordinates are calculated by the centroid shift weight equation in accordance with the target hit scores of the characteristic points and the search point scan windows and the center coordinates of the characteristic points and the search point scan windows. The centroid shift weight equation is expressed by equation (1) as follows:
In equation (1), wi denotes the target hit scores of the characteristic points or the search point scan windows, (xi,yi) denotes the center coordinates of the characteristic points or the search point scan windows, and Centroid(x,y) denotes centroid coordinates. Referring to
Step S18 involves narrowing the scope of ROI search according to the location of the centroid coordinates and reducing the displacement between the search points. Referring to
Referring to
Referring to Table 1 below, three tests described below are conducted with conventional test databases (OTCBVS, OTCBVS_2, CAVIAR_medium, CAVIAR_high, PETS_frontview, PETS_sideview) to compare their test results: (1) Full Search: performing a full-field scan on a picture in whole by an image detection method; (2) SURF Local Search: retrieving characteristic points from a picture by a SURF algorithm and then performing a block scan on the retrieved characteristic points to detect for a target image by an image detection method; and (3) Our System: performing the method of speeding up image detection according to the present invention to speed up image search. As indicated by the test results shown in Table 1, regardless of which of the aforesaid databases is used, an image search is conducted faster by the method of speeding up image detection according to the present invention than the two other image detection method by around 10 times, wherein the frame refresh rate is expressed in frame per second (FPS, i.e., the maximum number of picture frames processed per second). The larger the FPS value is, the faster the system can process pictures. Hence, Table 1 proves that the method of speeding up image detection according to the present invention is able to render the system less busy, speed up detection, and enhance detection efficiency greatly. Furthermore, the method of speeding up image detection according to the present invention is applicable to a vehicular system for pedestrian detection or obstacle detection and capable of effectuating instant detection without any additional hardware apparatus.
The present invention is disclosed above by preferred embodiments. However, persons skilled in the art should understand that the preferred embodiments are illustrative of the present invention only, but should not be interpreted as restrictive of the scope of the present invention. Hence, all equivalent modifications and replacements made to the aforesaid embodiments should fall within the scope of the present invention. Accordingly, the legal protection for the present invention should be defined by the appended claims.