TWI739387B - Seal identification system and method thereof - Google Patents

Seal identification system and method thereof Download PDF

Info

Publication number
TWI739387B
TWI739387B TW109112269A TW109112269A TWI739387B TW I739387 B TWI739387 B TW I739387B TW 109112269 A TW109112269 A TW 109112269A TW 109112269 A TW109112269 A TW 109112269A TW I739387 B TWI739387 B TW I739387B
Authority
TW
Taiwan
Prior art keywords
image
block
seal
denoising
corresponding block
Prior art date
Application number
TW109112269A
Other languages
Chinese (zh)
Other versions
TW202139063A (en
Inventor
方建華
Original Assignee
彰化商業銀行股份有限公司
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 彰化商業銀行股份有限公司 filed Critical 彰化商業銀行股份有限公司
Priority to TW109112269A priority Critical patent/TWI739387B/en
Application granted granted Critical
Publication of TWI739387B publication Critical patent/TWI739387B/en
Publication of TW202139063A publication Critical patent/TW202139063A/en

Links

Images

Abstract

A seal identification system is provided. By scanning and obtaining a seal image; performing straightening, removal of edge margins, normalization, contrast enhancement, binarization, image erosion and image expansion processes on the seal image to obtain a denoised image; dividing the denoised image and a retained seal image into multiple blocks separately; performing similarity comparison processing on each block of the denoised image and a corresponding block of the retained seal image in order, and then sequentially determining whether each block of the denoised image is similar to the corresponding block of the retained seal image; and outputting a notification message when determining any block of the denoised image is not similar to the corresponding block of the retained seal image, the recognition performance can be improved.

Description

印鑑辨識系統及其方法Seal identification system and method

本發明涉及一種辨識系統及其方法,特別是印鑑辨識系統及其方法。The invention relates to an identification system and a method thereof, in particular to a seal identification system and a method thereof.

印鑑對於人們的日常生活之間係具有息息相關與密不可分的關係,無論為至金融機構臨櫃提款與結清帳戶或至地政機關辦理不動產(例如:土地或房屋)的登記或過戶時,皆必需要使用到印鑑,故印鑑的實用性不言可喻。Seals are closely related and inseparable to people’s daily lives, whether it is to withdraw cash and settle accounts at financial institutions, or to register or transfer real estate (such as land or houses) at the land administration authority. The seal must be used, so the practicality of the seal is self-evident.

然而,為了要使印鑑於使用時正確無誤,往往民眾至金融機構臨櫃提款與結清帳戶或至地政機關辦理不動產的登記或過戶時,於金融機構或地政機關的職員需要藉由肉眼比對印鑑是否正確。但是,以人工方式進行印鑑比對存在過於相似的印鑑往往需請其他職員幫忙確認,而造成效率低落且極易會發生比對錯誤的情形。此外,若是因肉眼識別偽造印鑑造成的比對錯誤,使民眾發生盜領或偷過戶的情況,不僅會產生客訴,還會影響金融機構或地政機關的聲譽。有鑒於此,實有必要提出改進的技術手段,來解決此一問題。However, in order to ensure that the seal is used correctly, often when people go to the financial institution to withdraw money and settle the account or to the land office to register or transfer the real estate, the staff of the financial institution or the land office needs to compare with the naked eye. Whether the seal is correct. However, manual seal comparisons that are too similar often require other staff to help confirm them, resulting in inefficiency and easy comparison errors. In addition, if the comparison error caused by the identification of forged seals with the naked eye causes the people to steal or transfer the property, it will not only cause customer complaints, but also affect the reputation of financial institutions or land administration agencies. In view of this, it is necessary to propose improved technical means to solve this problem.

本發明揭露一種印鑑辨識系統及其方法。The invention discloses a seal identification system and method.

首先,本發明揭露一種印鑑辨識系統,其包括:影像掃描模組、影像處理模組、二值化模組、影像降噪模組、影像比對模組與通知模組,影像處理模組連接掃描模組,二值化模組連接影像處理模組,影像降噪模組連接二值化模組,影像比對模組連接影像降噪模組,通知模組連接影像比對模組。其中,影像掃描模組用以掃描並獲得印鑑影像;影像處理模組用以對印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得印章影像;二值化模組用以對印章影像進行二值化處理,以獲得二值化影像;影像降噪模組用以對二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得去雜訊影像;影像比對模組用以將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊,並分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似;以及通知模組用以當影像比對模組判斷去雜訊影像的任一區塊與該留存印章影像的對應區塊之間不相似時,輸出通知信息。First, the present invention discloses a seal recognition system, which includes: an image scanning module, an image processing module, a binarization module, an image noise reduction module, an image comparison module and a notification module, and the image processing module is connected The scanning module, the binarization module is connected to the image processing module, the image noise reduction module is connected to the binarization module, the image comparison module is connected to the image noise reduction module, and the notification module is connected to the image comparison module. Among them, the image scanning module is used to scan and obtain the seal image; the image processing module is used to correct the seal image, remove white borders, normalize and strengthen the contrast to obtain the seal image; the binarization module is used to correct The stamp image is binarized to obtain a binarized image; the image noise reduction module is used to perform image erosion and image expansion processing on the binarized image to remove noise and obtain a de-noise image; image comparison The module is used to cut the noise-removed image and the stored seal image separately to cut into multiple blocks, and respectively sequentially divide each block of the noise-removed image and each corresponding block of the stored seal image Perform similarity comparison processing, and then sequentially determine whether each block of the denoising image is similar to each corresponding block of the stored seal image; and the notification module is used when the image comparison module determines the denoising When there is no similarity between any block of the message image and the corresponding block of the stored seal image, a notification message is output.

此外,本發明揭露一種印鑑辨識方法,包括以下步驟:掃描並獲得印鑑影像;對印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得印章影像;對印章影像進行二值化處理,以獲得二值化影像;對二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得去雜訊影像;將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊;分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似;以及當判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似時,輸出通知信息。In addition, the present invention discloses a seal identification method, which includes the following steps: scanning and obtaining a seal image; correcting, removing white borders, normalizing and contrasting the seal image to obtain a seal image; performing binarization processing on the seal image To obtain a binary image; perform image erosion and image dilation processing on the binary image to remove noise, and then obtain a noise-removed image; cut the noise-removed image and the stored seal image separately to cut into Multiple blocks; sequentially compare each block of the denoising image with each corresponding block of the saved seal image, and then determine each block of the denoising image and the retention in sequence Whether each corresponding block of the seal image is similar; and when it is determined that any block of the denoising image is not similar to the corresponding block of the remaining seal image, a notification message is output.

本發明所揭露之系統與方法如上,與先前技術的差異在於本發明是透過掃描並獲得印鑑影像;對印鑑影像依序進行轉正、去除白邊、正規化、對比強化、二值化、影像侵蝕與影像膨脹處理,進而獲得去雜訊影像;將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊;分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似;以及當判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似時,輸出通知信息。The system and method disclosed in the present invention are as above. The difference from the prior art is that the present invention obtains the seal image by scanning; the seal image is sequentially corrected, white border removed, normalized, contrast enhanced, binarized, and image erosion is performed in sequence. And image expansion processing, and then get the denoising image; the denoising image and the saved seal image are cut into multiple blocks separately; each block of the denoising image and the saved seal are sequentially cut Perform similarity comparison processing for each corresponding block of the image, and then determine in order whether each block of the denoising image is similar to each corresponding block of the remaining seal image; and when determining the denoising image When there is no similarity between any block and the corresponding block of the saved seal image, a notification message is output.

透過上述的技術手段,本發明可輔助人工進行疑似印鑑的辨識比對,且藉由影像處理技術與圖像分割處理提升比對速度,且不容易因人為疏忽而出錯,進而提升辨識效能。Through the above technical means, the present invention can assist manual identification and comparison of suspected seals, and the image processing technology and image segmentation are used to increase the comparison speed, and it is not easy to make mistakes due to human negligence, thereby improving the identification performance.

在說明本發明所揭露之印鑑辨識系統及其方法之前,先對本發明所自行定義的名詞作說明,本發明所述的印鑑辨識系統所包括的各種模組主要可利用硬體方式來實現,同時可與軟體或韌體協同運作。其中,在實施中所使用的軟體或韌體可以被儲存在機器可讀儲存媒體上,例如:唯讀記憶體(ROM)、隨機存取記憶體(RAM)、磁盤儲存媒體、光儲存媒體、快閃記憶體裝置等等,並且可以由一個或多個通用或專用的可程式化微處理器執行。Before describing the seal identification system and method disclosed in the present invention, firstly, the terms defined by the present invention will be explained. The various modules included in the seal identification system of the present invention can be implemented mainly by hardware, and at the same time Can work with software or firmware. Among them, the software or firmware used in the implementation can be stored on machine-readable storage media, such as: read-only memory (ROM), random access memory (RAM), disk storage media, optical storage media, Flash memory devices, etc., and can be executed by one or more general-purpose or special-purpose programmable microprocessors.

以下將配合圖式及實施例來詳細說明本發明之實施方式,藉此對本發明如何應用技術手段來解決技術問題並達成技術功效的實現過程能充分理解並據以實施。The following describes the implementation of the present invention in detail with the drawings and embodiments, so as to fully understand and implement the implementation process of how the present invention uses technical means to solve technical problems and achieve technical effects.

請參閱「第1圖」與「第2圖」,「第1圖」為本發明印鑑辨識系統之一實施例方塊示意圖,「第2圖」為「第1圖」的印鑑辨識系統執行印鑑辨識方法之一實施例方法流程圖。在本實施例中,印鑑辨識系統100可應用於金融機構,提供民眾至金融機構臨櫃提款與結清帳戶時,輔助職員辨識比對印鑑是否正確,但本實施例並非用以限定本發明,可依據實際需求應用於同樣需進行印鑑辨識的不同情境中。Please refer to "Figure 1" and "Figure 2", "Figure 1" is a block diagram of an embodiment of the seal recognition system of the present invention, and "Figure 2" is the "Figure 1" seal recognition system performing seal recognition A method flowchart of an embodiment of the method. In this embodiment, the seal identification system 100 can be applied to financial institutions to provide assistance to staff to identify and compare the seals when they withdraw cash and settle accounts at financial institutions. However, this embodiment is not intended to limit the present invention. , Can be used in different situations where seal identification is also required according to actual needs.

在本實施例中,印鑑辨識系統100可包括:影像掃描模組110、影像處理模組120、二值化模組130、影像降噪模組140、影像比對模組150與通知模組160,影像處理模組120可連接掃描模組110,二值化模組130可連接影像處理模組120,影像降噪模組140可連接二值化模組130,影像比對模組150可連接影像降噪模組140,通知模組160可連接影像比對模組150。其中,影像處理模組120與掃描模組110之間、二值化模組130與影像處理模組120之間、影像降噪模組140與二值化模組130之間、影像比對模組150與影像降噪模組140之間以及通知模組160與影像比對模組150之間可利用無線或有線方式進行影像、訊息與資料的傳遞,也可通過網路相互連通,例如:行動通訊網路、網際網路、區域網路、廣域網路與/或無線網路,以進行影像、訊息與/或資料的傳遞。In this embodiment, the seal recognition system 100 may include: an image scanning module 110, an image processing module 120, a binarization module 130, an image noise reduction module 140, an image comparison module 150, and a notification module 160 , The image processing module 120 can be connected to the scanning module 110, the binarization module 130 can be connected to the image processing module 120, the image noise reduction module 140 can be connected to the binarization module 130, and the image comparison module 150 can be connected The image noise reduction module 140 and the notification module 160 can be connected to the image comparison module 150. Among them, between the image processing module 120 and the scanning module 110, between the binarization module 130 and the image processing module 120, between the image noise reduction module 140 and the binarization module 130, and the image comparison module The group 150 and the image noise reduction module 140 and the notification module 160 and the image comparison module 150 can transmit images, messages, and data in a wireless or wired manner, and can also communicate with each other through a network, for example: Mobile communication network, Internet, local area network, wide area network and/or wireless network for the transmission of images, messages and/or data.

在本實施例中,印鑑辨識方法可包括以下步驟:掃描並獲得印鑑影像(步驟210);對印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得印章影像(步驟220);對印章影像進行二值化處理,以獲得二值化影像(步驟230);對二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得去雜訊影像(步驟240);將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊(步驟250);分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似(步驟260);以及當判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似時,輸出通知信息(步驟270)。In this embodiment, the seal identification method may include the following steps: scanning and obtaining a seal image (step 210); performing normalization, removing white borders, normalization and contrast enhancement processing on the seal image to obtain the seal image (step 220); Perform binarization processing on the seal image to obtain a binarized image (step 230); perform image erosion and image dilation processing on the binarized image to remove noise and obtain a de-noise image (step 240); The denoising image and the retained seal image are respectively cut into multiple blocks (step 250); each block of the denoising image is similar to each corresponding block of the retained seal image in sequence In order to determine whether each block of the denoising image is similar to each corresponding block of the stored seal image (step 260); and when it is determined whether any block of the denoising image is similar to each other When the corresponding blocks of the stored seal images are not similar, a notification message is output (step 270).

在步驟210中,影像掃描模組110可掃描民眾向金融機構提供其提款單或結清申請書,該提款單或結清申請書上蓋有民眾的印鑑圖章,再利用影像處理技術之特徵擷取功能,擷取印鑑圖章的特徵,並確立該印鑑圖章的所在區塊,將該區塊擷取出來,以獲得印鑑影像。In step 210, the image scanning module 110 can scan the people to provide their withdrawal slips or settlement applications to financial institutions. The withdrawal slips or settlement applications are stamped with the people’s seal stamp, and then use the characteristics of image processing technology. The capture function captures the characteristics of the seal stamp, establishes the block where the seal seal is located, and extracts the block to obtain the seal image.

在步驟220中,影像掃描模組110擷取完印鑑影像後,由於該印鑑圖章可能並未蓋正,影像處理模組120需要對印鑑影像做轉正的動作;此外,影像處理模組120也需將轉正的印鑑影像之白邊去除,調整轉正且去除白邊的印鑑影像之長寬大小固定(即本發明所述之正規化處理),以及將轉正、去除白邊且正規化的印鑑影像之對比進行強化,以使影像掃描模組110所擷取的印鑑影像變成具有單純印鑑圖章且可供後續辨識使用的印章影像。其中,轉正、去除白邊且正規化的印鑑影像之長寬大小可為M

Figure 02_image001
N個像素(轉正、去除白邊且正規化的印鑑影像之長度為M個像素大小,寬度為N個像素大小;即轉正、去除白邊且正規化的印鑑影像為M
Figure 02_image001
N個像素所組成的二維陣列),M與N皆為大於1的正整數,可依據實際需求進行調整。 In step 220, after the image scanning module 110 has captured the seal image, since the seal stamp may not be stamped, the image processing module 120 needs to correct the seal image; in addition, the image processing module 120 also needs to correct the seal image. Remove the white borders of the corrected seal image, adjust the length and width of the corrected seal image and remove the white borders to a fixed size (that is, the normalization process described in the present invention), and convert the corrected, white border and normalized seal image The contrast is enhanced, so that the seal image captured by the image scanning module 110 becomes a seal image that has a simple seal seal and can be used for subsequent identification. Among them, the length and width of the stamp image that is normalized, white edges removed, and normalized can be M
Figure 02_image001
N pixels (the length of the stamp image that is normalized, white edges removed, and normalized is M pixels, and the width is N pixels; that is, the stamp image that is normalized, white edges removed, and normalized is M
Figure 02_image001
A two-dimensional array composed of N pixels), M and N are both positive integers greater than 1, which can be adjusted according to actual needs.

其中,由於提款單或結清申請書上所蓋有的印鑑圖章通常為方形圖章,因此,在本實施例中,步驟220之影像處理模組120所進行的轉正處理可包括以下步驟:(a)判斷印鑑影像中的印章外框是否為方形;(b)若判斷印鑑影像中的印章外框為方形時,定義以印鑑影像中該印章外框的最底部頂點為原點的平面座標系;(c)取得印章外框中位於平面座標系中第一象限的邊線於平面座標系的水平軸上的投影角度θ 1;(d)判斷投影角度θ 1是否等於零;以及(e)若判斷投影角度θ 1不等於零時,依據旋轉指令順時鐘旋轉印鑑影像一預設角度,並重複執行步驟(c)與(d),直至判斷出投影角度θ 1等於零。其中,預設角度可為但不限於1度,可依據實際情況進行調整;需注意的是,當預設角度過小時,會造成重複執行步驟(c)與(d)之次數變多,進而影響轉正處理的效率;當預設角度過大時,會造成投影角度θ 1不易等於零之情況。 Among them, since the seal stamp on the withdrawal slip or settlement application is usually a square stamp, in this embodiment, the normalization process performed by the image processing module 120 in step 220 may include the following steps: ( a) Determine whether the seal frame in the seal image is square; (b) If it is determined that the seal frame in the seal image is square, define the plane coordinate system with the origin of the bottom vertex of the seal frame in the seal image ; (C) Obtain the projection angle θ 1 of the edge of the first quadrant in the plane coordinate system of the seal frame on the horizontal axis of the plane coordinate system; (d) Determine whether the projection angle θ 1 is equal to zero; and (e) If it is judged When the projection angle θ 1 is not equal to zero, rotate the seal image clockwise by a preset angle according to the rotation command, and repeat steps (c) and (d) until it is determined that the projection angle θ 1 is equal to zero. Among them, the preset angle can be but not limited to 1 degree, which can be adjusted according to the actual situation; it should be noted that when the preset angle is too small, the number of repeated steps (c) and (d) will increase, and furthermore Affect the efficiency of the normalization process; when the preset angle is too large, it will cause the projection angle θ 1 to be difficult to equal zero.

更詳細地說,影像處理模組120會先判斷影像掃描模組110所擷取的印鑑影像之印鑑圖章是否為方形章(即印章外框是否為方形),若判斷印鑑影像中的印章外框為方形時,由於未蓋正的方形章其圖面存在有最底部頂點,因此,影像處理模組120可定義出以該最底部頂點為原點的平面座標系,平面座標系具有相互垂直的水平軸與垂直軸;此時,方形章中由原點延伸出來的一個邊線可位於平面座標系的第一象限中,該邊線於平面座標系的水平軸上的投影角度可為θ 1;接著,影像處理模組120會判斷投影角度θ 1是否等於零(投影角度θ 1等於零時,代表該邊線位於平面座標系的水平軸上,即不需要進行轉正),當影像處理模組120判斷投影角度θ 1不等於零時,可依據旋轉指令順時鐘旋轉印鑑影像一預設角度,接著,重複執行步驟(c)與(d),直至判斷出投影角度θ 1等於零(即轉正印鑑影像)。 In more detail, the image processing module 120 will first determine whether the seal stamp of the seal image captured by the image scanning module 110 is a square seal (that is, whether the seal frame is a square), and if it determines the seal frame in the seal image When it is a square, because the uncovered square chapter has the bottom vertex on the drawing surface, the image processing module 120 can define a plane coordinate system with the bottom vertex as the origin, and the plane coordinate system has mutually perpendicular Horizontal axis and vertical axis; at this time, a sideline extending from the origin in the square chapter can be located in the first quadrant of the plane coordinate system, and the projection angle of the sideline on the horizontal axis of the plane coordinate system can be θ 1 ; , The image processing module 120 will determine whether the projection angle θ 1 is equal to zero (when the projection angle θ 1 is equal to zero, it means that the edge is located on the horizontal axis of the plane coordinate system, that is, it does not need to be normalized), when the image processing module 120 determines the projection angle When θ 1 is not equal to zero, the seal image can be rotated clockwise by a preset angle according to the rotation command, and then steps (c) and (d) are repeated until it is determined that the projection angle θ 1 is equal to zero (that is, the seal image is corrected).

此外,由於提款單或結清申請書上所蓋有的印鑑圖章可能不是方形圖章,因此,在另一實施例中,步驟220之影像處理模組120所進行的轉正處理還可包括下步驟:透過影像識別文字方式取得印鑑影像中未轉正的文字;取得欲進行印鑑辨識比對的民眾在其申請開戶預留於金融機構的印鑑卡之印鑑圖章上的印文;以及基於取得的印鑑圖章上的印文與印鑑影像中未轉正的文字判斷印鑑影像轉正需要的旋轉角度,進而依據該旋轉角度轉正印鑑影像。其中,由於印鑑辨識系統100用以輔助人工進行疑似印鑑的辨識比對(即代表印鑑影像高度近似於留存印章影像,肉眼無法精準判斷,所以才藉由印鑑辨識系統100加以輔助辨識),因此,在透過影像識別文字方式取得印鑑影像中的文字之步驟中,可基於上述印鑑卡之印鑑圖章上的印文及其排列方式輔助影像處理技術,判斷出印鑑影像中文字的字體,進而取得印鑑影像中未轉正的文字。In addition, since the seal stamp on the withdrawal slip or settlement application may not be a square stamp, in another embodiment, the normalization process performed by the image processing module 120 in step 220 may also include the following steps : Obtain the uncorrected text in the seal image through the method of image recognition; obtain the seal stamp of the seal card reserved by the financial institution for the people who want to perform the seal recognition comparison; and based on the obtained seal stamp The uncorrected text in the seal and the seal image determines the rotation angle required for the seal image to be corrected, and then the seal image is corrected according to the rotation angle. Among them, the seal recognition system 100 is used to assist manual identification and comparison of suspected seals (that is, the seal image is highly similar to the stored seal image and cannot be accurately judged by the naked eye, so the seal recognition system 100 is used to assist in the identification), therefore, In the step of obtaining the text in the seal image through the method of image recognition, the image processing technology can be assisted based on the seal on the seal stamp of the seal card and its arrangement to determine the font of the text in the seal image, and then the seal image can be obtained Uncorrected text in.

在本實施例中,步驟220之影像處理模組120所進行的去除白邊處理可包括以下步驟:判斷轉正的印鑑影像中有無任一行列的像素是全白;以及若判斷轉正的印鑑影像中有任一行列的像素是全白,將全白的該行列去除。In this embodiment, the white fringing process performed by the image processing module 120 in step 220 may include the following steps: determining whether any row or column of pixels in the corrected seal image is completely white; and if it is determined in the corrected seal image Any row or column of pixels is completely white, and that row or column that is completely white is removed.

在本實施例中,由於轉正、去除白邊且正規化的印鑑影像中的印鑑圖章可能因蓋章時施力均勻或其他因素而造成部分區域顏色較深而部分區域顏色較淺的情形,因此,影像處理模組120需淡化顏色較深的區域之顏色以及加深顏色較淺的區域之顏色,故步驟220之影像處理模組120所進行的對比強化處理可包括以下步驟:採用直方圖調整(Histogram Modification)方式,藉由改變轉正、去除白邊且正規化的印鑑影像其所具有的像素之灰階值及分佈,進而達到影像強化的效果。進一步地說,轉正、去除白邊且正規化的印鑑影像之灰階分佈圖(其為一種離散函數)可基於分佈圖均勻化法(Histogram equalization)藉由各灰階值的離散機率密度函數值進行轉換,進而取得均勻分佈的灰階分佈圖。需注意的是,印章影像與轉正、去除白邊且正規化的印鑑影像之長寬大小相同(即印章影像之長度為M個像素大小,寬度為N個像素大小;換句話說,印章影像為M

Figure 02_image001
N個像素所組成的二維陣列)。 In this embodiment, since the seal stamp in the seal image that is normalized, white edges removed, and normalized may be darker in some areas and lighter in some areas due to the uniform force applied during stamping or other factors, , The image processing module 120 needs to dilute the color of the darker area and deepen the color of the lighter area. Therefore, the contrast enhancement processing performed by the image processing module 120 in step 220 may include the following steps: using histogram adjustment ( Histogram Modification) method, by changing the grayscale value and distribution of the pixels of the stamp image that is normalized, removed the white border and normalized, and then achieves the effect of image enhancement. Furthermore, the grayscale distribution map (which is a discrete function) of the stamp image that is normalized, white fringed removed, and normalized can be based on the distribution map equalization method (Histogram equalization) by using the discrete probability density function value of each grayscale value Perform the conversion to obtain a uniformly distributed grayscale distribution map. It should be noted that the length and width of the seal image is the same as the length and width of the stamp image that is normalized, white border removed, and normalized (that is, the length of the seal image is M pixels in size, and the width is N pixels in size; in other words, the seal image is M
Figure 02_image001
A two-dimensional array composed of N pixels).

在步驟230中,二值化模組130可對印章影像進行二值化處理,以獲得二值化影像。更詳細地說,二值化模組130可將影像處理模組120所獲得的印章影像轉換成灰階影像,使得灰階影像中每一像素之灰階值落於0至255之間,灰階值為0表示該像素為黑色,灰階值為255表示該像素為白色;二值化模組130可進一步依據上述灰階影像所對應的影像直方圖取出一閥值(threshold value),再利用上述灰階影像中任一像素在其灰階值大於該閥值時轉換為1,任一像素在其灰階值小於或等於該閥值時轉換為0(即利用該閥值大小轉換上述灰階影像),進而產生由1與0所組成的二維陣列(即產生二值化影像),其中,二維陣列中的1代表白色,0代表黑色。In step 230, the binarization module 130 may perform binarization processing on the seal image to obtain a binarized image. In more detail, the binarization module 130 can convert the stamp image obtained by the image processing module 120 into a grayscale image, so that the grayscale value of each pixel in the grayscale image falls between 0 and 255. A level value of 0 indicates that the pixel is black, and a grayscale value of 255 indicates that the pixel is white; the binarization module 130 may further obtain a threshold value according to the image histogram corresponding to the grayscale image, and then Use any pixel in the above grayscale image to convert to 1 when its grayscale value is greater than the threshold, and convert any pixel to 0 when its grayscale value is less than or equal to the threshold (that is, use the threshold to convert the above Grayscale image), and then generate a two-dimensional array composed of 1 and 0 (that is, to generate a binary image), where 1 in the two-dimensional array represents white and 0 represents black.

在步驟240中,由於印鑑使用時間過久時可能會使印鑑圖章中的印文模糊(即產生雜訊),因此,需透過影像降噪模組140對二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得去雜訊影像。其中,影像侵蝕與影像膨脹處理係可透過多次的膨脹(Dilation)運算與侵蝕(Erosion)運算交互作用,使運算後的結果填補二值化影像中的小洞、平滑邊界或將一些斷線連接起來,進而獲得去雜訊影像。In step 240, since the seal stamp may be blurred (ie, noise is generated) when the seal is used for too long, the image noise reduction module 140 is required to perform image erosion and image expansion on the binary image. Processing to remove the noise, and then get a de-noise image. Among them, the image erosion and image dilation processing system can interact with multiple dilation operations and erosion operations, so that the results of the operations can fill in small holes, smooth boundaries, or break some lines in the binary image. Connect, and then get the noise-removed image.

在步驟250與步驟260中,影像比對模組150開始比對去雜訊影像與留存印章影像之間的相似度(即進行印鑑辨識比對),其中,留存印章影像係為民眾於金融機構申請開戶時,用印於印鑑卡,金融機構將該印鑑卡利用印鑑辨識系統100執行進行上述步驟210至步驟240所取得之影像。In step 250 and step 260, the image comparison module 150 starts to compare the similarity between the noise-removed image and the saved seal image (that is, performs seal recognition and comparison), where the saved seal image is for the public in the financial institution When applying for opening an account, it is printed on the seal card, and the financial institution uses the seal recognition system 100 to execute the image obtained from the above steps 210 to 240.

更詳細地說,影像比對模組150開始進行印鑑辨識比對時,需先分別將去雜訊影像與留存印章影像進行對應切割,例如:去雜訊影像切割成三個區塊,留存印章影像也要切割成三個區塊,使得去雜訊影像的每一區塊與留存印章影像的每一對應區塊之面積相同(即步驟250)。在本實施例中,去雜訊影像與留存印章影像所切割的區塊數量係可為但不限於留存印章影像中印文的字數(即民眾的姓名字數)。In more detail, when the image comparison module 150 starts to perform the seal recognition and comparison, it needs to cut the denoising image and the saved seal image respectively, for example: cut the denoising image into three blocks, and save the seal. The image is also cut into three blocks, so that each block of the denoising image has the same area as each corresponding block of the remaining seal image (step 250). In this embodiment, the number of blocks cut by the denoising image and the saved seal image can be, but is not limited to, the number of words in the printed text in the saved seal image (ie, the number of people's names).

接著,影像比對模組150可基於相似度公式分別依序計算出去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間的相似度值(即透過像素的分布情況取得相似度值),並基於計算出來的相似度值判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似,其中,相似度公式為:

Figure 02_image003
,P為去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間的相似度值,R與Q分別為去雜訊影像的任一區塊與留存印章影像的對應區塊中每一像素值的總和。最後,影像比對模組150可將計算出來的每一相似度值與一第一預設值進行大小比較,若計算出來的任一相似度值小於該第一預設值時,則判斷用以計算該相似度值的去雜訊影像的該區塊與留存印章影像的該對應區塊之間不相似;若計算出來的任一相似度值大於或等於該第一預設值時,則判斷用以計算該相似度值的去雜訊影像的該區塊與留存印章影像的該對應區塊之間相似;在本實施例中,第一預設值可為但不限於90%,可依據實際需求進行調整。 Then, the image comparison module 150 can sequentially calculate the similarity value between each block of the noise image and each corresponding block of the stored seal image based on the similarity formula (that is, obtained through the distribution of pixels). Similarity value), and based on the calculated similarity value, determine whether each block of the denoising image is similar to each corresponding block of the remaining seal image. The similarity formula is:
Figure 02_image003
, P is the similarity value between each block of the denoising image and each corresponding block of the stored seal image, R and Q are respectively any block of the denoising image and the corresponding area of the stored seal image The sum of the value of each pixel in the block. Finally, the image comparison module 150 can compare each calculated similarity value with a first preset value. If any calculated similarity value is less than the first preset value, the judgment is The block of the denoising image for calculating the similarity value is not similar to the corresponding block of the stored seal image; if any calculated similarity value is greater than or equal to the first preset value, then It is determined that the block of the denoising image used to calculate the similarity value is similar to the corresponding block of the stored seal image; in this embodiment, the first preset value may be, but not limited to, 90%. Adjust according to actual needs.

舉例而言,當去雜訊影像切割成三個區塊(區塊J 1、區塊J 2與區塊J 3)且留存印章影像也切割成三個區塊(區塊K 1、區塊K 2與區塊K 3)時,區塊J 1可對應區塊K 1且區塊J 1與區塊K 1之面積相同(即區塊J 1與區塊K 1之像素數量相同),區塊J 2可對應區塊K 2且區塊J 2與區塊K 2之面積相同(即區塊J 2與區塊K 2之像素數量相同),區塊J 3可對應區塊K 3且區塊J 3與區塊K 3之面積相同(即區塊J 3與區塊K 3之像素數量相同)。影像比對模組150可先計算區塊J 1與區塊K 1之間的相似度值(需先計算區塊J 1中每一像素值的總和R 1以及區塊K 1中每一像素值的總和Q 1,由於去雜訊影像與留存印章影像為由1與0所組成的二維陣列(1代表白色,0代表黑色),故當任一像素為白色時其像素值為1,任一像素為黑色時其像素值為0),再進行相似度P 1之計算(

Figure 02_image005
)),接著,若影像比對模組150判斷P 1小於90%時,則判斷區塊J 1與區塊K 1之間不相似,反之,判斷區塊J 1與區塊K 1之間相似;若影像比對模組150判斷區塊J 1與區塊K 1之間相似,則接著計算區塊J 2與區塊K 2之間的相似度值(需先計算區塊J 2中每一像素值的總和R 2以及區塊K 2中每一像素值的總和Q 2,再進行相似度P 2之計算(
Figure 02_image007
)),並判斷P 2是否小於90%,若影像比對模組150判斷P 2小於90%時,則判斷區塊J 2與區塊K 2之間不相似,反之,判斷區塊J 2與區塊K 2之間相似;若影像比對模組150判斷區塊J 2與區塊K 2之間相似,則接著計算區塊J 3與區塊K 3之間的相似度值(需先計算區塊J 3中每一像素值的總和R 3以及區塊K 3中每一像素值的總和Q 3,再進行相似度P 3之計算(
Figure 02_image009
)),並判斷P 3是否小於90%,若影像比對模組150判斷P 3小於90%時,則判斷區塊J 3與區塊K 3之間不相似,反之,判斷區塊J 3與區塊K 3之間相似。 For example, when the de-noise image is cut into three blocks (block J 1 , block J 2 and block J 3 ) and the remaining seal image is also cut into three blocks (block K 1 , block J 3) K 2 and block K 3 ), block J 1 can correspond to block K 1 and the area of block J 1 and block K 1 are the same (that is, the number of pixels in block J 1 and block K 1 is the same), Block J 2 can correspond to block K 2 and the areas of block J 2 and block K 2 are the same (that is, the number of pixels in block J 2 and block K 2 is the same), block J 3 can correspond to block K 3 And the area of the block J 3 and the block K 3 are the same (that is, the number of pixels in the block J 3 and the block K 3 is the same). The image comparison module 150 can first calculate the similarity value between the block J 1 and the block K 1 (it is necessary to first calculate the sum R 1 of each pixel value in the block J 1 and each pixel in the block K 1 The sum of the values Q 1 , since the denoising image and the stored seal image are a two-dimensional array of 1 and 0 (1 represents white and 0 represents black), when any pixel is white, its pixel value is 1. When any pixel is black, its pixel value is 0), and then calculate the similarity P 1 (
Figure 02_image005
)), Then, if the image comparison module 150 determines that P 1 is less than 90%, it is determined that the block 1 and the block J K 1 between the dissimilar, and vice versa, and the block 1 determines the block J K between 1 Similar; if the image comparison module 150 determines that the block J 1 and the block K 1 are similar, then calculate the similarity value between the block J 2 and the block K 2 (need to calculate the block J 2 first The sum R 2 of each pixel value and the sum Q 2 of each pixel value in the block K 2 are then calculated for the similarity P 2 (
Figure 02_image007
)) and judge whether P 2 is less than 90%. If the image comparison module 150 judges that P 2 is less than 90%, it judges that the block J 2 and the block K 2 are not similar, otherwise, judges the block J 2 It is similar to the block K 2 ; if the image comparison module 150 determines that the block J 2 and the block K 2 are similar, it then calculates the similarity value between the block J 3 and the block K 3 (need first calculate the sum of the R value of each pixel block J 3 3 and the sum of each pixel value of the block K 3 Q 3, P 3 then calculates the similarity of (
Figure 02_image009
)) and judge whether P 3 is less than 90%. If the image comparison module 150 judges that P 3 is less than 90%, it judges that the block J 3 and the block K 3 are not similar, otherwise, judges the block J 3 similar to the block K 3.

在步驟270中,由於步驟260中影像比對模組150可先計算出P 1,並基於P 1判斷區塊J 1與區塊K 1之間是否相似;若影像比對模組150判斷區塊J 1與區塊K 1之間相似,則接著計算出P 2,並基於P 2判斷區塊J 2與區塊K 2之間是否相似;若影像比對模組150判斷區塊J 2與區塊K 2之間相似,則接著計算出P 3,並基於P 3判斷區塊J 3與區塊K 3之間是否相似,因此,當影像比對模組150一旦判斷出區塊J 1與區塊K 1之間不相似、區塊J 2與區塊K 2之間不相似或者區塊J 3與區塊K3之間不相似時,則影像比對模組150可結束印鑑辨識比對;此時,通知模組160可輸出通知信息(其內容可為但不限於「印章不符」),以通知操作印鑑辨識系統100的職員。由於影像比對模組150一旦判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似即會通知操作印鑑辨識系統100的職員,不需完全辨識去雜訊影像的所有區塊與留存印章影像的所有對應區塊是否相似,因此,可提升辨識效率。 In step 270, since the image comparison module 150 in step 260 can first calculate P 1 , and determine whether the block J 1 and the block K 1 are similar based on P 1 ; if the image comparison module 150 determines the area If the block J 1 and the block K 1 are similar, then P 2 is calculated, and based on P 2 it is judged whether the block J 2 and the block K 2 are similar; if the image comparison module 150 judges the block J 2 Is similar to the block K 2 , then P 3 is calculated, and based on P 3, it is determined whether the block J 3 and the block K 3 are similar. Therefore, once the image comparison module 150 determines the block J between 1 and K 1 dissimilar block, the block 2 and block J K J dissimilar blocks or dissimilarity between 3 and K3 between 2 blocks, the image comparison module 150 may identify the end seal Comparison; at this time, the notification module 160 can output a notification message (the content of which can be, but is not limited to, "seal does not match") to notify the staff operating the seal identification system 100. Since the image comparison module 150 determines that any block of the denoising image is not similar to the corresponding block of the stored seal image, it will notify the staff operating the seal recognition system 100, and there is no need to fully identify the denoising image. Whether all the blocks are similar to all the corresponding blocks of the saved seal image, therefore, the identification efficiency can be improved.

需注意的是,當影像比對模組150判斷出區塊J 1與區塊K 1之間相似、區塊J 2與區塊K 2之間相似且區塊J 3與區塊K3之間也相似時,通知模組160可輸出通過信息(其內容可為但不限於「印章正確」),以通知操作印鑑辨識系統100的職員。 It should be noted that when the image comparison module 150 determines that the block J 1 and the block K 1 are similar, the block J 2 and the block K 2 are similar, and the block J 3 and the block K3 are similar. Similarly, the notification module 160 can output the pass information (the content of which can be, but is not limited to, "the seal is correct") to notify the staff operating the seal identification system 100.

在上述步驟260中,影像比對模組150係基於相似度公式分別依序計算出去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間的相似度值,並基於計算出來的相似度值判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似,但本實施例並非用以限定本發明。舉例而言,在另一實施例中,影像比對模組150可擷取去雜訊影像的每一區塊與留存印章影像的每一對應區塊之至少一特徵點,並依序比對去雜訊影像的每一區塊與留存印章影像的每一對應區塊之至少一特徵點之分布,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似。其中,特徵點可為但不限於每一字的端點、筆畫轉折處與筆畫的交接處。In the above step 260, the image comparison module 150 sequentially calculates the similarity value between each block of the noise image and each corresponding block of the stored seal image based on the similarity formula, and based on the calculation The obtained similarity value determines whether each block of the denoising image is similar to each corresponding block of the stored seal image, but this embodiment is not intended to limit the present invention. For example, in another embodiment, the image comparison module 150 can capture at least one feature point of each block of the denoising image and each corresponding block of the stored seal image, and compare them in sequence The distribution of at least one feature point between each block of the denoising image and each corresponding block of the remaining seal image, and then determining each block of the denoising image and each corresponding block of the remaining seal image in sequence Are they similar. Among them, the characteristic points can be, but are not limited to, the end points of each character, the transition point of the stroke and the intersection of the stroke.

舉例而言,當去雜訊影像切割成三個區塊(區塊J 1、區塊J 2與區塊J 3)且留存印章影像也切割成三個區塊(區塊K 1、區塊K 2區塊K 3)時,區塊J 1可對應區塊K 1且區塊J 1與區塊K 1之面積相同,區塊J 2可對應區塊K 2且區塊J 2與區塊K 2之面積相同,區塊J 3可對應區塊K 3且區塊J 3與區塊K 3之面積相同。影像比對模組150可先擷取區塊J 1與區塊K 1中的特徵點,並比對區塊J 1與區塊K 1的特徵點數量,若影像比對模組150判斷區塊J 1與區塊K 1的特徵點數量相同時,則判斷區塊J 1與區塊K 1之間相似,反之,判斷區塊J 1與區塊K 1之間不相似;若影像比對模組150判斷區塊J 1與區塊K 1之間相似,則接著擷取區塊J 2與區塊K 2中的特徵點,並比對區塊J 2與區塊K 2的特徵點數量,若影像比對模組150判斷區塊J 2與區塊K 2的特徵點數量相同時,則判斷區塊J 2與區塊K 2之間相似,反之,判斷區塊J 2與區塊K 2之間不相似;若影像比對模組150判斷區塊J 2與區塊K 2之間相似,則接著擷取區塊J 3與區塊K 3中的特徵點,並比對區塊J 3與區塊K 3的特徵點數量,若影像比對模組150判斷區塊J 3與區塊K 3的特徵點數量相同時,則判斷區塊J 3與區塊K 3之間相似,反之,判斷區塊J 3與區塊K 3之間不相似。 For example, when the de-noise image is cut into three blocks (block J 1 , block J 2 and block J 3 ) and the remaining seal image is also cut into three blocks (block K 1 , block J 3) when K 2 K block. 3), a block may correspond to block J and K 1 J 1 block area of the same block of K 1, a block may correspond to block J 2 and K 2 and J 2 block region Block K 2 has the same area, block J 3 can correspond to block K 3, and block J 3 and block K 3 have the same area. Image comparison module 150 may retrieve the first block and the block J a feature point 1 K, J and matching block 1 and block number of feature points 1 K, 150 determines if the image matching area module When the number of feature points of the block J 1 and the block K 1 is the same, it is judged that the block J 1 and the block K 1 are similar; otherwise, it is judged that the block J 1 and the block K 1 are not similar; if the image ratio is 1 and the similarity between the K block module 150 determines a block J, and then retrieve the feature point block 2 and block 2 J K, wherein matching block 2 and block J and K 2 If the image comparison module 150 determines that the number of feature points of the block J 2 and the block K 2 are the same, it will determine that the block J 2 and the block K 2 are similar. Otherwise, it will determine that the block J 2 is similar to the The blocks K 2 are not similar; if the image comparison module 150 judges that the blocks J 2 and K 2 are similar, then it then extracts the feature points in the block J 3 and the block K 3 and compares them. Regarding the number of feature points of the block J 3 and the block K 3 , if the image comparison module 150 determines that the number of feature points of the block J 3 and the block K 3 are the same, it will determine the block J 3 and the block K 3 Otherwise, it is judged that the block J 3 and the block K 3 are not similar.

此外,在一實施例中,影像比對模組150可將去雜訊影像的每一區塊與留存印章影像的每一對應區塊分別進行細線化處理,以分別擷取去雜訊影像的每一區塊與留存印章影像的每一對應區塊之多個特徵向量;基於內積公式計算出去雜訊影像的每一區塊與留存印章影像的每一對應區塊中相對的每一特徵向量之間的向量夾角,並依序取得去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間具有的平均向量夾角;以及基於去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間具有的平均向量夾角依序判斷去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似。In addition, in one embodiment, the image comparison module 150 can perform a thinning process on each block of the denoising image and each corresponding block of the stored seal image to capture the denoising image. Multiple feature vectors of each block and each corresponding block of the stored seal image; calculate each feature of each block of the noise image and each corresponding block of the stored seal image based on the inner product formula The vector included angle between the vectors, and the average vector included angle between each block of the denoising image and each corresponding block of the stored seal image is obtained in sequence; and the difference between each block and each block based on the denoising image The average vector included angle between each corresponding block of the stored seal image sequentially determines whether each block of the denoising image is similar to each corresponding block of the stored seal image.

舉例而言,當去雜訊影像切割成三個區塊(區塊J 1、區塊J 2與區塊J 3)且留存印章影像也切割成三個區塊(區塊K 1、區塊K 2與區塊K 3)時,區塊J 1可對應區塊K 1且區塊J 1與區塊K 1之面積相同,區塊J 2可對應區塊K 2且區塊J 2與區塊K 2之面積相同,區塊J 3可對應區塊K 3且區塊J 3與區塊K 3之面積相同。影像比對模組150可先將區塊J 1與區塊K 1中每一文字細線化,取細線化線條的端點及交叉點座標轉換成多條向量,使得每一線段形成一特徵向量;接著,影像比對模組150可將區塊J 1與區塊K 1之相對應的特徵向量以內積公式取得特徵向量之向量夾角,並將所有向量夾角取平均值,以獲得平均向量夾角(例如:區塊J 1與區塊K 1各有五個特徵向量,故可計算取得五個向量夾角,將五個向量夾角取平均值後即可取得平均向量夾角),當影像比對模組150判斷平均向量夾角小於第二預設值(其可為但不限於0度至5度)時,則判斷區塊J 1與區塊K 1之間相似,反之,判斷區塊J 1與區塊K 1之間不相似;若影像比對模組150判斷區塊J 1與區塊K 1之間相似,則接著將區塊J 2與區塊K 2中每一文字細線化,取細線化線條的端點及交叉點座標轉換成多條向量,使得每一線段形成一特徵向量;接著,影像比對模組150可將區塊J 2與區塊K 2之相對應的特徵向量以內積公式取得特徵向量之向量夾角,並將所有向量夾角取平均值,以獲得平均向量夾角,當影像比對模組150判斷平均向量夾角小於第二預設值(其可為但不限於0度至5度)時,則判斷區塊J 2與區塊K 2之間相似,反之,判斷區塊J 2與區塊K 2之間不相似;若影像比對模組150判斷區塊J 2與區塊K 2之間相似,則接著將區塊J 3與區塊K 3中每一文字細線化,取細線化線條的端點及交叉點座標轉換成多條向量,使得每一線段形成一特徵向量;接著,影像比對模組150可將區塊J 3與區塊K 3之相對應的特徵向量以內積公式取得特徵向量之向量夾角,並將所有向量夾角取平均值,以獲得平均向量夾角,當影像比對模組150判斷平均向量夾角小於第二預設值(其可為但不限於0度至5度)時,則判斷區塊J 3與區塊K 3之間相似,反之,判斷區塊J 3與區塊K 3之間不相似。 For example, when the de-noise image is cut into three blocks (block J 1 , block J 2 and block J 3 ) and the remaining seal image is also cut into three blocks (block K 1 , block J 3) when the block K and K 2. 3), a block may correspond to block J and K 1 J 1 block area of the same block of K 1, a block may correspond to block J 2 and K 2 and J 2 blocks The area of the block K 2 is the same, the block J 3 can correspond to the block K 3, and the area of the block J 3 and the block K 3 are the same. The image comparison module 150 can thin each text in the block J 1 and the block K 1 first , and convert the coordinates of the endpoints and intersections of the thinned lines into multiple vectors, so that each line segment forms a feature vector; Then, the image comparison module 150 can use the inner product formula of the corresponding feature vectors of the block J 1 and the block K 1 to obtain the vector included angle of the feature vector, and average all the vector included angles to obtain the average vector included angle ( For example: block J 1 and block K 1 each have five feature vectors, so five vector included angles can be calculated, and the average vector included angle can be obtained by averaging the five vector included angles), when the image comparison module 150. When it is judged that the average vector included angle is less than the second preset value (which can be but not limited to 0 degrees to 5 degrees), it is judged that the block J 1 and the block K 1 are similar. Otherwise, it is judged that the block J 1 and the zone Block K 1 is not similar; if the image comparison module 150 determines that the block J 1 and the block K 1 are similar, then each text in the block J 2 and the block K 2 is thinned, and then thinned. The endpoints and intersection coordinates of the lines are converted into multiple vectors, so that each line segment forms a feature vector; then, the image comparison module 150 can inner product the corresponding feature vectors of the block J 2 and the block K 2 The formula obtains the vector included angle of the feature vector, and averages all the vector included angles to obtain the average vector included angle. When the image comparison module 150 determines that the average vector included angle is less than the second preset value (which can be, but is not limited to, 0 degrees to 5 degrees), it is judged that the block J 2 and the block K 2 are similar, otherwise, it is judged that the block J 2 and the block K 2 are not similar; if the image comparison module 150 judges that the block J 2 is similar to the Block K 2 is similar, then each text in block J 3 and block K 3 is thinned, and the endpoints and intersection coordinates of the thinned lines are converted into multiple vectors, so that each line segment forms a feature Vector; then, the image comparison module 150 can use the inner product formula of the feature vectors corresponding to the block J 3 and the block K 3 to obtain the vector included angle of the feature vector, and average the included angles of all vectors to obtain the average vector The included angle: when the image comparison module 150 determines that the average vector included angle is less than the second preset value (which can be but is not limited to 0 degrees to 5 degrees), it is determined that the block J 3 and the block K 3 are similar, and vice versa , It is determined that the block J 3 and the block K 3 are not similar.

綜上所述,可知本發明與先前技術之間的差異在於透過掃描並獲得印鑑影像;對印鑑影像依序進行轉正、去除白邊、正規化、對比強化、二值化、影像侵蝕與影像膨脹處理,進而獲得去雜訊影像;將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊;分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似;以及當判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似時,輸出通知信息,藉由此一技術手段可以解決先前技術所存在的問題,進而可輔助人工進行疑似印鑑的辨識比對,且藉由影像處理技術與圖像分割處理提升比對速度,且不容易因人為疏忽而出錯,進而提升辨識效能。To sum up, it can be seen that the difference between the present invention and the prior art is that the seal image is obtained through scanning; the seal image is sequentially corrected, white edges removed, normalized, contrast enhanced, binarized, image erosion and image expansion are performed. Processing to obtain the denoising image; the denoising image and the saved seal image are respectively subjected to a cutting process to cut into multiple blocks; each block of the denoising image and each remaining seal image are sequentially Perform similarity comparison processing on a corresponding block, and then determine in order whether each block of the denoising image is similar to each corresponding block of the remaining seal image; and when determining any area of the denoising image When the block and the corresponding block of the saved seal image are not similar, the notification message is output. This technical method can solve the problems of the previous technology, and then can assist the manual identification and comparison of the suspected seal, and by the image Processing technology and image segmentation processing speed up the comparison, and it is not easy to make mistakes due to human negligence, thereby improving the recognition performance.

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。Although the present invention is disclosed in the foregoing embodiments as above, it is not intended to limit the present invention. Anyone familiar with similar art can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, the present invention The scope of patent protection shall be subject to the definition of the scope of patent application attached to this specification.

100:印鑑辨識系統 110:影像掃描模組 120:影像處理模組 130:二值化模組 140:影像降噪模組 150:影像比對模組 160:通知模組 步驟210:掃描並獲得印鑑影像 步驟220:對印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得印章影像 步驟230:對印章影像進行二值化處理,以獲得二值化影像 步驟240:對二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得去雜訊影像 步驟250:將去雜訊影像與留存印章影像分別進行切割程序,以切割成多個區塊 步驟260:分別依序將去雜訊影像的每一區塊與留存印章影像的每一對應區塊進行相似度比對處理,進而依序判斷去雜訊影像的每一區塊與留存印章影像的每一對應區塊之間是否相似 步驟270:當判斷去雜訊影像的任一區塊與留存印章影像的對應區塊之間不相似時,輸出通知信息 100: Seal Identification System 110: Image scanning module 120: image processing module 130: Binarization module 140: Image noise reduction module 150: Image comparison module 160: Notification Module Step 210: Scan and obtain the seal image Step 220: Perform correction, removal of white edges, normalization and contrast enhancement on the seal image to obtain the seal image Step 230: Binarize the stamp image to obtain a binary image Step 240: Perform image erosion and image expansion processing on the binarized image to remove noise, thereby obtaining a de-noise image Step 250: Cut the noise-removed image and the stored seal image separately to cut into multiple blocks Step 260: Perform similarity comparison processing on each block of the denoising image and each corresponding block of the stored seal image in sequence, and then determine each block of the denoising image and the stored seal image in sequence Whether each corresponding block of is similar Step 270: When it is determined that any block of the denoising image is not similar to the corresponding block of the stored seal image, output a notification message

第1圖為本發明印鑑辨識系統之一實施例方塊示意圖。 第2圖為第1圖的印鑑辨識系統執行印鑑辨識方法之一實施例方法流程圖。 Figure 1 is a block diagram of an embodiment of the seal verification system of the present invention. Fig. 2 is a flowchart of an embodiment of the seal recognition method executed by the seal recognition system of Fig. 1.

100:印鑑辨識系統 100: Seal Identification System

110:影像掃描模組 110: Image scanning module

120:影像處理模組 120: image processing module

130:二值化模組 130: Binarization module

140:影像降噪模組 140: Image noise reduction module

150:影像比對模組 150: Image comparison module

160:通知模組 160: Notification Module

Claims (8)

一種印鑑辨識系統,其包括:一影像掃描模組,用以掃描並獲得一印鑑影像;一影像處理模組,連接該掃描模組,用以對該印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得一印章影像;一二值化模組,連接該影像處理模組,用以對該印章影像進行一二值化處理,以獲得一二值化影像;一影像降噪模組,連接該二值化模組,用以對該二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得一去雜訊影像;一影像比對模組,連接該影像降噪模組,用以將該去雜訊影像與一留存印章影像分別進行一切割程序,以切割成多個區塊,並基於一相似度公式分別依序計算出該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間的一相似度值,並基於該相似度值進而依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似,其中,該相似度公式為:
Figure 109112269-A0305-02-0019-7
,P為該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間的該相似度值,R與Q分別為該去雜訊影像的任一區塊與該留存印章影像的對應區塊中每一像素值的總和;以及 一通知模組,連接該影像比對模組,用以當該影像比對模組判斷該去雜訊影像的任一區塊與該留存印章影像的對應區塊之間不相似時,輸出一通知信息。
A seal recognition system, comprising: an image scanning module for scanning and obtaining a seal image; an image processing module connected to the scanning module for correcting, removing white edges, and normalizing the seal image And contrast enhancement processing to obtain a stamp image; a binarization module connected to the image processing module to perform a binarization process on the stamp image to obtain a binary image; an image noise reduction The module is connected to the binarization module to perform image erosion and image expansion processing on the binarized image to remove noise and obtain a denoising image; an image comparison module is connected to the image The noise reduction module is used to perform a cutting process on the denoising image and a stored stamp image respectively to cut into multiple blocks, and calculate each of the denoising images in sequence based on a similarity formula. A similarity value between a block and each corresponding block of the stored seal image, and based on the similarity value, each block of the denoising image and each block of the stored seal image are sequentially determined Whether the corresponding blocks are similar, where the similarity formula is:
Figure 109112269-A0305-02-0019-7
, P is the similarity value between each block of the denoising image and each corresponding block of the saved seal image, R and Q are respectively any block of the denoising image and the saved The sum of each pixel value in the corresponding block of the seal image; and a notification module connected to the image comparison module for determining whether any block of the denoising image is the same as the image comparison module. When the corresponding blocks of the stored seal image are not similar, a notification message is output.
如請求項1所述之印鑑辨識系統,其中,該影像比對模組擷取該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之至少一特徵點,並依序比對該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之該至少一特徵點之分布,進而依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似。 The seal recognition system according to claim 1, wherein the image comparison module captures at least one feature point of each block of the denoising image and each corresponding block of the stored seal image, and according to The distribution of the at least one characteristic point between each block of the denoising image and each corresponding block of the saved seal image is sequentially compared, and then each block of the denoising image and the retained stamp image are sequentially determined Whether each corresponding block of the seal image is similar. 如請求項1所述之印鑑辨識系統,其中,該影像比對模組將該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊分別進行細線化處理,以分別擷取該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之多個特徵向量;基於一內積公式計算出該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊中相對的每一該特徵向量之間的一向量夾角,並依序取得該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間具有的一平均向量夾角;以及基於該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間具有的該平均向量夾角依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似。 The seal recognition system according to claim 1, wherein the image comparison module performs thinning processing on each block of the denoising image and each corresponding block of the stored seal image to capture Take multiple feature vectors of each block of the denoising image and each corresponding block of the retained seal image; calculate each block of the denoising image and the retained seal image based on an inner product formula A vector angle between each of the feature vectors in each corresponding block of each corresponding block, and obtain the difference between each block of the denoising image and each corresponding block of the remaining seal image in sequence An average vector included angle; and based on the average vector included angle between each block of the denoising image and each corresponding block of the stored seal image, it is determined in sequence that each block of the denoising image is Whether each corresponding block of the saved seal image is similar. 如請求項1所述之印鑑辨識系統,其中,該轉正處理包括以下步驟: (a)判斷該印鑑影像中的印章外框是否為方形;(b)若判斷該印鑑影像中的該印章外框為方形時,定義以該印鑑影像中該印章外框的一最底部頂點為原點的一平面座標系;(c)取得該印章外框中位於該平面座標系中第一象限的一邊線於該平面座標系的一水平軸上的一投影角度θ1;(d)判斷該投影角度θ1是否等於零;以及(e)若判斷該投影角度θ1不等於零時,依據一旋轉指令順時鐘旋轉該印鑑影像一預設角度,並重複執行步驟(c)與(d),直至判斷出該投影角度θ1等於零。 The seal recognition system according to claim 1, wherein the conversion process includes the following steps: (a) Determine whether the seal frame in the seal image is a square; (b) If it is determined whether the seal frame in the seal image is square When it is square, define a plane coordinate system with a bottom vertex of the seal frame in the seal image as the origin; (c) Obtain the side line of the seal frame located in the first quadrant of the plane coordinate system. A projection angle θ 1 on a horizontal axis of the plane coordinate system; (d) judge whether the projection angle θ 1 is equal to zero; and (e) if it is judged that the projection angle θ 1 is not equal to zero, rotate clockwise according to a rotation command The seal image has a preset angle, and steps (c) and (d) are repeated until it is determined that the projection angle θ 1 is equal to zero. 一種印鑑辨識方法,包括以下步驟:(A)掃描並獲得一印鑑影像;(B)對該印鑑影像進行轉正、去除白邊、正規化與對比強化處理,以獲得一印章影像;(C)對該印章影像進行一二值化處理,以獲得一二值化影像;(D)對該二值化影像進行影像侵蝕與影像膨脹處理,以去除雜訊,進而獲得一去雜訊影像;(E)將該去雜訊影像與一留存印章影像分別進行一切割程序,以切割成多個區塊;(F)基於一相似度公式分別依序計算出該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間的一相似度 值,進而基於該相似度值依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似,其中,該相似度公式為:
Figure 109112269-A0305-02-0022-6
,P為該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間的該相似度值,R與Q分別為該去雜訊影像的任一區塊與該留存印章影像的對應區塊中每一像素值的總和;以及(G)當判斷該去雜訊影像的任一區塊與該留存印章影像的對應區塊之間不相似時,輸出一通知信息。
A seal identification method includes the following steps: (A) scan and obtain a seal image; (B) perform correction, removal of white borders, normalization and contrast enhancement on the seal image to obtain a seal image; (C) Perform a binarization process on the seal image to obtain a binarized image; (D) perform image erosion and image expansion processes on the binarized image to remove noise and obtain a de-noise image; (E) ) Perform a cutting process on the denoising image and a stored seal image respectively to cut into multiple blocks; (F) Calculate each block and the denoising image in sequence based on a similarity formula A similarity value between each corresponding block of the retained seal image, and then based on the similarity value, it is determined in sequence between each block of the denoising image and each corresponding block of the retained seal image Whether it is similar, where the similarity formula is:
Figure 109112269-A0305-02-0022-6
, P is the similarity value between each block of the denoising image and each corresponding block of the saved seal image, R and Q are respectively any block of the denoising image and the saved The sum of each pixel value in the corresponding block of the seal image; and (G) when it is determined that any block of the denoising image is not similar to the corresponding block of the stored seal image, output a notification message.
如請求項5所述之印鑑辨識方法,其中,該步驟(F)包括以下步驟:擷取該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之至少一特徵點;以及依序比對該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之該至少一特徵點之分布,進而依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似。 The seal identification method according to claim 5, wherein the step (F) includes the following steps: capturing at least one characteristic point of each block of the denoising image and each corresponding block of the stored seal image ; And sequentially compare the distribution of the at least one feature point of each block of the denoising image with each corresponding block of the remaining seal image, and then sequentially determine each block of the denoising image Whether it is similar to each corresponding block of the saved seal image. 如請求項5所述之印鑑辨識方法,其中,該步驟(F)包括以下步驟:將該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊分別進行細線化處理,以分別擷取該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之多個特徵向量;基於一內積公式計算出該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊中相對的每一該特徵向量之間的一向 量夾角,並依序取得該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間具有的一平均向量夾角;以及基於該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間具有的該平均向量夾角依序判斷該去雜訊影像的每一區塊與該留存印章影像的每一對應區塊之間是否相似。 The seal identification method according to claim 5, wherein the step (F) includes the following steps: each block of the denoising image and each corresponding block of the remaining seal image are respectively thinned, The feature vectors of each block of the denoising image and each corresponding block of the stored seal image are respectively captured; each block of the denoising image and the corresponding block are calculated based on an inner product formula The relationship between each corresponding feature vector in each corresponding block of the seal image Measure the included angle, and sequentially obtain an average vector included angle between each block of the denoising image and each corresponding block of the saved seal image; and the difference between each block based on the denoising image The average vector included angle between each corresponding block of the stored seal image determines in order whether each block of the denoising image is similar to each corresponding block of the stored seal image. 如請求項5所述之印鑑辨識方法,其中,該轉正處理包括以下步驟:(a)判斷該印鑑影像中的印章外框是否為方形;(b)若判斷該印鑑影像中的該印章外框為方形時,定義以該印鑑影像中該印章外框的一最底部頂點為原點的一平面座標系;(c)取得該印章外框中位於該平面座標系中第一象限的一邊線於該平面座標系的一水平軸上的一投影角度θ1;(d)判斷該投影角度θ1是否等於零;以及(e)若判斷該投影角度θ1不等於零時,依據一旋轉指令順時鐘旋轉該印鑑影像一預設角度,並重複執行步驟(c)與(d),直至判斷出該投影角度θ1等於零。 The seal identification method according to claim 5, wherein the conversion processing includes the following steps: (a) determining whether the seal frame in the seal image is a square; (b) if it is determined whether the seal frame in the seal image is square When it is square, define a plane coordinate system with a bottom vertex of the seal frame in the seal image as the origin; (c) Obtain the side line of the seal frame located in the first quadrant of the plane coordinate system. A projection angle θ 1 on a horizontal axis of the plane coordinate system; (d) judge whether the projection angle θ 1 is equal to zero; and (e) if it is judged that the projection angle θ 1 is not equal to zero, rotate clockwise according to a rotation command The seal image has a preset angle, and steps (c) and (d) are repeated until it is determined that the projection angle θ 1 is equal to zero.
TW109112269A 2020-04-10 2020-04-10 Seal identification system and method thereof TWI739387B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109112269A TWI739387B (en) 2020-04-10 2020-04-10 Seal identification system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109112269A TWI739387B (en) 2020-04-10 2020-04-10 Seal identification system and method thereof

Publications (2)

Publication Number Publication Date
TWI739387B true TWI739387B (en) 2021-09-11
TW202139063A TW202139063A (en) 2021-10-16

Family

ID=78778035

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109112269A TWI739387B (en) 2020-04-10 2020-04-10 Seal identification system and method thereof

Country Status (1)

Country Link
TW (1) TWI739387B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60156185A (en) * 1984-01-26 1985-08-16 Matsushita Graphic Commun Syst Inc Seal stamp collating device
US5652794A (en) * 1994-08-16 1997-07-29 France Telecom Device and process for securizing a document and graphic authentification code
TW328576B (en) * 1996-07-16 1998-03-21 Chen Bor Ning Automatic seal-imprint comparing method and apparatus
TW330272B (en) * 1996-07-18 1998-04-21 Startek Engineering Inc Automatic seal imprint comparing and recognizing system
EP0917113A2 (en) * 1997-11-13 1999-05-19 Xerox Corporation Seal detection system and method
TW359399U (en) * 1995-08-14 1999-05-21 Gloria Electronics Co Ltd Computer-aided neurological network for verifying singature and stamp
US20110231131A1 (en) * 2010-03-17 2011-09-22 Lee Joong Forged seal imprint inspection method and recording medium
TWM601383U (en) * 2020-04-10 2020-09-11 彰化商業銀行股份有限公司 Seal recognition system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60156185A (en) * 1984-01-26 1985-08-16 Matsushita Graphic Commun Syst Inc Seal stamp collating device
US5652794A (en) * 1994-08-16 1997-07-29 France Telecom Device and process for securizing a document and graphic authentification code
TW359399U (en) * 1995-08-14 1999-05-21 Gloria Electronics Co Ltd Computer-aided neurological network for verifying singature and stamp
TW328576B (en) * 1996-07-16 1998-03-21 Chen Bor Ning Automatic seal-imprint comparing method and apparatus
TW330272B (en) * 1996-07-18 1998-04-21 Startek Engineering Inc Automatic seal imprint comparing and recognizing system
EP0917113A2 (en) * 1997-11-13 1999-05-19 Xerox Corporation Seal detection system and method
US6067374A (en) * 1997-11-13 2000-05-23 Xerox Corporation Seal detection system and method
US20110231131A1 (en) * 2010-03-17 2011-09-22 Lee Joong Forged seal imprint inspection method and recording medium
TWM601383U (en) * 2020-04-10 2020-09-11 彰化商業銀行股份有限公司 Seal recognition system

Also Published As

Publication number Publication date
TW202139063A (en) 2021-10-16

Similar Documents

Publication Publication Date Title
CN109086714B (en) Form recognition method, recognition system and computer device
CN109993161B (en) Text image rotation correction method and system
WO2019169532A1 (en) License plate recognition method and cloud system
CN111353497B (en) Identification method and device for identity card information
CN110348264B (en) QR two-dimensional code image correction method and system
WO2020147398A1 (en) Reproduced image detection method and device, computer device and storage medium
KR20200118842A (en) Identity authentication method and device, electronic device and storage medium
WO2020082731A1 (en) Electronic device, credential recognition method and storage medium
WO2021237909A1 (en) Table restoration method and apparatus, device, and storage medium
WO2023097931A1 (en) Hough transform-based license plate tilt correction method
WO2022156178A1 (en) Image target comparison method and apparatus, computer device and readable storage medium
TWM601383U (en) Seal recognition system
CN111680690B (en) Character recognition method and device
CN104866847A (en) Rapid and robust answering card identifying method
KR20160083226A (en) Apparatus and method for recognizing license plate
CN115601757A (en) Scanning document image inclination correction method based on segmented projection
TWI739387B (en) Seal identification system and method thereof
CN112419207A (en) Image correction method, device and system
CN104408430B (en) License plate positioning method and device
CN112818983A (en) Method for judging character inversion by using picture acquaintance
CN116503871A (en) Character segmentation preprocessing method, terminal device and computer readable storage medium
WO2011097935A1 (en) Binarization processing method for fingerprint image
CN111986176B (en) Crack image identification method, system, terminal and readable storage medium
CN115410191A (en) Text image recognition method, device, equipment and storage medium
WO2022056875A1 (en) Method and apparatus for segmenting nameplate image, and computer-readable storage medium