TWI668464B - Positioning method for mobile electronic apparatus and positioning system - Google Patents
Positioning method for mobile electronic apparatus and positioning system Download PDFInfo
- Publication number
- TWI668464B TWI668464B TW107131784A TW107131784A TWI668464B TW I668464 B TWI668464 B TW I668464B TW 107131784 A TW107131784 A TW 107131784A TW 107131784 A TW107131784 A TW 107131784A TW I668464 B TWI668464 B TW I668464B
- Authority
- TW
- Taiwan
- Prior art keywords
- positioning
- image capturing
- coordinate information
- capturing device
- image
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C21/00—Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
- G01C21/20—Instruments for performing navigational calculations
- G01C21/206—Instruments for performing navigational calculations specially adapted for indoor navigation
Landscapes
- Engineering & Computer Science (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
一種移動式電子裝置的定位方法及定位系統。透過設置在移動式電子裝置的取像裝置拍攝定位標籤。定位標籤包括至少三個指定點。根據定位標籤來獲得至少三個指定點於世界座標系統中的座標資訊。根據至少三個指定點的座標資訊以及透過取像裝置拍攝定位標籤所獲得的影像來計算出取像裝置於世界座標系統的目標位置。A positioning method and positioning system for a mobile electronic device. The positioning tag is photographed through an image capturing device provided in the mobile electronic device. The positioning tag includes at least three designated points. According to the positioning label, at least three coordinate information of the specified point in the world coordinate system is obtained. The target position of the image capturing device in the world coordinate system is calculated based on the coordinate information of at least three specified points and the image obtained by capturing the positioning tag through the image capturing device.
Description
本發明是有關於一種定位機制,且特別是有關於一種移動式電子裝置的定位方法及定位系統。The present invention relates to a positioning mechanism, and in particular to a positioning method and positioning system for a mobile electronic device.
對於要在陌生的廠房環境中快速安排機台、裝備進駐與實際使用需要靠人員仔細量測並計算各種可能性之後才能完成。傳統的佈局方法需仰賴工程團隊依據廠房藍圖來設計佈局,並進行拉線、配管與安排機台位置。而隨著廠商所配置的機具越來越多的情況下,整個廠房充滿各種裝備,調整任何一部分都會牽扯到其他機台。It is only necessary to quickly arrange the machine, equipment station and actual use in a strange factory environment, and then carefully measure and calculate various possibilities. The traditional layout method relies on the engineering team to design the layout according to the factory blueprint, and to pull, pipe and arrange the machine position. With the increasing number of machines configured by the manufacturers, the entire plant is full of various equipment, and any part of the adjustment will involve other machines.
而廠房屬於室內空間,因此無法在廠房內採用傳統全球定位系統(Global Positioning System,GPS)來作為定位技術。而雖然目前已具有超寬頻(Ultra Wideband, UWB)的室內定位技術,由於廠房內包括各種精密機器,因此倘若採用UWB的室內定位技術,則其無線訊號將會影響廠房內的機器運作。The factory is an indoor space, so the traditional Global Positioning System (GPS) cannot be used as a positioning technology in the factory. Although there is an ultra-wideband (UWB) indoor positioning technology, because the factory includes various sophisticated machines, if UWB's indoor positioning technology is adopted, its wireless signal will affect the operation of the machine in the factory.
本發明提供一種移動式電子裝置的定位方法,只需簡單配置定位標籤與取像裝置即可精準定位。The invention provides a positioning method of a mobile electronic device, which can be accurately positioned by simply configuring a positioning tag and an image capturing device.
本發明的移動式電子裝置的定位方法,包括:透過設置在移動式電子裝置的取像裝置拍攝定位標籤,其中定位標籤包括至少三個指定點;根據定位標籤來獲得至少三個指定點於世界座標系統中的座標資訊;以及根據至少三個指定點的座標資訊以及透過取像裝置拍攝定位標籤所獲得的影像來計算出取像裝置於世界座標系統的目標位置。The positioning method of the mobile electronic device of the present invention comprises: capturing a positioning tag through an image capturing device disposed in the mobile electronic device, wherein the positioning tag includes at least three designated points; and obtaining at least three designated points in the world according to the positioning tag Coordinate information in the coordinate system; and calculating the target position of the image capturing device in the world coordinate system based on the coordinate information of at least three specified points and the image obtained by capturing the positioning tag through the image capturing device.
在本發明的一實施例中,上述定位方法更包括:在取像裝置的可視範圍內偵測是否存在定位標籤。In an embodiment of the invention, the positioning method further includes: detecting whether a positioning tag exists in a visible range of the image capturing device.
在本發明的一實施例中,在取像裝置的可視範圍內偵測是否存在定位標籤的步驟包括:擷取目標圖像;利用物件偵測演算法在目標圖像中框出候選物件;辨識候選物件的特徵資料是否符合預設特徵資料;以及在特徵資料符合預設特徵資料時,判定存在定位標籤。In an embodiment of the invention, the step of detecting whether the positioning tag exists in the visible range of the image capturing device comprises: capturing the target image; and using the object detection algorithm to frame the candidate object in the target image; Whether the feature data of the candidate object meets the preset feature data; and when the feature data meets the preset feature data, it is determined that the positioning tag exists.
在本發明的一實施例中,根據定位標籤來獲得至少三個指定點的座標資訊的步驟包括:根據定位標籤連線至伺服器,而自伺服器中獲得與定位標籤相對應的至少三個指定點的座標資訊。In an embodiment of the invention, the step of obtaining the coordinate information of the at least three specified points according to the positioning label comprises: connecting to the server according to the positioning label, and obtaining at least three corresponding to the positioning label from the server Specifies the coordinate information of the point.
在本發明的一實施例中,上述定位標籤中記載有至少三個指定點的座標資訊。In an embodiment of the invention, coordinate information of at least three designated points is recorded in the positioning tag.
在本發明的一實施例中,上述定位方法更包括:利用立體建模系統掃描指定空間以建立空間模型;於指定空間中決定多個標籤位置,其中這些標籤位置分別用以設置多個定位標籤;掃描多個定位標籤,以獲得每一個定位標籤所包括的至少三個指定點的相對位置;以及查詢世界座標系統來設定至少三個指定點的座標資訊。In an embodiment of the present invention, the positioning method further includes: scanning a specified space by using a stereo modeling system to establish a spatial model; determining a plurality of label positions in the designated space, wherein the label positions are respectively used to set a plurality of positioning labels Scanning a plurality of positioning tags to obtain a relative position of at least three specified points included in each of the positioning tags; and querying the world coordinate system to set coordinate information of at least three specified points.
在本發明的一實施例中,利用立體建模系統掃描指定空間以產生空間模型的步驟包括:劃分指定空間為多個區域;利用立體建模系統掃描這些區域而建立多個區塊小模型;以及合併這些區塊小模型以產生空間模型。In an embodiment of the present invention, the step of scanning a specified space by the stereo modeling system to generate a spatial model includes: dividing the designated space into a plurality of regions; and scanning the regions by using a stereo modeling system to establish a plurality of small block models; And merging these small block models to produce a spatial model.
在本發明的一實施例中,根據至少三個指定點的座標資訊來計算出取像裝置於世界座標系統的目標位置的步驟包括:基於相機成像原理,利用所述影像以及至少三個指定點的座標資訊,計算轉換矩陣;基於定位標籤的實際邊長與定位標籤成像於所述影像中的成像邊長,計算邊長比例;利用至少三個指定點的座標資訊、邊長比例以及取像裝置的焦距來計算取像裝置相對於定位標籤的相對座標;以及基於轉換矩陣將相對座標轉換為於世界座標系統的目標位置。In an embodiment of the invention, the step of calculating the target position of the image capturing device in the world coordinate system according to the coordinate information of the at least three specified points comprises: utilizing the image and at least three specified points based on a camera imaging principle Coordinate information, calculating a transformation matrix; calculating the length of the side length based on the actual side length of the positioning label and the imaging side length of the positioning label imaged in the image; using coordinate information, side length ratio, and image capturing of at least three specified points A focal length of the device to calculate a relative coordinate of the imaging device relative to the positioning tag; and converting the relative coordinate to a target position of the world coordinate system based on the transformation matrix.
在本發明的一實施例中,所述定位標籤為一圖碼。In an embodiment of the invention, the positioning tag is a graphic code.
本發明的定位系統包括:定位標籤,包括至少三個指定點;以及移動式電子裝置,包括:取像裝置以及處理器。取像裝置用以拍攝定位標籤。處理器耦接至取像裝置,透過取像裝置拍攝定位標籤,根據定位標籤來獲得至少三個指定點的座標資訊,並且根據至少三個指定點於一世界座標系統中的座標資訊以及透過取像裝置拍攝定位標籤所獲得的影像來計算出取像裝置於世界座標系統的目標位置。The positioning system of the present invention comprises: a positioning tag comprising at least three designated points; and a mobile electronic device comprising: an image capturing device and a processor. The image capture device is used to capture the positioning tag. The processor is coupled to the image capturing device, and the positioning label is photographed by the image capturing device, and the coordinate information of at least three specified points is obtained according to the positioning label, and the coordinate information according to at least three specified points in a world coordinate system and the transmission information are obtained. The image obtained by the positioning camera is imaged by the device to calculate the target position of the image capturing device in the world coordinate system.
基於上述,在室內空間設置定位標籤以協助定位,可解決傳統全球定位系統(Global Positioning System,GPS)無法在室內使用的問題,並且利用取像裝置搭配定位標籤的協助,可解決利用無線訊號進行定位而影響機台運作的問題。Based on the above, setting a positioning tag in the indoor space to assist positioning can solve the problem that the conventional Global Positioning System (GPS) cannot be used indoors, and the use of the image capturing device and the positioning tag can solve the problem of using the wireless signal. Positioning affects the operation of the machine.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.
圖1是依照本發明一實施例的定位系統的方塊圖。請參照圖1,定位系統10包括移動式電子裝置100、定位標籤150以及伺服器160。移動式電子裝置100為具有運算能力的電子裝置,例如為機器人。移動式電子裝置100可應用於無人機或無人車來實行工廠的運輸自動化,透過下述定位方法可避免使用無線電訊號在工廠內可能造成的干擾而影響生產。另外,在其他實施例中,移動式電子裝置100也可以是筆記型電腦、平板電腦、數位相機、智慧型手機或智慧型手錶等。移動式電子裝置100包括取像裝置110、處理器120、儲存裝置130以及通訊裝置140。處理器120耦接至取像裝置110、儲存裝置130以及通訊裝置140。1 is a block diagram of a positioning system in accordance with an embodiment of the present invention. Referring to FIG. 1 , the positioning system 10 includes a mobile electronic device 100 , a positioning tag 150 , and a server 160 . The mobile electronic device 100 is an electronic device having computing power, such as a robot. The mobile electronic device 100 can be applied to a drone or an unmanned vehicle to implement the transportation automation of the factory. The following positioning method can avoid the interference caused by the use of the radio signal in the factory and affect the production. In addition, in other embodiments, the mobile electronic device 100 can also be a notebook computer, a tablet computer, a digital camera, a smart phone, or a smart watch. The mobile electronic device 100 includes an image capturing device 110, a processor 120, a storage device 130, and a communication device 140. The processor 120 is coupled to the image capturing device 110, the storage device 130, and the communication device 140.
在此,移動式電子裝置100利用通訊裝置140經由網際網路170連線至伺服器160。而伺服器160與通訊裝置140可視需求選擇性配置。即,在其他實施例中,定位系統10中可不包括伺服器160,而移動式電子裝置100可不包括通訊裝置140。通訊裝置140例如為網路卡、WiFi晶片、行動通訊晶片等。Here, the mobile electronic device 100 is connected to the server 160 via the Internet 170 using the communication device 140. The server 160 and the communication device 140 are selectively configured as needed. That is, in other embodiments, the server 160 may not be included in the positioning system 10, and the mobile electronic device 100 may not include the communication device 140. The communication device 140 is, for example, a network card, a WiFi chip, a mobile communication chip, or the like.
取像裝置110可以是採用了電荷耦合元件(Charge coupled device,CCD)鏡頭、互補式金氧半電晶體(Complementary metal oxide semiconductor transistors,CMOS)鏡頭的攝影機、照相機等。The image capturing device 110 may be a camera, a camera, or the like using a charge coupled device (CCD) lens or a complementary metal oxide semiconductor transistor (CMOS) lens.
處理器120可採用中央處理單元(Central Processing Unit,CPU)、圖像處理單元(Graphic Processing Unit,GPU)、物理處理單元(Physics Processing Unit,PPU)、可程式化之微處理器(Microprocessor)、嵌入式控制晶片、數位訊號處理器(Digital Signal Processor,DSP)、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)或其他類似裝置來實現。The processor 120 can be a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a programmable microprocessor (Microprocessor), It is implemented by an embedded control chip, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or the like.
儲存裝置130可採用任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、安全數位卡(Secure Digital Memory Card,SD)、硬碟或其他類似裝置或這些裝置的組合來實現。儲存裝置130中儲存有由一或多個程式碼片段組成的模組,由處理器120執行所述模組,進而實現下述定位方法。The storage device 130 can adopt any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, and security. A Digital Card (Secure Digital Memory Card, SD), a hard disk, or other similar device or a combination of these devices is implemented. The storage device 130 stores a module consisting of one or more code segments, and the processor 120 executes the module to implement the following positioning method.
圖2是依照本發明一實施例用於移動式電子裝置100的定位方法的流程圖。請參照圖1及圖2,在步驟205中,移動式電子裝置100透過取像裝置110拍攝定位標籤150。在本實施例中,定位標籤150可以採用貼紙方式來實現,在定位標籤150可為一圖碼。所述圖碼可以是二維條碼。例如,定位標籤150為快速響應矩陣圖碼(Quick Response Code,QR碼)。在其他實施例中,定位標籤150並不限定於QR碼,也可以採用漢信碼(Han Xin Code)。2 is a flow chart of a method for locating a mobile electronic device 100 in accordance with an embodiment of the present invention. Referring to FIG. 1 and FIG. 2 , in step 205 , the mobile electronic device 100 captures the positioning tag 150 through the image capturing device 110 . In this embodiment, the positioning tag 150 can be implemented by using a sticker manner, and the positioning tag 150 can be a graphic code. The graphic code may be a two-dimensional barcode. For example, the positioning tag 150 is a Quick Response Code (QR code). In other embodiments, the positioning tag 150 is not limited to the QR code, and a Han Xin Code may also be used.
接著,在步驟S210中,移動式電子裝置100根據定位標籤來獲得三個指定點於世界座標系統(world coordinate system)中的座標資訊。在此,定位標籤150中包括至少三個指定點。而所述指定點可以是定位標籤150所包括的特定圖形。以QR碼為例,可將QR碼3個角落所印置的三個方塊點來作為指定點。另外,也可以在定位標籤150上額外設置至少三個特定圖形來作為指定點。而指定點的數量為至少三個,在其他實施例中,亦可設置為四個或四個以上的指定點,在此並不限定。Next, in step S210, the mobile electronic device 100 obtains coordinate information of three designated points in the world coordinate system according to the positioning tag. Here, the positioning tag 150 includes at least three designated points. The specified point may be a specific graphic included in the positioning tag 150. Taking the QR code as an example, three square points printed on three corners of the QR code can be used as the designated points. In addition, at least three specific patterns may be additionally set on the positioning tag 150 as designated points. The number of designated points is at least three. In other embodiments, four or more specified points may be set, which is not limited herein.
之後,在步驟S215中,移動式電子裝置100根據三個指定點的座標資訊以及透過取像裝置110拍攝定位標籤150所獲得的影像來計算出取像裝置120於世界座標系統的目標位置。例如,處理器120利用至少三個指定點的座標資訊、邊長比例以及取像裝置120的焦距來計算取像裝置120相對於定位標籤150的相對座標。所述邊長比例為處理器120透過取像裝置110對定位標籤150進行拍攝而獲得一影像,之後根據定位標籤150成像於影像中的成像邊長以及定位標籤150的實際邊長所計算獲得。Then, in step S215, the mobile electronic device 100 calculates the target position of the image capturing device 120 in the world coordinate system based on the coordinate information of the three designated points and the image obtained by the image capturing device 110 capturing the positioning tag 150. For example, the processor 120 calculates the relative coordinates of the image capturing device 120 with respect to the positioning tag 150 using the coordinate information of at least three specified points, the aspect ratio, and the focal length of the image capturing device 120. The side length ratio is obtained by the processor 120 capturing the positioning label 150 through the image capturing device 110 to obtain an image, and then calculated according to the imaging side length imaged by the positioning label 150 in the image and the actual side length of the positioning label 150.
在獲得取像裝置120相對於定位標籤150的相對座標之後,例如,利用取像裝置110的內部參數(intrinsic parameter)、外部參數(extrinsic parameter)以及至少三個指定點的座標資訊,便可計算出取像裝置120的座標位置(世界座標)。即,基於相機成像原理,利用透過取像裝置120拍攝定位標籤150所獲得的影像以及至少三個指定點的座標資訊,計算轉換矩陣。之後,基於轉換矩陣將相對座標轉換為於世界座標系統的目標位置。After obtaining the relative coordinates of the image capturing device 120 with respect to the positioning tag 150, for example, using the intrinsic parameter, the extrinsic parameter of the image capturing device 110, and the coordinate information of at least three specified points, the calculation can be performed. The coordinate position (world coordinates) of the image capturing device 120 is taken out. That is, based on the principle of camera imaging, the conversion matrix is calculated by capturing the image obtained by the positioning tag 150 by the image capturing device 120 and the coordinate information of at least three specified points. The relative coordinates are then converted to the target position of the world coordinate system based on the transformation matrix.
一般來說,世界座標經過取像裝置110的外部參數的作用而轉換成為取像裝置110的相機座標(camera coordinate),而取像裝置110的相機座標再經過內部參數的投影作用轉換成所拍攝影像的像素座標(pixel coordinate)。據此,處理器120可利用所拍攝影像來推算出世界座標。Generally, the world coordinates are converted into the camera coordinates of the image capturing device 110 by the external parameters of the image capturing device 110, and the camera coordinates of the image capturing device 110 are converted into the captured images by the projection of internal parameters. The pixel coordinate of the image. Accordingly, the processor 120 can use the captured image to derive the world coordinates.
首先,利用取像裝置110對於位在三維世界座標中的物件(例如定位標籤150)進行拍攝。取像裝置110利用下述公式(1)將世界座標轉換為相機座標。First, the image capturing device 110 is used to capture an object (for example, the positioning tag 150) positioned in the three-dimensional world coordinates. The image capturing device 110 converts the world coordinates into camera coordinates using the following formula (1).
公式(1) P c= R (P w- C) 其中,C=(c x, c y, c z),其為世界座標系統中的原點。 Equation (1) P c = R (P w - C) where C = (c x , c y , c z ), which is the origin in the world coordinate system.
在公式(1)中,P w為物件的世界座標,P w=(X, Y, Z);P c為物件的相機座標,P c=(X camera, Y camera, Z camera),R為3×3的旋轉矩陣(r 11~r 33),t為3×1位移矩陣(t x 、t y 、t z)。旋轉矩陣R與位移矩陣t構成外部參數矩陣。公式(1)可轉換為下述公式(2)。 In formula (1), P w is the world coordinate of the object, P w = (X, Y, Z); P c is the camera coordinate of the object, P c = (X camera , Y camera , Z camera ), R is A 3 × 3 rotation matrix (r 11 to r 33 ), t is a 3 × 1 displacement matrix (t x , t y , t z ). The rotation matrix R and the displacement matrix t constitute an external parameter matrix. Equation (1) can be converted into the following formula (2).
公式(2) Formula (2)
在將物件的世界座標P w轉換成物件的相機座標P c後,所得到的物件的相機座標P c是相對於取像裝置120的焦距f的位置,因此可以再將此物件的相機座標P c轉換為取像裝置120的成像平面座標,也就是影像的螢幕座標(x, y)。在針孔相機成相模型(Pinhole Camera Model)下,相機座標P c(X camera, Y camera, Z camera)投影在成像平面的螢幕座標(x, y),如公式(3)所示。 After converting the object into an object world coordinate P W P C camera coordinates, the resulting object coordinate P C is the position of the camera focal length f 120 of the apparatus with respect to imaging, this can be another object of the camera coordinate P c is converted to the imaging plane coordinates of the image capturing device 120, that is, the screen coordinates (x, y) of the image. In the pinhole camera model (Pinhole Camera Model), the camera coordinates P c (X camera , Y camera , Z camera ) are projected on the screen coordinates (x, y) of the imaging plane, as shown in equation (3).
公式(3) Formula (3)
接著,以三維座標(x', y', z')來代表二維的像素座標(x, y),如公式(4)所示,其中,x=x'/z';y=y'/z'。Next, the two-dimensional pixel coordinates (x, y) are represented by three-dimensional coordinates (x', y', z'), as shown in the formula (4), where x=x'/z'; y=y' /z'.
公式(4) Formula (4)
由於螢幕座標的原點位於中心,但是像素座標的原點位於左上角,因此以下述公式(5)來修正其偏移。其中,(o x, o y)為螢幕中心座標,f為取像裝置120的焦距。 Since the origin of the screen coordinates is at the center, but the origin of the pixel coordinates is at the upper left corner, the offset is corrected by the following formula (5). Where (o x , o y ) is the center coordinates of the screen, and f is the focal length of the image capturing device 120.
公式(5) Formula (5)
接著,如下述轉換,將相機座標轉換至像素座標。其中,(s x, s y)代表像素的實際大小,其單位例如為mm,f x、f y為以像素為單位的焦距距離。 其中,內部參數矩陣= ; 外部參數矩陣= 。 Next, the camera coordinates are converted to pixel coordinates as described below. Where (s x , s y ) represents the actual size of the pixel, the unit of which is, for example, mm, and f x and f y are focal lengths in units of pixels. Among them, the internal parameter matrix = ; external parameter matrix = .
基於上述可以知道:物件的相機座標=外部參數矩陣×物件的世界座標;像素座標=內部參數矩陣×物件的相機座標。故,像素座標=內部參數矩陣×外部參數矩陣×物件的世界座標。Based on the above, it can be known that the camera coordinates of the object = external parameter matrix × world coordinates of the object; pixel coordinates = internal parameter matrix × camera coordinates of the object. Therefore, the pixel coordinates = internal parameter matrix × external parameter matrix × world coordinates of the object.
據此,要由像素座標來獲得世界座標,則先將像素座標轉換為螢幕座標,接著將螢幕座標轉換為相機座標,之後將相機座標轉換為世界座標。而要從像素座標轉換到相機座標,必須使用內部參數和失真(distortion)係數對影像的像素點進行無失真(undistort)處理,以使其返回到相機座標。接下來,將相機座標映射回世界座標。Accordingly, to obtain the world coordinates from the pixel coordinates, the pixel coordinates are first converted to screen coordinates, then the screen coordinates are converted to camera coordinates, and then the camera coordinates are converted to world coordinates. To convert from pixel coordinates to camera coordinates, the pixels of the image must be undistorted using internal parameters and distortion coefficients to return them to the camera coordinates. Next, map the camera coordinates back to the world coordinates.
外部參數矩陣[R|t]為: 而描述取像裝置120姿勢的轉換矩陣為[R c|C]。 基於上述可獲得: The external parameter matrix [R|t] is: The conversion matrix describing the posture of the image capturing device 120 is [R c |C]. Based on the above:
據此,利用上述轉換矩陣[R c|C]對取像裝置120的相對座標進行反向運算,便可獲得取像裝置120於世界座標系統的目標位置。 According to this, by using the above-described conversion matrix [R c |C] to inversely calculate the relative coordinates of the image capturing device 120, the target position of the image capturing device 120 in the world coordinate system can be obtained.
圖3是依照本發明一實施例的以QR碼作為定位標籤的示意圖。請參照圖3,QR碼呈正方形,在QR碼的3個角落具有三個方塊點,即指定點A1~A3。在透過取像裝置110拍攝QR碼而獲得一影像之後,處理器120根據QR碼來獲得指定點A1~A3的座標資訊。在本實施例中,將指定點A1~A3的座標資訊儲存在遠端的伺服器160中,並在QR碼中寫入伺服器160的連線位址。當處理器120解析QR碼而獲得伺服器160的連線位址之後,便會透過通訊裝置140連線至伺服器160,據以獲得指定點A1~A3的座標資訊。而在其他實施例中,亦可直接將指定點A1~A3的座標資訊寫入在QR碼中。3 is a schematic diagram of a QR code as a positioning tag in accordance with an embodiment of the present invention. Referring to FIG. 3, the QR code is square, and has three square points in three corners of the QR code, that is, designated points A1 to A3. After obtaining an image by capturing the QR code through the image capturing device 110, the processor 120 obtains coordinate information of the designated points A1 to A3 based on the QR code. In the present embodiment, the coordinate information of the designated points A1 to A3 is stored in the remote server 160, and the connection address of the server 160 is written in the QR code. After the processor 120 parses the QR code to obtain the connection address of the server 160, it is connected to the server 160 through the communication device 140 to obtain the coordinate information of the designated points A1 to A3. In other embodiments, the coordinate information of the specified points A1 to A3 may be directly written in the QR code.
所述定位方法更包括在取像裝置110的可視範圍內偵測是否存在定位標籤。處理器120透過取像裝置110來持續擷取目標圖像並進行分析,以判斷可視範圍內是否存在定位標籤。在判定存在定位標籤時,便可進行定位。The positioning method further includes detecting whether a positioning tag exists in the visible range of the image capturing device 110. The processor 120 continuously captures the target image through the image capturing device 110 and performs analysis to determine whether a positioning tag exists in the visible range. When it is determined that there is a positioning tag, positioning can be performed.
圖4是依照本發明一實施例用於移動式電子裝置100的偵測定位標籤的方法流程圖。請參照圖4,在步驟S405中,移動式電子裝置100利用物件偵測演算法在目標圖像中框出候選物件。接著,在步驟S415中,移動式電子裝置100找出候選物件的特徵資料。例如,特徵資料為外框、顏色、大小、特徵點等。FIG. 4 is a flow chart of a method for detecting a positioning tag of the mobile electronic device 100 according to an embodiment of the invention. Referring to FIG. 4, in step S405, the mobile electronic device 100 frames the candidate object in the target image by using the object detection algorithm. Next, in step S415, the mobile electronic device 100 finds the feature data of the candidate object. For example, the feature data is a frame, a color, a size, a feature point, and the like.
之後,在步驟315中,讀取資料庫。資料庫中儲存了多個預設特徵資料。並且,在步驟S320中,移動式電子裝置100辨識候選物件的特徵資料是否符合預設特徵資料。在此,預設特徵資料例如為QR碼的特徵資料。在候選物件的特徵資料符合預設特徵資料時,如步驟S425所示,移動式電子裝置100判定可視範圍內存在定位標籤,之後便可執行步驟S205~步驟S215,藉此來獲得取像裝置110(即,移動式電子裝置)的座標位置。而在特徵資料不符合預設特徵資料時,如步驟S430所示,判定可視範圍內不存在定位標籤。Thereafter, in step 315, the database is read. A plurality of preset feature data are stored in the database. Moreover, in step S320, the mobile electronic device 100 recognizes whether the feature data of the candidate object meets the preset feature data. Here, the preset feature data is, for example, feature data of a QR code. When the feature data of the candidate object meets the preset feature data, as shown in step S425, the mobile electronic device 100 determines that the positioning tag exists in the visible range, and then performs steps S205 to S215, thereby obtaining the image capturing device 110. (ie, mobile electronic device) coordinate position. When the feature data does not meet the preset feature data, as shown in step S430, it is determined that there is no positioning tag in the visible range.
另一方面,在進行定位之前,可先以立體建模系統掃描指定空間以建立空間模組。以廠房內部空間作為指定空間為例,利用立體建模系統來逐一掃描廠房內部的多個區域,進而建立區塊小模型。區塊小模型包括現有的配線、設備與裝置。在獲得各區域對應的區塊小模型之後,將這些小模型合併為大模型,也就是整個廠房對應的空間模型。On the other hand, before positioning, the specified space can be scanned with a stereo modeling system to create a spatial module. Taking the internal space of the factory as the designated space as an example, a three-dimensional modeling system is used to scan multiple areas inside the plant one by one, and then a small block model is established. The small block model includes existing wiring, equipment and devices. After obtaining the small block models corresponding to each region, these small models are merged into a large model, that is, a spatial model corresponding to the entire plant.
在建立出空間模型之後,可利用物件偵測演算法來找出物件的粗略位置,之後利用圖像匹配(pattern match)的方式來找到真實位置,並標示出物件的外框以建立對應的立體模型。透過所述方式,便可標示出廠房中的不可動物件與可移動物件。將不可活動的物件作為佈局基礎(layout base),在佈局基礎上配置可以移動的各物件,並透過模擬器模擬各項可能的結果,找出最佳空間配置與最大產能。After the spatial model is established, the object detection algorithm can be used to find the rough position of the object, and then the pattern match is used to find the real position, and the outer frame of the object is marked to establish the corresponding stereo. model. In this way, non-animal and movable objects in the plant can be marked. Use the non-movable object as the layout base, configure the objects that can be moved based on the layout, and simulate the possible results through the simulator to find the optimal space configuration and maximum capacity.
之後,在指定空間(例如為廠房的整個廠區)中決定多個標籤位置。這些標籤位置是用來分別設定多個定位標籤。之後,透過具有取像裝置的移動式電子裝置來掃描這些定位標籤,以獲得每一個定位標籤所包括的至少三個指定點的相對位置,之後查詢世界座標系統來設定至少三個指定點的座標資訊(世界座標)。據此,在建模階段便能夠設定在指定空間的多個定位標籤的座標位置,並將這些座標位置寫入至伺服器160中。之後,倘若更動了定位標籤的所在位置,則只要修改伺服器160中對應的資料即可,可重複使用這些定位標籤。After that, multiple label locations are determined in the designated space (for example, the entire plant area of the plant). These tag positions are used to individually set a plurality of positioning tags. Thereafter, the positioning tags are scanned through the mobile electronic device having the image capturing device to obtain the relative positions of at least three specified points included in each of the positioning tags, and then the world coordinate system is queried to set the coordinates of at least three specified points. Information (world coordinates). Accordingly, the coordinate positions of the plurality of positioning tags in the designated space can be set in the modeling stage, and the coordinate positions are written into the server 160. Then, if the location of the positioning tag is changed, the corresponding data in the server 160 can be modified, and the positioning tags can be reused.
綜上所述,本發明只需簡單配置定位標籤與取像裝置即可精準定位。以定位標籤為開發之基礎,設計指定空間的世界座標系統,設定定位標籤的至少三個指定點的世界座標,以視覺方式觀察三點與相機成像位置差距,藉此來完成定位系統。另外,建模、物件偵測、定位系統的整合突破傳統製造線安排的限制,將剩餘的產能集中利用,讓資源使用最大化。而空間安排佈局與廠房的利用,可透過模型的模擬來達到成效之評估,達前所未有之成效。In summary, the present invention can be accurately positioned by simply configuring the positioning tag and the image capturing device. Based on the development of the positioning label, the world coordinate system of the designated space is designed, and the world coordinates of at least three specified points of the positioning label are set, and the difference between the three points and the imaging position of the camera is visually observed to complete the positioning system. In addition, the integration of modeling, object detection, and positioning systems breaks through the limitations of traditional manufacturing line arrangements, and the remaining capacity is concentrated to maximize resource use. The layout of the space arrangement and the use of the factory can be used to achieve an evaluation of the results through simulation of the model, achieving unprecedented results.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed in the above embodiments, it is not intended to limit the present invention, and any one of ordinary skill in the art can make some changes and refinements without departing from the spirit and scope of the present invention. The scope of the invention is defined by the scope of the appended claims.
10‧‧‧定位系統10‧‧‧ Positioning System
100‧‧‧移動式電子裝置 100‧‧‧Mobile electronic devices
110‧‧‧取像裝置 110‧‧‧Image capture device
120‧‧‧處理器 120‧‧‧ processor
130‧‧‧儲存裝置 130‧‧‧Storage device
140‧‧‧通訊裝置 140‧‧‧Communication device
150‧‧‧定位標籤 150‧‧‧ Positioning label
160‧‧‧伺服器 160‧‧‧Server
170‧‧‧網際網路 170‧‧‧Internet
A1~A3‧‧‧指定點 A1~A3‧‧‧ designated points
S205~S215‧‧‧定位方法各步驟 S205~S215‧‧‧ positioning method steps
S405~S430‧‧‧偵測定位標籤的方法各步驟 S405~S430‧‧‧Methods for detecting positioning tags
圖1是依照本發明一實施例的定位系統的方塊圖。 圖2是依照本發明一實施例的定位方法的流程圖。 圖3是依照本發明一實施例的以QR碼作為定位標籤的示意圖。 圖4是依照本發明一實施例的偵測定位標籤的方法流程圖。1 is a block diagram of a positioning system in accordance with an embodiment of the present invention. 2 is a flow chart of a positioning method in accordance with an embodiment of the present invention. 3 is a schematic diagram of a QR code as a positioning tag in accordance with an embodiment of the present invention. 4 is a flow chart of a method for detecting a positioning tag according to an embodiment of the invention.
Claims (13)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107131784A TWI668464B (en) | 2018-09-10 | 2018-09-10 | Positioning method for mobile electronic apparatus and positioning system |
CN201910645125.2A CN110887469A (en) | 2018-09-10 | 2019-07-17 | Positioning method and positioning system of mobile electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107131784A TWI668464B (en) | 2018-09-10 | 2018-09-10 | Positioning method for mobile electronic apparatus and positioning system |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI668464B true TWI668464B (en) | 2019-08-11 |
TW202011042A TW202011042A (en) | 2020-03-16 |
Family
ID=68316202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107131784A TWI668464B (en) | 2018-09-10 | 2018-09-10 | Positioning method for mobile electronic apparatus and positioning system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110887469A (en) |
TW (1) | TWI668464B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101929866A (en) * | 2009-06-23 | 2010-12-29 | 神达电脑股份有限公司 | Method and device for calculating position of personal navigation device with the help of road sign |
CN103123682A (en) * | 2013-01-17 | 2013-05-29 | 无锡普智联科高新技术有限公司 | System and method for positioning mobile robot based on regular graphic code composite tags |
TW201816421A (en) * | 2016-10-24 | 2018-05-01 | 財團法人工業技術研究院 | Positioning method and image capturing device thereof |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013257251A (en) * | 2012-06-14 | 2013-12-26 | Internatl Business Mach Corp <Ibm> | Anomaly detection method, program, and system |
CN106441268B (en) * | 2016-08-30 | 2019-09-10 | 西安小光子网络科技有限公司 | A kind of localization method based on optical label |
CN106468553B (en) * | 2016-08-30 | 2019-11-12 | 上海擎朗智能科技有限公司 | A kind of localization method of the mobile object based on road sign |
CN106969766A (en) * | 2017-03-21 | 2017-07-21 | 北京品创智能科技有限公司 | A kind of indoor autonomous navigation method based on monocular vision and Quick Response Code road sign |
CN107977977B (en) * | 2017-10-20 | 2020-08-11 | 深圳华侨城卡乐技术有限公司 | Indoor positioning method and device for VR game and storage medium |
-
2018
- 2018-09-10 TW TW107131784A patent/TWI668464B/en active
-
2019
- 2019-07-17 CN CN201910645125.2A patent/CN110887469A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101929866A (en) * | 2009-06-23 | 2010-12-29 | 神达电脑股份有限公司 | Method and device for calculating position of personal navigation device with the help of road sign |
CN103123682A (en) * | 2013-01-17 | 2013-05-29 | 无锡普智联科高新技术有限公司 | System and method for positioning mobile robot based on regular graphic code composite tags |
TW201816421A (en) * | 2016-10-24 | 2018-05-01 | 財團法人工業技術研究院 | Positioning method and image capturing device thereof |
Also Published As
Publication number | Publication date |
---|---|
CN110887469A (en) | 2020-03-17 |
TW202011042A (en) | 2020-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110568447B (en) | Visual positioning method, device and computer readable medium | |
CN110146869A (en) | Determine method, apparatus, electronic equipment and the storage medium of coordinate system conversion parameter | |
CN109918977B (en) | Method, device and equipment for determining idle parking space | |
US20170337701A1 (en) | Method and system for 3d capture based on structure from motion with simplified pose detection | |
CN110400315A (en) | A kind of defect inspection method, apparatus and system | |
JP2004213332A (en) | Calibration device, calibration method, program for calibration, and calibration mending tool | |
CN112270719A (en) | Camera calibration method, device and system | |
CN113226952A (en) | Article position management device, article position management system, article position management method, and program | |
JP2004334819A (en) | Stereo calibration device and stereo image monitoring device using same | |
CN108344401B (en) | Positioning method, positioning device and computer readable storage medium | |
CN116721203A (en) | Method, device and storage medium for measuring three-dimensional model | |
CN113361365A (en) | Positioning method and device, equipment and storage medium | |
JP6447706B1 (en) | Calibration data generation apparatus, calibration data generation method, calibration system, and control program | |
CN112308930A (en) | Camera external parameter calibration method, system and device | |
CN111383264A (en) | Positioning method, positioning device, terminal and computer storage medium | |
CN115830135A (en) | Image processing method and device and electronic equipment | |
JP6699518B2 (en) | Image recognition processing method, image recognition processing program, data providing method, data providing system, data providing program, recording medium, processor and electronic device | |
JP2018173882A (en) | Information processing device, method, and program | |
JP7412260B2 (en) | Positioning system, positioning device, positioning method and positioning program | |
JP2010184300A (en) | Attitude changing device and attitude changing method | |
TWI668464B (en) | Positioning method for mobile electronic apparatus and positioning system | |
CN112767498A (en) | Camera calibration method and device and electronic equipment | |
CN117557637A (en) | Dynamic flyswatter high-precision positioning method and device based on Mark point Mark | |
CN113256721B (en) | Indoor multi-person three-dimensional high-precision positioning method | |
CN112634377B (en) | Camera calibration method, terminal and computer readable storage medium of sweeping robot |