TW201314169A - Method and system for positioning circular object - Google Patents

Method and system for positioning circular object Download PDF

Info

Publication number
TW201314169A
TW201314169A TW100136632A TW100136632A TW201314169A TW 201314169 A TW201314169 A TW 201314169A TW 100136632 A TW100136632 A TW 100136632A TW 100136632 A TW100136632 A TW 100136632A TW 201314169 A TW201314169 A TW 201314169A
Authority
TW
Taiwan
Prior art keywords
image
center
current
center position
module
Prior art date
Application number
TW100136632A
Other languages
Chinese (zh)
Inventor
Guang-Jian Wang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Publication of TW201314169A publication Critical patent/TW201314169A/en

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a method and system for positioning a circular object. The method includes: controlling camera equipment to shoot a measured object; getting the circular object's position image according to the circular object's coordinates from the circular object's image, and turning the circular object's position image to gray image, and setting the gray image to current gray image; getting the outline of the current gray image; oval fitting the outline to obtain a fitting center position; determining whether the center position converges, if converges, having a noise reduction processing to the gray image, and setting the gray image after noise reduction processing to the current gray image, and returning to get the outline of the current gray image; if does not converge, obtaining the final convergence center position, and mapping it to the measured object.

Description

環形物體定位方法及系統Ring object positioning method and system

本發明涉及一種環形物體定位方法及系統。The invention relates to a method and system for positioning an annular object.

印製電路板(Printed Circuit Board,PCB)、主板等在生產時經常需要對定位環進行精確定位。通過對定位環的精確定位,可以確定定位環的精確位置,從而提高器件安裝至指定定位環的精確性。而對定位環的精確定位,在現有生產過程中通常使用鐳射定位反射器來實現。這種精確定位方法,成本比較高,會造成生產過程中成本的大幅度提高,因此需尋找一種環形物體的低成本精確定位方法。Printed Circuit Board (PCB), motherboard, etc. often require precise positioning of the positioning ring during production. By precisely positioning the positioning ring, the precise position of the positioning ring can be determined, thereby improving the accuracy of mounting the device to the specified positioning ring. The precise positioning of the positioning ring is usually achieved by using a laser positioning reflector in the existing production process. This precise positioning method, which is relatively expensive, causes a significant increase in the cost of the production process, and therefore requires a low-cost accurate positioning method for a ring-shaped object.

鑒於以上內容,有必要提供一種環形物體定位方法及系統,以實現對環形物體的低成本精確定位。In view of the above, it is necessary to provide a method and system for positioning an annular object to achieve low-cost accurate positioning of an annular object.

所述環形物體定位方法,該方法包括以下步驟:控制步驟:控制攝像設備對被測物體進行拍攝;灰度處理步驟:從被測物體的圖像中根據環形物體座標取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,將灰度圖像置為當前灰度圖像;獲取步驟:取得當前灰度圖像的輪廓;橢圓擬合步驟:對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置;收斂判斷步驟:判斷圓心位置是否收斂,當圓心位置收斂時,執行降噪處理步驟,否則,執行映射步驟;降噪處理步驟:對灰度圖像進行降噪處理,將降噪處理後的灰度圖像置為當前灰度圖像,並返回繼續執行獲取步驟;映射步驟:取得最後收斂的圓心位置,並將圓心位置映射至被測物體。The method for positioning an annular object, the method comprising the steps of: controlling a camera device to capture an object to be measured; and performing a grayscale processing step: extracting an image of the position of the ring object according to the coordinates of the ring object from the image of the object to be measured, Converting the ring object position image into a gray image, and setting the gray image as the current gray image; obtaining step: obtaining the contour of the current gray image; ellipse fitting step: ellipating the obtained contour Combine to obtain a fitted center position; convergence judgment step: determine whether the center of the circle converges, when the center of the circle converges, perform a noise reduction process step, otherwise, perform a mapping step; noise reduction processing step: lower the gray image The noise processing sets the grayscale image after the noise reduction processing to the current grayscale image, and returns to continue to perform the acquisition step. The mapping step: obtains the center position of the final convergence, and maps the center of the circle to the object to be measured.

所述環形物體定位系統,該系統包括:控制模組,用於控制攝像設備對被測物體進行拍攝;灰度處理模組,用於從被測物體的圖像中根據環形物體座標取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,將灰度圖像置為當前灰度圖像;獲取模組,用於取得當前灰度圖像的輪廓;橢圓擬合模組,用於對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置;收斂判斷模組,用於判斷圓心位置是否收斂;降噪處理模組,用於在圓心位置收斂時,對灰度圖像進行降噪處理,並將降噪處理後的灰度圖像置為當前灰度圖像;獲取模組,還用於取得降噪處理後的當前灰度圖像的輪廓;映射模組,用於在圓心位置不收斂時,取得最後收斂的圓心位置,並將圓心位置映射至被測物體。The ring object positioning system includes: a control module for controlling an image capturing device to capture an object to be measured; and a gray processing module for extracting a ring object from the image of the object to be measured according to the coordinates of the ring object The position image converts the image of the ring object position into a gray image, and sets the gray image as the current gray image; the acquisition module is used to obtain the contour of the current gray image; the ellipse fitting module , used to perform ellipse fitting on the obtained contour to obtain a fitted center position; a convergence judgment module for judging whether the center of the circle is converged; and a noise reduction processing module for grading when the center of the circle converges The image is subjected to noise reduction processing, and the grayscale image after the noise reduction processing is set as the current grayscale image; the acquisition module is also used to obtain the contour of the current grayscale image after the noise reduction processing; the mapping module For obtaining the position of the center of the final convergence when the center of the circle does not converge, and mapping the position of the center of the circle to the object to be measured.

相較於習知技術,本發明所述之環形物體定位方法及系統,在被測物體尺寸已知和攝像設備的基本參數已知的情況下,使用光學方法對環形物體進行定位,利用亞圖元識別方法高精度定位被測物體,即對被測物體進行拍攝,並擬合亞圖元級別的元素位置,同時高精度映射元素位置至被測物體,從而完成定位。Compared with the prior art, the ring object positioning method and system of the present invention uses an optical method to locate a ring object under the condition that the size of the object to be measured is known and the basic parameters of the camera device are known, and the sub-image is utilized. The meta-recognition method locates the measured object with high precision, that is, photographs the measured object, and fits the position of the element at the sub-picture level, and simultaneously maps the position of the element to the measured object with high precision, thereby completing the positioning.

如圖1所示,係為本發明環形物體定位系統較佳實施例之架構圖。As shown in FIG. 1, it is an architectural diagram of a preferred embodiment of the ring object positioning system of the present invention.

環形物體定位系統10運行於電腦1中。所述電腦1還與攝像設備2連接。所述攝像設備2用於對被測物體進行拍攝。所述攝像設備2可為數位相機、攝像機等。所述環形物體定位系統10用於實現對被測物體中環形物體的精確定位。The ring object positioning system 10 operates in the computer 1. The computer 1 is also connected to the imaging device 2. The imaging device 2 is used to photograph an object to be measured. The imaging device 2 can be a digital camera, a video camera or the like. The annular object positioning system 10 is used to achieve precise positioning of an annular object in an object to be measured.

所述環形物體定位系統10包括控制模組100、灰度處理模組101、獲取模組102、橢圓擬合模組103、收斂判斷模組104、降噪處理模組105、映射模組106及校正模組107。各模組的功能將結合圖2之流程圖進行詳細介紹。The ring object positioning system 10 includes a control module 100, a grayscale processing module 101, an acquisition module 102, an ellipse fitting module 103, a convergence determination module 104, a noise reduction processing module 105, a mapping module 106, and Correction module 107. The function of each module will be described in detail in conjunction with the flowchart of FIG. 2.

如圖2所示,係為本發明環形物體定位方法較佳實施例之流程圖。2 is a flow chart of a preferred embodiment of a method for positioning a ring object according to the present invention.

步驟S100,所述控制模組100控制攝像設備2對被測物體進行拍攝。In step S100, the control module 100 controls the imaging device 2 to capture an object to be measured.

需要說明的是,用戶判斷攝像設備2拍攝所得圖像是否需進行校正,當用戶判斷拍攝所得圖像需進行校正時,所述校正模組107在接收用戶的校正需求後,根據攝像設備2已知的基本參數對攝像設備2拍攝所得圖像進行校正。所述攝像設備2已知的基本參數包括焦距、相距、物距及焦段等,所述校正模組107根據已知的基本參數對拍攝所得圖像進行逆向校正。所述攝像設備2所拍攝的圖像有時需要進行校正的原因為:攝像設備2拍攝所得圖像會產生不同的失真效果,所述失真效果如產生桶形畸變、圖像拉長等。It should be noted that the user determines whether the image captured by the imaging device 2 needs to be corrected. When the user determines that the captured image needs to be corrected, the correction module 107 receives the correction request of the user, according to the imaging device 2 The basic parameters are known to correct the image captured by the imaging apparatus 2. The basic parameters known to the imaging device 2 include focal length, distance, object distance, focal length, and the like, and the correction module 107 performs reverse correction on the captured image according to known basic parameters. The reason why the image captured by the imaging apparatus 2 sometimes needs to be corrected is that the image obtained by the imaging apparatus 2 produces different distortion effects such as barrel distortion, image stretching, and the like.

步驟S101,所述灰度處理模組101根據環形物體座標從特定圖像中取出環形物體位置圖像,同時將環形物體位置圖像轉化為灰度圖像,並將所述灰度圖像置為當前灰度圖像。所述特定圖像為攝像設備2所拍攝的不需校正的圖像,或經校正模組107校正後所得的圖像。Step S101, the gradation processing module 101 extracts a ring object position image from a specific image according to the ring object coordinates, and simultaneously converts the ring object position image into a gray image, and sets the gray image Is the current grayscale image. The specific image is an image that is not corrected by the imaging device 2 or is corrected by the correction module 107.

具體而言,根據被測物體的設計圖紙可知被測物體的尺寸,同時被測物體上的環形物體的座標也是已知的,則所述灰度處理模組101可根據已知的環形物體座標從所述特定圖像中取出環形物體位置圖像。所述環形物體位置圖像的範圍為根據環形物體的面積乘以一個預設值而得到。所述預設值為一經驗值,如為5至15中的任何一個數值。所述灰度處理模組101對所得的環形物體位置圖像進行灰度處理,從而將環形物體位置圖像轉化為灰度圖像。所述環形物體如為主板上的定位環等。Specifically, according to the design drawing of the measured object, the size of the measured object is known, and the coordinates of the annular object on the measured object are also known, and the gray processing module 101 can be based on the known circular object coordinates. An annular object position image is taken from the specific image. The range of the annular object position image is obtained by multiplying the area of the annular object by a preset value. The preset value is an empirical value, such as any one of 5 to 15. The grayscale processing module 101 performs grayscale processing on the obtained annular object position image, thereby converting the annular object position image into a grayscale image. The annular object is a positioning ring or the like on the main board.

步驟S102,所述獲取模組102利用Canny演算法取得當前灰度圖像的輪廓。In step S102, the acquisition module 102 uses the Canny algorithm to obtain the contour of the current grayscale image.

步驟S103,所述橢圓擬合模組103對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置。In step S103, the ellipse fitting module 103 performs ellipse fitting on the obtained contour to obtain a fitted center position.

所述輪廓是由多個輪廓點組成的序列,所述橢圓擬合模組103對取得的輪廓進行橢圓擬合,即對輪廓中的所有輪廓點進行橢圓擬合。The contour is a sequence of a plurality of contour points, and the ellipse fitting module 103 performs ellipse fitting on the obtained contour, that is, elliptical fitting is performed on all contour points in the contour.

而橢圓擬合法的基本思路是:對於給定平面上的一組樣本點,尋找一個橢圓,使其盡可能靠近這些樣本點。即所述橢圓擬合模組103將當前灰度圖像輪廓中的輪廓點以橢圓方程為模型進行擬合,使某一橢圓方程儘量滿足這些資料,並求出該橢圓方程的各個參數。最後確定的最佳橢圓的中心即是所述橢圓擬合模組103要求擬合得到的圓心位置。The basic idea of the ellipse fitting method is to find an ellipse as close as possible to a set of sample points on a given plane. That is, the ellipse fitting module 103 fits the contour points in the contour of the current gray image with the elliptic equation as a model, so that an elliptic equation satisfies the data as much as possible, and obtains various parameters of the elliptic equation. The center of the finally determined optimal ellipse is the position of the center of the circle that the ellipse fitting module 103 requires to fit.

步驟S104,所述收斂判斷模組104判斷圓心位置是否收斂。當圓心位置收斂時,執行步驟S105,否則執行步驟S106。所述圓心位置是否收斂的判斷將在下文中進行詳細介紹。In step S104, the convergence determination module 104 determines whether the center of the circle converges. When the center of the circle converges, step S105 is performed, otherwise step S106 is performed. The judgment of whether or not the center position of the center converges will be described in detail below.

步驟S105,所述降噪處理模組105對當前灰度圖像進行降噪處理。Step S105, the noise reduction processing module 105 performs noise reduction processing on the current grayscale image.

需要說明的是,執行步驟S105後,所述降噪處理模組105將降噪處理後的灰度圖像置為當前灰度圖像,並返回執行步驟S102。It should be noted that, after the step S105 is performed, the noise reduction processing module 105 sets the grayscale image after the noise reduction processing as the current grayscale image, and returns to step S102.

所述對灰度圖像進行降噪處理,即對灰度圖像進行平滑處理,採用線性插值或高斯插值等方法對灰度圖像進行插值來模糊灰度圖像的邊界,以達到對灰度圖像去除干擾的作用,從而實現對灰度圖像的降噪效果。The grayscale image is subjected to noise reduction processing, that is, the grayscale image is smoothed, and the grayscale image is interpolated by linear interpolation or Gaussian interpolation to blur the boundary of the grayscale image to achieve grayscale The degree image removes the effect of interference, thereby achieving a noise reduction effect on the grayscale image.

在上述步驟S102至步驟S105的迴圈過程中,每次迴圈均會產生一個圓心位置。所述圓心位置按照擬合的順序序號進行命名,第幾次擬合得到的圓心位置,則命名為第幾個圓心位置。如第一次擬合得到的圓心位置,則命名為第一個圓心位置。During the loop of the above steps S102 to S105, a center position is generated for each loop. The position of the center of the circle is named according to the sequence number of the fitting, and the position of the center of the circle obtained by the first fitting is named as the first center position. For example, the position of the center of the circle obtained by the first fitting is named as the first center position.

需要說明的是,所述收斂判斷模組104默認橢圓擬合模組103擬合的第一個及第二個圓心位置是收斂的。It should be noted that the convergence determination module 104 defaults to the first and second center positions of the ellipse fitting module 103 that are converged.

在S104中判斷圓心位置是否收斂的步驟如下:The procedure for determining whether the center of the circle converges in S104 is as follows:

當擬合得到一個當前圓心位置時,按照擬合的先後順序,取該當前圓心位置及與該當前圓心位置相鄰的前兩個圓心位置以得到三個按照先後順序排列的圓心位置,當前兩個圓心位置之間的距離大於後兩個圓心位置之間的距離時,判定當前圓心位置收斂,當前兩個圓心位置之間的距離不大於後兩個圓心位置之間的距離時,則判定當前圓心位置不收斂。When the fitting obtains a current center position, the current center position and the first two center positions adjacent to the current center position are taken in order of the fitting to obtain three center positions arranged in order, the current two When the distance between the center positions is greater than the distance between the positions of the last two centers, it is determined that the current center position converges, and the distance between the current two center positions is not greater than the distance between the positions of the last two centers, then the current The center of the circle does not converge.

例如,在步驟S103擬合得到一個當前圓心位置為E,按照擬合的先後順序排序,先前擬合有A、B、C、D共4個圓心位置,取該當前圓心位置E及與E相鄰的圓心位置C、D,得到了三個按擬合的先後順序進行排序的圓心位置C、D、E,當圓心位置C與D之間的距離大於圓心位置D與當前圓心位置E之間的距離時,所述收斂判斷模組104則判定當前圓心位置E收斂。當圓心位置C與D之間的距離不大於圓心位置D與圓心位置E之間的距離時,所述收斂判斷模組104則判定當前圓心位置E不收斂。For example, in step S103, a current center position is obtained as E, which is sorted according to the order of fitting. Previously, there are 4 center positions of A, B, C, and D, and the current center position E and phase E are taken. The center positions C and D of the neighbors obtain three center positions C, D, and E sorted in the order of fitting. When the distance between the center positions C and D is greater than the center position D and the current center position E The distance judgment module 104 determines that the current center position E converges. When the distance between the center positions C and D is not greater than the distance between the center position D and the center position E, the convergence determination module 104 determines that the current center position E does not converge.

步驟S106,所述映射模組106取得最後收斂的圓心位置,並將圓心位置映射至被測物體。In step S106, the mapping module 106 obtains the center position of the final convergence and maps the center of the circle to the object to be measured.

在當前圓心位置不收斂時,所述映射模組106從按擬合的先後順序進行排序的圓心位置中,取出當前圓心位置前一個圓心位置即為所述最後收斂的圓心位置。例如,按擬合的先後順序進行排序的圓心位置共有A、B、C、D、E五個圓心位置,其中E為當前圓心位置,當圓心位置C與D之間的距離不大於圓心位置D與當前圓心位置E之間的距離時,收斂判斷模組104判斷出當前圓心位置E不收斂,此時所述映射模組106取得圓心位置D,該圓心位置D即為最後收斂的圓心位置。When the current center position does not converge, the mapping module 106 extracts the position of the center of the center of the current center of the circle from the center position of the sorted in the order of the fitting, that is, the center position of the last convergence. For example, the center positions of the sorted in the order of fitting have a total of five center positions A, B, C, D, and E, where E is the current center position, and the distance between the center positions C and D is not greater than the center position D. When the distance between the current center position E and the current center position E is determined, the convergence determination module 104 determines that the current center position E does not converge. At this time, the mapping module 106 obtains the center position D, which is the finally converged center position.

同時,所述映射模組106將最後收斂的圓心位置的座標映射至被測物體的設計圖紙中,根據所述最後收斂的圓心位置的座標確定環形物體的圓心位置,從而實現環形物體定位系統10對環形物體的精確定位。At the same time, the mapping module 106 maps the coordinates of the finally converged center position to the design drawing of the object to be measured, and determines the center position of the ring object according to the coordinate of the last converged center position, thereby implementing the ring object positioning system 10 . Precise positioning of the ring object.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅爲本發明之較佳實施例,本發明之範圍並不以上述實施例爲限,舉凡熟悉本案技藝之人士援依本發明之精神所作之等效修飾或變化,皆應涵蓋於以下申請專利範圍內。In summary, the present invention complies with the requirements of the invention patent and submits a patent application according to law. The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-described embodiments, and equivalent modifications or variations made by those skilled in the art in light of the spirit of the present invention are It should be covered by the following patent application.

1...電腦1. . . computer

10...環形物體定位系統10. . . Ring object positioning system

100...控制模組100. . . Control module

101...灰度處理模組101. . . Grayscale processing module

102...獲取模組102. . . Get module

103...橢圓擬合模組103. . . Ellipse fitting module

104...收斂判斷模組104. . . Convergence judgment module

105...降噪處理模組105. . . Noise reduction processing module

106...映射模組106. . . Mapping module

107...校正模組107. . . Correction module

2...攝像設備2. . . Camera equipment

S100...控制攝像設備對被測物體進行拍攝S100. . . Control the camera to shoot the measured object

S101...根據環形物體座標,從圖像中取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,並置灰度圖像為當前灰度圖像S101. . . According to the coordinates of the ring object, the ring object position image is taken out from the image, the ring object position image is converted into a gray image, and the gray image is concatenated as the current gray image.

S102...獲取當前灰度圖像的輪廓S102. . . Get the outline of the current grayscale image

S103...對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置S103. . . Elliptical fitting of the obtained contour to obtain a fitted center position

S104...圓心位置收斂?S104. . . The center of the circle converges?

S105...對灰度圖像進行降噪處理,並將降噪處理後的灰度圖像置為當前灰度圖像S105. . . Denoising the grayscale image and setting the grayscale image after the noise reduction to the current grayscale image

S106...得到圓心位置,將圓心位置映射至被測物體S106. . . Get the center position and map the center of the circle to the measured object

圖1係為本發明環形物體定位系統較佳實施例之架構圖。1 is a block diagram of a preferred embodiment of a ring object positioning system of the present invention.

圖2係為本發明環形物體定位方法較佳實施例之流程圖。2 is a flow chart of a preferred embodiment of a method for positioning a ring object of the present invention.

S100...控制攝像設備對被測物體進行拍攝S100. . . Control the camera to shoot the measured object

S101...根據環形物體座標,從圖像中取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,並置灰度圖像為當前灰度圖像S101. . . According to the coordinates of the ring object, the ring object position image is taken out from the image, the ring object position image is converted into a gray image, and the gray image is concatenated as the current gray image.

S102...獲取當前灰度圖像的輪廓S102. . . Get the outline of the current grayscale image

S103...對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置S103. . . Elliptical fitting of the obtained contour to obtain a fitted center position

S104...圓心位置收斂?S104. . . The center of the circle converges?

S105...對灰度圖像進行降噪處理,並將降噪處理後的灰度圖像置為當前灰度圖像S105. . . Denoising the grayscale image and setting the grayscale image after the noise reduction to the current grayscale image

S106...得到圓心位置,將圓心位置映射至被測物體S106. . . Get the center position and map the center of the circle to the measured object

Claims (10)

一種環形物體定位方法,其中,該方法包括以下步驟:
控制步驟:控制攝像設備對被測物體進行拍攝;
灰度處理步驟:從被測物體的圖像中根據環形物體座標取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,將灰度圖像置為當前灰度圖像;
獲取步驟:取得當前灰度圖像的輪廓;
橢圓擬合步驟:對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置;
收斂判斷步驟:判斷圓心位置是否收斂,當圓心位置收斂時,執行降噪處理步驟,否則,執行映射步驟;
降噪處理步驟:對灰度圖像進行降噪處理,將降噪處理後的灰度圖像置為當前灰度圖像,並返回繼續執行獲取步驟;
映射步驟:取得最後收斂的圓心位置,並將圓心位置映射至被測物體。
A ring object positioning method, wherein the method comprises the following steps:
Control step: controlling the camera device to shoot the measured object;
Gray processing step: extracting the position image of the ring object according to the coordinates of the ring object from the image of the object to be measured, converting the image of the position of the ring object into a gray image, and setting the gray image as the current gray image;
Obtaining step: obtaining an outline of a current grayscale image;
Ellipse fitting step: ellipse fitting the obtained contour to obtain a fitted center position;
Convergence judging step: judging whether the center of the circle converges, and when the center of the circle converges, performing a noise reduction processing step; otherwise, performing a mapping step;
The noise reduction processing step: performing noise reduction processing on the grayscale image, setting the grayscale image after the noise reduction processing as the current grayscale image, and returning to continue to perform the obtaining step;
Mapping step: obtain the center position of the final convergence and map the center of the circle to the measured object.
如申請專利範圍第1項所述之環形物體定位方法,其中,該方法在控制步驟與灰度處理步驟之間還包括:
校正步驟:當用戶判斷攝像設備拍攝所得圖像需進行校正時,接收用戶的校正需求,並對攝像設備拍攝所得圖像進行校正。
The ring object positioning method according to claim 1, wherein the method further comprises: between the control step and the gray processing step:
Correction step: When the user judges that the image captured by the camera device needs to be corrected, the user's correction request is received, and the image captured by the camera device is corrected.
如申請專利範圍第1項所述之環形物體定位方法,其中,所述環形物體位置圖像的範圍根據環形物體的面積乘以一個預設值而得到。The ring object positioning method according to claim 1, wherein the range of the ring object position image is obtained by multiplying an area of the ring object by a preset value. 如申請專利範圍第1項所述之環形物體定位方法,其中,所述判斷圓心位置是否收斂的步驟如下:
當擬合得到一個當前圓心位置時,按照擬合的先後順序,取該當前圓心位置及與該當前圓心位置相鄰的前兩個圓心位置以得到三個按照先後順序排列的圓心位置;
當前兩個圓心位置之間的距離大於後兩個圓心位置之間的距離時,判定當前圓心位置收斂;
當前兩個圓心位置之間的距離不大於後兩個圓心位置之間的距離時,則判定當前圓心位置不收斂。
The method for positioning a ring object according to claim 1, wherein the step of determining whether the center of the circle converges is as follows:
When the current center position is obtained by fitting, the current center position and the first two center positions adjacent to the current center position are taken according to the order of fitting to obtain three center positions arranged in order;
When the distance between the two center positions is greater than the distance between the last two center positions, it is determined that the current center position converges;
When the distance between the current two center positions is not greater than the distance between the last two center positions, it is determined that the current center position does not converge.
如申請專利範圍第1項所述之環形物體定位方法,其中,所述對灰度圖像進行降噪處理為對灰度圖像進行插值來模糊灰度圖像的邊界。The ring object positioning method according to claim 1, wherein the grayscale image is subjected to noise reduction processing to interpolate the grayscale image to blur a boundary of the grayscale image. 一種環形物體定位系統,其中,該系統包括:
控制模組,用於控制攝像設備對被測物體進行拍攝;
灰度處理模組,用於從被測物體的圖像中根據環形物體座標取出環形物體位置圖像,將環形物體位置圖像轉化為灰度圖像,將灰度圖像置為當前灰度圖像;
獲取模組,用於取得當前灰度圖像的輪廓;
橢圓擬合模組,用於對取得的輪廓進行橢圓擬合,得到一個擬合的圓心位置;
收斂判斷模組,用於判斷圓心位置是否收斂;
降噪處理模組,用於在圓心位置收斂時,對灰度圖像進行降噪處理,並將降噪處理後的灰度圖像置為當前灰度圖像;
獲取模組,還用於取得降噪處理後的當前灰度圖像的輪廓;
映射模組,用於在圓心位置不收斂時,取得最後收斂的圓心位置,並將圓心位置映射至被測物體。
An annular object positioning system, wherein the system comprises:
a control module for controlling the camera device to shoot the measured object;
The grayscale processing module is configured to extract the position image of the ring object according to the coordinates of the ring object from the image of the object to be measured, convert the image of the position of the ring object into a gray image, and set the gray image to the current gray level. image;
Obtaining a module for obtaining an outline of a current grayscale image;
An elliptical fitting module for elliptical fitting of the obtained contour to obtain a fitted center position;
a convergence judging module for judging whether the center of the circle is converged;
The noise reduction processing module is configured to perform noise reduction processing on the grayscale image when the center of the circle converges, and set the grayscale image after the noise reduction processing to the current grayscale image;
Obtaining a module, which is also used to obtain a contour of a current grayscale image after noise reduction processing;
The mapping module is configured to obtain the center position of the final convergence when the center of the circle does not converge, and map the center of the circle to the object to be measured.
如申請專利範圍第6項所述之環形物體定位系統,其中,該系統還包括:
校正模組,用於當用戶判斷攝像設備拍攝所得圖像需進行校正時,接收用戶的校正需求,並對攝像設備拍攝所得圖像進行校正。
The ring object positioning system of claim 6, wherein the system further comprises:
The correction module is configured to receive a calibration requirement of the user when the user determines that the image captured by the camera device needs to be corrected, and correct the image captured by the camera device.
如申請專利範圍第6項所述之環形物體定位系統,其中,所述環形物體位置圖像的範圍根據環形物體的面積乘以一個預設值而得到。The ring object positioning system of claim 6, wherein the range of the ring object position image is obtained by multiplying an area of the ring object by a preset value. 如申請專利範圍第6項所述之環形物體定位系統,其中,所述收斂判斷模組通過以下步驟實現圓心位置是否收斂的判斷:
當擬合得到一個當前圓心位置時,按照擬合的先後順序,取該當前圓心位置及與該當前圓心位置相鄰的前兩個圓心位置以得到三個按照先後順序排列的圓心位置;
當前兩個圓心位置之間的距離大於後兩個圓心位置之間的距離時,判定當前圓心位置收斂;
當前兩個圓心位置之間的距離不大於後兩個圓心位置之間的距離時,則判定當前圓心位置不收斂。
The ring object positioning system of claim 6, wherein the convergence determining module determines whether the center of the circle is converged by the following steps:
When the current center position is obtained by fitting, the current center position and the first two center positions adjacent to the current center position are taken according to the order of fitting to obtain three center positions arranged in order;
When the distance between the two center positions is greater than the distance between the last two center positions, it is determined that the current center position converges;
When the distance between the current two center positions is not greater than the distance between the last two center positions, it is determined that the current center position does not converge.
如申請專利範圍第6項所述之環形物體定位系統,其中,所述對灰度圖像進行降噪處理為對灰度圖像進行插值來模糊灰度圖像的邊界。The ring object positioning system of claim 6, wherein the grayscale image is subjected to noise reduction processing to interpolate the grayscale image to blur the boundary of the grayscale image.
TW100136632A 2011-09-29 2011-10-11 Method and system for positioning circular object TW201314169A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110292390 CN103033126A (en) 2011-09-29 2011-09-29 Annular object location method and system

Publications (1)

Publication Number Publication Date
TW201314169A true TW201314169A (en) 2013-04-01

Family

ID=48020275

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100136632A TW201314169A (en) 2011-09-29 2011-10-11 Method and system for positioning circular object

Country Status (2)

Country Link
CN (1) CN103033126A (en)
TW (1) TW201314169A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104613869B (en) * 2015-01-28 2017-05-10 南京信息工程大学 Method and system for detecting elliptical hole group based on maximum inscribed circle
CN111354047B (en) * 2018-12-20 2023-11-07 精锐视觉智能科技(上海)有限公司 Computer vision-based camera module positioning method and system

Also Published As

Publication number Publication date
CN103033126A (en) 2013-04-10

Similar Documents

Publication Publication Date Title
CN108932698B (en) Image distortion correction method, device, electronic equipment and storage medium
WO2017092631A1 (en) Image distortion correction method for fisheye image, and calibration method for fisheye camera
KR101014572B1 (en) Method of correcting image distortion and Image processing device of adapting the same method
KR102143456B1 (en) Depth information acquisition method and apparatus, and image collection device
CN104065859B (en) A kind of acquisition methods and camera head of full depth image
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
CN103279956B (en) A kind of method detecting chip mounter components and parts positioning precision
JP6217110B2 (en) Projector and adjustment method
CN103679166B (en) The method and system of fish eye lens center offset in a kind of quick obtaining equipment
US9693041B2 (en) Image capturing device and method for calibrating image deformation thereof
JP6274931B2 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device
CN111385461B (en) Panoramic shooting method and device, camera and mobile terminal
WO2015174257A1 (en) Image-processing device, image-processing method, imaging device, electronic instrument, and program
CN106846395B (en) Method and system for calculating area of target graph in photo
TW201314169A (en) Method and system for positioning circular object
KR101578029B1 (en) Apparatus and method for correcting image distortion
TWI552603B (en) Image correction system and method
CN105872344B (en) Image processing method, image processing apparatus, electronic equipment
US11166005B2 (en) Three-dimensional information acquisition system using pitching practice, and method for calculating camera parameters
KR101703715B1 (en) The apparatus for measuring camera principal point and the method thereof
JP2009177792A (en) Image processing unit and imaging device
CN111630569A (en) Binocular matching method, visual imaging device and device with storage function
CN113587895A (en) Binocular distance measuring method and device
JP2004117049A (en) Stereo image processing device and stereo image processing method
WO2016192436A1 (en) Method and system for acquiring target three-dimensional image