TWI657410B - Method and image processing system of image angle detection - Google Patents

Method and image processing system of image angle detection Download PDF

Info

Publication number
TWI657410B
TWI657410B TW107107193A TW107107193A TWI657410B TW I657410 B TWI657410 B TW I657410B TW 107107193 A TW107107193 A TW 107107193A TW 107107193 A TW107107193 A TW 107107193A TW I657410 B TWI657410 B TW I657410B
Authority
TW
Taiwan
Prior art keywords
image
source image
source
feature
values
Prior art date
Application number
TW107107193A
Other languages
Chinese (zh)
Other versions
TW201939436A (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 TW107107193A priority Critical patent/TWI657410B/en
Application granted granted Critical
Publication of TWI657410B publication Critical patent/TWI657410B/en
Publication of TW201939436A publication Critical patent/TW201939436A/en

Links

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一種影像角度偵測的方法及其影像處理系統,此方法適用於影像處理系統並且包括取得來源影像,以及在針對來源影像進行影像壓縮或是影像解壓縮的過程中,取得來源影像所對應的多個第一特徵值,利用上述第一特徵值進行特徵檢測,再根據特徵檢測的結果,計算來源影像的偏斜角度。A method for image angle detection and an image processing system thereof, the method is applicable to an image processing system and includes obtaining a source image, and obtaining a source image corresponding to image compression or image decompression for a source image The first feature value is used to perform feature detection using the first feature value, and then the skew angle of the source image is calculated according to the result of the feature detection.

Description

影像角度偵測的方法及其影像處理系統Image angle detection method and image processing system thereof

本發明是有關於一種影像處理的技術,且特別是關於一種影像角度偵測的方法及其影像處理系統。The present invention relates to a technique for image processing, and more particularly to a method for image angle detection and an image processing system thereof.

影像掃描器主要是以光學掃描的方式將相片、印刷文件、手寫文件等物件進行分析並且轉換成數位影像,而在掃描過程中往往會因人為或是裝置本身的因素而將使得所掃描出的影像產生偏斜。一般校正影像偏斜的方法往往僅能在取得完整的掃描影像後,才能藉由演算法對整張影像進行運算。若是影像較大,除了需要等待影像資料完全取得才得以開始進行校正外,亦需要更多的運算時間以及計算資源,因此影像角度校正的解決方案並未普遍應用於一般市面上中低階的印表機或掃描器中。Image scanners mainly analyze and convert photos, printed documents, handwritten documents and other objects into digital images by optical scanning. In the scanning process, the scanned images are often caused by human factors or the device itself. The image is skewed. Generally, the method of correcting image skew can only perform the operation of the entire image by using an algorithm after obtaining a complete scanned image. If the image is large, in addition to waiting for the image data to be completely obtained, it is necessary to start the calibration. It also requires more computing time and computing resources. Therefore, the image angle correction solution is not widely used in the low-end printing on the market. In the table or scanner.

有鑑於此,本發明提供一種影像角度偵測的方法及其影像處理系統,其可以較小的資料量、系統運算資源以及時間完成影像角度偵測。In view of the above, the present invention provides a method for image angle detection and an image processing system thereof, which can complete image angle detection with a small amount of data, system computing resources, and time.

在本發明的一實施例中,上述的方法適用於影像處理系統並且包括取得來源影像,並且在針對來源影像進行影像壓縮或是影像解壓縮的過程中,取得來源影像所對應的多個第一特徵值,利用上述第一特徵值進行特徵檢測,以及根據特徵檢測的結果,計算來源影像的偏斜角度。In an embodiment of the invention, the method is applicable to an image processing system and includes acquiring a source image, and obtaining a plurality of first images corresponding to the source image during image compression or image decompression for the source image. The feature value is subjected to feature detection using the first feature value, and the skew angle of the source image is calculated according to the result of the feature detection.

在本發明的一實施例中,上述的影像處理系統包括記憶體以及處理器,其中記憶體耦接於處理器。記憶體用以儲存影像以及資料。處理器用以取得來源影像,並且在針對來源影像進行影像壓縮或是影像解壓縮的過程中,取得來源影像所對應的多個第一特徵值,利用上述第一特徵值進行特徵檢測,以及根據特徵檢測的結果,計算來源影像的偏斜角度。In an embodiment of the invention, the image processing system includes a memory and a processor, wherein the memory is coupled to the processor. Memory is used to store images and data. The processor is configured to obtain the source image, and obtain a plurality of first feature values corresponding to the source image in the process of image compression or image decompression for the source image, and perform feature detection using the first feature value, and according to the feature As a result of the detection, the skew angle of the source image is calculated.

為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。The above described features and advantages of the invention will be apparent from the following description.

本發明的部份實施例接下來將會配合附圖來詳細描述,以下的描述所引用的元件符號,當不同附圖出現相同的元件符號將視為相同或相似的元件。這些實施例只是本發明的一部份,並未揭示所有本發明的可實施方式。更確切的說,這些實施例只是本發明的專利申請範圍中的方法以及系統的範例。The components of the present invention will be described in detail in the following description in conjunction with the accompanying drawings. These examples are only a part of the invention and do not disclose all of the embodiments of the invention. Rather, these embodiments are merely examples of methods and systems within the scope of the patent application of the present invention.

圖1是根據本發明一實施例所繪示的影像處理系統的方塊圖,但此僅是為了方便說明,並不用以限制本發明。首先圖1先介紹影像處理系統中的所有構件以及配置關係,詳細功能將配合圖2一併揭露。1 is a block diagram of an image processing system according to an embodiment of the invention, but is for convenience of description and is not intended to limit the present invention. First, Figure 1 first introduces all the components and configuration relationships in the image processing system. The detailed functions will be disclosed in conjunction with Figure 2.

請參照圖1,影像處理系統100包括記憶體110以及處理器120,其中記憶體110耦接至處理器120。在一實施例中,影像處理系統100可以是個人電腦、筆記型電腦、平板電腦、工作站、伺服器電腦、大型電腦、工業電腦等具有影像處理功能的電腦系統。在另一實施例中,影像處理系統100可以包括上述電腦系統以及與其有線或是無線連接的掃描器,或者是兼具掃描以及影像處理功能的掃描系統、印表機、多功能事務機等電子設備,本發明不在此設限。Referring to FIG. 1 , the image processing system 100 includes a memory 110 and a processor 120 , wherein the memory 110 is coupled to the processor 120 . In an embodiment, the image processing system 100 can be a computer system with image processing functions such as a personal computer, a notebook computer, a tablet computer, a workstation, a server computer, a large computer, and an industrial computer. In another embodiment, the image processing system 100 may include the above computer system and a scanner connected to it wired or wirelessly, or a scanning system, a printer, a multifunction machine, and the like that have both scanning and image processing functions. The device, the invention is not limited thereto.

記憶體110用以儲存影像、程式碼等資料,其可以例如是任意型式的固定式或可移動式隨機存取記憶體(random access memory,RAM)、唯讀記憶體(read-only memory,ROM)、快閃記憶體(flash memory)、硬碟或其他類似裝置、積體電路及其組合。The memory 110 is used for storing images, programs, and the like, and may be, for example, any type of fixed or removable random access memory (RAM), read-only memory (ROM). ), flash memory, hard disk or other similar device, integrated circuit, and combinations thereof.

處理器120用以控制影像處理系統100的構件之間的作動,其可以例如是中央處理單元(central processing unit,CPU),或是其他可程式化之一般用途或特殊用途的微處理器(microprocessor)、數位訊號處理器(digital signal processor,DSP)、圖形處理器(graphic processing unit,GPU)、可程式化控制器、特殊應用積體電路(application specific integrated circuits,ASIC)、可程式化邏輯裝置(programmable logic device,PLD)、其他類似裝置或上述裝置的組合。The processor 120 is configured to control operations between components of the image processing system 100, which may be, for example, a central processing unit (CPU), or other programmable general purpose or special purpose microprocessors. ), digital signal processor (DSP), graphics processing unit (GPU), programmable controller, application specific integrated circuits (ASIC), programmable logic devices (programmable logic device, PLD), other similar devices, or a combination of the above.

圖2是根據本發明一實施例所繪示的影像角度偵測的方法流程圖,而本實施例中的方法流程可以影像處理系統100的各元件來實現。FIG. 2 is a flowchart of a method for image angle detection according to an embodiment of the invention, and the method flow in this embodiment may be implemented by components of the image processing system 100.

請同時參照圖1以及圖2,首先,影像處理系統100的處理器120將接收來源影像(步驟S202),並且針對來源影像進行影像壓縮或是影像解壓縮的流程(步驟S210)。在此,處理器120將依據來源影像的類型來決定進行影像壓縮或是影像解壓縮。舉例來說,假設來源影像是掃描器所產生的原始圖檔(raw image),基於其較大的資料量而往往需要壓縮成例如是JPEG格式的壓縮影像,以節省記憶體110的儲存空間。假設來源影像是經由網路傳輸所接收到的壓縮影像,則需要解壓縮以呈現於螢幕(未繪示)。Referring to FIG. 1 and FIG. 2 simultaneously, first, the processor 120 of the image processing system 100 receives the source image (step S202), and performs a process of image compression or image decompression for the source image (step S210). Here, the processor 120 determines whether to perform image compression or image decompression depending on the type of the source image. For example, if the source image is a raw image generated by the scanner, it is often required to be compressed into a compressed image such as a JPEG format based on its larger data amount to save storage space of the memory 110. Assuming that the source image is a compressed image received via the network, it needs to be decompressed for presentation on a screen (not shown).

當處理器120在針對來源影像進行影像壓縮或是影像解壓縮的同時,將會取得來源影像所對應的多個第一特徵值(步驟S212)。在此的第一特徵值為處理器120在進行影像壓縮或是影像解壓縮的過程中有關於空間域與頻率域之間轉換所產生的中介資料,因此處理器120不需經過額外的運算,而此中介資料能代表來源影像大部份的影像特徵。When the processor 120 performs image compression or image decompression on the source image, a plurality of first feature values corresponding to the source image are obtained (step S212). The first characteristic value here is that the processor 120 has intermediate information generated by the conversion between the spatial domain and the frequency domain in the process of performing image compression or image decompression, so the processor 120 does not need to perform additional operations. This mediation data can represent most of the image features of the source image.

以一般的影像壓縮而言,會經過頻帶分離的程序,以將影像中的高頻值與低頻值分離而達到高壓縮率的目的,其中本實施例中所採用的第一特徵值為低頻值。在本實施例中,處理器120在針對來源影像進行影像壓縮時可以是先將其分割成多個相同大小並且不重疊的多個正方形區塊(例如8×8、16×16),再針對各個區塊進行離散餘弦轉換(discrete cosine transform,DCT),而各個區塊將會分別產生一個DCT係數矩陣。以一個8×8的區塊來說,其DCT係數矩陣將會有1個代表低頻的直流係數(DC值)以及63個代表高頻的交流係數(AC值)。在此,來源影像所對應的所有DC值將構成一個低頻影像,而此低頻影像足以描述來源影像大部份的影像特徵。因此,處理器120將會擷取各個區塊的DC值來做為前述的「第一特徵值」。必須說明的是,在其它實施例中,處理器120可以是利用離散小波轉換(discrete wavelet transform)、傅立葉轉換(Fourier transform)等其它可用於頻帶分離的方式來取得第一特徵值,本發明不在此設限。本領域具通常知識者應明瞭,處理器120在分割來源影像為多個區塊前可以先進行色彩轉換(color transformation)、取樣(sampling)。此外,處理器120在針對各個區塊進行完DCT轉換後,將會持續進行量化(quantization)、熵編碼(entropy encoding)等程序,而步驟S212並不會影響影像壓縮流程。In the case of general image compression, a frequency separation process is performed to separate high frequency values from low frequency values in the image to achieve high compression ratio. The first characteristic value used in this embodiment is a low frequency value. . In this embodiment, when performing image compression on the source image, the processor 120 may first divide the image into a plurality of square blocks (for example, 8×8, 16×16) that are the same size and do not overlap, and then Each block performs a discrete cosine transform (DCT), and each block will generate a DCT coefficient matrix. In the case of an 8×8 block, its DCT coefficient matrix will have one DC coefficient (DC value) representing low frequency and 63 AC coefficients (AC value) representing high frequency. Here, all DC values corresponding to the source image will constitute a low frequency image, and the low frequency image is sufficient to describe most of the image features of the source image. Therefore, the processor 120 will retrieve the DC value of each block as the aforementioned "first feature value". It should be noted that, in other embodiments, the processor 120 may use a discrete wavelet transform, a Fourier transform, or the like to obtain the first feature value in a manner of band separation. This limit. It should be apparent to those skilled in the art that the processor 120 may perform color conversion and sampling before dividing the source image into a plurality of blocks. In addition, after the DCT conversion is performed for each block, the processor 120 will continue to perform processes such as quantization and entropy encoding, and step S212 does not affect the image compression process.

另一方面,以一般的影像解壓縮而言,在本實施例中,處理器120可以是先針對來源影像進行熵解碼(entropy decoding)、反量化(inverse quantization)等程序而得到各個區塊的DC值來做為前述的「第一特徵值」。同樣地,處理器120將會持續地進行離散餘弦反轉換(inverse discrete cosine transform,IDCT)、反取樣(unsampling)、色彩反轉換(inverse color transformation)等程序,而步驟S212亦不會影響影像解壓縮流程。On the other hand, in the case of the general image decompression, in the embodiment, the processor 120 may first perform entropy decoding, inverse quantization, and the like on the source image to obtain the respective blocks. The DC value is used as the "first characteristic value" described above. Similarly, the processor 120 will continuously perform procedures such as inverse discrete cosine transform (IDCT), unsampling, and inverse color transformation, and step S212 will not affect the image solution. Compression process.

處理器120在取得第一特徵值後,將會利用第一特徵值進行特徵檢測(步驟S214),並且根據特徵檢測的結果,計算來源影像的偏斜角度(步驟S216)。換句話說,處理器120 可以利用來源影像進行影像壓縮或者是影像解壓縮的過程中所產生的中介資料來進行特徵檢測,以從中取得來源影像的偏斜角度。在此,處理器120可以是利用霍夫變換演算法(Hough transform)、雷登變換(Radon transform)、迴歸分析(regression analysis)等直線檢測演算法(line detection algorithm)來偵測由第一特徵值所構成的中介影像中的直線特徵。在本實施例中,處理器120即採用由DC值所構成的低頻影像來進行直線檢測,再將所偵測到的直線線段相對於水平方向或是垂直方向的夾角,即可以取得來源影像的偏斜角度。因此,處理器120無須等待影像壓縮或是影像解壓縮完畢,即可以資料量較小的低頻影像來計算出來源影像的偏斜角度。為了方便明瞭,以下實施例將來說明圖2的應用情境。After obtaining the first feature value, the processor 120 performs feature detection using the first feature value (step S214), and calculates a skew angle of the source image according to the result of the feature detection (step S216). In other words, the processor 120 can perform image detection by using the source image for image compression or mediation data generated during image decompression to obtain the skew angle of the source image. Here, the processor 120 may detect the first feature by using a line detection algorithm such as a Hough transform, a Radon transform, or a regression analysis. The linear feature in the intermediate image formed by the value. In this embodiment, the processor 120 uses the low frequency image composed of the DC value to perform the line detection, and then the angle between the detected straight line segment and the horizontal direction or the vertical direction, that is, the source image can be obtained. Skew angle. Therefore, the processor 120 does not need to wait for image compression or image decompression, that is, the low-frequency image with a small amount of data can be used to calculate the skew angle of the source image. For the sake of convenience, the following embodiments will explain the application scenario of FIG. 2 in the future.

圖3是根據本發明一實施例所繪示的影像角度偵測的方法的應用情境流程圖。本實施例中的方法流程可以影像處理系統100的各元件來實現,並且在此將以掃描器所產生的掃描影像做為來源影像來進行說明。FIG. 3 is a flow chart of an application scenario of a method for image angle detection according to an embodiment of the invention. The method flow in this embodiment can be implemented by each component of the image processing system 100, and the scanned image generated by the scanner is used as a source image.

請同時參照圖1以及圖3,首先,影像處理系統100的處理器120將針對掃描影像Img30進行影像壓縮(步驟S310),以壓縮成例如是漸進式(progressive)JPEG格式或標準型(baseline)JPEG格式的壓縮影像。在進行影像壓縮的過程中,處理器120將擷取DCT轉換所產生的DC值(步驟S312),以進行直線檢測(步驟S314),從而取得掃描影像Img30的偏斜角度(步驟S316),其中步驟S310、S312、S314、S316的詳細說明請參照前述實施例,於此不再贅述。附帶說明的是,當掃描影像為文件檔案時,基於每行文字大部份是呈直線排列,而文件內的表格以及影像具有直線邊框,因此處理器120可以精確地計算出掃描影像的偏斜角度。Referring to FIG. 1 and FIG. 3 simultaneously, first, the processor 120 of the image processing system 100 performs image compression on the scanned image Img30 (step S310) to be compressed into, for example, a progressive JPEG format or a baseline. Compressed image in JPEG format. During the image compression process, the processor 120 captures the DC value generated by the DCT conversion (step S312) to perform line detection (step S314), thereby obtaining the skew angle of the scanned image Img30 (step S316), wherein For details of the steps S310, S312, S314, and S316, refer to the foregoing embodiment, and details are not described herein again. Incidentally, when the scanned image is a file file, the majority of each line of text is arranged in a straight line, and the table and the image in the file have a straight line border, so the processor 120 can accurately calculate the skew of the scanned image. angle.

接著,當處理器120壓縮完掃描影像後,會將偏斜角度的相關資訊寫入壓縮影像,以產生具有角度資訊的壓縮影像Img31。以JPEG影像的EXIF資訊來說,處理器120可以例如是將偏斜角度寫入於用以儲存使用者註解的UserComment標籤(標籤號為0x9286)。接著,處理器120將針對壓縮影像Img31進行影像解壓縮(步驟S320),以產生解壓縮影像Img32。同時,處理器120將會讀取壓縮影像Img31中的角度資訊(步驟S322),以根據角度資訊來針對解壓縮影像Img32進行偏斜校正(deskew),而產生已校正的解壓縮影像Img33。換言之,步驟S320與步驟S322可理解為同時進行,而無需待步驟S320完成影像解壓縮後,才接續進行步驟S322的讀取角度資訊。Then, after the processor 120 compresses the scanned image, the information about the skew angle is written into the compressed image to generate a compressed image Img31 having angle information. For EXIF information of the JPEG image, the processor 120 may, for example, write the skew angle to the UserComment tag (label number 0x9286) for storing the user's annotation. Next, the processor 120 performs image decompression on the compressed image Img31 (step S320) to generate a decompressed image Img32. At the same time, the processor 120 will read the angle information in the compressed image Img31 (step S322) to perform skew correction (deskew) on the decompressed image Img32 according to the angle information, and generate the corrected decompressed image Img33. In other words, step S320 and step S322 can be understood to be performed simultaneously, and the read angle information of step S322 is not continued until image decompression is completed in step S320.

由於本實施例的處理器120是在針對掃描影像Img30進行影像壓縮的過程中,同步地利用掃描影像Img30所對應的低頻影像來估算掃描影像Img30偏移角度,因此除了可以較小的資料量達到以完整影像做偏移角度分析的精確度,更可降低系統運算資源的耗用以及時間。此外,由於偏斜角度已寫入於壓縮影像Img31,因此處理器120每次開啟壓縮影像Img31時,無需再重新計算其偏移角度。The processor 120 of the embodiment estimates the offset angle of the scanned image Img30 by using the low frequency image corresponding to the scanned image Img30 in the process of image compression for the scanned image Img30, so that the data amount can be reduced by a small amount of data. The accuracy of the offset angle analysis with the complete image can reduce the consumption and time of the system computing resources. In addition, since the skew angle has been written in the compressed image Img31, the processor 120 does not need to recalculate the offset angle each time the compressed image Img31 is turned on.

值得一提的是,假設掃描影像Img30為純文字文件的原始RGB影像,其解析度具有300dpi(2480×3508像素),而其DC值所構成的低頻影像為(310×439像素)。以64位元(x64)版本的Windows 7的作業系統為例,若採用Intel Core i7-3520M 2.9GHz做為處理器120時,一般習知的流程需要經過672ms的時間取得到完整的解壓縮影像後,再經過33ms的時間進行直線檢測才能取得偏移角度,而以圖3的流程僅需156ms來取得到偏移角度。因此,影像處理系統100可實作為中低價的影印機、印表機、掃描器、或多功能事務機等機種,以提供校正現有文檔的選項,進而減少複印瑕疵文件紙張以及墨水的成本。It is worth mentioning that, assuming that the scanned image Img30 is a raw RGB image of a plain text file, the resolution has 300 dpi (2480×3508 pixels), and the low frequency image composed of the DC value is (310×439 pixels). Taking the 64-bit (x64) version of the Windows 7 operating system as an example, if the Intel Core i7-3520M 2.9 GHz is used as the processor 120, the conventional process requires 672 ms to obtain a complete decompressed image. After that, the line detection is performed for 33 ms to obtain the offset angle, and the flow of FIG. 3 only takes 156 ms to obtain the offset angle. Therefore, the image processing system 100 can be implemented as a medium and low-priced photocopier, printer, scanner, or multifunction printer to provide an option to correct existing documents, thereby reducing the cost of copying the document paper and ink.

影像處理系統100除了可校正前述的掃描影像外,更可用於校正一般影像,以方便後續應用。具體來說,圖4是根據本發明一實施例所繪示影像角度偵測的方法的應用情境流程圖。本實施例中的方法流程可以影像處理系統100的各元件來實現,並且在此將以自網路所接收到的壓縮影像做為來源影像來進行說明,也就是說在此可合理地假設此壓縮影像並不具有角度資訊。In addition to correcting the aforementioned scanned images, the image processing system 100 can be used to correct general images to facilitate subsequent applications. Specifically, FIG. 4 is a flow chart of an application scenario of a method for image angle detection according to an embodiment of the invention. The method flow in this embodiment can be implemented by various components of the image processing system 100, and the compressed image received from the network is used as a source image, which is reasonably assumed here. Compressed images do not have angular information.

請同時參照圖1以及圖4,首先,影像處理系統100的處理器120將針對不具有角度資訊的壓縮影像Img40進行影像解壓縮(步驟S410)。在進行影像壓縮的過程中,處理器120將在進行反量化處理後(即IDCT轉換之前)擷取DC值(步驟S412),以進行直線檢測(步驟S414),從而取得壓縮影像Img40的偏斜角度(步驟S416)。在此,步驟S410、S412、S414、S416的詳細說明請參照前述實施例,於此不再贅述。當處理器120解壓縮完壓縮影像Img40後,將會產生解壓縮影像Img41,並且再根據偏斜角度來針對解壓縮影像Img41進行偏斜校正,而產生已校正的解壓縮影像Img42,以增加使用者越讀的舒適性。Referring to FIG. 1 and FIG. 4 simultaneously, first, the processor 120 of the image processing system 100 performs image decompression on the compressed image Img40 having no angle information (step S410). In the process of performing image compression, the processor 120 will take a DC value after performing the inverse quantization process (ie, before the IDCT conversion) (step S412) to perform line detection (step S414), thereby obtaining the skew of the compressed image Img40. Angle (step S416). For details of the steps S410, S412, S414, and S416, refer to the foregoing embodiment, and details are not described herein again. After the processor 120 decompresses the compressed image Img40, the decompressed image Img41 is generated, and the decompressed image Img41 is further corrected according to the skew angle, and the corrected decompressed image Img42 is generated to increase the use. The more you read the comfort.

綜上所述,本發明所提出的影像角度偵測的方法及其影像處理系統,其是在針對來源影像進行影像壓縮或是影像解壓縮的過程中,利用能代表來源影像大部份的影像的特徵並且有關於空間域與頻率域之間轉換所產生的中介資料來進行影像角度偵測。基此,本發明的影像處理系統不需經過額外的運算,除了可以較小的資料量達到偏移角度分析的精確度,更可降低系統運算資源的耗用以及時間,因此可實作於市面上高中低階的相關產品,以提升消費者更佳的使用者體驗。In summary, the image angle detection method and the image processing system thereof according to the present invention use image representing most of the source image during image compression or image decompression for the source image. The feature is also related to the mediation data generated by the conversion between the spatial domain and the frequency domain for image angle detection. Therefore, the image processing system of the present invention does not need to perform additional operations, except that the accuracy of the offset angle analysis can be achieved with a small amount of data, and the consumption and time of the system computing resources can be reduced, so that the image can be implemented in the market. High- and low-level related products to enhance the consumer's better user experience.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。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.

100‧‧‧影像處理系統100‧‧‧Image Processing System

110‧‧‧記憶體110‧‧‧ memory

120‧‧‧處理器120‧‧‧ processor

S202、S212、S214、S216、S310、S312、S314、S316、S320、S322、S410、S412、S414、S416‧‧‧步驟S202, S212, S214, S216, S310, S312, S314, S316, S320, S322, S410, S412, S414, S416‧‧ steps

Img30、Img31、Img32、Img33、Img40、Img41、Img42‧‧‧影像Img30, Img31, Img32, Img33, Img40, Img41, Img42‧‧ images

圖1是根據本發明一實施例所繪示的影像處理系統的方塊圖。 圖2是根據本發明一實施例所繪示的影像角度偵測的方法流程圖。 圖3是根據本發明一實施例所繪示的影像角度偵測的方法的應用情境流程圖。 圖4是根據本發明另一實施例所繪示的影像角度偵測的方法的應用情境流程圖。FIG. 1 is a block diagram of an image processing system according to an embodiment of the invention. 2 is a flow chart of a method for image angle detection according to an embodiment of the invention. FIG. 3 is a flow chart of an application scenario of a method for image angle detection according to an embodiment of the invention. FIG. 4 is a flow chart of an application scenario of a method for image angle detection according to another embodiment of the invention.

Claims (14)

一種影像角度偵測的方法,適用於影像處理系統,該方法包括:取得來源影像;以及在針對該來源影像進行影像壓縮或是影像解壓縮的過程中:取得該來源影像所對應的多個第一特徵值;利用該些第一特徵值進行特徵檢測;以及根據該特徵檢測的結果,計算該來源影像的偏斜角度,其中在針對該來源影像進行該影像壓縮的過程中,取得該來源影像所對應的該些第一特徵值的步驟包括:取得針對該來源影像進行空間域至頻率域的轉換編碼所產生的多個低頻值,以做為該些第一特徵值。 An image angle detection method is applicable to an image processing system, and the method includes: obtaining a source image; and performing image compression or image decompression on the source image: obtaining a plurality of the corresponding images of the source image a feature value; performing feature detection by using the first feature values; and calculating a skew angle of the source image according to the result of the feature detection, wherein the source image is obtained during the image compression process for the source image The step of the corresponding first feature values includes: obtaining a plurality of low frequency values generated by performing spatial domain to frequency domain transform coding on the source image as the first feature values. 如申請專利範圍第1項所述的方法,其中該些第一特徵值關聯於該來源影像的低頻訊號。 The method of claim 1, wherein the first feature values are associated with a low frequency signal of the source image. 如申請專利範圍第1項所述的方法,其中該來源影像為掃描影像。 The method of claim 1, wherein the source image is a scanned image. 如申請專利範圍第1項所述的方法,其中該轉換編碼為離散餘弦轉換,而每一該些低頻值為直流係數(DC值)。 The method of claim 1, wherein the conversion code is a discrete cosine transform, and each of the low frequency values is a DC coefficient (DC value). 如申請專利範圍第1項所述的方法,其中當針對該來源影像進行該影像壓縮的過程中,利用該些第一特徵值進行特徵檢測的步驟包括: 利用該些第一特徵值進行直線檢測,據以檢測出該來源影像中的線段。 The method of claim 1, wherein the step of performing feature detection using the first feature values in the process of performing the image compression on the source image comprises: Line detection is performed using the first feature values to detect line segments in the source image. 如申請專利範圍第1項所述的方法,其中在針對該來源影像進行該影像壓縮的過程之後,該方法更包括:產生該來源影像的壓縮影像;以及寫入該偏斜角度的相關資訊於該壓縮影像。 The method of claim 1, wherein after performing the image compression process on the source image, the method further comprises: generating a compressed image of the source image; and writing related information of the skew angle to The compressed image. 如申請專利範圍第6項所述的方法,更包括:當針對該壓縮影像進行影像解壓縮時,讀取該偏斜角度的該相關資訊;以及當針對該壓縮影像進行完影像解壓縮而產生解壓縮影像時,根據該偏斜角度的該相關資訊校正該解壓縮影像,以產生已校正的解壓縮影像。 The method of claim 6, further comprising: when the image is decompressed for the compressed image, reading the related information of the skew angle; and generating image decompression for the compressed image When the image is decompressed, the decompressed image is corrected based on the correlation information of the skew angle to generate a corrected decompressed image. 如申請專利範圍第1項所述的方法,其中該來源影像為壓縮影像。 The method of claim 1, wherein the source image is a compressed image. 如申請專利範圍第8項所述的方法,其中在針對該來源影像進行該影像解壓縮的過程中,取得該來源影像的該些第一特徵值的步驟包括:取得該壓縮影像的多個低頻值,以做為該些第一特徵值。 The method of claim 8, wherein the step of obtaining the first feature values of the source image during the image decompression of the source image comprises: obtaining a plurality of low frequencies of the compressed image Values are used as the first feature values. 如申請專利範圍第9項所述的方法,其中每一該些低頻值為直流係數(DC值)。 The method of claim 9, wherein each of the low frequency values is a direct current coefficient (DC value). 如申請專利範圍第9項所述的方法,其中當針對該來源影像進行該影像解壓縮的過程中,根據該些第一特徵值進行特徵檢測,以產生該檢測結果的步驟包括:利用該些第一特徵值進行直線檢測,據以檢測出該來源影像中的線段。 The method of claim 9, wherein the step of performing feature detection according to the first feature values during the image decompression of the source image to generate the detection result comprises: utilizing the The first feature value is linearly detected to detect a line segment in the source image. 如申請專利範圍第8項所述的方法,其中在針對該來源影像進行完該影像解壓縮的過程之後,該方法更包括:產生該來源影像的解壓縮影像;以及根據該偏斜角度校正該解壓縮影像,以產生已校正的解壓縮影像。 The method of claim 8, wherein after performing the image decompression process on the source image, the method further comprises: generating a decompressed image of the source image; and correcting the angle according to the skew angle The image is decompressed to produce a corrected decompressed image. 如申請專利範圍第1項所述的方法,其中該影像壓縮的過程為JPEG壓縮處理,而該影像解壓縮的過程為JPEG解壓縮處理。 The method of claim 1, wherein the image compression process is a JPEG compression process, and the image decompression process is a JPEG decompression process. 一種影像處理系統,包括:記憶體,用以儲存影像以及資料;處理器,耦接該記憶體,用以取得來源影像,以及在針對該來源影像進行影像壓縮或是影像解壓縮的過程中,用以取得該來源影像所對應的多個第一特徵值,利用該些第一特徵值進行特徵檢測,以及根據該特徵檢測的結果,計算該來源影像的偏斜角度,其中在針對該來源影像進行該影像壓縮的過程中,取得該來源影像所對應的該些第一特徵值的步驟包括:該處理器用以取得針對該來源影像進行空間域至頻率域的轉 換編碼所產生的多個低頻值,以做為該些第一特徵值。 An image processing system includes: a memory for storing images and data; a processor coupled to the memory for acquiring a source image, and performing image compression or image decompression for the source image, And acquiring a plurality of first feature values corresponding to the source image, performing feature detection by using the first feature values, and calculating a skew angle of the source image according to the result of the feature detection, where the source image is The step of obtaining the first feature values corresponding to the source image during the image compression process comprises: the processor is configured to obtain a spatial domain to a frequency domain for the source image A plurality of low frequency values generated by the encoding are changed as the first characteristic values.
TW107107193A 2018-03-05 2018-03-05 Method and image processing system of image angle detection TWI657410B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107107193A TWI657410B (en) 2018-03-05 2018-03-05 Method and image processing system of image angle detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107107193A TWI657410B (en) 2018-03-05 2018-03-05 Method and image processing system of image angle detection

Publications (2)

Publication Number Publication Date
TWI657410B true TWI657410B (en) 2019-04-21
TW201939436A TW201939436A (en) 2019-10-01

Family

ID=66996004

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107107193A TWI657410B (en) 2018-03-05 2018-03-05 Method and image processing system of image angle detection

Country Status (1)

Country Link
TW (1) TWI657410B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110043864A1 (en) * 2009-08-21 2011-02-24 Konica Minolta Systems Laboratory, Inc. Deblurring and supervised adaptive thresholding for print-and-scan document image evaluation
TW201520976A (en) * 2013-11-27 2015-06-01 Microsoft Corp Content-aware image rotation
CN106910196A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of image detecting method and device
CN107038440A (en) * 2016-02-04 2017-08-11 株式会社理光 Image tilt calibration apparatus, image processing system and image tilt correction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110043864A1 (en) * 2009-08-21 2011-02-24 Konica Minolta Systems Laboratory, Inc. Deblurring and supervised adaptive thresholding for print-and-scan document image evaluation
TW201520976A (en) * 2013-11-27 2015-06-01 Microsoft Corp Content-aware image rotation
CN106910196A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of image detecting method and device
CN107038440A (en) * 2016-02-04 2017-08-11 株式会社理光 Image tilt calibration apparatus, image processing system and image tilt correction method

Also Published As

Publication number Publication date
TW201939436A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
JP4991604B2 (en) Image processing apparatus and image processing method
US20130084004A1 (en) Image processing of data from scanned display
US8139237B2 (en) Image generating apparatus, image processing apparatus, recording medium and computer readable recording medium
JP5847210B2 (en) Image processing apparatus, image processing method, and computer program
US7742199B2 (en) System and method for compressing and rotating image data
TWI657410B (en) Method and image processing system of image angle detection
JP6354253B2 (en) Image processing apparatus, image processing system, image processing method, and image processing program
US20150120683A1 (en) Data compression apparatus, data compression method, and non-transitory computer readable medium
US9215344B2 (en) Image forming apparatus, image processing apparatus, image forming method, image processing method, and non-transitory computer readable medium
JP6129337B2 (en) Image compression / decompression apparatus and image forming apparatus
US20120087596A1 (en) Methods and systems for pipelined image processing
CN110233947A (en) The method and its image processing system of image angle detection
JP2009130819A (en) Image processing apparatus, control method thereof, program therefor, and storage medium therefor
JP5821994B2 (en) Image processing apparatus, image forming apparatus, and program
US20230139962A1 (en) Image upsampling
JP2006313984A (en) Image processing apparatus
US8582168B2 (en) Image processing apparatus and processing method thereof
JP2009124576A (en) Image processing apparatus and control method thereof
US11314995B2 (en) Image processing apparatus, image processing method, and storage medium
JP2020088694A (en) Image processing apparatus and image processing method
JP3850006B2 (en) Image processing apparatus and image forming apparatus
JP2005045458A (en) Image compression method and apparatus
JP2006340338A (en) Image processor
JP2006313985A (en) Image processing apparatus
JP2004120639A (en) Image processing method