TWI438714B - System and method synthesizing images - Google Patents

System and method synthesizing images Download PDF

Info

Publication number
TWI438714B
TWI438714B TW95146144A TW95146144A TWI438714B TW I438714 B TWI438714 B TW I438714B TW 95146144 A TW95146144 A TW 95146144A TW 95146144 A TW95146144 A TW 95146144A TW I438714 B TWI438714 B TW I438714B
Authority
TW
Taiwan
Prior art keywords
rectangle
unit
bitmap
image
primitive
Prior art date
Application number
TW95146144A
Other languages
Chinese (zh)
Other versions
TW200825978A (en
Inventor
Chih Kuang Chang
Xiao-Chao Sun
Zhong-Kui Yuan
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
Priority to TW95146144A priority Critical patent/TWI438714B/en
Publication of TW200825978A publication Critical patent/TW200825978A/en
Application granted granted Critical
Publication of TWI438714B publication Critical patent/TWI438714B/en

Links

Landscapes

  • Image Processing (AREA)

Description

圖像合成系統及方法 Image synthesis system and method

本發明涉及一種圖像處理系統及方法,尤其是一種圖像合成系統及方法。 The present invention relates to an image processing system and method, and more particularly to an image synthesis system and method.

在精密影像量測中,標準工業電荷耦合器件(Charge Coupled Device,CCD)搭配特殊的鏡頭可以得到高分辨的影像也就是高清晰圖像,精度高,重複性好,且不會造成變形,對被量測工件影響小,所以在工廠及實驗室得到廣泛應用。圖像解析度是用於衡量圖像內資料量多少的一個參數,通常表示成ppi(每英寸圖元)。包含的資料越多,圖形文件的長度就越大,也能表現更豐富的細節。圖元(Pixel)是由Picture和Element這兩個字母所組成的,是用來計算影像的一種單位,影像具有連續性的濃淡階調,若把影像放大數倍,會發現這些連續色調其實是由許多色彩相近的小方點所組成,這些小方點就是構成影像的最小單位“圖元”。 In precision image measurement, the standard industrial charge coupled device (CCD) with a special lens can obtain high-resolution images, that is, high-definition images, with high precision, good repeatability, and no deformation. The measured workpiece has a small influence, so it is widely used in factories and laboratories. Image resolution is a parameter used to measure the amount of data in an image, usually expressed as ppi (pixels per inch). The more data you have, the larger the length of the graphics file and the richer details. Pixel is composed of two letters, Picture and Element. It is a unit for calculating images. The image has a continuous tone and tone. If you magnify the image several times, you will find that these continuous colors are actually It consists of a number of small squares with similar colors. These small squares are the smallest unit "picture elements" that make up the image.

而標準工業CCD搭配1倍物鏡能夠識別的一個圖元長度對應工件尺寸約0.01MM,因此在電腦顯示器解析度為1024*768的模式下,可顯示的範圍的尺寸大約在10MM左右。而當測量工件尺寸較大時,顯然是無法在一個螢幕上顯示完全的,需要搖動量測機台對多張 拍攝到的同一工件圖像進行量測處理,但是由於手動搖量測機台比較耗時,當一個量測人員在利用量測機台對一工件進行量測時,其他量測人員就必須長時間的等候機台,因此大大降低了量測人員的工作效率。 The length of a primitive that can be recognized by a standard industrial CCD with a 1x objective lens corresponds to a workpiece size of about 0.01 mm. Therefore, in a mode where the resolution of the computer display is 1024*768, the size of the displayable range is about 10 mm. When the measured workpiece size is large, it is obviously impossible to display the complete on one screen, and it is necessary to shake the measuring machine to multiple sheets. The same workpiece image is taken for measurement processing, but since the manual shake measurement machine is time consuming, when a measurement person measures a workpiece using the measurement machine, other measurement personnel must be long. The waiting time of the machine, thus greatly reducing the efficiency of the measurement staff.

因此,針對以上缺陷,需要提供一種能夠對拍攝到工件的圖像進行離線量測,以減小機台佔用時間的方法。 Therefore, in view of the above drawbacks, it is necessary to provide a method capable of offline measurement of an image captured by a workpiece to reduce the occupation time of the machine.

鑒於以上內容,有必要提供一種圖像合成系統及方法,其可對多張點陣圖進行合併生成一張工件全局圖,並能夠根據量測人員在全局圖上選定的位置求該選定位置附近子圖像。 In view of the above, it is necessary to provide an image synthesis system and method, which can combine multiple bitmaps to generate a global map of workpieces, and can find the selected location according to the position selected by the measurement personnel on the global map. Sub image.

一種圖像合成系統,該系統利用電腦來進行圖像的合成,該電腦包括一個存儲有至少一張點陣圖及與該點陣圖位置相關的座標文件的資料庫,該電腦還包括一個點陣圖合併單元及一求子圖像單元,其中: An image synthesis system for synthesizing images using a computer, the computer comprising a database storing at least one bitmap and coordinate files associated with the position of the bitmap, the computer further including a point A merge unit and a seek image unit, wherein:

所述點陣圖合併單元用於依據資料庫中的座標文件將多個點陣圖進行合併以得到一張合併後的全局圖;及所述求子圖像單元用於根據在合併的全局圖中選定位置求該選定位置附近的子圖像。 The bitmap merge unit is configured to combine a plurality of bitmaps according to a coordinate file in the database to obtain a merged global map; and the sub-image unit is used according to the merged global map The selected position in the selected sub-image near the selected position.

所述的點陣圖合併單元包括邏輯矩形計算模組和圖元單位矩形添加模組,其中:該邏輯矩形計算模組,用於根據資料庫中每一個點陣圖的高度及寬度、及該點陣圖的中心座標轉換得到一個圖元單位矩形,再根據其中心座標將每一個圖元單位矩形合併得到一個大邏輯矩形;還用於計算大邏輯矩形縮小比例;該圖元單位矩 形添加模組,用於將上述轉換得到的所有圖元單位矩形按上述比例縮小,並將縮小後得到的點陣圖進行合併。 The bitmap merging unit includes a logical rectangle computing module and a primitive unit rectangular adding module, wherein: the logical rectangular computing module is configured to: according to a height and a width of each bitmap in the database, and the The center coordinate of the bitmap is converted to a primitive unit rectangle, and each primitive unit rectangle is combined according to its central coordinate to obtain a large logical rectangle; it is also used to calculate the large logical rectangle reduction ratio; The shape adding module is configured to reduce all the unit rectangles obtained by the above conversion according to the above ratio, and merge the reduced bitmaps.

本發明較佳實施例提供一種圖像合成方法,該方法包括如下步驟:計算一個大邏輯矩形,該大邏輯矩形是將資料庫中每一點陣圖轉換成圖元單位矩形並將其合併而成;計算大邏輯矩形的縮小比例;構造返回的點陣圖rcC,該點陣圖rcC是由大邏輯矩形按上述比例縮小映射而成的;打開點陣圖rcC;將點陣圖rcC清成背景色;讀取一張點陣圖的圖元單位矩形,將該圖元單位矩形按照上述比例縮小,重複該步驟直到所有的圖元單位矩形讀取完畢;將縮小後得到的點陣圖添加至點陣圖rcC得到一張合併的全局圖;及在全局圖上選定一位置,並求該選定位置附近的子圖像。 A preferred embodiment of the present invention provides an image synthesizing method. The method includes the following steps: calculating a large logical rectangle, which converts each dot map in the database into a unit rectangle of a primitive and merges them. Calculate the reduction ratio of the large logical rectangle; construct the returned bitmap rcC, which is formed by scaling the large logical rectangle according to the above scale; open the bitmap rcC; clear the bitmap rcC into the background Color; read the unit rectangle of a bitmap, reduce the unit rectangle of the primitive according to the above ratio, repeat this step until all the primitive unit rectangles are read; add the bitmap obtained after the reduction to The bitmap rcC obtains a merged global map; and selects a position on the global map and finds a sub-image near the selected location.

相較於習知技術,所述的圖像合成系統及方法,其可對多張點陣圖進行合併生成一張工件全局圖,並根據量測人員的在全局圖上選定位置求該選定位置附近子圖像,從而實現對圖像的離線量測,減少機台佔用時間以提高量測效率。 Compared with the prior art, the image synthesizing system and method can combine a plurality of dot patterns to generate a global map of the workpiece, and obtain the selected position according to the selected position of the measuring person on the global map. The nearby sub-images enable offline measurement of the image and reduce the occupation time of the machine to improve the measurement efficiency.

1‧‧‧電腦 1‧‧‧ computer

2‧‧‧X軸手動搖桿 2‧‧‧X-axis manual rocker

3‧‧‧Y軸手動搖桿 3‧‧‧Y-axis manual rocker

4‧‧‧Z軸手動搖桿 4‧‧‧Z-axis manual rocker

5‧‧‧待測工件 5‧‧‧Workpiece to be tested

6‧‧‧機台 6‧‧‧ machine

7‧‧‧電荷耦合裝置 7‧‧‧Charge-coupled device

10‧‧‧點陣圖合併單元 10‧‧‧ bitmap merge unit

11‧‧‧求子圖像單元 11‧‧‧Sub-image unit

12‧‧‧資料庫 12‧‧‧Database

圖1是本發明圖像合成系統較佳實施例的硬體架構圖。 1 is a hardware architecture diagram of a preferred embodiment of an image composition system of the present invention.

圖2是本發明圖像合成系統較佳實施例中圖像合併單元的功能模組圖。 2 is a functional block diagram of an image merging unit in a preferred embodiment of the image compositing system of the present invention.

圖3是本發明圖像合成方法的座標映射關係圖。 Fig. 3 is a diagram showing a coordinate mapping relationship of the image synthesizing method of the present invention.

圖4是本發明圖像合成方法較佳實施例的圖像合併流程圖。 4 is a flow chart of image merging in accordance with a preferred embodiment of the image synthesizing method of the present invention.

圖5是圖4中步驟計算大邏輯矩形rcA的子流程圖。 Figure 5 is a sub-flow diagram of the step of computing the large logical rectangle rcA in Figure 4.

圖6是圖4中步驟求全局圖上選定位置附近子圖像的子流程圖。 Figure 6 is a sub-flow diagram of the sub-images near the selected location on the global map in the step of Figure 4.

參閱圖1所示,是本發明圖像合成系統較佳實施例的硬體架構圖。該圖像合成系統(以下稱該系統)包括一電腦1及一放置待測工件5的機台6。其中,機台6的Z軸上還有用於採集連續圖像的電荷耦合裝置7(Charged Coupled Device,CCD),該電荷耦合裝置7裝有工業光學鏡頭,該電荷耦合裝置7透過該工業光學鏡頭來拍攝待測工件5的圖像。所述電腦1包括一資料庫12。該資料庫12既可位於電腦1中,也可獨立於電腦1。為方便描述,在本發明的較佳實施例中,該資料庫12位於電腦1中。電荷耦合裝置7透過圖像資料線與所述電腦1相連,該電荷耦合裝置7透過該圖像資料線將從機台6獲取的圖像傳送到電腦1上,該電腦1將該圖像保存至資料庫12中,同時該資料庫12還保存有一與圖像位置相關的座標文件。該座標文件包括每一張圖像的檔案名及其中心點座標,該座標是尺寸單位。由於每一張圖像都是以點陣圖bmp格式存儲的,因此以下以點陣圖來稱呼圖像。並以bmp0,bmp1…bmpn等來命名每一張圖像。每張點陣圖包括了點陣圖寬度及高度資訊。 Referring to Figure 1, there is shown a hardware architecture diagram of a preferred embodiment of the image composition system of the present invention. The image synthesizing system (hereinafter referred to as the system) includes a computer 1 and a machine table 6 on which the workpiece 5 to be tested is placed. The Z-axis of the machine 6 also has a charge coupled device (CCD) for collecting continuous images. The charge coupled device 7 is equipped with an industrial optical lens, and the charge coupled device 7 transmits the industrial optical lens. To take an image of the workpiece 5 to be tested. The computer 1 includes a database 12. The database 12 can be located either in the computer 1 or independently of the computer 1. For convenience of description, in a preferred embodiment of the present invention, the database 12 is located in the computer 1. The charge coupled device 7 is connected to the computer 1 through an image data line, and the charge coupled device 7 transmits the image acquired from the machine 6 to the computer 1 through the image data line, and the computer 1 saves the image. To the database 12, the database 12 also holds a coordinate file associated with the image location. The coordinate file includes the file name of each image and its center point coordinates, which is the unit of measure. Since each image is stored in bitmap bmp format, the image is referred to below as a bitmap. Name each image with bmp0, bmp1...bmpn, and so on. Each bitmap contains bitmap width and height information.

電腦1還包括一點陣圖合併單元10及一求子圖像單元11。所述點陣圖合併單元10用於依據資料庫12中的座標文件將多個點陣圖進行合併以得到一張合併後的全局圖BMP。所述求子圖像單元11用於求量測人員在合併的全局圖BMP中選定位置的子圖像。量測人員可對該返回的子圖像進行量測,從而實現對圖像的離線量測,提高量測效率以減少機台佔用時間。 The computer 1 further includes a dot matrix merging unit 10 and a sub-image unit 11. The bitmap merge unit 10 is configured to combine a plurality of bitmaps according to the coordinate file in the database 12 to obtain a merged global map BMP. The sub-image unit 11 is used to determine a sub-image of the selected position in the merged global map BMP by the surveying personnel. The measuring personnel can measure the returned sub-images, thereby realizing off-line measurement of the image and improving the measurement efficiency to reduce the occupation time of the machine.

該系統還包括一台顯示裝置(未示出),該顯示裝置與電腦1相連,用於提供互動介面,使得量測人員透過該顯示裝置觀看圖像合成過程及結果,並可以透過該顯示裝置向電腦1發出命令,以控制圖像的獲取或點陣圖的合成。 The system further includes a display device (not shown) coupled to the computer 1 for providing an interactive interface for the measurement personnel to view the image synthesis process and results through the display device and to pass through the display device A command is issued to the computer 1 to control the acquisition of the image or the synthesis of the bitmap.

所述機台6上還有一個X軸手動搖桿2,一個Y軸手動搖桿4及一個Z軸手動搖桿3。其中X軸手動搖桿2控制機台6左右移動,Y軸手動搖桿4控制機台6前後移動,機臺上的待測工件5隨控制機台6的移動而隨之移動;Z軸手動搖桿3控制機台6沿Z軸上下移動,從而調整電荷耦合裝置7和工業光學鏡頭相對待測工件5的距離以對待測工件5聚焦,得到待測工件5的圖像。 The machine table 6 also has an X-axis manual rocker 2, a Y-axis manual rocker 4 and a Z-axis manual rocker 3. The X-axis manual rocker 2 controls the machine 6 to move left and right, and the Y-axis manual rocker 4 controls the machine 6 to move back and forth. The workpiece 5 to be tested on the machine moves with the movement of the control machine 6; Z-axis manual The rocker 3 controls the machine table 6 to move up and down along the Z axis, thereby adjusting the distance between the charge coupled device 7 and the industrial optical lens relative to the workpiece 5 to be measured to focus the workpiece 5 to be measured, and obtaining an image of the workpiece 5 to be tested.

參閱圖2所示,是本發明圖像合成系統較佳實施例中點陣圖合併單元的功能模組圖。該點陣圖合併單元10包括一邏輯矩形計算模組100及一圖元單位矩形添加模組110。以下結合圖3來描述。 Referring to FIG. 2, it is a functional block diagram of a dot matrix merge unit in a preferred embodiment of the image composition system of the present invention. The bitmap merge unit 10 includes a logical rectangle calculation module 100 and a primitive unit rectangle addition module 110. This will be described below in conjunction with FIG.

其中邏輯矩形計算模組100根據資料庫12中每一個點陣圖bmp0,bmp1…bmpn的高度及寬度、及該點陣圖的中心座標轉換得到一個圖元單位矩形rcB,再根據其中心座標將每一個rcB合併得到一個大邏輯矩形rcA。該大邏輯矩形rcA是一個能夠包含所有的圖元單位矩形rcB同時達到面積最小的一個矩形。其中大邏輯矩形rcA的長為a、寬為b;每一圖元單位矩形rcB的長為c、寬為d。 The logical rectangle calculation module 100 converts a height and a width of each dot pattern bmp0, bmp1...bmpn in the database 12 and a central coordinate of the bitmap to obtain a primitive unit rectangle rcB, and then according to the central coordinate thereof Each rcB merges to get a large logical rectangle rcA. The large logical rectangle rcA is a rectangle that can contain all of the primitive unit rectangles rcB while achieving the smallest area. The large logical rectangle rcA has a length a and a width b; each primitive unit rectangle rcB has a length c and a width d.

該邏輯矩形計算模組100還用於計算大邏輯矩形rcA縮小比例S,即將大邏輯矩形rcA按照比例S縮小映射而成點陣圖rcC。其中S等於a/c與b/d中較大的值,即當a/c>b/d時,S=a/c;當a/c<b/d時 ,S=b/d。 The logical rectangle calculation module 100 is further configured to calculate a large logical rectangle rcA reduction ratio S, that is, the large logical rectangle rcA is reduced in proportion to the scale S to form a bitmap rcC. Where S is equal to the larger of a/c and b/d, ie, when a/c>b/d, S=a/c; when a/c<b/d , S=b/d.

該圖元單位矩形添加模組110用於將上述轉換得到的每一個圖元單位矩形rcB按比例S縮小映射而成點陣圖rcD,並將縮小後得到的點陣圖rcD添加至rcC中最終得到一張合併的點陣圖BMP。 The primitive unit rectangle adding module 110 is configured to reduce the scale unit rcB obtained by the above conversion into a bitmap rcD by scaling S, and add the reduced bitmap rcD to the rcC. Get a merged bitmap BMP.

參閱圖3所示,是本發明圖像合成方法的較佳實施例中的座標映射關係圖。如圖所示,大邏輯矩形rcA按照比例S縮小映射成點陣圖rcC,同樣,其中圖元單位矩形rcB也按照比例S縮小映射成點陣圖rcD。 Referring to FIG. 3, it is a coordinate mapping relationship diagram in a preferred embodiment of the image synthesizing method of the present invention. As shown in the figure, the large logical rectangle rcA is mapped to the dot pattern rcC according to the scale S, and likewise, the primitive unit rectangle rcB is also mapped to the dot pattern rcD according to the scale S.

參閱圖4所示,是本發明圖像合成方法的點陣圖合併流程圖。步驟S301,邏輯矩形計算模組100根據資料庫12中每一個點陣圖bmp0,bmp1…bmpn的高度及寬度、及該點陣圖的中心座標轉換得到一個圖元單位矩形rcB,再根據其中心座標將每一個rcB合併得到一個大邏輯矩形rcA。該大邏輯矩形rcA是一個能夠包含所有的圖元單位矩形rcB同時達到面積最小的一個矩形。其中大邏輯矩形rcA的長為a、寬為b;每一圖元單位矩rcB的長為c、寬為d。 Referring to FIG. 4, it is a dot matrix merge flow chart of the image synthesizing method of the present invention. Step S301, the logical rectangle calculation module 100 converts a height and a width of each dot pattern bmp0, bmp1...bmpn in the database 12 and a central coordinate of the bitmap to obtain a primitive unit rectangle rcB, and then according to the center thereof. The coordinates combine each rcB to get a large logical rectangle rcA. The large logical rectangle rcA is a rectangle that can contain all of the primitive unit rectangles rcB while achieving the smallest area. The large logical rectangle rcA has a length a and a width b; each primitive unit moment rcB has a length c and a width d.

步驟S302,計算大邏輯矩形rcA縮小比例S。其中S等於a/c與b/d中較大的值,即當a/c>b/d時,S=a/c;當a/c<b/d時,S=b/d。 In step S302, the large logical rectangle rcA reduction ratio S is calculated. Where S is equal to the larger value of a/c and b/d, that is, when a/c>b/d, S=a/c; when a/c<b/d, S=b/d.

步驟S303,構造返回的點陣圖rcC,該點陣圖rcC是由大邏輯矩形rcA按比例S縮小映射而成的。 In step S303, the returned bitmap rcC is constructed, and the bitmap rcC is formed by scaling down the large logical rectangle rcA.

步驟S304,打開點陣圖rcC以便於能夠編輯。 In step S304, the bitmap rcC is opened to be able to be edited.

步驟S305,將點陣圖rcC清成背景色。 In step S305, the bitmap rcC is cleared into a background color.

步驟S306,圖元單位矩形添加模組110讀取一張上述轉換得到的圖元單位矩形rcB。 In step S306, the primitive unit rectangle adding module 110 reads a unit unit rectangle rcB obtained by the above conversion.

步驟S307,將該讀取的圖元單位矩形rcB按照比例S縮小。 In step S307, the read primitive unit rectangle rcB is reduced by the scale S.

步驟S308,判斷當前讀取的圖元單位矩形rcB是否為最後一張。 In step S308, it is determined whether the currently read primitive unit rectangle rcB is the last one.

步驟S309,若當前讀取的圖元單位矩形rcB為最後一張,則將上述縮小後得到的點陣圖添加至點陣圖rcC,得到合併的全局圖BMP,該合併的全局圖BMP是最終呈現在量測人員面前的圖像。 Step S309, if the currently read primitive unit rectangle rcB is the last one, the bitmap image obtained by the reduction is added to the bitmap rcC to obtain a merged global map BMP, and the merged global map BMP is final. An image presented in front of the measurement personnel.

步驟S310,在全局圖BMP上選定一位置,並求該選定位置附近的子圖像,最後結束流程。 In step S310, a position is selected on the global map BMP, and a sub-image near the selected position is obtained, and finally the flow is ended.

若當前讀取的圖元單位矩形rcB不是最後一張,在步驟311中,讀取下一張圖元單位矩形rcB並返回步驟S307。 If the currently read primitive unit rectangle rcB is not the last one, in step 311, the next primitive unit rectangle rcB is read and the flow returns to step S307.

參閱圖5所示,是圖4中步驟計算大邏輯矩形rcA的子流程圖。步驟S401,邏輯矩形計算模組100讀取一張點陣圖。步驟S402,獲取該讀取的點陣圖的高H及寬W。步驟S403,讀取座標文件中對應該點陣圖的中心座標(X,Y),該中心座標單位為尺寸單位,如英寸等。步驟S404,將所述中心座標(X,Y)轉換成圖元單位。步驟S405,構造該點陣圖的圖元單位矩形rcB。步驟S406,判斷當前讀取的點陣圖是否為最後一張。若當前讀取的點陣圖為最後一張點陣圖,則在步驟S407,將以上得到的所有圖元單位矩形rcB進行合併,並得到大邏輯矩形rcA,最後流程結束。若當前讀取的點陣圖不是最後一張,則在步驟S408中,讀取下一張點陣圖,並返回步驟S402。 Referring to FIG. 5, it is a sub-flowchart for calculating the large logical rectangle rcA in the step of FIG. In step S401, the logical rectangle calculation module 100 reads a dot pattern. Step S402, obtaining a high H and a width W of the read bitmap. In step S403, the central coordinate (X, Y) corresponding to the bitmap is read in the coordinate file, and the central coordinate unit is a unit of size, such as an inch. Step S404, converting the central coordinate (X, Y) into a primitive unit. Step S405, constructing a primitive unit rectangle rcB of the bitmap. In step S406, it is determined whether the currently read bitmap is the last one. If the currently read bitmap is the last bitmap, then in step S407, all the primitive unit rectangles rcB obtained above are merged, and a large logical rectangle rcA is obtained, and finally the flow ends. If the currently read bitmap is not the last one, in step S408, the next dot map is read, and the flow returns to step S402.

參閱圖6所示,是圖4中步驟求全局圖上選定位置附近子圖像的子流程圖。步驟S701,求子圖像單元11在上述合併得到的點陣圖BMP上指定一點pt。步驟S702,計算點pt在rcA上的映射ptB。步驟S703,以ptB為中心構造矩形rcE。其中rcE的尺寸大小為rcA的1/S。步驟S704,將矩形rcE轉換成實際座標的矩形rcF。即將rcE轉換相對實際機械座標的矩形rcF。步驟S705,取第一張圖元單位矩形rcB。步驟S706,求圖元單位矩形rcB與矩形rcF的交集矩形rcG。步驟S707,複製上述得到的交集矩形rcG至矩形rcF。步驟S708,判斷當前讀取的圖元單位矩形是否為最後一張。若當前讀取的圖元單位矩形為最後一張,則於步驟S709,將上述交集矩形rcG合併成量測人員選定位置附近的子圖像,並利用邊緣平均法對該合併得到的子圖像去毛邊,最後流程結束。 Referring to Figure 6, there is a sub-flow diagram of the sub-images near the selected location on the global map in the steps of Figure 4. In step S701, the sub-image unit 11 specifies a point pt on the merged bitmap BMP. In step S702, the mapping ptB of the point pt on rcA is calculated. In step S703, the rectangle rcE is constructed centering on ptB. The size of rcE is 1/S of rcA. In step S704, the rectangle rcE is converted into the rectangle rcF of the actual coordinates. The rcE is about to convert the rectangle rcF relative to the actual mechanical coordinates. Step S705, taking the first primitive unit rectangle rcB. In step S706, the intersection rectangle rcG of the primitive unit rectangle rcB and the rectangle rcF is obtained. In step S707, the intersection rectangle rcG obtained above is copied to the rectangle rcF. Step S708, determining whether the currently read primitive unit rectangle is the last one. If the currently read primitive unit rectangle is the last one, then in step S709, the intersection rectangle rcG is merged into a sub-image near the selected position of the measurement personnel, and the merged sub-image is obtained by the edge averaging method. Go to the raw edge and the final process ends.

相反,若當前讀取的圖元單位矩形不是最後一張,則於步驟S710,讀取下一張圖元單位矩形rcB,並返回流程S706。 On the contrary, if the currently read primitive unit rectangle is not the last one, then in step S710, the next primitive unit rectangle rcB is read, and the flow returns to flow S706.

本發明圖像合成系統及方法,雖以較佳實施方式揭露如上,然其並非用以限定本發明。任何熟悉此項技藝之人士,在不脫離本發明之精神和範圍內,當可做更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 The image synthesizing system and method of the present invention are disclosed above in the preferred embodiments, but are not intended to limit the present invention. Any person skilled in the art will be able to make modifications and refinements without departing from the spirit and scope of the invention, and the scope of the invention is defined by the scope of the appended claims.

10‧‧‧點陣圖合併單元 10‧‧‧ bitmap merge unit

100‧‧‧邏輯矩形計算模組 100‧‧‧Logical Rectangular Computing Module

110‧‧‧圖元單位矩形添加模組 110‧‧‧Element unit rectangle adding module

Claims (8)

一種圖像合成系統,該系統利用電腦來進行圖像的合成,該電腦包括一個存儲有至少一張點陣圖及與該點陣圖位置相關的座標文件的資料庫,該電腦還包括一個點陣圖合併單元及一求子圖像單元,其中:所述點陣圖合併單元用於依據資料庫中的座標文件將多個點陣圖進行合併以得到一張合併後的全局圖;及所述求子圖像單元用於根據在合併的全局圖中選定位置求該選定位置附近的子圖像。 An image synthesis system for synthesizing images using a computer, the computer comprising a database storing at least one bitmap and coordinate files associated with the position of the bitmap, the computer further including a point a merge unit and a seek image unit, wherein: the bitmap merge unit is configured to combine a plurality of bitmaps according to a coordinate file in the database to obtain a merged global map; The sub-image unit is operative to find a sub-image near the selected location based on the selected location in the merged global map. 如申請專利範圍第1項所述的圖像合成系統,所述的點陣圖合併單元包括:邏輯矩形計算模組,用於根據資料庫中每一個點陣圖的高度、寬度及該點陣圖的中心座標轉換得到一個圖元單位矩形,再根據其中心座標將每一個圖元單位矩形合併得到一個大邏輯矩形;還用於計算大邏輯矩形縮小比例;圖元單位矩形添加模組,用於將上述轉換得到的所有圖元單位矩形按上述比例縮小,並將縮小後得到的點陣圖進行合併得到全局圖。 The image composition system of claim 1, wherein the bitmap merge unit comprises: a logical rectangle calculation module, configured to: according to a height, a width, and a lattice of each dot map in the database; The center coordinate of the graph is converted into a primitive unit rectangle, and then each primitive unit rectangle is combined according to its central coordinate to obtain a large logical rectangle; it is also used to calculate the large logical rectangle reduction ratio; the primitive unit rectangle is added to the module, All the primitive unit rectangles obtained by the above conversion are reduced according to the above ratio, and the reduced bitmaps are combined to obtain a global map. 如申請專利範圍第1項所述的圖像合成系統,其中所述的大邏輯矩形是一個能夠包含所有的圖元單位矩形同時達到面積最小的一個矩形。 The image composition system of claim 1, wherein the large logical rectangle is a rectangle capable of containing all of the primitive unit rectangles while achieving the smallest area. 如申請專利範圍第2項所述的圖像合成系統,其中所述的縮小比 例等於a/c與b/d中較大的值,其中a和b為大邏輯矩形的長和寬;c和d為每一圖元單位矩形的長和寬。 An image synthesizing system according to claim 2, wherein the reduction ratio is The example is equal to the larger of a/c and b/d, where a and b are the length and width of the large logical rectangle; c and d are the length and width of the rectangular unit of each primitive. 一種圖像合成方法,該方法包括步驟:計算一個大邏輯矩形,該大邏輯矩形是將資料庫中每一點陣圖轉換成圖元單位矩形並將其合併而成;計算大邏輯矩形的縮小比例;構造返回的點陣圖rcC,該點陣圖rcC是由大邏輯矩形按上述比例縮小映射而成的;打開點陣圖rcC;將點陣圖rcC清成背景色;讀取一張點陣圖的圖元單位矩形,將該圖元單位矩形按照上述比例縮小,重複該步驟直到所有的圖元單位矩形讀取完畢;將縮小後得到的點陣圖添加至點陣圖rcC得到一張合併後的全局圖;及在全局圖上選定一位置,並求該選定位置附近的子圖像。 An image synthesis method, the method comprising the steps of: calculating a large logical rectangle, wherein the large logical rectangle converts each dot pattern in the database into a unit rectangle of a primitive and merges them; and calculates a reduction ratio of the large logical rectangle Constructing the returned bitmap rcC, which is formed by scaling the large logical rectangle according to the above scale; opening the bitmap rcC; clearing the bitmap rcC to the background color; reading a dot matrix The primitive unit rectangle of the graph, the unit rectangle of the primitive is reduced according to the above ratio, and the step is repeated until all the unit unit rectangles are read; the bitmap obtained by the reduction is added to the bitmap rcC to obtain a merge. The global map; and select a position on the global map, and find the sub-image near the selected position. 如申請專利範圍第5項所述的圖像合成方法,所述的計算大邏輯矩形的步驟包括:獲取一張點陣圖的高及寬;讀取座標文件中對應該點陣圖的中心座標,該中心座標單位為尺寸單位;將所述中心座標轉換成圖元單位;構造該點陣圖的圖元單位矩形;重複上述步驟直到所有點陣圖讀取完畢;將以上得到的所有圖元單位矩形進行合併,得到大邏輯矩形。 The image synthesizing method according to claim 5, wherein the step of calculating a large logical rectangle comprises: acquiring a height and a width of a bitmap; and reading a coordinate coordinate of a coordinate file corresponding to a central coordinate of the bitmap; The central coordinate unit is a unit of size; the central coordinate is converted into a unit of the primitive; the unit rectangle of the bitmap is constructed; the above steps are repeated until all the bitmaps are read; all the primitives obtained above are obtained The unit rectangles are merged to get a large logical rectangle. 如申請專利範圍第5項所述的圖像合成方法,其中所述的大邏輯矩形是一個能夠包含所有的圖元單位矩形同時達到面積最小的一個矩形。 The image synthesizing method according to claim 5, wherein the large logical rectangle is a rectangle capable of containing all of the primitive unit rectangles while achieving the smallest area. 如申請專利範圍第5項所述的圖像合成方法,其中所述的縮小比例等於a/c與b/d中較大的值,其中a和b為大邏輯矩形的長和寬;c和d為每一圖元單位矩形的長和寬。 The image synthesizing method according to claim 5, wherein the reduction ratio is equal to a larger value of a/c and b/d, wherein a and b are length and width of a large logical rectangle; c and d is the length and width of the rectangle of each primitive unit.
TW95146144A 2006-12-08 2006-12-08 System and method synthesizing images TWI438714B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW95146144A TWI438714B (en) 2006-12-08 2006-12-08 System and method synthesizing images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW95146144A TWI438714B (en) 2006-12-08 2006-12-08 System and method synthesizing images

Publications (2)

Publication Number Publication Date
TW200825978A TW200825978A (en) 2008-06-16
TWI438714B true TWI438714B (en) 2014-05-21

Family

ID=44772242

Family Applications (1)

Application Number Title Priority Date Filing Date
TW95146144A TWI438714B (en) 2006-12-08 2006-12-08 System and method synthesizing images

Country Status (1)

Country Link
TW (1) TWI438714B (en)

Also Published As

Publication number Publication date
TW200825978A (en) 2008-06-16

Similar Documents

Publication Publication Date Title
CN101197044A (en) Image synthesis system and method
JP6363863B2 (en) Information processing apparatus and information processing method
KR100402043B1 (en) Non-contact type image reading apparatus and system using the same
US6937321B2 (en) Distance measuring method and image input device with distance measuring function
JP2010008352A (en) Size measuring method and size measuring device
US20080240546A1 (en) System and method for measuring digital images of a workpiece
JP6619516B2 (en) Damage diagram editing apparatus and damage diagram editing method
JPWO2019150799A1 (en) Repair length determination method and repair length determination device
CN111623942A (en) Displacement measurement method for test structure model of unidirectional vibration table
JP3618649B2 (en) An extended image matching method between images using an indefinite window
CN102592302B (en) Digital cartoon intelligent dynamic detection system and dynamic detection method
TWI510761B (en) System and method for focusing multiple measurement points on a surface of an object
JP4415101B2 (en) Image projection apparatus and image projection method
KR100740031B1 (en) Image processing method and contactless image input apparatus utilizing the method
TWI438714B (en) System and method synthesizing images
CN106340062A (en) Three-dimensional texture model file generating method and device
JP7329951B2 (en) Image processing device and its control method
CN107941241A (en) A kind of resolving power test target and its application method for aerophotogrammetry quality evaluation
CN112665528A (en) Correction method for laser scanning three-dimensional imaging
TWI397668B (en) System and method for correcting an image
CN114322839B (en) Method for detecting light spot contour
Streilein et al. Comparison of a S-VHS Camcorder and a High-Resolution CCD-Camera for use in Architectural Photogrammetry
TWI390412B (en) System and method for image processing offline
CN113269207B (en) Image feature point extraction method for grid structure light vision measurement
CN112197701B (en) Three-dimensional data extraction method applied to large-breadth workpiece

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees