[go: up one dir, main page]

CN113129230A - Image color cast correction method and system of CIS scanner - Google Patents

Image color cast correction method and system of CIS scanner Download PDF

Info

Publication number
CN113129230A
CN113129230A CN202110348110.7A CN202110348110A CN113129230A CN 113129230 A CN113129230 A CN 113129230A CN 202110348110 A CN202110348110 A CN 202110348110A CN 113129230 A CN113129230 A CN 113129230A
Authority
CN
China
Prior art keywords
rgb
image
value
mean value
calculating
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110348110.7A
Other languages
Chinese (zh)
Inventor
刘勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Huagao Information Technology Co ltd
Original Assignee
Ningbo Huagao Information Technology 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 Ningbo Huagao Information Technology Co ltd filed Critical Ningbo Huagao Information Technology Co ltd
Priority to CN202110348110.7A priority Critical patent/CN113129230A/en
Publication of CN113129230A publication Critical patent/CN113129230A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06CDIGITAL COMPUTERS IN WHICH ALL THE COMPUTATION IS EFFECTED MECHANICALLY
    • G06C3/00Arrangements for table look-up, e.g. menstruation table
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention belongs to the technical field of image processing, and provides an image color cast correction method of a CIS scanner, which comprises the following steps: a1, scanning by a CIS scanner to obtain an image; a2, calculating the mean value of each component of RGB three colors in the image according to the acquired image; a3, calculating the RGB mean value of the image according to the mean value of each component of RGB three colors; a4, judging whether the RGB mean values are balanced; and A5, if the absolute value of the difference value between the RGB mean value and the preset mean value is larger than a preset value, performing color cast correction on the scanned image according to a preset check value table. The invention also provides an image color cast correction system of the CIS scanner, and the image color cast correction system has the advantages that the color cast image is output after the chromaticity is adjusted by adjusting the RGB value of the color cast image through the preset check value table, so that the image color cast problem during scanning of the CIS scanner is solved, and the use experience of a user is improved.

Description

Image color cast correction method and system of CIS scanner
Technical Field
The invention relates to the technical field of image processing, in particular to an image color cast correction method and system of a CIS scanner.
Background
The scanner is the third computer input equipment behind mouse and keyboard, and can convert the image into digital format capable of being displayed, edited, stored and output by computer.
The CIS scanner is used for converting optical signals into electric signals after sensing reflected light irradiated to a scanned original from a scanned internal light source, and then converting the electric signals into digital signals by an AD conversion circuit on a scanner mainboard and transmitting the digital signals to a computer to complete the whole scanning process.
However, in the actual scanning process, the scanned image often has color cast due to the problem of the scanning light source or the angle.
Disclosure of Invention
The invention aims to provide an image color cast correction method of a CIS scanner, which is used for solving the problem of color cast of a scanned image.
In order to achieve the purpose, the invention adopts the technical scheme that:
an image color cast correction method of a CIS scanner includes the steps of:
a1, scanning by a CIS scanner to obtain an image;
a2, calculating the mean value of each component of RGB three colors in the image according to the acquired image;
a3, calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
a4, judging whether the RGB mean values are balanced;
and A5, if the absolute value of the difference value between the RGB mean value and the preset mean value is larger than a preset value, performing color cast correction on the scanned image according to a preset check value table.
Further, the step of obtaining the preset difference table includes:
s1, scanning the standard gray scale color-scale paper by a CIS scanner to obtain an image with each gray scale strip block;
and S2, generating a value searching table of RGB three colors according to a preset algorithm for the image with each gray-scale strip block.
Further, before step S1, the method further includes the steps of:
and S0, performing flat field correction on the CIS scanner.
Further, step S2 specifically includes:
s21, calculating the average value of each RGB three-color component of each gray-scale strip block according to the image of each gray-scale strip block;
s22, calculating the RGB mean value of each gray scale block according to the mean value of each component of RGB three colors;
and S23, generating an RGB three-color check value table by fitting a preset function according to the RGB mean value of each gray-scale strip block.
Further, the specific step of generating the look-up table of three RGB colors through the preset function in step S23 includes:
s231, fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
s232, calculating target values corresponding to component values of RGB three colors according to the function formula and rounding;
and S233, generating a table of looking up values of RGB three colors according to the target value after the rounding.
An object of the present invention is also to provide an image color cast correction system of a CIS scanner, including:
the image acquisition module is used for scanning and acquiring an image through a CIS scanner;
the RGB component mean value calculating module is used for calculating the mean value of each component of RGB three colors in the image according to the acquired image;
the image mean value calculating module is used for calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
the balance judging module is used for judging whether the RGB mean value is balanced or not;
and the color cast correction module is used for performing color cast correction on the scanned and acquired image according to a preset lookup table.
Further, the color cast correction module comprises:
the image scanning unit scans the standard gray scale color level paper through a CIS scanner to obtain an image with each gray scale strip block;
and the check value table generating unit is used for generating the RGB three-color check value table for the image with each gray scale strip block according to a preset algorithm.
Further, the method also comprises the following steps:
and the flat field correction unit is used for carrying out flat field correction on the CIS scanner.
Further, the lookup table generating unit includes:
the gray scale block component mean value calculating unit is used for calculating the mean value of each RGB three-color component of each gray scale block according to the image of each gray scale block;
the gray scale block mean value calculating unit is used for calculating the RGB mean value of each gray scale block according to the mean value of each RGB three-color component;
and the preset function generating unit is used for generating an RGB three-color check table through preset function fitting according to the RGB mean value of each gray scale strip block.
Further, the preset function generating unit includes:
the preset function fitting subunit is used for fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
the component object value calculating operator unit is used for calculating the object values corresponding to the component values of the RGB three colors according to the function formula and rounding;
and the check value table generating subunit is used for generating a check value table of three colors of RGB according to the rounded target value.
Compared with the prior art, the invention at least comprises the following beneficial effects:
(1) for the color cast image scanned by the scanner, the invention adjusts the RGB value of the color cast image through the preset check value table, and then outputs the color cast image after adjusting the chromaticity, thereby solving the problem of image color cast when the CIS scanner scans and improving the use experience of users;
(2) the lookup table is generated in a function fitting mode, color cast correction is carried out on the image, the fitting correlation degree is high, and a good effect is achieved.
Drawings
FIG. 1 is a flowchart illustrating an image color cast correction method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for obtaining a table of default differences according to an embodiment of the present invention;
FIG. 3 is a flowchart of step S2 according to an embodiment of the present invention;
FIG. 4 is a flowchart of step S23 according to an embodiment of the present invention;
fig. 5 is a schematic diagram of the general architecture of the second embodiment of the present invention.
Detailed Description
The following are specific embodiments of the present invention, and the technical solutions of the present invention will be further described with reference to the drawings, but the present invention is not limited to these embodiments.
Example one
As shown in fig. 1, an image color cast correction method of a CIS scanner according to the present invention includes the steps of:
a1, scanning by a CIS scanner to obtain an image;
a2, calculating the mean value of each component of RGB three colors in the image according to the acquired image;
a3, calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
a4, judging whether the RGB mean values are balanced;
and A5, if the absolute value of the difference value between the RGB mean value and the preset mean value is larger than a preset value, performing color cast correction on the scanned image according to a preset check value table.
After the obtained image is subjected to balanced judgment, whether the image needs to be subjected to color cast correction is determined, but due to the problems of equipment, light sources and the like, most of scanned images have color cast conditions, so that the image needs to be subjected to color cast correction.
As shown in fig. 2, the step of obtaining the preset difference table includes:
s0, performing flat field correction on the CIS scanner;
s1, scanning the standard gray scale color-scale paper by a CIS scanner to obtain an image with each gray scale strip block;
and S2, generating a value searching table of RGB three colors according to a preset algorithm for the image with each gray-scale strip block.
As shown in fig. 3, step S2 specifically includes:
s21, calculating the average value of each RGB three-color component of each gray-scale strip block according to the image of each gray-scale strip block;
s22, calculating the RGB mean value of each gray scale block according to the mean value of each component of RGB three colors;
the formula is as follows:
Figure BDA0003001416470000051
wherein,
Figure BDA0003001416470000052
is the RGB mean of the ith gray-scale block,
Figure BDA0003001416470000053
is the average of the R components in the ith gray scale block,
Figure BDA0003001416470000054
is the average of the G components in the ith gray scale block,
Figure BDA0003001416470000055
is the average of the B components in the ith gray scale block.
And S23, generating an RGB three-color check value table by fitting a preset function according to the RGB mean value of each gray-scale strip block.
As shown in fig. 4, the specific step of generating the lookup table of three RGB colors by the preset function in step S23 includes:
s231, fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
the preset function formula may include a power function, a polynomial function, and the like, and taking the power function as an example, the formula to be fitted by the power function is:
Figure BDA0003001416470000061
Figure BDA0003001416470000062
Figure BDA0003001416470000063
wherein, Fm() Is a preset function formula with the formula of Fm(x)=a×xbAnd m is the RGB three-color component name.
And fitting the RGB mean value and each component mean value of RGB three colors to obtain coefficients a and b, and further obtaining a function formula.
S232, calculating target values corresponding to component values of RGB three colors according to the function formula and rounding;
and S233, generating a table of looking up values of RGB three colors according to the target value after the rounding.
And calculating new corresponding component values of 0-255 values in each component of RGB through the function, and further generating a corresponding lookup table.
For example, assuming that the CIS line width is 6000 pixels and each pixel has a bit depth of 8 bits, the R, G, B value of each pixel point can be 0-255, after flat field correction, the R component is taken as a column, the ith pixel point, the value of 0-255 in the lookup table, and then the power function F is performedR() And fitting operation is carried out to obtain a new value-checking table, and the subsequently scanned image is processed by using the new value-checking table.
The invention adjusts the RGB value of the color cast image through the preset check table, then outputs the color cast image after adjusting the chromaticity, solves the problem of image color cast when the CIS scanner scans, improves the use experience of users, generates the check table through the power function fitting mode, corrects the color cast of the image, has high fitting correlation degree, and achieves good effect.
Example two
As shown in fig. 5, an image color cast correction system of a CIS scanner includes:
the image acquisition module is used for scanning and acquiring an image through a CIS scanner;
the RGB component mean value calculating module is used for calculating the mean value of each component of RGB three colors in the image according to the acquired image;
the image mean value calculating module is used for calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
the balance judging module is used for judging whether the RGB mean value is balanced or not;
and the color cast correction module is used for performing color cast correction on the scanned and acquired image according to a preset lookup table.
Wherein, the color cast correction module includes:
a flat field correction unit for performing flat field correction on the CIS scanner;
the image scanning unit scans the standard gray scale color level paper through a CIS scanner to obtain an image with each gray scale strip block;
and the check value table generating unit is used for generating the RGB three-color check value table for the image with each gray scale strip block according to a preset algorithm.
Further, the lookup table generating unit includes:
the gray scale block component mean value calculating unit is used for calculating the mean value of each RGB three-color component of each gray scale block according to the image of each gray scale block;
the gray scale block mean value calculating unit is used for calculating the RGB mean value of each gray scale block according to the mean value of each RGB three-color component;
and the preset function generating unit is used for generating an RGB three-color check table through preset function fitting according to the RGB mean value of each gray scale strip block.
Further, the preset function generating unit includes:
the preset function fitting subunit is used for fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
the component object value calculating operator unit is used for calculating the object values corresponding to the component values of the RGB three colors according to the function formula and rounding;
and the check value table generating subunit is used for generating a check value table of three colors of RGB according to the rounded target value.
The invention adjusts the RGB value of the color cast image through the preset check table, performs chromaticity adjustment on the color cast image and then outputs the color cast image, solves the problem of image color cast when a CIS scanner scans and improves the use experience of users.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.

Claims (10)

1. An image color cast correction method of a CIS scanner, characterized by comprising the steps of:
a1, scanning by a CIS scanner to obtain an image;
a2, calculating the mean value of each component of RGB three colors in the image according to the acquired image;
a3, calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
a4, judging whether the RGB mean values are balanced;
and A5, if the absolute value of the difference value between the RGB mean value and the preset mean value is larger than a preset value, performing color cast correction on the scanned image according to a preset check value table.
2. The method of claim 1, wherein the step of obtaining the preset difference table comprises:
s1, scanning the standard gray scale color-scale paper by a CIS scanner to obtain an image with each gray scale strip block;
and S2, generating a value searching table of RGB three colors according to a preset algorithm for the image with each gray-scale strip block.
3. An image color cast correction method of CIS scanner according to claim 2, characterized by further comprising, before step S1, the steps of:
and S0, performing flat field correction on the CIS scanner.
4. An image color cast correction method for CIS scanner according to claim 2, characterized in that step S2 specifically includes:
s21, calculating the average value of each RGB three-color component of each gray-scale strip block according to the image of each gray-scale strip block;
s22, calculating the RGB mean value of each gray scale block according to the mean value of each component of RGB three colors;
and S23, generating an RGB three-color check value table by fitting a preset function according to the RGB mean value of each gray-scale strip block.
5. An image color cast correction method of CIS scanner according to claim 4 wherein the specific step of generating the look-up table of RGB three colors by the preset function in step S23 includes:
s231, fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
s232, calculating target values corresponding to component values of RGB three colors according to the function formula and rounding;
and S233, generating a table of looking up values of RGB three colors according to the target value after the rounding.
6. An image color cast correction system of a CIS scanner, comprising:
the image acquisition module is used for scanning and acquiring an image through a CIS scanner;
the RGB component mean value calculating module is used for calculating the mean value of each component of RGB three colors in the image according to the acquired image;
the image mean value calculating module is used for calculating the RGB mean value of the image according to the mean value of each component of RGB three colors;
the balance judging module is used for judging whether the RGB mean value is balanced or not;
and the color cast correction module is used for performing color cast correction on the scanned and acquired image according to a preset lookup table.
7. An image color cast correction system of CIS scanner according to claim 6, wherein the color cast correction module comprises:
the image scanning unit scans the standard gray scale color level paper through a CIS scanner to obtain an image with each gray scale strip block;
and the check value table generating unit is used for generating the RGB three-color check value table for the image with each gray scale strip block according to a preset algorithm.
8. An image color cast correction system of a CIS scanner according to claim 7, further comprising:
and the flat field correction unit is used for carrying out flat field correction on the CIS scanner.
9. An image color cast correction system of a CIS scanner according to claim 7, wherein the lookup table generating unit comprises:
the gray scale block component mean value calculating unit is used for calculating the mean value of each RGB three-color component of each gray scale block according to the image of each gray scale block;
the gray scale block mean value calculating unit is used for calculating the RGB mean value of each gray scale block according to the mean value of each RGB three-color component;
and the preset function generating unit is used for generating an RGB three-color check table through preset function fitting according to the RGB mean value of each gray scale strip block.
10. An image color cast correction system of a CIS scanner according to claim 7, wherein the preset function generating unit comprises:
the preset function fitting subunit is used for fitting the average value of each component of RGB three colors to the RGB average value through a preset function formula to obtain a function formula;
the component object value calculating operator unit is used for calculating the object values corresponding to the component values of the RGB three colors according to the function formula and rounding;
and the check value table generating subunit is used for generating a check value table of three colors of RGB according to the rounded target value.
CN202110348110.7A 2021-03-31 2021-03-31 Image color cast correction method and system of CIS scanner Pending CN113129230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110348110.7A CN113129230A (en) 2021-03-31 2021-03-31 Image color cast correction method and system of CIS scanner

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110348110.7A CN113129230A (en) 2021-03-31 2021-03-31 Image color cast correction method and system of CIS scanner

Publications (1)

Publication Number Publication Date
CN113129230A true CN113129230A (en) 2021-07-16

Family

ID=76775417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110348110.7A Pending CN113129230A (en) 2021-03-31 2021-03-31 Image color cast correction method and system of CIS scanner

Country Status (1)

Country Link
CN (1) CN113129230A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129674A (en) * 2010-12-17 2011-07-20 北京优纳科技有限公司 Self-adaptation color balance correction method for color image
CN102641109A (en) * 2011-07-08 2012-08-22 上海交通大学 Method for intelligently adjusting endoscope illuminance
CN104159001A (en) * 2014-07-09 2014-11-19 宁波摩视光电科技有限公司 Multi-point regional image correction method based on high-precision large-breadth scanner system
CN104754177A (en) * 2015-01-06 2015-07-01 电子科技大学 Chromatic aberration correction and bottom color filtering method of CIS large-breadth scanner
CN105187819A (en) * 2015-07-29 2015-12-23 合肥埃科光电科技有限公司 Color response testing and correcting device and method for industrial color cameras
CN109377531A (en) * 2018-09-29 2019-02-22 努比亚技术有限公司 Image color cast method of adjustment, device, mobile terminal and readable storage medium storing program for executing
CN111107330A (en) * 2019-12-05 2020-05-05 华侨大学 Color cast correction method for Lab space
CN111355941A (en) * 2020-04-01 2020-06-30 深圳市菲森科技有限公司 Image color real-time correction method, device and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129674A (en) * 2010-12-17 2011-07-20 北京优纳科技有限公司 Self-adaptation color balance correction method for color image
CN102641109A (en) * 2011-07-08 2012-08-22 上海交通大学 Method for intelligently adjusting endoscope illuminance
CN104159001A (en) * 2014-07-09 2014-11-19 宁波摩视光电科技有限公司 Multi-point regional image correction method based on high-precision large-breadth scanner system
CN104754177A (en) * 2015-01-06 2015-07-01 电子科技大学 Chromatic aberration correction and bottom color filtering method of CIS large-breadth scanner
CN105187819A (en) * 2015-07-29 2015-12-23 合肥埃科光电科技有限公司 Color response testing and correcting device and method for industrial color cameras
CN109377531A (en) * 2018-09-29 2019-02-22 努比亚技术有限公司 Image color cast method of adjustment, device, mobile terminal and readable storage medium storing program for executing
CN111107330A (en) * 2019-12-05 2020-05-05 华侨大学 Color cast correction method for Lab space
CN111355941A (en) * 2020-04-01 2020-06-30 深圳市菲森科技有限公司 Image color real-time correction method, device and system

Similar Documents

Publication Publication Date Title
US7227990B2 (en) Color image processing device and color image processing method
US7170645B2 (en) Method and apparatus for enhancing digital image quality
JP2012029276A (en) Image forming device, color adjustment method and color adjustment program
US6734899B1 (en) Method of establishing color correction functions
JP2004252620A (en) Image processing device and method, and program
JPH1169181A (en) Image processing unit
JP2001014448A (en) Color data conversion apparatus, color data conversion method, and computer-readable recording medium storing a program for causing a computer to execute the method
JP4957668B2 (en) Image processing device
JP3623673B2 (en) Color image recording apparatus and color image recording method
US8873108B2 (en) Image processing apparatus and image processing method
JPH1023279A (en) Image-processing unit
US9129423B2 (en) Image processing apparatus
JP2020088545A (en) Image forming apparatus, color proofing method, and color proofing program
JP2017157971A (en) Image processing apparatus, image processing method, and program
CN113129230A (en) Image color cast correction method and system of CIS scanner
FI107412B (en) Method and apparatus for maximizing visual quality of an image in electrical form
CN102340613B (en) Image processing apparatus and method for reducing gradation level of image
US20240135518A1 (en) Image processing for improving image quality
JPH10283470A (en) Image processor, image processing method and recording medium
JP2001285638A (en) Image processing method
CN100518234C (en) Negative film scanning processing method and device
CN100530218C (en) Method for adjusting image by means of correction data parameter
JP4027098B2 (en) Image processing apparatus and image processing method
JP2004336655A (en) Method and apparatus for luminance adjusting and image output apparatus
JP3121026B2 (en) Color image processing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination