TW201141234A - System and method for processing image - Google Patents

System and method for processing image Download PDF

Info

Publication number
TW201141234A
TW201141234A TW99115268A TW99115268A TW201141234A TW 201141234 A TW201141234 A TW 201141234A TW 99115268 A TW99115268 A TW 99115268A TW 99115268 A TW99115268 A TW 99115268A TW 201141234 A TW201141234 A TW 201141234A
Authority
TW
Taiwan
Prior art keywords
image
coefficient
string
value
image block
Prior art date
Application number
TW99115268A
Other languages
Chinese (zh)
Other versions
TWI484829B (en
Inventor
Pei-Chong Tang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW099115268A priority Critical patent/TWI484829B/en
Publication of TW201141234A publication Critical patent/TW201141234A/en
Application granted granted Critical
Publication of TWI484829B publication Critical patent/TWI484829B/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

A method for processing an image by: capturing the image; diving the image into a plurality of image blocks; setting precisions of the image block based on the predetermine precisions of regions of interest (ROI); compressing the image blocks independently by suitable compressed formats to generate corresponding coding strings, the coding strings forming a compressing image document. Moreover, a system for processing an image is also provided.

Description

201141234 六、發明說明: 【發明所屬之技術領域】 [0001] 本發明涉及圖像處理技術,尤其涉及一種圖像壓縮/解壓 縮之圖像處理系統及方法。 【先前技術】 [0002] 目前,工業產品的檢測通常是利用圖像處理方式來完成 的。在檢測過程中,通常是利用電腦對原始圖像檔進行 處理,但如果待檢測的圖像資料很大,圖像傳輸給電腦 速度較慢,且在處理過程中通常會由於資料過大佔用電 〇 腦的較多的記憶體,從而使圖像處理速度比較慢,甚至 使電腦當機。 [0003] 雖現有技術中出現多種圖像壓縮方式,若對待檢測圖像 進行壓縮後可以提高圖像的傳輸速度。然而,現有的圖 像壓縮方法大多數是利用了圖像的相鄰圖元之間具有一 定的相關性進行編碼。因此,每當解壓縮的時候需要將 整個圖像都進行解壓縮。如圖10所示,例如利用電腦10 ο 對該種壓縮方法處理後的待檢測圖像分析時,需要將整 個待檢測圖像解壓縮後傳輸至電腦記憶體的缓衝區11中 暫存,然後才進行後續的處理。如此,若待檢測圖像的 資料比較龐大,亦即解壓後的資料比較龐大,同樣會佔 用電腦的較多的記憶體,導致出現圖像處理速度比較慢 和電腦當機等問題。 【發明内容】 [0004] 有鑒於此,有必要提供一種提高處理速度的圖像處理系 統0 099115268 表單編號A0101 第3頁/共38頁 0992027027-0 201141234 [0005] 此外,還有必要提供一種提高處理速度的圖像處理方法 〇 [0006] 一種圖像處理系統包括圖像壓縮裝置。所述圖像壓縮裝 置用於獲取一圖像並對該圖像利用預設的壓縮規則進行 壓縮以產生壓縮圖像檔。所述圖像壓縮裝置包括圖像分 割單元、精度分配單元、編碼器以及存儲單元。所述圖 像分割單元用於將獲取的圖像按照預設的大小分割成若 干圖像區塊。精度分配單元用於根據預設的獲取圖像的 R ΟI的位置資訊和精度值資訊分配各圖像區塊中的精度值 。所述編碼器根據各圖像區塊的精度值選擇相應的壓縮 方式對每一圖像區塊進行獨立壓縮編碼生成相應的壓縮 字串,所述壓縮字串構成所述壓縮圖像檔。 [0007] 一種圖像處理方法,其包括如下步驟: [0008] 獲取圖像; [0009] 將獲取的圖像分割為若干圖像區塊; [0010] 根據預設的ROI精度資訊設置各圖像區塊的精度值; [0011] 根據各圖像區塊的精度值選擇相應的壓縮方式對每一圖 像區塊進行獨立壓縮編碼生成相應的壓縮字串,所述壓 縮字串構成與所述獲取圖像相對應的壓縮圖像檔。 [0012] 上述圖像處理系統及方法對各圖像區塊分別進行獨立壓 縮編碼。因此,可以對壓縮圖像檔進行局部解壓,不但 減少圖像佔用系統資源且提高了圖像處理速度。 【實施方式】 099115268 表單編號A0101 第4頁/共38頁 0992027027-0 201141234 [0013] 本發明提供一種圖像處理系統及裝置,其能夠切斷圊像 各相鄰圖元之間的相關性’使得對壓縮圖像進行解壓縮 時,能夠對壓縮圖像進行局部解壓縮’從而減少圖像處 理佔用較多的資源及提高圖像處理的速度。 [0014] 請參看圖1,其為一較佳實施方式的圖像處理系統100的 功能模組示意圖。圖像處理系統100可用於檢測不良工業 產品,例如P C Β板上的異常元件。圖像處理系統1 〇 〇包括 輸入裝置200、圖像壓縮裝置300以及圖像解壓縮裝置 400。 Ο [0015] .: . ... S .... 圖像壓縮裝置300用如獲取圖像,並對獲取的圖像按照預 設的壓縮規則將獲取的圖像以圖像區塊為單位進行獨立 壓縮編碼,以生成壓縮圖像檔。圖像輸入裝置2〇〇接收用 戶輸入的指令以確定解壓縮的圖像區塊。圖像解壓縮裝 置400用於按照預設的解壓縮規則對壓圖像槽中需要解 壓縮的圖像區塊進行解壓縮,亦卻對壓縮圖像擋進行局 Ο 部解壓縮。如圖2所示,在本實施方式卜圖像塵^置 300應用於數位相機30申。圖像解壓縮穿置 腦40中。當數位相機3G攝取拍攝對像的圖Μ用於電 像壓縮裝置300對攝取的圖像進行壓縮處理’經過圖 檔。電腦40接收到確定解壓縮區塊的^人理生成壓縮圖像 的解壓祕廳對壓縮圖_進行局按照預設 至電腦記憶體的緩衝區41〇中谁〜紅 縮’並傳輪 作暫存。如此 圖像資料佔用電腦中記憶體較夕 , 可以避免 處理速度。 、衝區4lQ ’從而提高 圖像壓縮裝置300包括圖像獲取單_ 099115268 表單編衆A0101 第5頁/共38 5 心01、圖像分割單元 〇卯2027027-0 [0016] 201141234 302、精度分配單元303、編碼器304、内部存儲單元305 、外部存儲單元3〇6以及資料處理模組307。 [0017]圖像獲取單元3 〇 1攝取拍攝物件的圖像。 [〇〇18] 圖像分割單元302用於根據預設的大小將獲取的圖像分割 成若干圖像區塊。在本實施方式中’圖像區塊預設的大 小為16*16。如圖3所示,例如’獲取的圖像P的大小為 [ 40000*40000 ],若以[16*16]的大小分割獲取的圖像p ’則獲取的圖像P共可以分割為[ 2500*2500 ]個圖像區塊 Μ。 ....' ..201141234 VI. Description of the Invention: [Technical Field] The present invention relates to image processing technology, and more particularly to an image compression/decompression image processing system and method. [Prior Art] [0002] At present, the detection of industrial products is usually performed by means of image processing. In the detection process, the original image file is usually processed by a computer, but if the image data to be detected is large, the image is transmitted to the computer at a relatively slow speed, and in the process, the data is usually too large to occupy the power. The brain has more memory, which makes the image processing slower and even makes the computer crash. [0003] Although a variety of image compression methods have appeared in the prior art, the image transmission speed can be improved by compressing the image to be detected. However, most of the existing image compression methods utilize a certain correlation between adjacent elements of an image for encoding. Therefore, the entire image needs to be decompressed whenever decompressed. As shown in FIG. 10, for example, when the image to be detected processed by the compression method is analyzed by the computer 10, the entire image to be detected needs to be decompressed and then transferred to the buffer 11 of the computer memory for temporary storage. Subsequent processing is then carried out. Thus, if the data of the image to be detected is relatively large, that is, the data after decompression is relatively large, it will also occupy more memory of the computer, resulting in problems such as slow image processing speed and computer downtime. SUMMARY OF THE INVENTION [0004] In view of the above, it is necessary to provide an image processing system that increases the processing speed. 0 099115268 Form No. A0101 Page 3 / Total 38 Page 0992027027-0 201141234 [0005] In addition, it is also necessary to provide an improvement Image Processing Method of Processing Speed [0006] An image processing system includes an image compressing apparatus. The image compression device is operative to acquire an image and compress the image using a predetermined compression rule to produce a compressed image file. The image compression device includes an image segmentation unit, a precision distribution unit, an encoder, and a storage unit. The image segmentation unit is configured to divide the acquired image into a plurality of image blocks according to a preset size. The precision assigning unit is configured to allocate the precision value in each image block according to the position information and the precision value information of the R Ο I of the preset acquired image. The encoder independently compresses and encodes each image block to generate a corresponding compressed string according to the precision value of each image block, and the compressed string constitutes the compressed image file. An image processing method includes the following steps: [0008] acquiring an image; [0009] dividing the acquired image into a plurality of image blocks; [0010] setting each image according to preset ROI precision information The precision value of the image block is as follows: [0011] each image block is independently compression-coded according to the precision value of each image block to generate a corresponding compressed string, and the compressed string constitutes a The compressed image file corresponding to the acquired image is described. [0012] The image processing system and method described above perform independent compression encoding for each image block. Therefore, the compressed image file can be locally decompressed, which not only reduces the image occupation system resources but also improves the image processing speed. [Embodiment] 099115268 Form No. A0101 Page 4 / Total 38 Page 0992027027-0 201141234 [0013] The present invention provides an image processing system and apparatus capable of cutting off correlation between adjacent elements of an image ' When the compressed image is decompressed, the compressed image can be locally decompressed', thereby reducing image processing and consuming more resources and increasing the speed of image processing. Please refer to FIG. 1, which is a functional block diagram of an image processing system 100 according to a preferred embodiment. Image processing system 100 can be used to detect undesirable industrial products, such as anomalous components on a P C seesaw. The image processing system 1 输入 输入 includes an input device 200, an image compressing device 300, and an image decompressing device 400.图像 [0015] . : . . S .... The image compression device 300 uses, for example, an image, and the acquired image is in units of image blocks according to a preset compression rule. Independent compression coding is performed to generate a compressed image file. The image input device 2 receives an instruction input by the user to determine a decompressed image block. The image decompressing device 400 is configured to decompress the image block to be decompressed in the compressed image groove according to a preset decompression rule, and decompress the compressed image file. As shown in Fig. 2, in the present embodiment, the image dust collector 300 is applied to the digital camera 30. The image is decompressed into the brain 40. When the digital camera 3G picks up the image of the captured image, the image compression device 300 compresses the taken image by the image. The computer 40 receives the decompression secret file of the decompressed block to generate a compressed image, and compresses the image to perform a localization according to a preset buffer to the computer memory buffer 41〇~reduce' and transmit the wheel for temporary storage. . In this way, the image data occupies the memory of the computer, and the processing speed can be avoided. , rushing area 4lQ 'to improve image compression device 300 including image acquisition list _ 099115268 form editor A0101 page 5 / total 38 5 heart 01, image segmentation unit 〇卯 2027027-0 [0016] 201141234 302, precision allocation The unit 303, the encoder 304, the internal storage unit 305, the external storage unit 3〇6, and the data processing module 307. The image acquisition unit 3 摄取 1 takes an image of the photographic subject. [〇〇18] The image dividing unit 302 is configured to divide the acquired image into a plurality of image blocks according to a preset size. In the present embodiment, the size of the image block preset is 16*16. As shown in FIG. 3, for example, the size of the acquired image P is [40000*40000], and if the acquired image p' is divided by the size of [16*16], the image P obtained can be divided into [2500]. *2500] image blocks Μ. ....' ..

[0019] 精度分配單元303用於根據預設的感興趣的區域(R〇I ) 資訊設置每個圖像區塊的精度值,並將各個圓像區塊的 精度值κ以精度表格的形式存儲於第一内部存儲單元3〇5 中,如圖4所示。該預設的R0I資訊存儲於内部存儲單元 305中。該預設的ROI資訊包括拍攝物件的R〇I的位置資 訊以及ROI精度值。ROI位置資訊包括座標和尺寸大小, 精度分配單元303根據肋丨位置資訊獲得圖像中與與 相對應的圖像區塊。在本實施方式中,拍攝物件為一 板。ROI為PCB板上的各種元件,例如電阻、電容以及電 晶體等。預設的ROI精度值用於表示各個R〇I所需要的解 析度。例如’ PCB板上較大的元件需要採用較低的解析度 就可以清楚表示該元件的特徵;PCB板較小的元件需要採 用較高的解析度才可以清楚表示該元件的特徵;而對於 PCB板上不感興趣的區域’即未設置任何元件的位置可採 用最低的解析度。 099115268 表單煸號A0101 第6頁/共38頁 0992027027-0 201141234 [0020]具體地,精度分配單元303分配各圖像區塊的精度值〖的 過程如圖5所示。由於具有不同精度值的多個可能對 應到一個圖像區塊中,此時,精度分配單元3〇3根據最高 的精度值分配該圖像區塊的精度值κ。如圖5a,R〇I 3和 ROI b同時對應到圖像區塊jji中,且r〇i a和匕具有 不同的精度值4和8,則圖像區塊M1的精度值1(設置為8, 如圖5b所示。 [〇〇21]優選地,精度分配單元303還具有平滑處理功能,用於對 q 與多個R01相對應的圖像區塊Ml進行平傦處理。亦即,精 度分配單元303對與圖像區塊mi相鄰的區塊的精度值κ作 進一步調整「以使各圖像區瑰之間平滑變化,具有連續 性。如圖5C所示,上述圖像區塊似經過平滑處理後,圖 像區塊Ml相鄰的區塊之精度值κ變為6。 [0022]資料處理模組307包括JPEG壓縮單元3§〇和圩£(;字串處理 單兀360。JPEG壓縮單元350利用標準的JPEG壓縮編碼規 則對獲取的圖像進行jPEG壓縮編碼得到JpEG字串。通常 〇 ,JPEG壓縮編碼的過程包括色彩空間變換、縮減取樣、 離散余弦變換、量化、可變長編碼(VLC)以及霍夫曼編碼 (Huff man)等。其中圖像經過色彩空間變換用於變換到 yuv空間和縮減取樣後產生8*8的資料塊並對該8*8的 資料塊進行離散余弦變換後得到64個DCT變換係數。該64 個DCT係數中包括位於係數左上角的DC係數,其餘63個 AC係數。接著,對8*8的資料塊進行量化。然後,對量化 後的8*8資料塊在矩陣中按照2字形的次序進行編排;接 著,對輸出的Z字形次序排列的DC係數和AC係數進行νιχ 099115268 表單編號A0101 第7頁/共38頁 0992027027-0 201141234 。其中VLC是對DC係數採用差分脈衝編碼調製(DPCM)進 行編碼以及對A C係數使用行程長度編瑪(R l E)進行編瑪 最後’使用111^丨11^11對1)?〇^編碼後的0(:係數和孔£編瑪 後的AC係數進一步壓縮得到JPEG壓縮字串。在本實施方 式中,JPEG壓縮單元350採用4 : 2 : 0的方式進行採樣。 [0023] [0024] [0025] [0026] 由於現有的JPEG壓縮編碼規則是利用DPCM對DC係數進行 編碼的’因此,相連的資料塊之間具有關聯性,因此, 不能對每個資料塊進行獨立地解碼。而本實施方式中的 圖像處理系統1 0 0可以對圖像進行壓縮編碼並可對圖像中 各個圖像區塊進行獨立編碼和解瑪,真體如下。 JPEG字串處理單元360對JPEG壓縮字串進行Huffman解 碼和相應的DPCM解碼和RLE解碼得到量化後的DC係數和 AC係數’並生成與各圖像區塊分別相對應的Dc係數和 係數。 編碼器304用於根據各圖像區塊的轎皮值1利用預設的壓 縮規則對獲取的圖像進行編碼以:產生塵縮圖像檔,並將 該壓縮圖像棺存儲於外部;儲:軍'元·=3〇6中。外部存儲單元 306可為SD卡、CF卡等。在其他實施方式中,外部存储單 兀306還可以省略,而將該壓縮檔放置於内部存儲 305 中。 編碼器304包括利用預設規則完成抒£(;表格的第—表格創 建單元310以及利用預設規則完成壓縮編碼表格的第二表 格創建單元320。jpeg表格330和壓縮編碼表格340共同 構成該壓縮圖像檔。 099115268 表單蝙號A0101 第8頁/共38頁 0992027027-0 201141234 [0027] 第一表格創建單元310根據各圖像區塊的精度值κ和JPEG 字串處理單元360生成的DC係數和AC係數完成JPEG表格 330。具體地,第一表格創建單元31〇首先根據精度表中 各圖像區塊的精度值K按照預設壓縮規則選擇與各圖像區 塊相應的DC係數和部分/全部AC係數,亦即可丟棄部分AC 係數;然後,將選擇的AC係數進行編碼RLE和Huffman編 碼產生AC編碼字串,並將DC係數和AC編碼字串存儲於 JPEG表格相應的位置中。 [0028] Ο 可以理解地’ 一圖像區塊的精度值f越高表示該圖像區塊 的解析度要求較高,即該圖像區塊AC係數的丟棄個數就 越少,壓縮率就越低,還原後得到的圖像清晰度較高。 反之’ 一圖像區塊的精度值K越低’即該圖像區塊AC係數 的丟棄個數就越多,壓縮率越高,還原後得到的圖像清 晰度較低。在本實施方式中,第一表格剝建單元31〇創建 JPEG表格330依照四種預設壓縮規則: [0029] Ο 當一圖像區塊的精度值K滿定第一精度值範圍時,例如 k> = 8時’表示該圖像區塊要求的解析度最高,則選擇所 有DC係數和AC係數,將選擇的AC係數進行RLE和 Huffman編碼後得到ac編碼字串,並以先DC係數後AC編 碼字串的順序存儲於jpEG表格330中作為壓縮字串。 [0030] 當一圖像區塊的精度值K滿足第二精度值範圍時,例如 l<k< = 7時’表示該圖像區塊要求的解析度較高,則選擇 相應的DC係數並根據相應的精度值κ選擇部*AC係數,將 選擇的AC係數進行rle編瑪後再進行Huff man編碼得到AC 壓縮字串’並以先DC係數後AC編碼字串存儲於jpEG表格 099115268 表早編號A0101 第9頁/共38頁 0992027027-0 201141234 3 3 0中作為壓縮字串。例如,對圖像區塊的γ u v分量採用4 :2 : 〇的比例進行取樣,每個圖像區塊對應6個dc係數。 每個圖像區塊對應6個DC係數,即4個Y分量對應的4個DC 係數,1個U分量對應1個DC係數,一個V分量對應1個DC 係數。每個圊像區塊對應的AC係數包括對應於4個Y分量 的4*63個AC係數,對應於v分量對應63個AC係數,以及 對應於V分量對應63個AC係數。在本實施方式中,精度值 K還對應按照Z字形的次序編排每個矩陣時所編排的行數 。例如’精度值K為4的時候,表示按照Z字形的次序編排 在每個矩陣中前4行的資料得到9個AC係數。第一表格創 . ... ... 建單元310按照YUV分量的順序存放相:應的])(;係數,然後 以相應的順序存放AC編碼字串。 [0031] 當一圖像區塊的精度值K滿足第三精度值範圍時,例如 k = l時,表示該圖像區塊要求的解析度較低,則選擇相斜 應的DC係數而丟棄全部的AC係數,並將選擇的dc係數按 預設的順序存儲於JPEG表中作為壓縮> _。如前所述, 每個圖像區塊分別對應6個Dς係數,亦即4個γ分量對應的 4個DC係數,wu分量對應“固此係數υ,— 個V分量對應1個DC係數γ。且第一表格創建單元31〇以 YUV分量的次序將相應的DC係數,即γ γ γ γ肝,左 00 01 1011 存 放在JPEG表格330中作為壓縮字串。 [0032] 當一圖像區塊的精度值K滿足第四精度值範圍時,例如 k = 〇時,表示該圖像區塊要求的解析度最低,捨棄全部的 AC係數和DC係數,亦即沒有將該圖像區塊相對應DC係數 和AC係數存儲於JPEG表格330中。 099115268 表單編號A0101 第10頁/共38頁 0992027027-0 201141234 [0033] 睛一併參看圖6,第二表格創建單元32〇利用JpEG表格和 精度表格來完成壓縮編碼表格34〇。壓縮編碼表格34〇包 括若干陣列Tab[],每一陣列與每一圖像區塊--對應, Ο 且按照圖像區塊的順序存儲於壓縮編碼表格34〇中。亦即 母圖像區塊為一個獨立壓縮單元。例如,原始圖像 被分割為2500*2500個圖像區塊,則Tab[]陣列的數目為 2500*2500個。每一陣列Tab[]ffi32bit表示,其高四位 元用於表示相應的圖像區塊的精度值κ,其低24位元用於 存儲指向圖像區塊相應壓縮字串的指標字串。該第二表 格創建單元320根據不雜的精摩隹範園錄廡的四種壓縮規 則將指標字串殽置為相應的學縮字串的起始位址或者是 該圖像區塊相應的DC係數,而使壓縮編碼表格34〇中的陣 列Tab[]形成三種壓縮模式。例如: [0034][0019] The precision assigning unit 303 is configured to set the precision value of each image block according to the preset region of interest (R〇I) information, and the precision value κ of each round image block is in the form of a precision table. It is stored in the first internal storage unit 3〇5 as shown in FIG. The preset ROI information is stored in the internal storage unit 305. The preset ROI information includes the position information of the R〇I of the photographed object and the ROI precision value. The ROI position information includes a coordinate and a size, and the accuracy assigning unit 303 obtains an image block corresponding to the image in the image based on the position information of the rib. In the present embodiment, the object to be photographed is a board. The ROI is a variety of components on the PCB, such as resistors, capacitors, and transistors. The preset ROI precision value is used to indicate the degree of resolution required for each R〇I. For example, the larger component on the PCB requires a lower resolution to clearly indicate the characteristics of the component; the smaller component of the PCB requires a higher resolution to clearly indicate the characteristics of the component; The area that is not of interest on the board, that is, the position where no components are placed, can be used with the lowest resolution. 099115268 Form nickname A0101 Page 6 of 38 0992027027-0 201141234 [0020] Specifically, the process of assigning the accuracy value of each image block by the accuracy assigning unit 303 is as shown in FIG. 5. Since a plurality of images having different precision values may correspond to one image block, at this time, the precision assigning unit 3〇3 assigns the precision value κ of the image block according to the highest precision value. As shown in Fig. 5a, R〇I 3 and ROI b simultaneously correspond to the image block jji, and r〇ia and 匕 have different precision values 4 and 8, and the image block M1 has an accuracy value of 1 (set to 8 As shown in Fig. 5b. [21] Preferably, the precision assigning unit 303 further has a smoothing processing function for performing flat processing on the image block M1 corresponding to the plurality of R01s. The allocating unit 303 further adjusts the precision value κ of the block adjacent to the image block mi "to make the image regions smoothly change between each image region, and has continuity. As shown in FIG. 5C, the above image block It seems that after the smoothing process, the precision value κ of the block adjacent to the image block M1 becomes 6. [0022] The data processing module 307 includes the JPEG compression unit 3 § 〇 and ( (; string processing unit 兀 360 The JPEG compression unit 350 performs jPEG compression encoding on the acquired image by using a standard JPEG compression encoding rule to obtain a JpEG string. Generally, the process of JPEG compression encoding includes color space conversion, downsampling, discrete cosine transform, quantization, and variable. Long code (VLC) and Huffman code, etc. The color space transform is used to transform into the yuv space and reduce the sample to generate 8*8 data blocks and perform discrete cosine transform on the 8*8 data block to obtain 64 DCT transform coefficients. The 64 DCT coefficients are included in the coefficients. The DC coefficient in the upper left corner, and the remaining 63 AC coefficients. Next, the 8*8 data block is quantized. Then, the quantized 8*8 data blocks are arranged in a matrix in the order of the zigzag; then, the output is The zigzag order of DC coefficients and AC coefficients are performed by νιχ 099115268 Form No. A0101 Page 7 of 38 0992027027-0 201141234. VLC is a differential DC code encoding for DC coefficients and is used for AC coefficients. The length of the run length is programmed (R l E) to be programmed. Finally, 'use 111^丨11^11 to 1)? 〇^ after encoding 0 (: coefficient and hole, the AC coefficient after encoding is further compressed to obtain the JPEG compression string. In the present embodiment, the JPEG compression unit 350 performs sampling using a 4:2:0 method. [0025] [0026] Since the existing JPEG compression coding rule is to encode DC coefficients by using DPCM. 'Therefore, the connected funds There is an association between the blocks, and therefore, each data block cannot be independently decoded. However, the image processing system 100 in the present embodiment can compress and encode the image and can respectively image each image in the image. The block is independently coded and decoded, and the real body is as follows: JPEG string processing unit 360 performs Huffman decoding and corresponding DPCM decoding and RLE decoding on the JPEG compressed string to obtain quantized DC coefficients and AC coefficients 'and generates and images The corresponding Dc coefficients and coefficients of the blocks. The encoder 304 is configured to encode the acquired image by using a predetermined compression rule according to the car skin value 1 of each image block to: generate a dust image file, and store the compressed image file on the outside; : Army 'yuan·=3〇6. The external storage unit 306 can be an SD card, a CF card, or the like. In other embodiments, the external storage unit 306 can also be omitted and the compressed file placed in the internal storage 305. The encoder 304 includes a first table creation unit 310 that completes the compression coding table by using a preset rule (the first table creation unit 310 of the table and the preset rule). The jpeg table 330 and the compression coding table 340 together constitute the compression. Image file 099115268 Form bat number A0101 Page 8/38 page 0992027027-0 201141234 [0027] The first table creating unit 310 is based on the precision value κ of each image block and the DC coefficient generated by the JPEG string processing unit 360. And the AC coefficient completes the JPEG table 330. Specifically, the first table creating unit 31 first selects the DC coefficient and the portion corresponding to each image block according to the preset compression rule according to the precision value K of each image block in the accuracy table. / All AC coefficients, that is, the partial AC coefficients can be discarded; then, the selected AC coefficients are encoded by RLE and Huffman coding to generate an AC coded string, and the DC coefficients and AC coded strings are stored in corresponding positions of the JPEG table. [0028] Ο It can be understood that the higher the accuracy value f of an image block indicates that the resolution of the image block is higher, that is, the number of discarded AC coefficients of the image block is less. The lower the compression ratio, the higher the sharpness of the image obtained after the reduction. Conversely, the lower the accuracy value K of an image block is, the more the number of discarded AC coefficients of the image block is, the more the compression rate is. High, the image obtained after the reduction is low in definition. In the present embodiment, the first table stripping unit 31 creates the JPEG table 330 according to four preset compression rules: [0029] Ο When an image block When the precision value K is full of the first precision value range, for example, when k>=8, it indicates that the image block requires the highest resolution, then all DC coefficients and AC coefficients are selected, and the selected AC coefficients are RLE and Huffman coded. The ac coded string is obtained and stored in the jpEG table 330 as a compressed string in the order of the first DC coefficient and the AC coded string. [0030] When the accuracy value K of an image block satisfies the second precision value range For example, if l<k<=7' indicates that the resolution required by the image block is high, the corresponding DC coefficient is selected and the selected AC coefficient is rle-edited according to the corresponding precision value κ selection part *AC coefficient. After the horse, then Huff man coding to get the AC compression string 'and DC first The AC coded string after the coefficient is stored in the jpEG table 099115268 table early number A0101 page 9 / 38 pages 0992027027-0 201141234 3 3 0 as a compressed string. For example, the γ uv component of the image block is 4:2 : The ratio of 〇 is sampled, and each image block corresponds to 6 dc coefficients. Each image block corresponds to 6 DC coefficients, that is, 4 DC coefficients corresponding to 4 Y components, and 1 U component corresponds to 1 DC coefficient, one V component corresponds to one DC coefficient. The AC coefficients corresponding to each of the image blocks include 4*63 AC coefficients corresponding to 4 Y components, corresponding to 63 AC coefficients corresponding to the v components, and 63 AC coefficients corresponding to the V components. In the present embodiment, the precision value K also corresponds to the number of lines arranged in the order of the zigzag in the order of the zigzag. For example, when the precision value K is 4, it means that the data of the first 4 lines in each matrix is arranged in the order of zigzag to obtain 9 AC coefficients. The first table creation unit 310 stores the phases in the order of the YUV components: the required ]) (; coefficients, and then stores the AC encoded strings in the corresponding order. [0031] When an image block When the precision value K satisfies the third precision value range, for example, when k = l, indicating that the resolution required by the image block is low, the DC coefficient of the phase deviation is selected and all AC coefficients are discarded, and the selected The dc coefficients are stored in the JPEG table in the preset order as compression > _. As described above, each image block corresponds to 6 Dς coefficients, that is, 4 DC coefficients corresponding to 4 γ components, wu The component corresponds to "fix this coefficient υ, - V components correspond to 1 DC coefficient γ. And the first table creation unit 31 存放 stores the corresponding DC coefficient in the order of YUV components, ie γ γ γ γ liver, left 00 01 1011 As a compressed string in the JPEG table 330. [0032] When the accuracy value K of an image block satisfies the fourth precision value range, for example, k = 〇, indicating that the image block requires the lowest resolution, discarding All AC coefficients and DC coefficients, that is, no corresponding DC coefficients and AC coefficients are stored for the image block. In the JPEG table 330. 099115268 Form No. A0101 Page 10/Total 38 Page 0992027027-0 201141234 [0033] Referring to FIG. 6 together, the second table creating unit 32 performs the compression encoding table 34 using the JpEG table and the precision table. The compression coding table 34A includes a plurality of arrays Tab[], each array corresponding to each image block, and stored in the compression coding table 34A in the order of the image blocks. The block is an independent compression unit. For example, if the original image is divided into 2500*2500 image blocks, the number of Tab[] arrays is 2500*2500. Each array Tab[]ffi32bit indicates that its height is four. The bit element is used to indicate the precision value κ of the corresponding image block, and the lower 24 bits are used to store the index word string corresponding to the corresponding compressed string of the image block. The second table creating unit 320 is based on the non-mixing essence. The four compression rules recorded by Capricorn Fan will confine the indicator string to the starting address of the corresponding learning string or the corresponding DC coefficient of the image block, so that the compression encoding table 34〇 The array Tab[] forms three compression modes. For example: [003 4]

G 如圖6a所示’當一圖像區塊的精度值為〇時,即,該圖像 區塊相應的陣列Tab[]為0#壓縮模式,選擇與該圖像區塊 相對應的DC係數將選擇的DC係數變換為YUV分量所對應的 3個DC值’並按預定的順序排列後作為指標字串存儲於陣 列Tab[]中◊亦即,指標字串為γυν分量相對應的^固沉 係數’而並非是JPEG表格330中的壓縮字串。例如,如前 所述,若一圖像區塊中具有6個DC係數,則陣列Tab []中 存儲YUV分量相對應的3個DC係數的分別為:4個γ分量的 DC係數的平均值Y、ϋ分量相對應的DC係數U、V分量相對 應的DC係數V,並以γυν的順序存儲於Tab[]中。同理, 若採用他取樣方式,例如,若圖像區塊中具有4個γ分量 、4個ϋ分量和4個V分量,則將各分量的DC係數平均值存 099115268 表單編號A0101 第11頁/共38頁 0992027027-0 201141234 儲於壓縮編碼表格申β [0035] ^圖6b所不’當—圖像區塊的精度值為1時,即,該圖像 品走相應的陣列Tab[]為1#壓縮模式,陣列Μ□中存儲 子串疋扣向JPEG表格330中相應的壓縮字串的起始 位址。此時’ _像區麟應關縮㈣包⑽嗔係數 [0036] [0037] [0038] 如圖6(:所不’當—圖像區塊的精度值大於1時,即,該g 像區塊相應的陣列Tab[]為2«縮模式,則陣列Tab[]t 子儲的从子串是指向相應的壓縮字串的起始位址此 時’該圖像區塊對應的屋縮字串包括贿係數和娜 AC編碼字串。 編碼器304創建壓縮編碼表格34()的步驟包括:首先根 據各個圖像區塊的精度值κ將各個圖像區塊的精度值 儲於相應的Tab[]的相應位置中。接著,根據各^圖㈣ 塊的精度值K所對應的精度範圍選擇存儲各圖像區塊的 JPEG字串眺係數或者是相應的壓縮字串的起始位址。 圖像輸入裝置200用於回應用戶操作,而根據預先設置备 R〇1的資訊產生解壓縮指令。例如,圖像處理系統提供_ 各個R01的圖示,用戶藉由輸人裝置m點選該圖示可以 產生用於描述解壓縮區塊位置資訊的解壓縮指令。G As shown in Fig. 6a, when the precision value of an image block is 〇, that is, the corresponding array Tab[] of the image block is 0# compressed mode, the DC corresponding to the image block is selected. The coefficient converts the selected DC coefficient into three DC values corresponding to the YUV component and arranges them in a predetermined order and stores them as an index string in the array Tab[], that is, the index string corresponds to the γυν component. The sag coefficient is not a compressed string in the JPEG table 330. For example, as described above, if there are six DC coefficients in an image block, the three DC coefficients corresponding to the YUV components stored in the array Tab[] are: the average of the DC coefficients of the four γ components. The DC coefficient V corresponding to the DC coefficients U and V components corresponding to the Y and ϋ components is stored in Tab[] in the order of γυν. Similarly, if he uses the sampling method, for example, if there are 4 γ components, 4 ϋ components, and 4 V components in the image block, the average value of the DC coefficients of each component is stored in 099115268. Form No. A0101 Page 11 / Total 38 pages 0992027027-0 201141234 stored in the compression coding table Shen [0035] ^ Figure 6b does not 'when - the image block has a precision value of 1, that is, the image goes to the corresponding array Tab[] In the 1# compression mode, the storage substring in the array is deduced to the start address of the corresponding compressed string in the JPEG table 330. At this time, the _ image area should be closed (4) package (10) 嗔 coefficient [0036] [0037] [0038] Figure 6 (: does not - when the image block accuracy value is greater than 1, that is, the g image The corresponding array Tab[] of the block is 2 «shrink mode, then the slave substring of the array Tab[]t is pointed to the start address of the corresponding compressed string. At this time, the corresponding block of the image block The string includes a bribe coefficient and a Na AC code string. The step of the encoder 304 creating the compression code table 34() includes first storing the precision values of the respective image blocks according to the precision values κ of the respective image blocks. The corresponding position of Tab[]. Next, the JPEG string 眺 coefficient of each image block or the start address of the corresponding compressed string is selected according to the precision range corresponding to the precision value K of each block (four) block. The image input device 200 is configured to generate a decompression command according to the information of the preset R〇1 in response to the user operation. For example, the image processing system provides an icon of each R01, and the user selects the input device m. The illustration may generate decompression instructions for describing decompressed block location information.

[0039] 圖像解壓縮裝置_包括解瑪器4G1和記憶體4Q2。解碼 器401用純據檢寵域指令查找壓縮影像檔中的_相 對應的壓縮字串的起始㈣’然後根據各圖像區塊的料 度值K進行解碼。記憶_)2⑽細解碼後的圖像以^ 099115268 表單編號A0101 第12頁/共38頁 0992027027-0 201141234 [0040] [0041]❹ [0042][0039] The image decompressing device_ includes a decimator 4G1 and a memory 4Q2. The decoder 401 searches for the start (four) of the compression string corresponding to the _ phase in the compressed image file by the pure parity field command and then decodes it according to the value K of each image block. Memory _) 2 (10) Finely decoded image to ^ 099115268 Form number A0101 Page 12 / Total 38 pages 0992027027-0 201141234 [0040] [0041] ❹ [0042]

GG

[0043][0043]

後續操作。由於壓縮圖像檔對應3種壓縮模式,相應地, 解碼器401進行解壓縮時也具有3種解壓縮方式:如圖7所 示。 當圖像區塊精度值K = 〇時,解碼器401直接取得相應的陣 列Tab[]中的指標字串,即γυν分量對應的”固沉係數作 為YUV值,並將YUV值進行γυν空間到RGB空間的變換,獲 得相應R G B值。 當精度值K=1時’圖像解壓縮裝置40〇藉由相應的陣列 Tab[]中的指標字_取得jpEG表格中相應的冗係數,即 Y〇〇Y〇1Y1〇Y11UV ’作為4個Y分量和1個U分量和1個V分量 的值’並將其進行YUV空間到RGB空間的變換,獲得相應 RGB值’無需作其他解碼動作、 當精度值K>1時’圖像解壓縮裝置4〇〇藉由相應的陣列 Tab[]中的指標字串取得jpEG表格中相應壓縮字串,獲 取DC係數和AC編碼字串’並對ac編瑪字串進行Huffman 和RLE解碼得到AC係數’從而將利用反量化和反余弦將叱 係數和AC係數變換得到相應的γϋν值,然後將γυν值從 YUV空間變換到RGB空間得到RGB值。 上述處理系統利用JPEG壓縮格式中的JPEG字串進行處理 ,使得各壓縮圖像區塊可以獨立運作,且還依據R〇I對一 些圖像區塊設定不同的壓縮率,以提高壓縮比。另外, 各壓縮圖像區塊可以獨立運作可以對壓縮圖像檔進行局 部解歷不但減少圖像佔用系統資源且提高了圖像處理速 度。此外’壓縮圖像區塊對一些壓縮圖像區塊利用jpEG 099115268 表單編號A0101 第13頁/共38頁 0992027027-0 201141234 格式的解壓縮動作’進一步加快了圖像處理速度。 [0044] 請參看圖8,其為一較佳實施方式之圖像壓縮方法流程圖 〇 [0045] 步驟801,獲取圖像。即對拍攝對象進行拍攝而得。 [0046] 步驟803,將獲取的圖像分割為若干圖像區塊。例如,圖 像區塊的分割可按照預設的大小進行分割。 [0047] 步驟805,根據預設的R〇I精度資訊設置各圖像區塊的精 度值。该預设的ROI精度> sfl包括R〇 I位置資訊和精度值 。例如,各圖像區捧的輪度值首先根棣位置資訊可以 確定ROI相對應的圖像區塊;然後,將相對應的圖像區塊 的精度值設置為ROI的精度值。另外,若具有不同精度值 的多個RO I對應到一個圖像區塊時,根據多個I中最大 的精度值设置為该圖像£塊的精度值(如圖和圖gb) 。此外,還可與RO I相對應的圖像區塊相鄰的圖像區塊進 行平滑處理,以使各圖像區塢之間事滑變化,具有連續 性(如圖5 c )。 [0048] 步驟,利用JPEG壓縮演算法生成各圖像區塊的jpEG 壓縮字串,並對JPEG壓縮字串進行處理獲得各圖像區塊 相對應的YUV分量的DC係數和ac係數。獲得各圖像區塊相 對應的YUV分量的DC係數和AC係數如前所述,在此不再贅 述。在本實施方式中’對圖像區塊的YUV分量採用4 : 2 : 0的比例進行取樣’每一圖像區塊包括6個DC係數,即4個 Y分量對應4個DC係數Υ^υ^ΥμΥ",一個u分量對應1個 DC係數V,一個V分量對應1個DC係數U。同樣地,每個γ 099115268 表單編號A0101 第14頁/共38頁 0992027027-0 201141234 [0049] [0050] [0051] Ο [0052] ο [0053] [0054] 099115268 分量、U分量及V分量分別對應63個AC係數。 步驟809 ’根據各圖像區塊的精度值和相應的DC係數及AC 係數開始創建JPEG表格和壓縮編碼表格。 步驟811,依次選擇一圖像區塊的精度值存儲於壓縮編碼 表格相應的位置中。 步驟813 ’判斷壓縮編碼表格中的精度值是否大於或等於 1若壓縮編碼表格中的精度值小於1,則執行步驟; 若壓縮編碼表格中的精度值大於或等於1,則執行步驟 817。 步驟815,選擇相應的DC係數,並將DC係數變換為與γυν 分量的相對應的3個Dc係數,並將變換後的])(:係數按照預 設的順序存儲於壓縮編碼表格相應的位置中作為壓縮字 串。如上所述,每一圖像區塊包括6個DC係數,即4.γ分 量對應4個DC係數,一個分量對應丨個!^係數,—個v分 量對應1個DC係數,則該圖像區塊的相應的γυν分量的3個 DC係數分別為4個Ύ分量的j)c係數的平均值γ、υ*量對應 DC係數U以及V分量對應的DC係數v,並以γ、u、v的順序 存儲於壓縮編碼表格中以產生相應的壓縮字串。 步驟817,判斷壓縮編碼表格中的精度值是否大於丨。若 壓縮編碼表格中的精度值大於丨,則執行步驟819 ;若壓 縮編碼表格中的精度值等於1,則執行步驟821。 步驟819,根據相應的精度值選擇相應的阢係數和部分/ 全部AC係數,將AC係數進行RLE和Huffman編碼生成从 編碼字串,並以先DC係數後△(:編碼字串的順序存儲於 表單編號A0101 第15頁/共38頁 0992027027-0 201141234 JPEG表格相應的位置中作為壓縮字串。其中,係數的 選擇則是根據精度值範圍選擇JPEG字串中全部或者部分 的AC係數。例如,當一圖像區塊的精度值1<k< = 7時則 選擇部分相應的AC係數,且精度值κ對應z字形的次序編 排母個矩陣時所編排到的行數。例如,當—圖像區塊的 精度值為4的時候,表示按照z字形的次序編排在每個矩 陣中則4订的資料得到9個人(:係數。當一圖像區塊的精度 值k> = 8時’則選擇全部相應的虬係數。 [0055] [0056] [0057] [0058] [0059] 099115268 ^驟821,選擇相應的DC係數,並將選擇的DC係數按照胃 定的順序存儲於JPEG表格中以產生相應的壓縮字串。如 上所述,每一圖像區塊包括6個叱係數,即4個丫分量對應 4個DC係數Υ〇ΛιΥιοΥιι,—個卩分量對應1個DC係數u, 一個V分量對應丨個此係數v,且以γ t οογ〇ΐγΐ〇γιιυν 的順序 子古於壓縮編碼表格中以產生相應的壓縮字串。 步驟823,獲取壓縮字串相應的#EG表格中的起始位址, 、將獲取的起始位址存儲矜..壓錦編崎奉格相應的位置中 步驟825,判斷是否所有圖像區塊的精度值已被選擇到。 右所有圖像區塊的精度值被選擇到,則完成JpEG表格和 壓縮蝙碼表格的創建,即生成壓縮圖像檔,流程結束; 反之’執行步驟811。 請參看囷9,其為一較佳實施方式之圖像解壓縮方法流程 圖。 步驟901,判斷是否接收到描述圖像區塊的資訊的解壓縮 0992027027-0 表單編號A0101 第16頁/共38頁 201141234 [0060] [0061] [0062] Ο [0063] [0064] [0065] Ο [0066] [0067] 指令。 步驟903右接收到描述圖像區塊的資訊的解壓縮指令, 根據解令從壓縮編碼表格帽取相應的圖像區塊 的精度值。 步驟905 ’判斷相應的精度值是否大於或等於1。若相應 的精度值λΙ、於1 ’執行步驟^ ;若相應的精度值大於或 者等於1執行步驟909。 步驟9G7 ’獲取壓縮編碼^:格巾職字轉為相應的YUV 值。 步驟909 ’進行YUV空間到RGB空間變換,獲得相應的RGB 值。 , 步驟911 ’從壓縮編碼表格中獲取相應的虚縮字串對應的 起始位址。 步驟913 ’判斷相應的精度值是否太於1。若相應的精度 值大於1執行步驟915,若相應的精度值等於丨執行步驟 919。 步驟915,根據獲取相應的起始位址從JpEG表格中獲取相 應的壓縮字串,對壓縮字串進行相應的逆變化得到相應 的YUV分量值。獲得YUV分量值包括:獲取壓縮字串中的 DC係數和AC編碼字串,並對AC蝙碼字串進行Huffinai^ RLE解碼得到AC係數,對DC係數和ac係數進行反量化及 反余弦變化得到相應的YUV值。 步驟917 ’將得到YUV值從YUV變換到RGB空間獲得相應的 099115268 表單編號A0101 第17頁/共38頁 0992027027-0 201141234 RGB 值0 [0068] [0069] [0070] [0071] [0072] [0073] [0074] 099115268 乂’ 9根據獲取的起始位址從相應的表格中獲取 相應的壓縮字串作為相應的YUV分量值。 v驟921進仃γυν到RGB空間的變換獲得相應的㈣值。 步驟923 ’根據得到的RGB值和相應的圖像區塊資訊將相 應的圖像區塊進行還原。 上述圖像處理方法利用則G壓縮格式中的駡字串進行 處理,使得各壓縮圖像區塊可以獨立運作,且還依據謝 對一些圖像區塊設定不_壓縮率,简高壓縮比。另 外’各壓縮圖像區塊可以獨立運作可以對壓縮圖像標進 行局部解壓不但減少圖像佔用系統資琢且提高了圖像處 理速度。此外,壓縮圖像區塊對—麵縮圖像區塊利用 JPEG格式的解壓縮動作,進一步加快了圖像處理速度。 在其他實施方式中’圖像處理系統和圖像處理方法可以 不需要對圖像進行JPEG壓縮得到相應JpEG字串後才對 JPEG字串進行處理得到相”沉係數和ac係數而是對 圖像進行余弦變換和量化後得到相應的D G係數和A c係數 。亦即,t料處理模組307使用余弦變換單元和量化處理 單兀替換JPEG壓縮單元350和JPEG字串處理單元36〇。 【圖式簡單說明】 圖1為一較佳實施方式的圖像處理系統的功能模組圖。 圖2為一較佳實施方式的圖像處理系統處理圖像的過程示 意圖。 圖3為圖1圖像處理系統分割圖像區塊之示意圖 0992027027-0 表單編號A0101 第18頁/共38頁 201141234 [0075] 圖4為圖像區塊精度值表格的示意圖。 [0076] 圖5為圖像區塊精度值分配過程的示意圖。 [0077] 圖6為圖1圖像處理系統壓縮模式示意圖。 [0078] 圖7為解壓縮過程的示意圖。 [0079] 圖8為一較佳實施方式之圖像壓縮方法流程圖。 [0080] 圖9為一較佳實施方式之圖像解壓縮方法流程圖。 [0081] 圖1 0為現有的圖像處理過程示意圖。 〇 【主要元件符號說明】 [0082] 數位相機30 [0083] 電腦40 [0084] 緩衝區410 [0085] 圖像處理系統100 [0086] 輸入裝置200 〇 [0087] 圖像壓縮裝置300 [0088] 圖像解壓縮裝置400 [0089] 圖像獲取單元301 [0090] 資料處理模組307 [0091] JPEG壓縮單元350 [0092] JPEG字串處理單元360 [0093] 圖像分割單元302 099115268 表單編號A0101 第19頁/共38頁 0992027027-0 201141234 [0094] 精度分配單元303 [0095] 編碼is 3 0 4 [0096] 内部存儲單元305 [0097] 第一表格創建單元 310 [0098] 第二表格創建單元 320 [0099] 外部存儲單元306 [0100] JPEG表格 330 [0101] 壓縮編碼表格340 [0102] 解碼器401 [0103] 記憶體402 [0104] 圖像壓縮方法801 -825 [0105] 圖像解壓縮方法901〜923 099115268 表單編號 A0101 第 20 頁/共 38 頁 0992027027-0Follow-up actions. Since the compressed image file corresponds to three compression modes, correspondingly, the decoder 401 also has three decompression modes when decompressing: as shown in Fig. 7. When the image block precision value K = 〇, the decoder 401 directly obtains the index string in the corresponding array Tab[], that is, the "solidification coefficient corresponding to the γυν component as the YUV value, and the YUV value is γυν space to The RGB space is transformed to obtain the corresponding RGB value. When the precision value K=1, the image decompressing device 40 obtains the corresponding redundant coefficient in the jpEG table by the index word_ in the corresponding array Tab[], that is, Y〇 〇Y〇1Y1〇Y11UV 'as the value of 4 Y components and 1 U component and 1 V component' and transform it into YUV space to RGB space to obtain the corresponding RGB value 'No need for other decoding actions, when precision When the value K > 1 'the image decompressing device 4 obtains the corresponding compressed string in the jpEG table by the index string in the corresponding array Tab[], obtains the DC coefficient and the AC encoded string 'and encodes the ac The string is subjected to Huffman and RLE decoding to obtain the AC coefficient', so that the 叱 coefficient and the AC coefficient are transformed by the inverse quantization and the inverse cosine to obtain the corresponding γϋν value, and then the γυν value is transformed from the YUV space to the RGB space to obtain the RGB value. Utilize JPEG words in JPEG compression format Processing, so that each compressed image block can operate independently, and also set different compression ratios for some image blocks according to R〇I to increase the compression ratio. In addition, each compressed image block can operate independently. Compressing the image file for local solution not only reduces the image occupation system resources but also improves the image processing speed. In addition, the 'compressed image block uses jpEG 099115268 for some compressed image blocks. Form No. A0101 Page 13 of 38 0992027027-0 201141234 Format decompression action 'further speeds up image processing. [0044] Please refer to FIG. 8 , which is a flowchart of an image compression method according to a preferred embodiment. [0045] Step 801, acquiring an image That is, the subject is photographed. [0046] Step 803, the acquired image is divided into a plurality of image blocks. For example, the segmentation of the image block may be divided according to a preset size. [0047] 805: Set an accuracy value of each image block according to preset R〇I precision information. The preset ROI precision> sfl includes R〇I position information and precision value. For example, the wheel of each image area The degree value first determines the image block corresponding to the ROI based on the position information; then, sets the precision value of the corresponding image block to the precision value of the ROI. In addition, if multiple RO I have different precision values Corresponding to an image block, the maximum precision value of the plurality of I is set as the precision value of the image block (as shown in the figure and FIG. gb). In addition, the image block corresponding to the RO I may also be used. Adjacent image blocks are smoothed to make things slip between the image areas, and have continuity (Fig. 5c). [0048] Steps: generating a jpEG compressed string of each image block by using a JPEG compression algorithm, and processing the JPEG compressed string to obtain a DC coefficient and an ac coefficient of the YUV component corresponding to each image block. The DC coefficients and AC coefficients of the YUV components corresponding to the respective image blocks are obtained as described above, and will not be described herein. In the present embodiment, 'the YUV component of the image block is sampled with a ratio of 4:2:0'. Each image block includes 6 DC coefficients, that is, 4 Y components correspond to 4 DC coefficients Υ^υ ^ΥμΥ", one u component corresponds to one DC coefficient V, and one V component corresponds to one DC coefficient U. Similarly, each γ 099115268 Form No. A0101 Page 14 / Total 38 Page 0992027027-0 201141234 [0049] [0051] 005 [0053] [0054] 099115268 Component, U component, and V component respectively Corresponds to 63 AC coefficients. Step 809' begins to create a JPEG table and a compression coded table based on the accuracy values of the image blocks and the corresponding DC coefficients and AC coefficients. In step 811, the precision values of an image block are sequentially selected and stored in corresponding positions of the compression coding table. Step 813' determines whether the precision value in the compression coding table is greater than or equal to 1. If the precision value in the compression coding table is less than 1, the step is performed; if the precision value in the compression coding table is greater than or equal to 1, step 817 is performed. Step 815, selecting a corresponding DC coefficient, and converting the DC coefficient into three corresponding Dc coefficients corresponding to the γυν component, and storing the transformed]) (: coefficients in a preset order in a corresponding position of the compression coding table As a compression string, as described above, each image block includes 6 DC coefficients, that is, 4. γ component corresponds to 4 DC coefficients, one component corresponds to ! ! ^ ^ coefficient, - v component corresponds to 1 DC The coefficient, the three DC coefficients of the corresponding γυν component of the image block are respectively the d) the average value γ of the c-factor, the υ* amount corresponding to the DC coefficient U and the DC coefficient v corresponding to the V component, And stored in the compression coding table in the order of γ, u, v to generate a corresponding compressed string. In step 817, it is determined whether the precision value in the compression coding table is greater than 丨. If the precision value in the compression coding table is greater than 丨, step 819 is performed; if the precision value in the compression coding table is equal to 1, step 821 is performed. Step 819: Select a corresponding 阢 coefficient and a partial/all AC coefficient according to the corresponding precision value, and perform an RLE and Huffman coding on the AC coefficient to generate a slave code string, and store the CDMA code (in the order of the code string in the order of the first DC coefficient). Form No. A0101 Page 15 of 38 0992027027-0 201141234 The corresponding position of the JPEG table is used as a compression string. The coefficient is selected by selecting all or part of the AC coefficients in the JPEG string according to the range of precision values. For example, When an image block has an accuracy value of 1 <k<= 7, a corresponding partial AC coefficient is selected, and the precision value κ corresponds to the order of the z-shape to arrange the number of rows to be arranged in the parent matrix. For example, when When the precision value of the block is 4, it means that the data in the order of the z-shape is arranged in each matrix, and 9 pieces of data are obtained (: coefficient. When the accuracy value of an image block is k> = 8) Then select all the corresponding 虬 coefficients. [0058] [0059] [0059] 099115268 ^ 821, select the corresponding DC coefficient, and store the selected DC coefficients in the order of the stomach in the JPEG table To produce the corresponding compression As described above, each image block includes six 叱 coefficients, that is, four 丫 components correspond to four DC coefficients Υ〇ΛιΥιοΥιι, one 卩 component corresponds to one DC coefficient u, and one V component corresponds to one. a coefficient v, and in the order of γ t οογ 〇ΐ ΐ〇 ι ι υ 子 子 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 压缩 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 823 The obtained starting address is stored in step 825 of the position corresponding to the compression complication, and it is judged whether the accuracy values of all the image blocks have been selected. The accuracy values of all right image blocks are selected to Then, the creation of the JpEG table and the compressed bat table is completed, that is, the compressed image file is generated, and the process ends; otherwise, the process proceeds to step 811. Please refer to FIG. 9, which is a flowchart of the image decompression method of a preferred embodiment. Step 901: Determine whether a decompression of the information describing the image block is received 0992027027-0 Form No. A0101 Page 16 of 38 201141234 [0061] [0062] [0065] [0065] Ο [0067] instruction. Step 903 right Receiving a decompression instruction describing the information of the image block, and taking the precision value of the corresponding image block from the compression coding table according to the solution. Step 905 'determine whether the corresponding precision value is greater than or equal to 1. If corresponding The precision value λΙ, at step 1 'execute step ^; if the corresponding precision value is greater than or equal to 1, step 909 is performed. Step 9G7 'Get compression code ^: Grid towel character is converted to the corresponding YUV value. Step 909 ' performs a YUV space to RGB spatial transformation to obtain a corresponding RGB value. Step 911 ' obtains a starting address corresponding to the corresponding shortened string from the compression encoding table. Step 913' determines if the corresponding precision value is too large. If the corresponding precision value is greater than 1, step 915 is performed, and if the corresponding precision value is equal to 丨, step 919 is performed. Step 915: Obtain a corresponding compressed string from the JpEG table according to obtaining the corresponding starting address, and perform corresponding inverse change on the compressed string to obtain a corresponding YUV component value. Obtaining the YUV component value includes: obtaining a DC coefficient and an AC coded string in the compressed string, performing Huffinai^ RLE decoding on the AC bat code string to obtain an AC coefficient, and performing inverse quantization and inverse cosine variation on the DC coefficient and the ac coefficient. The corresponding YUV value. Step 917 'will get the YUV value from YUV to RGB space to obtain the corresponding 099115268 Form No. A0101 Page 17 / Total 38 Page 0992027027-0 201141234 RGB Value 0 [0068] [0070] [0071] [0072] 0073] [0074] 099115268 乂 '9 obtains the corresponding compressed string from the corresponding table as the corresponding YUV component value according to the obtained start address. v 921 仃 仃 υ υ ν to RGB space transformation to obtain the corresponding (four) value. Step 923 ' restores the corresponding image block based on the obtained RGB values and corresponding image block information. The image processing method described above utilizes the 骂 string in the G compression format to process, so that each compressed image block can operate independently, and also according to the setting of the non-compression rate and the simple high compression ratio for some image blocks. In addition, each compressed image block can operate independently, and local decompression of the compressed image mark can not only reduce image occupation system resources but also improve image processing speed. In addition, the compressed image block pair-area image block uses the JPEG format decompression action to further speed up the image processing. In other embodiments, the image processing system and the image processing method may process the JPEG string without JPEG compression of the image to obtain a corresponding JpEG string to obtain a phase coefficient and an ac coefficient but an image. Corresponding cosine transform and quantization are performed to obtain corresponding DG coefficients and A c coefficients. That is, the t-processing module 307 replaces the JPEG compression unit 350 and the JPEG string processing unit 36 using a cosine transform unit and a quantization processing unit. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a functional block diagram of an image processing system according to a preferred embodiment. Fig. 2 is a schematic diagram of a process of processing an image by an image processing system according to a preferred embodiment. Schematic diagram of processing system segmentation image block 0992027027-0 Form No. A0101 Page 18 of 38 201141234 [0075] Figure 4 is a schematic diagram of an image block precision value table. [0076] Figure 5 is image block accuracy 6 is a schematic diagram of a compression mode of the image processing system of FIG. 1. [0078] FIG. 7 is a schematic diagram of a decompression process. [0079] FIG. 8 is a diagram of an image compression method according to a preferred embodiment. flow 9 is a flow chart of an image decompression method according to a preferred embodiment. [0081] FIG. 10 is a schematic diagram of a conventional image processing process. 〇 [Main component symbol description] [0082] Digital camera 30 [0083] Computer 40 [0084] Buffer 410 [0085] Image Processing System 100 [0086] Input Device 200 [0087] Image Compression Device 300 [0088] Image Decompression Device 400 [0089] Image Acquisition Unit 301 [0090] Data Processing Module 307 [0091] JPEG Compression Unit 350 [0092] JPEG String Processing Unit 360 [0093] Image Segmentation Unit 302 099115268 Form Number A0101 Page 19 of 38 0992027027-0 201141234 [0094 Accuracy Allocating Unit 303 [0095] Encoding is 3 0 4 [0096] Internal Table Storage Unit 305 [0098] Second Table Creation Unit 310 [0099] External Storage Unit 306 [0100] JPEG Table 330 [0101] Compressed Encoding Table 340 [0102] Decoder 401 [0103] Memory 402 [0104] Image Compression Method 801 - 825 [0105] Image Decompression Method 901~923 099115268 Form Number A0101 Page 20 of 38 pages 0992027 027-0

Claims (1)

201141234 七、申清專利範圍: 1 種圖像處理系統,其包括圖像壓縮裝置,所述圖像壓縮 裝置用於獲取—圖像並對該圖像利用預設的壓縮規則進行 壓縮以產生壓縮圖像檔;其改良在於:所述圖像壓縮裝置 包括資料處理模組、圖像分割單元、精度分配單元、編碼 、 y 盗以及存儲單元’所述圖像分割單元用於將獲取的圖像按 照預设的大小分割成若干圖像區塊;精度分配單元用於根 據預設的獲取圖像的R0I的位置資訊和精度值資訊分配各 Q 圖像區塊中的精度值;所述編碼器根據各圖像區塊的精度 值選擇相應的壓縮方式姆每一圖像區參進#獨立壓縮編碼 生成相應的壓縮字串,所述壓縮字串構成所述壓縮圖像檔 2 .如申請專利範圍第丨項所述之圖像處理系統,其中所述圖 像處理系統還包括資料處理單元,所述資料處理單元至少 對各圖像區塊進行余弦變換和量化處理獲得與每個圖像區 塊相對應的DC係數和AC係數; ◎ *述編碼器根據所述DC係數和AC係數對各囷像區塊進行 獨立編碼生成所述壓縮字串。 3.如申請專利範圍第2項所述之圖像處理系統其中所述資 料處理模組包括JPEG壓縮單元和JPEG字串處理單元,所 述JPEG壓縮單元利用標準JpEG壓縮規則對圖像進行jpEG 壓縮得到相應的JPEG字串,所述標準JPEG壓縮規則至少 包括所述余弦變換和量化處理,所述JPEG字串處理單元 將所述JPEG字串進行相應的變換得到所述%係數和㈣ 數0 099115268 表單編號A0101 第21頁/共38頁 0992027027-0 201141234 4 ·如申請專利範圍第2項所述之圖像處理系統’其中所述編 碼器包括第一表格創建單元和第二表格創建單元,所述第 一表格創建單元用於創建jpEG表格,所述第二表袼創建 單元用於創建壓縮編碼表格,所述壓縮字串存儲於所述 JPEG表格和所述壓縮編碼表格,所述第一表格創建單元 在一圖像區塊中的精度值屬於預設的第一精度範圍時,選 擇相應的DC係數和全部的AC係數,然後根據選擇的DC係 數和A C係數按照預設的編碼規則進行編碼生成所述壓縮字 串並存儲於所述JPEG表格中;所述第一表格創建單元還 在一圖像區塊中的精度瘅屬於預設的第二精度範圍時,選 擇相應的DC係數和部分的AC係數,然後根據選擇的DC係 數和AC係數按照預設的編碼規則進行编碼生成所述壓縮字 串並存儲於所述JPEG表格中;所述第一表格創建單元還 在一圖像區塊中的精度值屬於預設的第三精度範圍時,選 擇相應的DC係數並將選擇的DC係數按照預設編碼規則生 成所述壓縮字串並存儲於所述JPEG表格中;所述第二表 格創建單元用於將各圖像區塊的精度值存儲於所述壓縮編 碼表格相應的位置中,所述第二表格創建單元還用於在所 述圖像區塊屬於第一、第二及第三預設範圍時,獲取所述 壓縮字串在所述JPEG表格中的壓縮字串的起始位址並存 儲於所述壓縮編碼表格相應的位置中,所述第二表格創建 單元還用於在所述圖像區塊的精度值屬於所述預設的第四 精度範圍時,選擇相應的DC係數,並對相應的DC係數按 照預設的編碼規則進行編碼生成所述壓縮字串並存儲於所 述壓縮編碼表格中。 如申請專利範圍第4項所述之圖像處理系統,其中所述第 099115268 表單編號A0101 第22頁/共38頁 0992027027-0 201141234 -表格創建單元同時選擇1像區塊的 時,將選擇的AC係數進行叫Huffma_f系數 字串,並以先DC係數後AC編碼字串按昭預^生成AC編碼 於則G表格相應的位置中以生成所述壓縮^順序存儲 如申請專利範圍第4項所述之圖像處理系統,其中所 -表格創建單元只選擇一圖像區塊的叱係數時,按昭預, 的順序將DC係數存儲於】PEG表格相應的仇置中以生 述壓縮字串。201141234 VII. Shenqing Patent Range: An image processing system including an image compression device for acquiring an image and compressing the image using a preset compression rule to generate compression An image file; the improvement is that the image compression device includes a data processing module, an image segmentation unit, a precision distribution unit, an encoding, a pirate, and a storage unit. The image segmentation unit is configured to acquire the image. Dividing into a plurality of image blocks according to a preset size; the precision assigning unit is configured to allocate an accuracy value in each Q image block according to the position information and the precision value information of the preset ROI of the acquired image; the encoder Selecting a corresponding compression mode according to the precision value of each image block, each image area participating in the independent compression coding generates a corresponding compression string, and the compression string constitutes the compressed image file 2. The image processing system of claim 2, wherein the image processing system further comprises a data processing unit, wherein the data processing unit performs cosine transformation on at least each image block Quantization processing corresponding to the obtained DC coefficient and AC coefficients of each image block area; ◎ * said encoder for each image block according to the granary DC coefficient and AC coefficients independently coded generate the compressed string. 3. The image processing system of claim 2, wherein the data processing module comprises a JPEG compression unit and a JPEG string processing unit, the JPEG compression unit performing jpEG compression on the image using standard JpEG compression rules. Obtaining a corresponding JPEG string, the standard JPEG compression rule including at least the cosine transform and quantization processing, the JPEG string processing unit performing corresponding transformation on the JPEG string to obtain the % coefficient and (4) number 0 099115268 The image processing system of the second aspect of the invention, wherein the encoder includes a first form creation unit and a second form creation unit, wherein the encoder includes the first form creation unit and the second form creation unit. The first table creating unit is configured to create a jpEG table, the second form creating unit is configured to create a compressed encoding table, the compressed string is stored in the JPEG table and the compression encoding table, the first table When the accuracy value of the creation unit in an image block belongs to the preset first precision range, the corresponding DC coefficient and all AC coefficients are selected, and then the root The selected DC coefficient and AC coefficient are encoded according to a preset encoding rule to generate the compressed string and stored in the JPEG table; the accuracy of the first table creating unit in an image block is When the second precision range is set, the corresponding DC coefficient and part of the AC coefficient are selected, and then the compressed DC string is encoded according to the selected DC coefficient and the AC coefficient according to a preset encoding rule and stored in the JPEG table. The first table creation unit further selects a corresponding DC coefficient and generates the compression according to a preset encoding rule when the precision value in an image block belongs to a preset third precision range. a string is stored in the JPEG table; the second table creating unit is configured to store the precision value of each image block in a corresponding position of the compression encoding table, and the second table creating unit further uses And acquiring, when the image block belongs to the first, second, and third preset ranges, a start address of the compressed string of the compressed string in the JPEG table, and storing the compression code in the compression code In the corresponding position, the second table creating unit is further configured to: when the precision value of the image block belongs to the preset fourth precision range, select a corresponding DC coefficient, and corresponding DC coefficient Encoding is performed according to a preset encoding rule to generate the compressed string and stored in the compression encoding table. The image processing system of claim 4, wherein the 099115268 form number A0101 page 22/38 page 0992027027-0 201141234 - when the table creation unit simultaneously selects 1 image block, the selected one The AC coefficient is called Huffma_f is a digital string, and the first DC coefficient and the AC code string are generated by AC to generate the AC code in the corresponding position of the G table to generate the compression. The sequential storage is as in the fourth item of the patent application scope. In the image processing system, wherein the table creation unit selects only the 叱 coefficient of an image block, the DC coefficient is stored in the order of the PEG table in the order of the preview, to generate the compressed string. . 099115268 7.如申請專利範圍第i項所述之圖像處理系統其中所述第 二表格創建單元選擇一圖像區塊的仳係數時將選擇的 DC係數變換為循V分量對應的3個DC係數,'然後按照預設 的順序存儲於壓縮編碼表格相應的位置中,以產生相應圖 像區塊的壓縮字串。 8 .如申請專利範圍第6項所述之圖像處理系統,其中所述第 二表格創建單元變換YUV分量對應的3個DC係數時,若每 一圖像區塊包括多個γυν分量,則計算多個Υυν分量對應 的多個DC係數的平均值,並將該平均值作為該分量的如 係數。 9.如申請專利範圍第1項所述之圖像處理系統,其中所述壓 縮圖像處理系統還包括輸入裝置和圖像解壓縮裝置,所述 輸入裝置回應用戶操作產生包括圖像區塊資訊的解壓縮指 令’所述解壓縮裝置根據圖像區塊資訊查找壓縮圖像檔中 相應的壓縮編碼表格中相應的位置’根據愿縮編碼表格中 相應位置中的數值進行解碼。 1 0 .如申請專利範圍第9項所述之圖像處理系統’其中圖像解 壓縮裝置根據壓縮編碼表格中相應的精度值判斷壓縮編碼 第23頁/共38頁 0992027027-0 表單編號A0101 201141234 2應仅置中存儲的是壓縮字串還是壓縮字串的起始地址’ 右為墨输&由 巧予爭,將壓縮字串作為YUV分量的值,並進行從 YUV工間變換到RGB空間獲得相應的RGB值,若為起始位址 】根據δ亥覆缩字串的起始位址獲取相應的壓縮字串,並 11 . 12 . 13 . 099115268 Μ精度值範圍選擇相應的解壓縮方式進行解壓。 種圖像處理方法,其包括如下步驟: 獲取圖像; 獲取的圖像分割為若干圖像區塊; 據預6又的R〇1精度資訊設置各圖像區塊的精度值; 根據各圖像區塊的精度值選擇相應的壓縮方式對每一圖像 區塊進仃獨立壓縮編碼生成相應的壓縮字串,所述壓縮字 串構成與所述獲取圖像相對應的壓縮圖像檔。 申明專利範圍第11項所述之圖像處理方法,其中生成所 述壓縮字串還包括如下步驟: 夕對各圖像區塊進行余弦變換和量化處理獲得與每個圖 像_相對應峨健和AG餘; 據所述DC係數和AC係數對各圖像毯塊進行獨立編碼生 成所述壓縮字串。 如申清專利範圍第12項所述之圖像處理方法,其中獲取所 述DC係數和ac係數包括如下步驟: 利用標準JpEG壓縮規則對圖像進行jpeg壓縮得到相應的 JPEG字串,所述標準JPEG壓縮規則至少包括所述余弦變 換和量化處理; 將所述J P E G字串進行相應的逆變換得到所述D C係數和A c 係數。 如申請專利範圍第12項所述之圖像處理方法,其中根據所 表單編號A0101 第24頁/共38頁 0992027027-0 14 201141234 述DC係數和AG^數對各_像區塊進行獨立編碼生成所迷 壓縮字串包括如下步驟: 根據各圖像區塊的精度值和相應的Dc係數及虬係數開始 創建JPEG表格和壓縮編碼表格; 將各圖像區塊的精度值存儲於壓縮編碼表格相應的位置中 9 判斷所述圖像區塊的精度值是否屬於預設的第一精度範圍 若所述圖.像區塊的精度值屬於所述第一精度範圍,選擇相 應的DC係數和全部的AC係數,然後根據選擇的dc係數和 全部AC係數按照預設的編碼規則進行編碼生成所述壓縮字 串並存儲於所述JPEG表格中;, 若所述圖像區塊的精度值不屬於所述預幾的第一精度範圍 ’判斷所述圖像區塊的精度值是否屬於镇設的第二精度範 圍; 若所述圖像區塊的精度值屬於所述預設的第二精度範圍時 ’選擇相應的DC係數和部分的AC係數,根據選擇的dc係 數和AC係數按照福設的編碼規則進行編碼生成所述壓縮字 串並存儲於所述JPEG表格中; 若所述圖像區塊的精度值不屬於所述預設的第二精度範圍 ,判斷所述精度值是否屬於預設的第三精度範圍; 當所述精度值屬於預設的第三精度範圍時,選擇相應的DC 係數並將選擇的DC係數按照預設編碼規則生成所述壓縮字 串並存儲於所述JPEG表格中; 若所述圖像區塊的精度值不屬於所述預設的第三精度範圍 時;選擇相應的DC係數並將選擇的DC係數按照預設編碼 099115268 表單編號A0101 第25頁/共38頁 0992027027-0 201141234 15 . 規則生成所述壓縮字串並存儲於所述壓 縮編碼表格中; 獲取各壓縮字串在所述jpEG表格中的起始位址並存儲於 所述缩蝙碼表格相應的位置中。 如申凊專利範圍第14項所述之圖像處理方法,其中若所述 圖像區塊的精度值屬於所述預設的第一精度範圍或者第二 精度範圍時’將選擇的Ac係數進行RLE和Huffman編碼生 成AC編碼字串,並以先此係數後AC編碼字串按照預設的 順序存儲於JPEG表格相應的位置中以生成所述壓縮字串 16 . 17 . 18 19 如申請專利範圍第14項所述之圖像處理方法,其中若所述 圖像區塊的精度值屬於所述预設的第三精度範圍,將選擇 的圖像區塊的D C係數按照預設的順序存儲於j p e G表格相 應的位置中以生成所述壓縮字串。 如申請專利範圍第14項所述之圖像處理方法,其中若所述 圖像區塊的精度值不屬於所述預設的第三精度範圍將選 擇的DC係數變換為γυν分量個如係數,然後按照 預設的順序存儲於壓縮編碼表格用於相應的位置中,以產 生相應圖像區塊的壓縮字一。 如申請專利範圍第16項所述之圖像處理方法,其中將Μ 係數變換YUV分量對應的3個DC係數時,若每一圖像區塊 包括多個YUV分量,則計算多個YUV分量對應的多個队係 數的平均值,並將該平均值作為該分量的此係數。 如申明專利乾圍第14項所述之圖像處理方法,其中所述圖 像處理方法還包括: 判斷是否接收到用於描述圖像區塊資訊的解壓縮指令; 若接收到解壓縮指令,根據所述解壓縮指令在所述壓縮編 099115268 表單編號ΑΟίοι 第26頁/共38頁 0992027027-0 201141234 碼表格中獲取相應的精度值; 判斷獲取的精度值並根據相應的精度值選擇相應的解壓縮 方式進行解壓縮。 20 · 如申請專利範圍第19項所述之圖像處理方法,其中對壓縮 字串進行解壓包括如下步驟: 判斷所述圖像區塊的精度值是否屬於預設的第四精度範圍 > 若所述圖像區塊的精度值屬於所述預設的第一精度範圍, 獲取壓縮編碼表格中的相應的壓縮字串作為YUV分量值, Ο 並對YUV分量值進行從YUV空間變換到RGB空間獲得相應的 RGB值; : ,厂/ 若所述圖像區塊的精度值不屬於所述預設的第四精度範圍 ’則根據壓縮蝙碼表格中相應的壓縮字串的起始位址從所 述JPEG表格中獲取相應的壓縮字串; 判斷所述圖像區塊的精度值是否屬於所述預設的第三精度 範圍’若所述圖像區塊的精度值處於所述預設的第三精度 範圍, Ο 根據獲取的起始位鉦從JPEG表格中獲取相應的壓縮字串 作為YUV分量值; 對YUV分量值進行從YUV空間變換到RGB空間獲得相應的 RGB 值; 若所述圖像區塊的精度值不屬於所述預設的第三精度範圍 ’根據獲取的起始位址從jpEG表格中獲取相應的壓縮字 串; 從壓縮字串中獲取AC編碼字串, 將AC編碼字串進行Huff man和RLE解碼得到相應的^係數 099115268 表單編號A0101 第27頁/共38頁 0992027027-0 201141234 對DC係數和AC係數進行反量化和反余弦變換得到相應的 YUV 值; 對YUV值從YUV色彩空間變換到RGB色彩空間獲得相應的 RGB 值。 099115268 表單編號A0101 第28頁/共38頁 0992027027-0The image processing system of claim i, wherein the second table creation unit selects a 区 coefficient of an image block to convert the selected DC coefficient into three DCs corresponding to the V component. The coefficients, 'are then stored in the corresponding positions of the compression coding table in a preset order to produce a compressed string of corresponding image blocks. 8. The image processing system of claim 6, wherein when the second table creation unit converts three DC coefficients corresponding to the YUV component, if each image block includes a plurality of γυν components, An average value of a plurality of DC coefficients corresponding to a plurality of Υυν components is calculated, and the average value is taken as a coefficient of the component. 9. The image processing system of claim 1, wherein the compressed image processing system further comprises an input device and an image decompressing device, the input device generating image block information in response to a user operation. The decompressing instruction 'the decompressing means searches for the corresponding position in the corresponding compression coding table in the compressed image file according to the image block information' to decode according to the value in the corresponding position in the wishing coding table. The image processing system of claim 9, wherein the image decompressing device determines the compression encoding according to the corresponding precision value in the compression encoding table. Page 23/38 pages 0992027027-0 Form No. A0101 201141234 2 should only be stored in the compressed string or the starting address of the compressed string 'right is the ink input & by the competition, the compressed string as the value of the YUV component, and from the YUV workspace to RGB The space obtains the corresponding RGB value, if it is the starting address, the corresponding compressed string is obtained according to the starting address of the delta-shrinking string, and 11 . 12 . 13 . 099115268 Μ the precision value range selects the corresponding decompression The way to decompress. An image processing method comprising the steps of: acquiring an image; dividing the acquired image into a plurality of image blocks; setting an accuracy value of each image block according to a preset R〇1 precision information; The compression value of the block is selected according to the corresponding compression mode, and each image block is independently compressed and encoded to generate a corresponding compressed string, and the compressed string constitutes a compressed image file corresponding to the acquired image. The image processing method of claim 11, wherein the generating the compressed string further comprises the following steps: performing cosine transform and quantization processing on each image block to obtain a corresponding image for each image_ And AG residual; independently compressing each image blanket according to the DC coefficient and the AC coefficient to generate the compressed string. The image processing method of claim 12, wherein obtaining the DC coefficient and the ac coefficient comprises the following steps: performing jpeg compression on the image by using a standard JpEG compression rule to obtain a corresponding JPEG string, the standard The JPEG compression rule includes at least the cosine transform and quantization processing; performing inverse transform on the JPEG string to obtain the DC coefficient and the A c coefficient. The image processing method according to claim 12, wherein the _image block is independently coded according to the DC number and the AG^ number according to the form number A0101, page 24/38 page 0992027027-0 14 201141234. The compressed string includes the following steps: starting to create a JPEG table and a compression encoding table according to the precision value of each image block and the corresponding Dc coefficient and the 虬 coefficient; storing the precision value of each image block in the compression encoding table correspondingly 9 in the position determining whether the precision value of the image block belongs to a preset first precision range. If the accuracy value of the image block belongs to the first precision range, select the corresponding DC coefficient and all The AC coefficient is then encoded according to a selected dc coefficient and all AC coefficients according to a preset encoding rule to generate the compressed string and stored in the JPEG table; if the accuracy value of the image block does not belong to the Determining a first precision range of the pre-determination, determining whether the precision value of the image block belongs to a second precision range of the stipulation; if the accuracy value of the image block belongs to the preset second In the range of accuracy, 'select the corresponding DC coefficient and part of the AC coefficient, according to the selected dc coefficient and AC coefficient, according to the encoding rule of the fuzzification, to generate the compressed string and store it in the JPEG table; The precision value of the image block does not belong to the preset second precision range, and determines whether the precision value belongs to a preset third precision range; when the precision value belongs to a preset third precision range, select corresponding The DC coefficient and the selected DC coefficient are generated according to a preset encoding rule and stored in the JPEG table; if the accuracy value of the image block does not belong to the preset third precision range The corresponding DC coefficient is selected and the selected DC coefficient is generated according to a preset code 099115268 Form No. A0101, page 25 / 38 pages 0992027027-0 201141234 15 . The rule is generated and stored in the compression coding table. Obtaining a starting address of each compressed string in the jpEG table and storing the corresponding location in the bar code table. The image processing method of claim 14, wherein if the accuracy value of the image block belongs to the preset first precision range or the second precision range, the selected Ac coefficient is performed. The RLE and Huffman codes generate an AC coded string, and the AC coded string is stored in a corresponding position in the JPEG table in a preset order to generate the compressed string 16 . 17 . 18 19 as claimed The image processing method of claim 14, wherein if the accuracy value of the image block belongs to the preset third precision range, the DC coefficients of the selected image block are stored in a preset order. The jpe G table is in the corresponding position to generate the compressed string. The image processing method of claim 14, wherein if the accuracy value of the image block does not belong to the preset third precision range, the selected DC coefficient is converted into a γυν component such as a coefficient, The compressed encoding table is then stored in the corresponding position in a predetermined order to generate a compressed word one of the corresponding image block. The image processing method according to claim 16, wherein when the Μ coefficient is converted into three DC coefficients corresponding to the YUV component, if each image block includes a plurality of YUV components, a plurality of YUV components are calculated. The average of the multiple team coefficients and the average is taken as the coefficient for that component. The image processing method of claim 14, wherein the image processing method further comprises: determining whether a decompression instruction for describing image block information is received; and if the decompression instruction is received, Obtaining a corresponding precision value according to the decompressing instruction in the compression edit 099115268 form number ΑΟίοι 26 page / 38 page 0992027027-0 201141234 code table; determining the obtained precision value and selecting a corresponding solution according to the corresponding precision value Decompress in compression mode. The image processing method of claim 19, wherein decompressing the compressed string comprises the steps of: determining whether the precision value of the image block belongs to a preset fourth precision range > The precision value of the image block belongs to the preset first precision range, and the corresponding compressed string in the compression coding table is obtained as the YUV component value, and the YUV component value is transformed from the YUV space to the RGB space. Obtaining a corresponding RGB value; : , factory / if the accuracy value of the image block does not belong to the preset fourth precision range ' then according to the starting address of the corresponding compressed string in the compressed bat code table Obtaining a corresponding compressed string in the JPEG table; determining whether the precision value of the image block belongs to the preset third precision range, if the accuracy value of the image block is in the preset The third precision range, 获取 according to the obtained start bit 钲, the corresponding compressed string is obtained from the JPEG table as the YUV component value; the YUV component value is transformed from the YUV space to the RGB space to obtain the corresponding RGB value; The precision value of the image block does not belong to the preset third precision range. The corresponding compressed string is obtained from the jpEG table according to the obtained start address; the AC encoded string is obtained from the compressed string, and the AC is obtained. The code string is decoded by Huff man and RLE to obtain the corresponding ^ coefficient 099115268 Form No. A0101 Page 27 / Total 38 Page 0992027027-0 201141234 The DC coefficient and the AC coefficient are inverse quantized and inverse cosine transformed to obtain the corresponding YUV value; The value is transformed from the YUV color space to the RGB color space to obtain the corresponding RGB values. 099115268 Form No. A0101 Page 28 of 38 0992027027-0
TW099115268A 2010-05-13 2010-05-13 System and method for processing image TWI484829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099115268A TWI484829B (en) 2010-05-13 2010-05-13 System and method for processing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099115268A TWI484829B (en) 2010-05-13 2010-05-13 System and method for processing image

Publications (2)

Publication Number Publication Date
TW201141234A true TW201141234A (en) 2011-11-16
TWI484829B TWI484829B (en) 2015-05-11

Family

ID=46760490

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099115268A TWI484829B (en) 2010-05-13 2010-05-13 System and method for processing image

Country Status (1)

Country Link
TW (1) TWI484829B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI685247B (en) * 2017-06-14 2020-02-11 晶睿通訊股份有限公司 Image processing method and related camera device and camera system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159870A (en) * 2007-11-12 2008-04-09 北京中星微电子有限公司 Emergent JPEG compression bit rate control device and method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI685247B (en) * 2017-06-14 2020-02-11 晶睿通訊股份有限公司 Image processing method and related camera device and camera system
US11403762B2 (en) 2017-06-14 2022-08-02 Vivotek Inc. Image processing method and related camera device

Also Published As

Publication number Publication date
TWI484829B (en) 2015-05-11

Similar Documents

Publication Publication Date Title
JP2016226001A (en) Decoder and decoding method
US6754383B1 (en) Lossy JPEG compression/reconstruction using principal components transformation
JP2014039256A (en) Encoder and encoding method
CN103841424A (en) System And Method For Randomly Accessing Compressed Data From Memory
KR102194615B1 (en) Tile-based compression and decompression for graphic applications
JP2011234363A (en) Image processing system and method
TW535412B (en) Progressive JPEG decoding device and method thereof
TW201141234A (en) System and method for processing image
JP2003101788A (en) Decoding method, decoding device, picture processor, packet header generating method and packet header generating device
JPH07143488A (en) Method and device for decoding image data
JP7147075B2 (en) Compression across multiple images
CN107172425B (en) Thumbnail generation method and device and terminal equipment
JPH0879537A (en) Picture information encoding processor and picture information communication equipment
Patil et al. JPEG image compression using huffman coding and discrete cosine transfer
JP2006005478A (en) Image encoder and image decoder
JPS62150475A (en) Picture processor
JP4946801B2 (en) Image management apparatus, image management program, and image management method
JP3954032B2 (en) Image coding apparatus, image coding method, image coding program, and computer-readable recording medium on which image coding program is recorded
JPH04271664A (en) Picture data compressor and picture data decoder
JP2821614B2 (en) Image transmission apparatus and image transmission method
JP4447903B2 (en) Signal processing apparatus, signal processing method, recording medium, and program
TWI485618B (en) Kvm switch of transmitting video signal to remote consoles and method thereof
JP2020129728A (en) Image processing device and control method therefor
JPH04274674A (en) Data converter
JPH0884340A (en) Image data coder

Legal Events

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