TW202001598A - Image search method - Google Patents
Image search method Download PDFInfo
- Publication number
- TW202001598A TW202001598A TW107120502A TW107120502A TW202001598A TW 202001598 A TW202001598 A TW 202001598A TW 107120502 A TW107120502 A TW 107120502A TW 107120502 A TW107120502 A TW 107120502A TW 202001598 A TW202001598 A TW 202001598A
- Authority
- TW
- Taiwan
- Prior art keywords
- interest
- region
- image
- search method
- face
- Prior art date
Links
Images
Abstract
Description
本發明是有關於一種搜尋方法,且特別是有關於一種可即時圈選感興趣區域(Region of Interest,ROI)進行搜尋的圖像搜尋方法。The present invention relates to a search method, and in particular, to an image search method that can search regions of interest (ROI) in real time.
一般搜尋引擎提供了一個介面,使用戶能夠指定關於感興趣的專案的標準,並讓搜尋引擎找到符合的結果。除了輸入文字作為關鍵字來進行搜尋之外,還可進一步輸入圖片至搜尋引擎來進行搜尋。而目前搜尋引擎在進行圖片搜尋時,只能預先準備好圖片,並將整張圖片輸入至搜尋引擎。General search engines provide an interface that allows users to specify criteria for projects of interest and let search engines find matching results. In addition to entering text as a keyword to search, you can also enter pictures into the search engine to search. At present, when searching for pictures, search engines can only prepare pictures in advance and input the entire picture into the search engine.
目前圖片搜尋的方式並無法針對圖片中的特定區域進行搜尋。倘若欲針對圖片中的特定區域進行搜尋,使用者必需先手動對圖片進行裁切,以獲得只包括特定區域的圖像,再以所述圖像進行搜尋。此外,目前圖片搜尋的方式也無法直接針對視頻進行圖片搜尋。使用者必需在視頻播放中,事先擷取下感興趣的圖像來進行搜尋。據此,在使用上並不便利。The current image search method cannot search for specific areas in the image. If you want to search for a specific area in the picture, the user must manually crop the picture to obtain an image that includes only the specific area, and then search with the image. In addition, the current image search method cannot directly perform image search for videos. The user must capture the images of interest to search during the video playback. Accordingly, it is not convenient in use.
本發明提供一種圖像搜尋方法,可即時於顯示畫面中圈選感興趣區域並自動進行搜尋。The invention provides an image search method, which can circle the region of interest in the display screen and search automatically.
本發明的圖像搜尋方法,包括:在顯示畫面中執行圈選動作;基於圈選動作自顯示畫面中獲得感興趣區域;對感興趣區域執行人臉偵測;在判定感興趣區域具有人臉時,自顯示畫面中獲得對應於人臉的圖像;以及輸入對應於人臉的圖像至搜尋引擎進行搜尋。The image search method of the present invention includes: performing a circled action in the display screen; obtaining a region of interest from the display screen based on the circled action; performing face detection on the region of interest; determining that the region of interest has a human face , The image corresponding to the human face is obtained from the display screen; and the image corresponding to the human face is input to the search engine for searching.
在本發明的一實施例中,在獲得感興趣區域之後,更包括:執行影像變形校正。In an embodiment of the invention, after obtaining the region of interest, it further includes: performing image distortion correction.
在本發明的一實施例中,在獲得感興趣區域之後,更包括:對感興趣區域對應的圖像執行解析度補償。In an embodiment of the present invention, after obtaining the region of interest, it further includes: performing resolution compensation on the image corresponding to the region of interest.
在本發明的一實施例中,上述圖像搜尋方法更包括:在判定感興趣區域不具有人臉時,輸入感興趣區域對應的圖像至搜尋引擎進行搜尋。In an embodiment of the invention, the above image search method further includes: when it is determined that the region of interest does not have a human face, input an image corresponding to the region of interest to the search engine for searching.
在本發明的一實施例中,上述對感興趣區域執行人臉偵測的步驟包括:執行膚色分割,以獲得膚色區域;判斷膚色區域是否存在人臉特徵;以及當膚色區域中存在人臉特徵,則判定感興趣區域包括人臉。In an embodiment of the present invention, the step of performing face detection on the region of interest includes: performing skin color segmentation to obtain a skin color region; determining whether a facial feature exists in the skin color region; and when a facial feature exists in the skin color region , It is determined that the region of interest includes a human face.
在本發明的一實施例中,上述圖像搜尋方法更包括:在輸入對應於人臉的圖像至搜尋引擎進行搜尋之後,判斷搜尋到的各影像是否符合感興趣區域中的人臉。In an embodiment of the present invention, the above image search method further includes: after inputting an image corresponding to a human face to the search engine for searching, determining whether each of the searched images matches the human face in the region of interest.
在本發明的一實施例中,上述圖像搜尋方法更包括:當在感興趣區域偵測到N個人臉時,自顯示畫面中獲得基於N個人臉的N個圖像,其中N為大於1的整數;以及分別將N個圖像輸入至搜尋引擎進行搜尋。In an embodiment of the present invention, the above image search method further includes: when N faces are detected in the region of interest, N images based on N faces are obtained from the display screen, where N is greater than 1 Integer; and input N images to the search engine to search.
在本發明的一實施例中,上述顯示畫面包括視頻畫面、圖片以及瀏覽器畫面其中一個。In an embodiment of the invention, the display screen includes one of a video screen, a picture, and a browser screen.
基於上述,本發明提供一種供使用者即時於顯示畫面中圈選感興趣區域,在自動將圖像進行前處理以提升或還原圖像的解析度之後,將圖像輸入至搜尋引擎來進行搜尋,以提高使用的便利性。Based on the above, the present invention provides a method for the user to circle the region of interest in the display screen in real time, after automatically pre-processing the image to improve or restore the resolution of the image, input the image to the search engine for searching To improve the convenience of use.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。In order to make the above-mentioned features and advantages of the present invention more obvious and understandable, the embodiments are specifically described below in conjunction with the accompanying drawings for detailed description as follows.
圖1是依照本發明一實施例的電子裝置的方塊圖。電子裝置100包括處理器110、儲存單元120以及顯示器130。處理器110耦接至儲存單元120以及顯示器130。FIG. 1 is a block diagram of an electronic device according to an embodiment of the invention. The
處理器110可以是中央處理單元(Central Processing Unit,CPU)、圖像處理單元(Graphic Processing Unit,GPU)、物理處理單元(Physics Processing Unit,PPU)、可程式化之微處理器(Microprocessor)、嵌入式控制晶片、數位訊號處理器(Digital Signal Processor,DSP)、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)或其他類似裝置。The
儲存單元120為任意型式的固定式或可移動式隨機存取記憶體(Random Access Memory,RAM)、唯讀記憶體(Read-Only Memory,ROM)、快閃記憶體(Flash memory)、安全數位卡(Secure Digital Memory Card,SD)、硬碟或其他類似裝置或這些裝置的組合。儲存單元120儲存有至少一程式碼片段,而處理器110透過讀取儲存單元120內的程式碼片段來執行對應的指令來實現下述圖像搜尋方法。The
顯示器130可採用液晶顯示器(Liquid Crystal Display,LCD)、電漿顯示器(Plasma Display)等來實現,或者亦可以使用具有觸控模組的觸控螢幕來作為顯示器130。The
圖2是依照本發明一實施例的圖像搜尋方法的流程圖。請同時參照圖1以及圖2,在步驟S205中,在顯示畫面中執行圈選動作。例如,處理器110可在顯示器130的顯示畫面為呈現為視頻畫面、圖片或瀏覽器畫面時,藉由偵測輸入裝置所執行的動作,而在顯示器130的顯示畫面中執行對應的圈選動作。接著,在步驟S210中,處理器110基於圈選動作自顯示畫面中獲得感興趣區域(Region of Interest,ROI)。2 is a flowchart of an image search method according to an embodiment of the invention. Please refer to FIG. 1 and FIG. 2 at the same time. In step S205, a circle action is performed on the display screen. For example, the
圖3是依照本發明一實施例的圈選感興趣區域的示意圖。本實施例中以筆記型電腦為例來進行說明。請參照圖3,假設筆記型電腦正在播放視頻,使用者可以利用滑鼠、觸控筆、手寫板等輸入裝置在顯示畫面300(即,視頻畫面)上圈選感興趣區域310。3 is a schematic diagram of circled a region of interest according to an embodiment of the invention. In this embodiment, a notebook computer is used as an example for description. Referring to FIG. 3, assuming that the notebook computer is playing a video, the user may use an input device such as a mouse, a stylus pen, and a tablet to circle the region of
返回圖2,在獲得感興趣區域之後,處理器110進一步執行影像變形校正。例如,倘若感興趣區域為扭曲或翻轉過的畫面,則處理器110執行影像變形校正來修正感興趣區域對應的圖像。Returning to FIG. 2, after obtaining the region of interest, the
之後,在步驟S215中,處理器110對感興趣區域執行人臉偵測。這是為了避免當感興趣區域中包括一位以上的人物時,影響圖像的搜尋結果。人臉偵測是指在一張影像中去搜尋一個或多個可能為人臉的區域。在人臉偵測過程中,大致上可以利用臉部膚色以及人臉特徵等資訊來判斷。例如,處理器110執行膚色分割,以獲得膚色區域,之後判斷膚色區域是否存在人臉特徵。例如,判斷膚色區域中是否存在眼睛特徵、嘴巴特徵等。當膚色區域中存在人臉特徵,則判定感興趣區域包括人臉。另外,倘若所圈選的感興趣區域為半邊臉部的畫面,則處理器110會進一步將感興趣區域的範圍擴展至包括整個臉部區域甚至是全身的區域。Thereafter, in step S215, the
在步驟S220中,在判定感興趣區域具有人臉時,處理器110自顯示畫面中獲得對應於人臉的圖像。之後,在步驟S225中,處理器110輸入對應於人臉的圖像至搜尋引擎進行搜尋。另一方面,在判定感興趣區域不具有人臉時,處理器110直接輸入感興趣區域對應的圖像至搜尋引擎進行搜尋。In step S220, when it is determined that the region of interest has a human face, the
而當在感興趣區域偵測到N個人臉時,處理器110自顯示畫面中獲得基於N個人臉的N個圖像,並且分別將N個圖像輸入至搜尋引擎進行搜尋。其中,N為大於1的整數。例如,若感興趣區域存在2個人臉,則獲得對應的2張圖像。When N faces are detected in the region of interest, the
舉例來說,圖4A與圖4B是依照本發明另一實施例的圈選感興趣區域的示意圖。在圖4A中,圈選了感興趣區域410。在經過人臉偵測之後,於感興趣區域410找到2個人臉,而自顯示畫面中獲得基於各人臉的圖像411與圖像413。之後,分別將圖像411與圖像413輸入至搜尋引擎進行搜尋。在此,還可進一步設定為:當感興趣區域包括的人臉數量超過一門檻值時,仍然以整個感興趣區域對應的圖像來進行搜尋。例如,在人臉數量超過10個的情況下則不會分別以各個人臉進行搜尋,而是直接以整張圖像進行搜尋。For example, FIGS. 4A and 4B are schematic diagrams of circled regions of interest according to another embodiment of the present invention. In FIG. 4A, the region of
而在獲得感興趣區域之後,處理器110還可進一步對感興趣區域對應的圖像執行解析度補償。首先,將圖像轉換為灰階影像Gary1
。接著,對灰階影像Gary1
執行邊緣偵測演算法以求出邊緣數。在此,使用Sobel演算法來作為邊緣偵測演算法。After obtaining the region of interest, the
底下公式1、公式2的Gx 1 、 Gy 1 分別代表經橫向及縱向邊緣檢測的圖像。 公式1公式2基於每一個像素的橫向及縱向梯度近似值,可使用以下公式3來計算梯度的大小(Magnitude)GM 。 公式3 Gx 1 and Gy 1 in Equation 1 and Equation 2 below represent images detected by horizontal and vertical edges, respectively. Formula 1 Formula 2 Based on the approximate horizontal and vertical gradients of each pixel, the following formula 3 can be used to calculate the magnitude of the gradient (Magnitude) G M. Formula 3
接著,利用與灰階影像Gary1 大小相同的空白影像Edge 來記錄邊緣(參照公式4)。其中,門檻值T預設為100。 公式4 Next, use the blank image Edge that is the same size as the grayscale image Gary 1 to record the edge (refer to Equation 4). The threshold value T is preset to 100. Formula 4
然後,參照下述公式5、公式6來計算銳度比(sharpness ratio)SR ,並且根據銳度比SR 來獲得增強比(Enhancement Ratio)ER 。 公式5公式6 Then, the sharpness ratio S R is calculated with reference to the following formulas 5 and 6, and the enhancement ratio (Erancement Ratio) E R is obtained according to the sharpness ratio S R. Formula 5 Formula 6
之後,參照公式7,依據所獲得的增強比ER 來求出新的門檻值T。之後以新的門檻值T來重新獲得另一張邊緣影像Edge,並與原始的圖像疊加以進行優化。 公式7 Thereafter, the enhancement ratio E R obtains the new reference threshold Equation 7, based on the obtained T. Then, a new threshold value T is used to obtain another edge image Edge, which is superimposed with the original image for optimization. Formula 7
另外,在輸入對應於人臉的圖像至搜尋引擎進行搜尋之後,處理器110可進一步判斷搜尋到的各影像是否符合感興趣區域中的人臉。舉例來說,可利用眼距以及眼距中心至嘴巴的距離來進行比對。圖5是依照本發明一實施例的分析人臉的示意圖。參照圖5,利用人臉偵測在圖像中找出人臉區域510,之後進一步在人臉區域中找出眼部區域511、512以及嘴巴區域513。計算眼部區域511、512之間的距離L,並且計算自眼距中心至嘴巴區域513之間的距離R。In addition, after inputting the image corresponding to the human face to the search engine for searching, the
自感興趣區域獲得距離L、R,並依據L:R來獲得一比例RROI 。並且,自搜尋引擎所搜尋到的影像獲得距離L、R,並依據L:R來獲得一比例ROutput 。當比對結果符合下述公式8時,判定搜尋到的影像與感興趣區域中為相同人物。 公式8 Obtain distances L and R from the region of interest, and obtain a ratio R ROI according to L:R. Moreover, the images searched by the search engine obtain distances L and R, and obtain a ratio R Output according to L:R. When the comparison result meets the following formula 8, it is determined that the searched image and the region of interest are the same person. Formula 8
另外,可將感興趣區域對應的圖像輸入至多個搜尋引擎,並將自各搜尋引擎所獲得的結果進行統整。例如,針對場景、動植物、人物等來進行搜尋,不同的搜尋引擎的搜尋準確率皆不同。因此,整合各個搜尋引擎所收集到的資料,並且比對所獲得的資料,以將正確率最高(資料數最多)的資料匯整給使用者。In addition, images corresponding to the region of interest can be input to multiple search engines, and the results obtained from each search engine can be integrated. For example, when searching for scenes, animals, plants, characters, etc., the search accuracy of different search engines is different. Therefore, integrate the data collected by various search engines, and compare the obtained data to aggregate the data with the highest accuracy (the most data) to the user.
綜上所述,本發明提供一種供使用者即時於顯示畫面中圈選感興趣區域,在自動經過影像處理之後將圖像輸入至搜尋引擎來進行搜尋,以提高使用的便利性。並且,在進行搜尋之前提高圖像的解析度,可提高搜尋的準確度。此外,統整各搜尋引擎的結果,而回傳正確率最高的資料給使用者,在使用上可打破以往使用單一搜尋引擎的限制。In summary, the present invention provides a method for a user to circle a region of interest in a display screen in real time, and after automatically undergoing image processing, input an image to a search engine for searching, so as to improve the convenience of use. Moreover, before the search is performed, the resolution of the image is improved, and the accuracy of the search can be improved. In addition, the results of each search engine are consolidated, and the data with the highest accuracy is returned to the user, which can break the restrictions of using a single search engine in the past.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed as above with examples, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention shall be subject to the scope defined in the appended patent application.
100‧‧‧電子裝置110‧‧‧處理器120‧‧‧儲存單元130‧‧‧顯示器300‧‧‧顯示畫面310、410‧‧‧感興趣區域411、413‧‧‧圖像510‧‧‧人臉區域511、512‧‧‧眼部區域513‧‧‧嘴巴區域S205~S225‧‧‧圖像搜尋方法的各步驟100‧‧‧
圖1是依照本發明一實施例的電子裝置的方塊圖。 圖2是依照本發明一實施例的圖像搜尋方法的流程圖。 圖3是依照本發明一實施例的圈選感興趣區域的示意圖。 圖4A與圖4B是依照本發明另一實施例的圈選感興趣區域的示意圖。 圖5是依照本發明一實施例的分析人臉的示意圖。FIG. 1 is a block diagram of an electronic device according to an embodiment of the invention. 2 is a flowchart of an image search method according to an embodiment of the invention. 3 is a schematic diagram of circled a region of interest according to an embodiment of the invention. 4A and 4B are schematic diagrams of circled regions of interest according to another embodiment of the invention. FIG. 5 is a schematic diagram of analyzing a human face according to an embodiment of the invention.
S205~S225‧‧‧圖像搜尋方法的各步驟 S205~S225‧‧‧‧Image search method steps
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107120502A TW202001598A (en) | 2018-06-14 | 2018-06-14 | Image search method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107120502A TW202001598A (en) | 2018-06-14 | 2018-06-14 | Image search method |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202001598A true TW202001598A (en) | 2020-01-01 |
Family
ID=69941578
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107120502A TW202001598A (en) | 2018-06-14 | 2018-06-14 | Image search method |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW202001598A (en) |
-
2018
- 2018-06-14 TW TW107120502A patent/TW202001598A/en unknown
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11074436B1 (en) | Method and apparatus for face recognition | |
WO2020000908A1 (en) | Method and device for face liveness detection | |
US20220092882A1 (en) | Living body detection method based on facial recognition, and electronic device and storage medium | |
US10504202B2 (en) | Method and device for identifying whether standard picture contains watermark | |
WO2018137623A1 (en) | Image processing method and apparatus, and electronic device | |
US10832069B2 (en) | Living body detection method, electronic device and computer readable medium | |
JP4824411B2 (en) | Face extraction device, semiconductor integrated circuit | |
JP6255486B2 (en) | Method and system for information recognition | |
US11182885B2 (en) | Method and apparatus for implementing image enhancement, and electronic device | |
US7949157B2 (en) | Interpreting sign language gestures | |
WO2019137038A1 (en) | Method for determining point of gaze, contrast adjustment method and device, virtual reality apparatus, and storage medium | |
JP6688277B2 (en) | Program, learning processing method, learning model, data structure, learning device, and object recognition device | |
CN109376631B (en) | Loop detection method and device based on neural network | |
US20130202159A1 (en) | Apparatus for real-time face recognition | |
CN111008935B (en) | Face image enhancement method, device, system and storage medium | |
WO2017088804A1 (en) | Method and apparatus for detecting wearing of spectacles in facial image | |
WO2019140881A1 (en) | Image display method, computer readable storage medium, terminal apparatus, and device | |
WO2019056503A1 (en) | Store monitoring evaluation method, device and storage medium | |
CN109313797B (en) | Image display method and terminal | |
WO2019148923A1 (en) | Method and apparatus for searching for images with image, electronic device, and storage medium | |
US20110038509A1 (en) | Determining main objects using range information | |
JP2012068948A (en) | Face attribute estimating apparatus and method therefor | |
CN111222446A (en) | Face recognition method, face recognition device and mobile terminal | |
CN107578006B (en) | Photo processing method and mobile terminal | |
TW202001598A (en) | Image search method |