Hough Transform (HT) is an image edge detection technique which is widely used in pattern recognition and computer vision. In this paper the fundamental principle of HT is analyzed and the defect of HT and Randomized Hough Transform (RHT) is indicated. An algorithm based on RHT and the information of grayscale and gradient in image is proposed. It uses the property of the pattern and is mainly used for detection of circle and arc contour measurement. This algorithm can decrease memory usage in computer by a multi to one mapping, accelerate the calculation speed by parallel algorithm, improve the edge detection accuracy by subpixel division, obtain the parameters of object by applying least square fitting algorithm. Based on the principle, a measurement system with high accuracy and efficiency in image capturing and processing is developed. Experiments are carried out in the system. The result of experiment has certified the feasibility and validity of the algorithm.