[go: up one dir, main page]

TW201417562A - Image correction method - Google Patents

Image correction method Download PDF

Info

Publication number
TW201417562A
TW201417562A TW101139570A TW101139570A TW201417562A TW 201417562 A TW201417562 A TW 201417562A TW 101139570 A TW101139570 A TW 101139570A TW 101139570 A TW101139570 A TW 101139570A TW 201417562 A TW201417562 A TW 201417562A
Authority
TW
Taiwan
Prior art keywords
image
blue
red
line
scanner
Prior art date
Application number
TW101139570A
Other languages
Chinese (zh)
Other versions
TWI510051B (en
Inventor
Chun-Jen Lin
Yu-Hsiang Lee
Original Assignee
Foxlink Image Tech 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 Foxlink Image Tech Co Ltd filed Critical Foxlink Image Tech Co Ltd
Priority to TW101139570A priority Critical patent/TWI510051B/en
Publication of TW201417562A publication Critical patent/TW201417562A/en
Application granted granted Critical
Publication of TWI510051B publication Critical patent/TWI510051B/en

Links

Landscapes

  • Color Image Communication Systems (AREA)
  • Facsimile Scanning Arrangements (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Input (AREA)

Abstract

The present invention discloses an image correction method which is used in a scanner. The image correction method includes following steps: put a document which is to be scanned on a platform of the scanner and initialize parameters; the scanner scans a line of image which includes a plurality of image pixels corresponding to a red light, a blue light and a green light; store the sum of pixel values of the red light, the blue light or the green light, a plurality of minimum and maximum pixel values of the red light, the blue light or the green light to corresponding positions of a memory storage unit; when the set image is scanned enough, execute the set programs in the memory storage unit to get a update shading table so as to complete an image correction of each line of the image. So the image correction method can ensure a better image effect and effectively decrease a usage of the memory storage unit.

Description

影像校正方法Image correction method

  本發明涉及一種影像校正方法,尤其涉及一種應用於一掃描器的影像校正方法。
The present invention relates to an image correction method, and more particularly to an image correction method applied to a scanner.

  按,請參閱第一圖,一種習知的影像校正方法係應用於一掃描器(圖未示),所述掃描器通常包括一掃描器本體(圖未示)、一驅動裝置10’、一光學模組20’、一類比/數位轉換器30’及一記憶存儲單元40’。驅動裝置10’、光學模組20’、類比/數位轉換器30’及記憶存儲單元40’電性連接且裝設於掃描器本體內。其中,光學模組20’可在掃描器本體內移動。該光學模組20’包括一光源201’、一鏡頭202’及一影像感測元件203’。其中,影像感測元件203’為一電荷耦合器件(Charge Coupled Device,CCD)或一接觸式圖像傳感器(Contact Image Sensor,CIS)。掃描器本體的上方設置一掃描平臺(圖未示)。
  通常,光源201’本身各位置之輝度不同會導致掃描器掃描出的影像出現亮暗不均勻的現象,為了避免產生此亮暗不均勻的影像,當掃描器掃描一文件時,掃描器會利用所述影像校正方法來進行一影像校正動作。所述影像校正方法之步驟如下所述:首先,將待掃描的文件移至掃描器的掃描平臺上;其次,驅動裝置10’驅動光學模組20’移動對此文件進行掃描。具體地,光源201’透過掃描平臺照射到文件上,此時,由光源201’透過掃描平臺照射到文件上反射回來的光線通過鏡頭正確聚焦成像於影像感測元件203’上以形成一影像,所述影像由複數個影像像素組成;之後,影像像素經由類比/數位轉換器30’轉換成為數位電訊號;再次,儲存數位電訊號於記憶存儲單元40’內,並利用內插法或乘法運算法進行運算,從而產生一平衡表(Shading Table);最後,掃描器利用此平衡表進行掃描出的影像的亮度補償動作。
  惟,上述影像校正方法在建立平衡表的過程中,會受到文件上之不預期的髒點或灰塵所影響,從而得到不準確的平衡表,進而影響影像校正效果,同時,在記憶存儲單元40’內建立平衡表的過程中,由於記憶存儲單元40’沒有合理的劃分相應的區間進行運算,因而記憶存儲單元40’需具有較大的存儲空間,致使掃描器的影像校正成本增加。
Referring to the first figure, a conventional image correction method is applied to a scanner (not shown). The scanner generally includes a scanner body (not shown), a driving device 10', and a The optical module 20', an analog/digital converter 30' and a memory storage unit 40'. The driving device 10', the optical module 20', the analog/digital converter 30' and the memory storage unit 40' are electrically connected and installed in the scanner body. The optical module 20' can be moved within the scanner body. The optical module 20' includes a light source 201', a lens 202', and an image sensing element 203'. The image sensing component 203 ′ is a charge coupled device (CCD) or a contact image sensor (CIS). A scanning platform (not shown) is disposed above the scanner body.
Generally, the brightness of each position of the light source 201' itself may cause unevenness of light and darkness of the image scanned by the scanner. In order to avoid this uneven image, when the scanner scans a file, the scanner will utilize the scanner. The image correction method performs an image correction operation. The steps of the image correction method are as follows: First, the file to be scanned is moved to the scanning platform of the scanner; secondly, the driving device 10' drives the optical module 20' to move the file for scanning. Specifically, the light source 201 ′ is irradiated onto the document through the scanning platform. At this time, the light reflected by the light source 201 ′ through the scanning platform and reflected on the document is correctly focused and imaged on the image sensing element 203 ′ by the lens to form an image. The image is composed of a plurality of image pixels; thereafter, the image pixels are converted into digital electrical signals via an analog/digital converter 30'; again, the digital electrical signals are stored in the memory storage unit 40', and interpolation or multiplication is performed. The method performs an operation to generate a Shading Table; finally, the scanner uses the balance table to perform a brightness compensation operation of the scanned image.
However, in the process of establishing the balance table, the image correction method may be affected by undesired dirty spots or dust on the file, thereby obtaining an inaccurate balance table, thereby affecting the image correction effect, and at the same time, in the memory storage unit 40. In the process of establishing the balance table, since the memory storage unit 40' does not reasonably divide the corresponding interval for calculation, the memory storage unit 40' needs to have a large storage space, so that the image correction cost of the scanner is increased.

  本發明的主要目的係針對上述習知技術存在之缺陷提供一種影像校正方法,可以確保影像效果良好及有效減少記憶存儲單元的使用。
  為實現上述目的,本發明提供一種影像校正方法,係應用於一掃描器,該掃描器包括一掃描器本體,及裝設於掃描器本體內且呈電性連接的一驅動裝置、一光學模組、一類比/數位轉換器、一先進先出數據緩存器、一數據流程控制單元、一設置單元、一數據分類單元及一記憶存儲單元。該影像校正方法包括如下步驟:
  (1)將一待掃描的文件移至掃描器的掃描平臺上;
  (2)掃描器進行初始化參數;
  (3)驅動裝置驅動光學模組移動,使掃描器開始對此文件進行掃描,從而使掃描器掃描得到一條線的影像,影像包括複數個分別對應紅光、藍光及綠光的影像像素;
  (4)該影像像素通過類比/數位轉換器轉換為十六進制的數位電訊號,掃描器通過先進先出數據緩存器依序讀取複數個紅光像素值、藍光像素值及綠光像素值,並通過數據流程控制單元計算出紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值;
  (5)記憶存儲單元劃分複數個記憶體位置,將一條線的影像的紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值經過數據分類單元進行分類並分別存入記憶存儲單元內與其相對應的記憶體位置;
  (6)確認設定要掃入的影像是否已足夠,足夠則執行步驟(7),否則重複步驟(3)、(4)及(5),直到所設定要掃入的影像已足夠;
  (7)使記錄在記憶存儲單元內的每一條線的影像的紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值,及複數個紅光、藍光或綠光像素最大值,執行在數據流程控制單元中設定的程序,得到的數值組成更新的平衡表;
  (8)掃描器利用此更新的平衡表補償各影像像素所對應的數位電訊號,以進行每一條線的各影像像素的亮度補償,從而完成每一條線的影像校正。
  綜上所述,本發明影像校正方法通過在建立更新的平衡表的過程中,將每一條線的影像的複數個紅光、藍光或綠光像素最小值及每一條線的影像的複數個紅光、藍光或綠光像素最大值分別儲存於記憶存儲單元內,以便去除掃描器上的文件上的髒點或灰塵,從而確保影像效果良好。此外,掃描器分析掃描得到的影像,將每一條線的影像的紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值分別存入記憶存儲單元內與其相對應的記憶體位置,從而有效減少記憶存儲單元的使用。
The main object of the present invention is to provide an image correction method for the defects of the above-mentioned prior art, which can ensure good image effects and effectively reduce the use of the memory storage unit.
In order to achieve the above object, the present invention provides an image correction method, which is applied to a scanner, the scanner includes a scanner body, and a driving device, an optical module, which is electrically connected to the body of the scanner. A group, a analog/digital converter, a first in first out data buffer, a data flow control unit, a setting unit, a data classification unit, and a memory storage unit. The image correction method comprises the following steps:
(1) moving a file to be scanned to the scanning platform of the scanner;
(2) The scanner performs initialization parameters;
(3) The driving device drives the optical module to move, so that the scanner starts scanning the file, so that the scanner scans to obtain a line image, and the image includes a plurality of image pixels respectively corresponding to red, blue and green light;
(4) The image pixel is converted into a hexadecimal digital signal by an analog/digital converter, and the scanner sequentially reads a plurality of red pixel values, blue pixel values, and green pixels through the first in first out data buffer. a value, and a sum of red, blue, or green pixel values calculated by the data flow control unit, a plurality of red, blue, or green pixel minimum values and a plurality of red, blue, or green pixel maximum values;
(5) The memory storage unit divides the plurality of memory positions, the sum of the red, blue or green pixel values of the image of one line, the minimum number of red, blue or green pixels and the plurality of red and blue light Or the maximum value of the green light pixels is classified by the data classification unit and stored in the corresponding memory location in the memory storage unit;
(6) Confirm that the image to be scanned is sufficient. If it is enough, perform step (7). Otherwise, repeat steps (3), (4) and (5) until the image to be scanned is sufficient.
(7) summing the red, blue or green pixel values of the image of each line recorded in the memory storage unit, the minimum number of red, blue or green pixels, and a plurality of red, blue or The green pixel maximum value is executed by the program set in the data flow control unit, and the obtained values constitute an updated balance table;
(8) The scanner uses the updated balance table to compensate the digital signals corresponding to each image pixel to perform brightness compensation for each image pixel of each line, thereby completing image correction of each line.
In summary, the image correction method of the present invention passes the plurality of red, blue or green pixel minimums of the image of each line and the plurality of red images of each line in the process of establishing the updated balance table. The maximum values of light, blue or green pixels are stored in the memory storage unit to remove dirty spots or dust on the documents on the scanner, thus ensuring good image quality. In addition, the scanner analyzes the scanned image, the sum of the red, blue or green pixel values of the image of each line, the plurality of red, blue or green pixel minimums and a plurality of red, blue or green The maximum value of the optical pixels is respectively stored in the memory storage unit corresponding to the memory location, thereby effectively reducing the use of the memory storage unit.

  為詳細說明本發明之技術內容、構造特徵、所達成的目的及功效,以下茲例舉實施例並配合圖式詳予說明。
  請參閱第三圖,本發明影像校正方法係應用於一掃描器(圖未示)。掃描器可以是一自動進紙器式單雙面掃描器,一饋紙式單雙面掃描器或一平臺式單面掃描器,在本實施例中,掃描器為平臺式單面掃描器,其包括一掃描器本體(圖未示),及裝設於掃描器本體內且呈電性連接的一驅動裝置10、一光學模組20、一類比/數位轉換器30、一先進先出數據緩存器40、一數據流程控制單元50、一設置單元60、一數據分類單元70及一記憶存儲單元80,其中,光學模組20可在掃描器本體內移動。該光學模組20包括一光源201、一鏡頭202及一影像感測元件203。掃描器本體的上方設置一掃描平臺(圖未示)。其中,光源201可以是一冷陰極管(Cold Cathode Fluorescent Lamp,CCFL)或一發光二極管(Light Emitting Diode,LED)。影像感測元件203可以是一電荷耦合器件(Charge Coupled Device,CCD)或一接觸式圖像傳感器(Contact Image Sensor,CIS)。
  請參閱第二圖及第三圖,本發明影像校正方法之具體步驟描述如下:
  S001︰將一待掃描的文件移至掃描器的掃描平臺上;
  S002︰掃描器進行初始化參數,設置單元60設定數據流程控制單元50內的一條線的影像之所有像素值的總和SUM(x)的起始值為00000000h,其程序表達式為:SUM(x)=00000000h,其中x表示一條線的影像的第x個像素;設置單元60設定數據流程控制單元50內的一條線的影像的像素最小值Lp(x)的起始值為FFFFh,其程序表達式為Lp(x)=FFFFh,其中p=0..m-1;設置單元60設定數據流程控制單元50內的一條線的影像的像素最大值Hq(x)的起始值為0000h,其程序表達式為為Hq(x)=0000h,其中q=0..n-1;
  S003︰驅動裝置10驅動光學模組20移動,使掃描器開始對此文件進行掃描,具體地,光源201發出白光並透過掃描平臺照射到文件上,此時,由光源201透過掃描平臺照射到文件上反射回來的一條光線通過鏡頭202正確聚焦成像於影像感測元件203上,從而使掃描器掃描得到一條線的影像,因為白光由紅光、藍光及綠光按一定比例組合而成,所以影像包括複數個分別對應紅光、藍光及綠光的影像像素;
  S004︰該影像像素通過類比/數位轉換器30轉換為十六進制的數位電訊號,掃描器通過先進先出數據緩存器40依序讀取複數個紅光像素值、藍光像素值及綠光像素值,並通過數據流程控制單元50計算出紅光、藍光或綠光像素值的總和SUM(x),m個紅光、藍光或綠光像素最小值Lp(x)及n個紅光、藍光或綠光像素最大值Hq(x),所述一條線的影像的第x個紅光、藍光或綠光像素值可以用WH_TMPi(x)表示,並且在數據流程控制單元50中設定如下程序:SUM(x)=SUM(x)+WH_TMPi(x);使用WH_TMPi(x)進行不斷更新紅光、藍光或綠光像素最小值Lp(x)來確保一條線的影像始終保持有m個紅光、藍光或綠光像素最小值Lp(x);使用WH_TMPi(x)進行不斷更新紅光、藍光或綠光像素最大值Hq(x)來確保該一條線的影像始終保持有n個紅光、藍光或綠光像素最大值Hq(x);
  S005︰掃描器的記憶存儲單元80被劃分成q個區,且每個區又被劃分成複數個記憶體位置,掃描器分析掃描得到的影像,將該一條線的影像的紅光像素值的總和SUM(x),m個紅光像素最小值Lp(x),n個紅光像素最大值Hq(x),藍光像素值的總和SUM(x),m個藍光像素最小值Lp(x),n個藍光像素最大值Hq(x),綠光像素值的總和SUM(x),m個綠光像素最小值Lp(x)及n個綠光像素最大值Hq(x)經過數據分類單元70進行分類並分別存入記憶存儲單元80內與其相對應的記憶體位置;記憶存儲單元80的具體劃分方式及一條線的影像的紅光、藍光或綠光像素值的總和SUM(x),m個紅光、藍光或綠光像素最小值Lp(x)與n個紅光、藍光或綠光像素最大值Hq(x)的具體存儲狀態如下圖所示︰
In order to explain the technical contents, structural features, objects and effects of the present invention in detail, the embodiments are described in detail below with reference to the drawings.
Referring to the third figure, the image correction method of the present invention is applied to a scanner (not shown). The scanner may be an automatic document feeder type single-sided scanner, a sheet-fed single-sided scanner or a platform type single-sided scanner. In this embodiment, the scanner is a platform type single-sided scanner, The utility model comprises a scanner body (not shown), a driving device 10 installed in the scanner body and electrically connected, an optical module 20, an analog/digital converter 30, and a first in first out data buffer. The data processing unit 50, a setting unit 60, a data sorting unit 70 and a memory storage unit 80, wherein the optical module 20 is movable within the scanner body. The optical module 20 includes a light source 201, a lens 202, and an image sensing component 203. A scanning platform (not shown) is disposed above the scanner body. The light source 201 can be a Cold Cathode Fluorescent Lamp (CCFL) or a Light Emitting Diode (LED). The image sensing component 203 can be a Charge Coupled Device (CCD) or a Contact Image Sensor (CIS).
Referring to the second and third figures, the specific steps of the image correction method of the present invention are described as follows:
S001: moving a file to be scanned to a scanning platform of the scanner;
S002. The scanner performs initialization parameters, and the setting unit 60 sets the sum of all pixel values of the image of the line in the data flow control unit 50 to the initial value of SUM(x) of 000000000h, and the program expression is: SUM(x) =00000000h, where x represents the xth pixel of the image of one line; the setting unit 60 sets the starting value of the pixel minimum value Lp(x) of the image of a line in the data flow control unit 50 to FFFFh, the program expression thereof Is Lp(x)=FFFFh, where p=0. . M-1; setting unit 60 sets the starting value of the pixel maximum value Hq(x) of the image of one line in the data flow control unit 50 to 0000h, and the program expression is Hq(x)=0000h, where q= 0. . N-1;
S003. The driving device 10 drives the optical module 20 to move, so that the scanner starts scanning the file. Specifically, the light source 201 emits white light and is irradiated onto the document through the scanning platform. At this time, the light source 201 is irradiated to the file through the scanning platform. A light reflected upward is imaged correctly on the image sensing element 203 through the lens 202, so that the scanner scans to obtain a line image, because the white light is composed of red, blue and green light in a certain proportion, so the image Including a plurality of image pixels respectively corresponding to red, blue and green light;
S004. The image pixel is converted into a hexadecimal digital signal by the analog/digital converter 30, and the scanner sequentially reads a plurality of red pixel values, blue pixel values, and green light through the first in first out data buffer 40. The pixel value is calculated by the data flow control unit 50 to calculate the sum of red, blue, or green pixel values SUM(x), m red, blue, or green pixel minimum values Lp(x) and n red lights, The blue or green pixel maximum value Hq(x), the xth red, blue or green pixel value of the image of the line may be represented by WH_TMPi(x), and the following procedure is set in the data flow control unit 50 :SUM(x)=SUM(x)+WH_TMPi(x); use WH_TMPi(x) to continuously update the red, blue or green pixel minimum value Lp(x) to ensure that the image of one line always has m red lights , blue or green pixel minimum value Lp(x); use WH_TMPi(x) to continuously update red light, Light or green pixel maximum Hq (x) to ensure that the image of a line with n remain red, blue or green pixel maximum Hq (x);
S005. The memory storage unit 80 of the scanner is divided into q zones, and each zone is divided into a plurality of memory locations, and the scanner analyzes the scanned image, and the red pixel value of the image of the line is Sum SUM(x), m red pixel minimum value Lp(x), n red pixel maximum value Hq(x), sum of blue pixel values SUM(x), m blue pixel minimum value Lp(x) , n blue light pixel maximum value Hq(x), sum of green light pixel values SUM(x), m green light pixel minimum values Lp(x), and n green light pixel maximum values Hq(x) pass data classification unit 70 is classified and stored in the corresponding memory location in the memory storage unit 80; the specific division manner of the memory storage unit 80 and the sum of the red, blue or green pixel values of the image of one line SUM(x), The specific storage states of m red, blue or green pixel minimum values Lp(x) and n red, blue or green pixel maximum values Hq(x) are as follows ︰ shown



其中,W:表示資料的寬度為一個十六進制表示的字;
  S:表示每條線的影像的紅光、藍光或綠光像素值的總和SUM(x);
  b:表示區間長度;
  q:表示分區編號;
  S006︰確認設定要掃入的影像是否已足夠,足夠則執行S007;否則重複步驟S003和S004,其中在步驟S004中,掃描器掃描第k條線的影像的第x個紅光、藍光或綠光像素值可以用WH_TMPi(x)表示,其中,i為從0開始逐漸遞增的正整數,且i<2+m+n,k表示掃描第k條線的影像,k、m和n是由設置單元60進行設置的,並且在數據流程控制單元50中重複以下程序:SUM(x)=SUM(x)+WH_TMPi(x);使用WH_TMPi(x)進行不斷更新每一條線的影像的紅光、藍光或綠光像素最小值Lp(x)來確保每一條線的影像始終保持有m個紅光、藍光或綠光像素最小值Lp(x);使用WH_TMPi(x)進行不斷更新每一條線的影像的紅光、藍光或綠光像素最大值Hq(x)來確保每一條線的影像始終保持有n個紅光、藍光或綠光像素最大值Hq(x),重複步驟S005,直到所設定要掃入的影像已足夠;
  S007︰使記錄在記憶存儲單元80內的每一條線的影像的紅光、藍光或綠光像素值的總和SUM(x),每一條線的影像的m個紅光、藍光或綠光像素最小值Lp(x)及每一條線的影像的n個紅光、藍光或綠光像素最大值Hq(x)執行在數據流程控制單元50中設定的程序:,得到的數值組成一更新的平衡表(Shading Table);
  S008︰掃描器利用此更新的平衡表補償每一條線的各影像像素所對應的數位電訊號,以進行各影像像素的亮度補償,從而完成每一條線的影像校正。
  請參閱第二圖及第三圖,本發明影像校正方法通過以上所述步驟產生更新的平衡表來逐一進行每一條線的影像校正,同時在建立更新的平衡表的過程中,將每一條線的紅光、藍光或綠光像素最小值Lp(x)及每一條線的紅光、藍光或綠光像素最大值Hq(x)分別儲存於記憶存儲單元80內,以便去除掃描器一白板上的髒點或灰塵,從而確保影像效果良好。此外,掃描器的記憶存儲單元80被劃分成q個區,且每個區又被劃分成複數個記憶體位置,掃描器分析掃描得到的影像,將每條線的影像的紅光、藍光或綠光像素值的總和SUM(x),m個紅光、藍光或綠光像素最小值Lp(x)及n個紅光、藍光或綠光像素最大值Hq(x)分別存入記憶存儲單元80內與其相對應的記憶體位置,從而有效減少記憶存儲單元80的使用。
  請參閱第二圖和第三圖,較優地,先進先出數據緩存器40、數據流程控制單元50及數據分類單元70可以集成於一特殊應用集成電路(Application Specific Integrated Circuit,ASIC),從而使掃描器在建立更新的平衡表的過程中簡化掃描器上的軟體控制流程。
  綜上所述,本發明影像校正方法通過在建立更新的平衡表的過程中,將每一條線的影像的m個紅光、藍光或綠光像素最小值Lp(x)及每一條線的影像的n個紅光、藍光或綠光像素最大值Hq(x)分別儲存於記憶存儲單元80內,以便去除掃描器上的文件上的髒點或灰塵,從而確保影像效果良好。此外,掃描器分析掃描得到的影像,將每一條線的影像的紅光、藍光或綠光像素值的總和SUM(x),m個紅光、藍光或綠光像素最小值Lp(x)及n個紅光、藍光或綠光像素最大值Hq(x)分別存入記憶存儲單元80內與其相對應的記憶體位置,從而有效減少記憶存儲單元80的使用。





Where W: indicates that the width of the data is a hexadecimal representation;
S: represents the sum of the red, blue or green pixel values of the image of each line SUM(x);
b: indicates the length of the interval;
q: indicates the partition number;
S006.. confirming whether the image to be scanned is sufficient, and executing S007; otherwise, repeating steps S003 and S004, wherein in step S004, the scanner scans the xth red, blue or green of the image of the kth line The light pixel value can be represented by WH_TMPi(x), where i is a positive integer gradually increasing from 0, and i<2 k +m+n, k represents an image in which the kth line is scanned, and k, m, and n are set by the unit 60 is set, and the following program is repeated in the data flow control unit 50: SUM(x)=SUM(x)+WH_TMPi(x); using WH_TMPi(x) to continuously update the red, blue or blue of each line image The green pixel minimum value Lp(x) ensures that the image of each line always has m red, blue or green pixel minimum values Lp(x); use WH_TMPi(x) to continuously update the image of each line. Red, blue or green pixel maximum Hq(x) Paul image of each line is n remain red, blue or green pixel maximum Hq (x), step S005 is repeated, until the image to be scanned in the set is sufficient;
S007.. the sum of the red, blue or green pixel values of the image of each line recorded in the memory storage unit 80, SUM(x), the minimum of m red, blue or green pixels of the image of each line The value Lp(x) and the n red, blue or green pixel maximum values Hq(x) of the image of each line perform the program set in the data flow control unit 50: , the obtained values constitute an updated Shading Table;
S008.. The scanner uses the updated balance table to compensate the digital signals corresponding to each image pixel of each line to perform brightness compensation of each image pixel, thereby completing image correction of each line.
Referring to the second and third figures, the image correction method of the present invention performs image correction of each line one by one by generating an updated balance table by the above steps, and each line is created in the process of establishing an updated balance table. The red, blue or green pixel minimum value Lp(x) and the red, blue or green pixel maximum value Hq(x) of each line are stored in the memory storage unit 80, respectively, to remove the scanner from the whiteboard. Dirty spots or dust to ensure good image quality. In addition, the memory storage unit 80 of the scanner is divided into q zones, and each zone is divided into a plurality of memory locations, and the scanner analyzes the scanned images, and the image of each line is red, blue or The sum of the green pixel values SUM(x), m red, blue or green pixel minimum values Lp(x) and n red, blue or green pixel maximum values Hq(x) are stored in the memory storage unit The memory location corresponding to it within 80, thereby effectively reducing the use of memory storage unit 80.
Referring to the second and third figures, the FIFO data buffer 40, the data flow control unit 50, and the data classification unit 70 can be integrated into an Application Specific Integrated Circuit (ASIC). Enables the scanner to simplify the software control flow on the scanner during the process of creating an updated balance sheet.
In summary, the image correction method of the present invention passes the m red, blue or green pixel minimum value Lp(x) of the image of each line and the image of each line in the process of establishing the updated balance table. The n red, blue or green pixel maximum values Hq(x) are respectively stored in the memory storage unit 80 to remove dirty spots or dust on the documents on the scanner, thereby ensuring good image quality. In addition, the scanner analyzes the scanned image, and sums the sum of red, blue, or green pixel values of the image of each line by SUM(x), m red, blue, or green pixel minimum values Lp(x) and The n red, blue or green pixel maximum values Hq(x) are respectively stored in the corresponding memory locations in the memory storage unit 80, thereby effectively reducing the use of the memory storage unit 80.



10...驅動裝置10. . . Drive unit

20...光學模組20. . . Optical module

201...光源201. . . light source

202...鏡頭202. . . Lens

203...影像感測元件203. . . Image sensing component

30...類比/數位轉換器30. . . Analog/digital converter

40...先進先出數據緩存器40. . . FIFO data buffer

50...數據流程控制單元50. . . Data flow control unit

60...設置單元60. . . Setting unit

70...數據分類單元70. . . Data classification unit

80...記憶存儲單元80. . . Memory storage unit

  第一圖為習知的影像校正方法之實施例中應用的一掃描器之局部原理架構圖。
  第二圖為本發明影像校正方法之流程圖。
  第三圖為本發明影像校正方法之實施例中應用的一掃描器之局部原理架構圖。
The first figure is a partial schematic architecture diagram of a scanner applied in an embodiment of a conventional image correction method.
The second figure is a flow chart of the image correction method of the present invention.
The third figure is a partial schematic architecture diagram of a scanner applied in the embodiment of the image correction method of the present invention.

10...驅動裝置10. . . Drive unit

20...光學模組20. . . Optical module

201...光源201. . . light source

202...鏡頭202. . . Lens

203...影像感測元件203. . . Image sensing component

30...類比/數位轉換器30. . . Analog/digital converter

40...先進先出數據緩存器40. . . FIFO data buffer

50...數據流程控制單元50. . . Data flow control unit

60...設置單元60. . . Setting unit

70...數據分類單元70. . . Data classification unit

80...記憶存儲單元80. . . Memory storage unit

Claims (6)

一種影像校正方法,係應用於一掃描器,該掃描器包括一掃描器本體,及裝設於掃描器本體內且呈電性連接的一驅動裝置、一光學模組、一類比/數位轉換器、一先進先出數據緩存器、一數據流程控制單元、一設置單元、一數據分類單元及一記憶存儲單元;該影像校正方法包括如下步驟:
  (1)將一待掃描的文件移至掃描器的掃描平臺上;
  (2)掃描器進行初始化參數;
  (3)驅動裝置驅動光學模組移動,使掃描器開始對此文件進行掃描,從而使掃描器掃描得到一條線的影像,影像包括複數個分別對應紅光、藍光及綠光的影像像素;
  (4)該影像像素通過類比/數位轉換器轉換為十六進制的數位電訊號,掃描器通過先進先出數據緩存器依序讀取複數個紅光像素值、藍光像素值及綠光像素值,並通過數據流程控制單元計算出紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值;
  (5)記憶存儲單元劃分複數個記憶體位置,將一條線的影像的紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值經過數據分類單元進行分類並分別存入記憶存儲單元內與其相對應的記憶體位置;
  (6)確認設定要掃入的影像是否已足夠,足夠則執行步驟(7),否則重複步驟(3)、(4)及(5),直到所設定要掃入的影像已足夠;
  (7)使記錄在記憶存儲單元內的每一條線的影像的紅光、藍光或綠光像素值的總和,複數個紅光、藍光或綠光像素最小值及複數個紅光、藍光或綠光像素最大值,執行在數據流程控制單元中設定的程序,得到的數值組成更新的平衡表;及
  (8)掃描器利用此更新的平衡表補償各影像像素所對應的數位電訊號,以進行該每一條線的各影像像素的亮度補償,從而完成每一條線的影像校正。
An image correction method is applied to a scanner, the scanner includes a scanner body, and a driving device, an optical module, and an analog/digital converter mounted in the scanner body and electrically connected a first in first out data buffer, a data flow control unit, a setting unit, a data classification unit and a memory storage unit; the image correction method comprises the following steps:
(1) moving a file to be scanned to the scanning platform of the scanner;
(2) The scanner performs initialization parameters;
(3) The driving device drives the optical module to move, so that the scanner starts scanning the file, so that the scanner scans to obtain a line image, and the image includes a plurality of image pixels respectively corresponding to red, blue and green light;
(4) The image pixel is converted into a hexadecimal digital signal by an analog/digital converter, and the scanner sequentially reads a plurality of red pixel values, blue pixel values, and green pixels through the first in first out data buffer. a value, and a sum of red, blue, or green pixel values calculated by the data flow control unit, a plurality of red, blue, or green pixel minimum values and a plurality of red, blue, or green pixel maximum values;
(5) The memory storage unit divides the plurality of memory positions, the sum of the red, blue or green pixel values of the image of one line, the minimum number of red, blue or green pixels and the plurality of red and blue light Or the maximum value of the green light pixels is classified by the data classification unit and stored in the corresponding memory location in the memory storage unit;
(6) Confirm that the image to be scanned is sufficient. If it is enough, perform step (7). Otherwise, repeat steps (3), (4) and (5) until the image to be scanned is sufficient.
(7) The sum of the red, blue or green pixel values of the image of each line recorded in the memory storage unit, the minimum number of red, blue or green pixels and the plurality of red, blue or green The maximum value of the light pixel, the program set in the data flow control unit is executed, and the obtained value constitutes an updated balance table; and (8) the scanner uses the updated balance table to compensate the digital signal corresponding to each image pixel for performing The brightness of each image pixel of each line is compensated, thereby completing image correction of each line.
如申請專利範圍第1項所述之影像校正方法,其中所述步驟(2),設置單元設定數據流程控制單元內的一條線的影像之所有像素值的總和SUM(x)的起始值為00000000h,其程序表達式為:SUM(x)=00000000h,其中x表示一條線的影像的第x個像素;設置單元設定數據流程控制單元內的一條線的影像的像素最小值Lp(x)的起始值為FFFFh,其程序表達式為Lp(x)=FFFFh,其中p=0..m-1;設置單元設定數據流程控制單元內的一條線的影像的像素最大值Hq(x)的起始值為0000h,其程序表達式為Hq(x)=0000h,其中q=0..n-1。The image correction method according to claim 1, wherein in the step (2), the setting unit sets a starting value of a total sum SUM(x) of all pixel values of an image of a line in the data flow control unit. 00000000h, the program expression is: SUM(x)=00000000h, where x represents the xth pixel of the image of one line; the setting unit sets the pixel minimum value Lp(x) of the image of a line in the data flow control unit The starting value is FFFFh, and its program expression is Lp(x)=FFFFh, where p=0. . M-1; setting unit setting data The flow control unit has a pixel maximum value Hq(x) whose initial value is 0000h, and its program expression is Hq(x)=0000h, where q=0. . N-1. 如申請專利範圍第2項所述之影像校正方法,其中所述步驟(4),掃描一條線的影像的第x個紅光、藍光或綠光像素值可以用WH_TMPi(x)表示,並且在數據流程控制單元中執行如下程序:SUM(x)=SUM(x)+WH_TMPi(x);使用WH_TMPi(x)進行不斷更新紅光、藍光或綠光像素最小值Lp(x)來確保一條線的影像始終保持有m個紅光、藍光或綠光像素最小值Lp(x);使用WH_TMPi(x)進行不斷更新紅光、藍光或綠光像素最大值Hq(x)來確保一條線的影像始終保持有n個紅光、藍光或綠光像素最大值Hq(x)。The image correction method according to claim 2, wherein in the step (4), the xth red, blue or green pixel value of the image scanned by one line can be represented by WH_TMPi(x), and The following procedure is executed in the data flow control unit: SUM(x)=SUM(x)+WH_TMPi(x); use WH_TMPi(x) to continuously update the red, blue or green pixel minimum value Lp(x) to ensure a line The image always has m red, blue or green pixel minimum values Lp(x); use WH_TMPi(x) to continuously update the red, blue or green pixel maximum Hq(x) to ensure that the image of one line is always There are n red, blue or green pixel maximum values Hq(x). 如申請專利範圍第3項所述之影像校正方法,其中所述步驟(6),重複步驟(3)和(4),掃描器掃描第k條線的影像的第x個紅光、藍光或綠光像素值可以用WH_TMPi(x)表示,其中,i為從0開始逐漸遞增的正整數,且i<2+m+n,k表示掃描第k條線的影像,k、m和n是由設置單元進行設置的,並且在數據流程控制單元中重複進行如下運算:SUM(x)=SUM(x)+WH_TMPi(x);使用WH_TMPi(x)進行不斷更新每一條線的影像的紅光、藍光或綠光像素最小值Lp(x)來確保每一條線的影像始終保持有m個紅光、藍光或綠光像素最小值Lp(x);使用WH_TMPi(x)進行不斷更新每一條線的影像的紅光、藍光或綠光像素最大值Hq(x)來確保每一條線的影像始終保持有n個紅光、藍光或綠光像素最大值Hq(x),重複步驟(5),直到所設定要掃入的影像已足夠。The image correction method according to claim 3, wherein in the step (6), the steps (3) and (4) are repeated, and the scanner scans the xth red light, the blue light or the image of the kth line. The green pixel value can be represented by WH_TMPi(x), where i is a positive integer that gradually increases from 0, and i<2 k +m+n, k represents the image of the kth line, k, m, and n are set by The unit is set, and the following operations are repeated in the data flow control unit: SUM(x)=SUM(x)+WH_TMPi(x); use WH_TMPi(x) to continuously update the red, blue or blue of each line image The green pixel minimum value Lp(x) ensures that the image of each line always has m red, blue or green pixel minimum values Lp(x); use WH_TMPi(x) to continuously update the image of each line. Red, blue or green pixel maximum Hq(x) to ensure that each line of image always has n red lights Blue or green pixel maximum Hq (x), repeating steps (5), until the image to be scanned in the set is sufficient. 如申請專利範圍第4項所述之影像校正方法,其中步驟(7)所執行在數據流程控制單元中設定的程序為:The image correction method according to claim 4, wherein the program set in the data flow control unit executed by the step (7) is: . 如申請專利範圍第1項所述之影像校正方法,其中所述先進先出數據緩存器、數據流程控制單元及數據分類單元可以集成於一特殊應用集成電路(Application Specific Integrated Circuit,ASIC)。The image correction method of claim 1, wherein the FIFO data buffer, the data flow control unit, and the data classification unit are integrated in an Application Specific Integrated Circuit (ASIC).
TW101139570A 2012-10-25 2012-10-25 Image correction method TWI510051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101139570A TWI510051B (en) 2012-10-25 2012-10-25 Image correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101139570A TWI510051B (en) 2012-10-25 2012-10-25 Image correction method

Publications (2)

Publication Number Publication Date
TW201417562A true TW201417562A (en) 2014-05-01
TWI510051B TWI510051B (en) 2015-11-21

Family

ID=51294007

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101139570A TWI510051B (en) 2012-10-25 2012-10-25 Image correction method

Country Status (1)

Country Link
TW (1) TWI510051B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI589148B (en) * 2016-09-14 2017-06-21 東友科技股份有限公司 Scanner capable of executing static compensation and compensation value adjustment method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5335082A (en) * 1992-04-10 1994-08-02 Opton Corporation Method and apparatus for using monochrome images to form a color image
WO2007062679A1 (en) * 2005-11-29 2007-06-07 Ocè-Technologies B.V. Scanner and method of scanning
JP2007306078A (en) * 2006-05-09 2007-11-22 Toshiba Corp Image reading apparatus and image reading method
JP5180551B2 (en) * 2007-09-27 2013-04-10 キヤノン株式会社 Printing apparatus and control method thereof, and color processing apparatus and method thereof
TWI405144B (en) * 2008-01-14 2013-08-11 Magic Pixel Inc Image correcting method, image correcting unit and image capture apparatus using the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI589148B (en) * 2016-09-14 2017-06-21 東友科技股份有限公司 Scanner capable of executing static compensation and compensation value adjustment method thereof
US9871931B1 (en) 2016-09-14 2018-01-16 Teco Image Systems Co., Ltd. Scanner capable of executing static calibration and compensation value adjustment method therefor

Also Published As

Publication number Publication date
TWI510051B (en) 2015-11-21

Similar Documents

Publication Publication Date Title
US10531019B2 (en) Image processing method and apparatus, and electronic device
JP5493438B2 (en) Projector and projected image correction program
US10438321B2 (en) Image processing method and apparatus, and electronic device
US10382675B2 (en) Image processing method and apparatus, and electronic device including a simulation true-color image
US10249021B2 (en) Image processing method and apparatus, and electronic device
US10165205B2 (en) Image processing method and apparatus, and electronic device
US20180150937A1 (en) Image processing method and apparatus, and electronic device
US10290079B2 (en) Image processing method and apparatus, and electronic device
US20180150936A1 (en) Image Processing Method And Apparatus, And Electronic Device
CN105430360B (en) imaging method, image sensor, imaging device and electronic device
CN106133820B (en) Display device and viewfinder device
JP3939855B2 (en) Double-sided original reading method and apparatus
CN1591464A (en) System and method of compensating noise in image information
TWI510051B (en) Image correction method
CN1496096A (en) image reading device
US8462400B2 (en) Image-reading apparatus, image-reading method and program
JP5496310B1 (en) Image correction method
JP5063503B2 (en) Imaging apparatus and control method thereof
JP6467830B2 (en) Imaging apparatus, imaging method, and program
CN103856682A (en) Image correction method
JP5262700B2 (en) Image reading apparatus control circuit, image reading apparatus, image reading apparatus control method, and program for functioning as image reading apparatus control circuit
JP2011041039A (en) Imaging apparatus and program
JP5585121B2 (en) Image reading device
JP6515469B2 (en) Imaging device, imaging method and program
CN114786295B (en) Method, device, lamp, electronic device and medium for adjusting lamp brightness

Legal Events

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