CN115375590A - Image processing method for online compensation of brightness nonuniformity - Google Patents

Image processing method for online compensation of brightness nonuniformity Download PDF

Info

Publication number
CN115375590A
CN115375590A CN202211326022.8A CN202211326022A CN115375590A CN 115375590 A CN115375590 A CN 115375590A CN 202211326022 A CN202211326022 A CN 202211326022A CN 115375590 A CN115375590 A CN 115375590A
Authority
CN
China
Prior art keywords
pixel
compensation
image
brightness
imaging
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.)
Granted
Application number
CN202211326022.8A
Other languages
Chinese (zh)
Other versions
CN115375590B (en
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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202211326022.8A priority Critical patent/CN115375590B/en
Publication of CN115375590A publication Critical patent/CN115375590A/en
Application granted granted Critical
Publication of CN115375590B publication Critical patent/CN115375590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an image processing method for online compensation of brightness nonuniformity. The method combines the characteristics of a machine vision defect detection scene, extracts imaging brightness information of non-uniform illumination on a non-defect area on the surface of a workpiece in an adjacent area through a sequence image, refers to a correction step of optical response non-uniformity, sets a uniform illumination brightness expected value, obtains a compensation gain parameter of the non-uniform illumination in the area, and realizes online compensation of brightness non-uniformity. The method avoids the situation that other regions on the surface of the workpiece are over-compensated or under-compensated due to the fact that the compensation gain is calculated by using a single field-of-view region in the brightness non-uniformity off-line compensation method, and avoids the problems that image detail characteristics are distorted and cannot be adapted to the edge image of the workpiece and the like due to on-line image processing algorithms such as FFT filtering and the like.

Description

Image processing method for online compensation of brightness nonuniformity
Technical Field
The invention relates to the field of machine vision defect detection, in particular to an image processing method for brightness non-uniformity online compensation.
Background
At present, the demands of the manufacturing industry for improving the production efficiency and the product quality are continuously increased, and with the popularization of image algorithms and the rapid reduction of computational cost, a machine vision method for realizing product quality detection and production process optimization based on image information is widely applied in the industry. The machine vision system mainly comprises four components of a light source, a lens, an imaging camera and computing hardware, and each component can be of different types according to different application scenes, such as parameters of the shape, the color and the coaxiality of the light source, parameters of the visual field, the caliber and the telecentricity of the lens, parameters of the camera such as pixel resolution, linear array or area array, parameters of the computing hardware such as system architecture and real-time performance.
The detection capability of the machine vision system can meet the requirement, and the premise is that low-noise and low-distortion image information can be obtained. The photo-electric signal response function of each imaging pixel of the camera can be expressed asy=K*x+BWhereinxIs the intensity of the light signal received at the surface of the pixel,yfor a corresponding output voltage amplitude of the pixel,Kcorresponding to the gain value in the photoelectric conversion element,Bcorresponding to the offset value in the photoelectric conversion element. Ideally, the photo-electric signal response function of each pixel is identical; in the actual situationGain of different pixelsKBias value ofBDue to gain and noise fluctuations of peripheral circuits such as CMOS fabrication processes, ADCs, etc., they are not completely consistent. Therefore, when a camera manufacturer leaves a factory and performs imaging by matching with a whole set of optical system, corresponding pre-acquisition and correction work is necessary. Conventionally employed correction operations include correction of Dark Signal Non-Uniformity (DSNU) and Photo Response Non-Uniformity (PRNU) for an optical system. The dark signal non-uniformity correction step is carried out under the condition of total black (x=0) Obtaining the fluctuation of the pixel response level value and carrying out bias compensation; the step of correcting the non-uniformity of the photoresponse is to perform under completely uniform illumination conditions (between pixels)xEqual) to obtain the fluctuation of the pixel response level value and perform gain compensation.
The above-described correction procedure has been able to meet most industrial inspection requirements, provided that the illumination brightness is uniform or image noise due to illumination non-uniformity is negligible over the field of view. However, when the illuminance of light is not uniform in the field of view and the detection accuracy is directly affected by image noise caused by the illuminance non-uniformity, the above-described correction step cannot meet the final measurement requirement, and a correction step for the illuminance non-uniformity needs to be supplemented.
Intensity of light signal received by pixel surface in response function of photoelectric signal of camera pixelxCan be decomposed intox=I*rWhereinIThe illumination brightness corresponding to the pixel position,rthe surface reflectivity parameter of the workpiece corresponding to the pixel position is adopted, so that the conventional step of correcting the illumination brightness nonuniformity can refer to the method for correcting the photoresponse nonuniformity, obtain the fluctuation of the pixel response level value under the actual nonuniform illumination brightness condition, and carry out the operationK*IAnd (4) compensation of the total gain parameter.
As shown in FIG. 1, the above-mentioned step of correcting the non-uniformity of the illumination brightness is implemented independently before the start of the detection, and is an off-line compensation method, and a set of fixed compensation methods is adopted in the whole detection processK*IThe total gain compensation parameter, therefore, the illumination brightness nonuniformity in the whole detection link is required to be always kept consistent,otherwise, an over-or under-compensated condition may result.
However, in an actual working scene of the machine vision system, the nonuniformity of the illumination brightness can change along with the change of the stability of the light source, the detection of the imaging distance and other conditions. For example, in most precision detection and measurement systems, in order to obtain higher spatial resolution, a confocal optical system with a small field of view and a shallow depth of field is often used, and in the detection process, the imaging distance of a workpiece changes to cause obvious change of the imaging brightness of the surface of the workpiece, so that a clear detection image cannot be obtained.
In order to obtain a clear detection image, the imaging distance of the workpiece can be made constant by the focal height control, so that the non-uniformity distribution of the light source at a specific position also remains constant. If the focusing height of the workpiece surface cannot be automatically controlled, an online compensation mode for the illumination brightness nonuniformity is needed. As shown in fig. 3, according to the characteristic form of the illumination brightness nonuniformity represented in the image, an algorithm proposes a corresponding characteristic extraction algorithm and filters such characteristics from the image, for example, the light source nonuniformity presents strip-shaped characteristics in the line camera image, and the shadows and stripes in the image are removed by FFT filtering. The method has the disadvantages that the frequency spectrum leakage caused by frequency domain processing can cause the edge of partial detail features to be fuzzy, the FFT filtering processing can only be performed on rectangular image areas, when the edge outline area of a workpiece is imaged, shadow and stripe features exist in the surface area of the workpiece in the image, the non-workpiece surface area is a pure black background, and the FFT filtering method cannot process the images.
Therefore, it is a technical problem to be solved by those skilled in the art to provide an image processing method for online compensation of brightness non-uniformity.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention discloses an image processing method for online compensation of brightness nonuniformity.
The technical scheme adopted by the invention comprises the following steps:
step 1: correcting dark signal nonuniformity and photoresponse nonuniformity of an imaging camera by a machine vision detection system;
in the step 1:
the photoelectric signal response function of each imaging pixel of the imaging camera is expressed as follows:
y ij =K ij *I ij *r ij +B ij
wherein the content of the first and second substances,i,jis a pixel coordinate;K ij the gain value of each pixel of the camera in a factory state;B ij the offset value of each pixel of the camera in a factory state;I ij the illumination brightness corresponding to each pixel position;r ij an imaging surface reflectivity corresponding to each pixel location;y ij outputting voltage amplitude values corresponding to the pixels, namely pixel values;
after the correction work of the dark signal nonuniformity and the photoresponse nonuniformity, the response function of the photoelectric signal becomes:
y ij = K ij *K' ij * I ij *r ij + B ij +B' ij
make it possible toK ij *K' ij The value of the water-soluble polymer is a constant value, B ij +B' ij after a zero value, the photoelectric signal response function is simplified as follows:
y ij =G * I ij * r ij
wherein, the first and the second end of the pipe are connected with each other,G= K ij * K' ij K' ij to compensate for gain;B' ij to compensate for the offset.
And 2, step:
2.1 Placing a workpiece to be detected in a detection area of a machine vision detection system, turning on an illumination light source of the system, and imaging the detection area by an imaging camera;
2.2 Moving the workpiece to be detected for a small distance, and continuously imaging the detection area at the same position by the imaging camera; or the workpiece to be detected can be not moved, and imaging is carried out for multiple times at the position where the workpiece to be detected has no defects.
The micro distance is the distance of one pixel;
2.3 Repeating step 2.2) to obtain a plurality (more than fifty) image files;
in the step 2: the photoelectric signal response function corresponding to the image file obtained by each imaging is as follows:
Figure 368797DEST_PATH_IMAGE001
wherein the content of the first and second substances,nindicating the corresponding number of the image.
In specific implementation, the linear array camera sequentially moves the workpiece to be detected along the vertical direction of the pixel arrangement of the linear array camera, and image sequences of the linear array camera obtained after each movement are spliced to obtain a surface image of the workpiece, wherein the surface image is an image which is not subjected to brightness non-uniformity compensation operation.
In the step 2: the total distance of movement of the workpiece to be inspected is more than ten times the largest typical dimension of all defect features.
In the step 2: the workpiece to be inspected has a uniform dielectric surface.
And 3, step 3: the imaging positions of the images obtained in the step 2 are adjacent or overlapped, the nonuniformity of the light source can be considered to be consistent in the images, the pixel values of the same pixel position in each image in the step 2 are taken to form a sequence, and the median or average of the pixel value sequence is obtained to be used as the pixel value of the current pixel position under the condition that the surface of the workpiece is not defectiveY ij
In the step 3: because the imaging positions of the images acquired in the step 2 are adjacent or overlapped, the light source in the images is not usedUniformity is considered to be consistent, i.e.:
Figure 830740DEST_PATH_IMAGE002
therefore, the photoelectric signal response function corresponding to the image obtained by imaging in step 2 is:
Figure 238719DEST_PATH_IMAGE003
and 4, step 4: traversing all pixel positions in each image according to the step 3 to obtain pixel values corresponding to all the pixel positions;
in the step 4:
obtaining the pixel values of all the pixel positions under the condition that the surface of the workpiece is not defective according to the step 3Y ij
Since the workpiece is a uniform medium surface, the reflectance of the imaging surface corresponding to each pixel position is considered to be uniform, that is:r 00 =r 01 =r 10 =⋯r pq =rp,qthe number of pixels of the camera in two directions respectively; so that the pixel values of all pixel positionsY ij Illumination intensity corresponding to pixel positionI ij The proportional relation is as follows:Y ij =G*I ij *r
and 5: setting a uniform brightness value for a pixelMDividing the set pixel uniform brightness value by the pixel value corresponding to each pixel position to obtain the final corresponding compensation gain of each pixel;
in the step 5:
setting a uniform brightness value of a pixel for uniformizing the brightness of the uneven light sourceMThen the compensation gain corresponding to each pixelC ij By dividing the uniform luminance value of the pixel by the pixel value corresponding to each pixel position, i.e.C ij =M/Y ij
In the imageiPixel value of each pixel after compensation
Figure 345608DEST_PATH_IMAGE005
Comprises the following steps:
Figure 155432DEST_PATH_IMAGE007
wherein the content of the first and second substances,C ij * Y ij =Mis constant, thereforeC ij *I ij Is also constant, thereby realizing non-uniformity of light illumination in the regionI ij Compensation of (2).
Step 6: and (5) arranging the compensation gains corresponding to the pixels obtained in the step (5) in sequence to obtain a compensation gain table, and using the compensation gain table for gain compensation of the image in the current detection area, thereby realizing compensation of illumination brightness nonuniformity in the current detection area.
And 7: and after entering other detection areas, recalculating according to the steps 1 to 6 to realize the online compensation effect of the brightness nonuniformity.
The invention has the following beneficial effects:
the method avoids the situation that other regions on the surface of the workpiece are over-compensated or under-compensated due to the fact that the compensation gain is calculated by using a single field-of-view region in the luminance non-uniformity off-line compensation method, and avoids the problems that image detail characteristics are distorted and cannot be adapted to the edge image of the workpiece and the like due to on-line image processing algorithms such as FFT filtering and the like.
The method combines the characteristics of a machine vision defect detection scene, extracts imaging brightness information of non-uniform illumination on a non-defect area on the surface of a workpiece in an adjacent area through a sequence image, refers to a correction step of optical response non-uniformity, sets a uniform illumination brightness expected value, obtains a compensation gain parameter of the non-uniform illumination in the area, and realizes online compensation of brightness non-uniformity.
Drawings
FIG. 1 is a flow chart of off-line compensation of luminance non-uniformity;
FIG. 2 is a schematic flow chart of online compensation of luminance non-uniformity;
FIG. 3 is a schematic flow chart of FFT filtered image processing;
FIG. 4 is a schematic diagram of an image processing flow for online compensation of luminance non-uniformity;
fig. 5 is an original image obtained by using the line camera in example 1 without the luminance nonuniformity compensation operation;
fig. 6 is an image obtained by performing an FFT filtering image processing algorithm on an original image obtained by using the line camera in embodiment 1;
fig. 7 is an image of an original image obtained by using the line camera in embodiment 1 after an online brightness non-uniformity compensation operation;
fig. 8 is an image of an original image obtained by using the line camera in embodiment 1, which has undergone an off-line compensation operation for brightness non-uniformity;
fig. 9 is an image obtained by performing the FFT filtering image processing algorithm again after the luminance non-uniformity off-line compensation operation by using the line camera in embodiment 1;
fig. 10 is an image obtained by performing the online compensation operation again after the brightness non-uniformity offline compensation operation is performed on the line camera in embodiment 1;
FIG. 11 is an original image including the edge profile of the workpiece obtained by the line camera in example 1;
fig. 12 is an image obtained by subjecting an original image including an edge profile of a workpiece obtained by using a line camera to an FFT filtered image processing algorithm in embodiment 1;
FIG. 13 is an image of an original image including an edge profile of a workpiece obtained by using a line camera in example 1, which is subjected to an online brightness non-uniformity compensation operation;
FIG. 14 is a comparison of a uniform fringe image processed using an FFT filter and the method of the invention, respectively; fig. 14 (a) is a uniform stripe image; fig. 14 (b) shows the FFT frequency domain distribution of the image; fig. 14 (c) shows an FFT vertical stripe filter; fig. 14 (d) is an FFT-filtered image; FIG. 14 (e) is a diagram of processing an image according to the method of the present invention;
FIG. 15 is a comparison of a uniform fringe image with edges processed using an FFT filter and the method of the invention, respectively; fig. 15 (a) is a band edge uniform stripe image; fig. 15 (b) shows an FFT frequency domain distribution of the image; fig. 15 (c) is an FFT vertical stripe filter; fig. 15 (d) is an FFT-filtered image; fig. 15 (e) is a diagram of processing an image by the method of the present invention.
Detailed Description
The following will describe an image processing method for online compensation of brightness non-uniformity according to the present invention in further detail.
The present invention will now be described in more detail with reference to the accompanying drawings, in which preferred embodiments of the invention are shown, it being understood that one skilled in the art may modify the invention herein described while still achieving the advantageous effects of the invention. Accordingly, the following description should be construed as broadly as possible to those skilled in the art and not as limiting the invention.
In the interest of clarity, not all features of an actual implementation are described. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. It will of course be appreciated that in the development of any such actual embodiment, numerous implementation-specific details must be set forth in order to achieve the developer's specific goals, such as compliance with system-related and business-related constraints, which will vary from one implementation to another. Moreover, it will be appreciated that such a development effort might be complex and time-consuming, but would nevertheless be a routine undertaking for those of ordinary skill in the art.
In order to make the objects and features of the present invention more comprehensible, embodiments of the present invention are described in detail below with reference to the accompanying drawings. It is to be noted that the drawings are in a very simplified form and are each provided with a non-precise ratio for the purpose of facilitating and clearly facilitating the description of the embodiments of the present invention.
Example 1:
as shown in fig. 2 and fig. 4, the present embodiment will be described with respect to an online luminance nonuniformity compensation image algorithm performed by a line camera as an imaging camera.
And (1) correcting dark signal nonuniformity and photoresponse nonuniformity of an imaging camera by a machine vision detection system.
The photoelectric signal response function of each imaging pixel of the line camera can be expressed as follows:
y i =K i *I i *r i +B i
wherein the content of the first and second substances,iis the linear array camera pixel coordinate;K i the gain value of each pixel of the camera in a factory state;B i the offset value of each pixel of the camera in a factory state;I i the illumination brightness corresponding to each pixel position;r i an imaging surface reflectivity corresponding to each pixel location;y i the corresponding output voltage amplitude of the pixel is the pixel value.
Further, after the correction of the dark signal non-uniformity and the photo-response non-uniformity in the step (1), the photo-electric signal response function becomesy i = K i *K' i * I i *r i + B i +B' i K' i In order to compensate for the gain of the gain,B' i to compensate for the offset;
so thatK i *K' i The value of the water-soluble polymer is a constant value,B i +B' i zero value, so that the photoelectric signal response function can be simplified toy i =G * I i * r i WhereinG= K i * K' i
And (2) placing the workpiece to be detected in a detection area of a machine vision detection system, turning on an illumination light source of the system, and imaging the detection area by a camera at the current position. The workpiece to be inspected moves a minute distance (distance of one pixel), and the camera performs imaging at the current position. Repeating the operation to finally obtain more than a certain number (for example, fifty) image files;
further, the step (2) performs multiple imaging on the adjacent area of the workpiece to be detected, and the obtained photoelectric signal response function corresponding to the image file is
Figure 522698DEST_PATH_IMAGE009
In whichnCorresponding to the image number.
In this embodiment, the workpiece is moved at a fixed interval along the direction perpendicular to the pixel arrangement direction of the line camera, and the image of the surface of the workpiece, which is an image without brightness non-uniformity compensation operation, can be obtained after the obtained image sequences of the line camera are spliced. In fig. 5, the horizontal direction is the pixel arrangement direction of the line camera, and the vertical direction is the moving direction of the line camera.
As shown in fig. 5, it can be observed that the illumination brightness non-uniformity is uniform at a specific pixel position, and therefore, the bright and dark stripe feature caused by the illumination brightness non-uniformity in the stitched image can be seen.
Step (3) the imaging positions of the images are adjacent or overlapped, the nonuniformity of the light source can be considered to be consistent in the images, and therefore the images need to be processed: taking pixel values of the same pixel coordinate position in each image to form a sequence, and obtaining the median or average of the sequence as the light source brightness corresponding to the pixel position of the point;
further, in the case where the image forming positions are adjacent or coincide, it can be considered that the nonuniformity of the light source is kept uniform in these images, that is
Figure 152393DEST_PATH_IMAGE010
Thus, it is possible to
Figure 735078DEST_PATH_IMAGE011
. The surface of a workpiece in a machine vision defect detection system is always a uniform medium surface, the defect detection is to identify and classify the quantity and the types of the defects existing sparsely on the surface, and the minimum feature size of the defects on the surface of the workpiece and the pixels of a cameraThe spatial resolution is comparable, and the defect feature size is generally much smaller than the camera imaging field of view, such as the defect detection scenario for workpieces such as flat panel display glass, semiconductor wafers, cell phone backplanes, and the like. And (4) performing the step (3) to obtain the median or average of the pixel sequence, filtering out the defect information in the image, and obtaining the brightness information of the current pixel position under the condition of no defect on the surface of the workpiece. For the present embodiment, the pixel value sequence of each column of pixels in fig. 5, which has not been subjected to the brightness non-uniformity compensation operation, is taken as the median, so as to obtain the pixel value under the condition that the workpiece surface is not defectiveY i
Traversing all pixel positions according to the step 3 to obtain pixel brightness values corresponding to all the pixel positions;
further, the step (4) is carried out to obtain the pixel values of all the pixel positions under the condition that the surface of the workpiece is not defectiveY i The workpiece is a uniform medium surface, and it can be considered thatr 0 =r 1 =⋯ r p =rpThe number of pixels of the line camera. So that the pixel values of all pixel positions at this timeY i Brightness of illumination directly corresponding to pixel positionI i The proportion relation is that,Y i =G*I i *r
setting a pixel uniform brightness value for homogenizing the non-uniform light source brightness, and dividing the homogenized brightness value by the pixel value corresponding to each pixel position to obtain the final compensation gain corresponding to each pixel;
further, the step (5) is performed to set a desired uniform luminance value of the pixelMThen the compensation gain corresponding to each pixel is the uniform luminance value divided by the luminance value corresponding to each pixel position, i.e. the compensation gain corresponding to each pixel positionC i =M/Y i To finally obtain theiPixel value of each pixel after compensationY' i =C i *Y i =C i *G*I i *rC i * Y i =MIs constant, thereforeC i *I i Also constant, thereby realizing non-uniformity of light illumination in the regionI i Compensation of (2). Fig. 7 is an image after the above-described luminance non-uniformity on-line compensation operation.
And (6) arranging the compensation gains corresponding to the pixels obtained in the step in sequence to obtain a compensation gain table, and using the compensation gain table for gain compensation of the current detection area image.
And (7) after entering other areas, recalculating according to the steps to realize the online compensation effect of brightness nonuniformity.
The image processing method for the online compensation of the brightness nonuniformity can also process the under-compensated or over-compensated image obtained by an offline compensation algorithm, thereby improving the image quality. Fig. 8 is an image of an obtained original image after being subjected to an offline compensation operation for brightness non-uniformity, and it can be seen that due to variation in illumination non-uniformity in a non-offline compensation area, the situation of under-compensation or over-compensation can be caused by using a compensation gain in an offline compensation area, which is specifically represented as that a part of streak features still exist in the image, and as shown in fig. 10, it can be seen that the streak features can be effectively filtered out without causing distortion of other image information in the image after the image is secondarily compensated by the online compensation algorithm.
Fig. 6 and 9 are processing results of removing vertical stripes and shadows in the images by using FFT filtering on fig. 5 and 8, respectively, and it can be seen that there is some blurring distortion at the edge of the detail feature while the stripes are removed. Fig. 12 and fig. 13 are result diagrams of processing the image including the edge of the workpiece in fig. 11 by using the above FFT filtering method and the method of the present invention, respectively, and it can be seen that the processing result of the FFT filtering in the vicinity of the edge and the original image have large distortion, but the method of the present invention uses a feature value in a pixel value sequence, and can check the influence of the region outside the edge of the workpiece on the algorithm by setting an image mask, so that an accurate image with stripes removed can be obtained. Fig. 14 and 15 are graphs comparing FFT filters and processing of the method of the present invention for the uniform fringe image generated by the simulation and the uniform fringe image with edges, respectively. The uniform stripe image with step change of brightness can be seen, a brighter horizontal central line can be observed in the FFT frequency domain to represent the characteristic of horizontal distribution in the image, and the principle of the FFT vertical stripe filter is to set the value corresponding to the horizontal central line in the frequency domain to zero, so as to eliminate the horizontal distribution characteristic, namely the vertical stripe, of the corresponding spatial domain. As shown in fig. 14, the FFT filter and the method of the present invention can remove the streak feature for a uniform streak image. For the uniform stripe image with edge in fig. 15, the frequency domain information of the edge region will appear in the frequency domain distribution after FFT transformation, and the horizontal center line corresponding to the vertical stripe will generate cross coupling, and the adoption of the way of zeroing the value corresponding to the horizontal center line will cause serious distortion in the image processing of the outer region of the edge of the workpiece and the adjacent region of the edge of the surface of the workpiece.
Example 2:
the present embodiment will be described with respect to an area-array camera as an imaging camera for performing an image algorithm for online compensation of luminance nonuniformity.
And (1) finishing the correction work of dark signal nonuniformity and photoresponse nonuniformity of a machine vision detection system.
The photoelectric signal response function of each imaging pixel of the camera can be expressed asy ij =K ij *I ij *r ij +B ij In whichi, jIs a coordinate of a pixel, and is,K ij the gain value of each pixel of the camera in a factory state,B ij as an offset value of each pixel of the camera in a factory state,I ij for the illumination intensity corresponding to each pixel position,r ij the imaging surface reflectivity for each pixel location,y ij the corresponding output voltage amplitude for the pixel.
Further, the step (1) performs dark signal non-uniformity and light responseAfter the correction of the non-uniformity, the response function of the photoelectric signal becomesy ij = K ij *K' ij * I ij *r ij + B ij +B' ij So thatK ij *K' ij The value of the water-soluble polymer is a constant value, B ij +B' ij zero value, so that the photoelectric signal response function can be simplified toy ij =G * I ij * r ij WhereinG= K ij * K' ij
And (2) placing the workpiece to be detected in a detection area of a machine vision detection system, turning on an illumination light source of the system, and imaging the current position by a camera. And moving the workpiece to be detected for a small distance, and imaging at the current position by the camera. Repeating the operation to finally obtain more than a certain number (for example, fifty) image files;
further, the step (2) is to perform multiple times of imaging on the adjacent area of the workpiece to be detected, and the obtained photoelectric signal response function corresponding to the image file is as follows
Figure 868250DEST_PATH_IMAGE012
In whichnCorresponding to the image number.
In step (3), the imaging positions of the images are adjacent, and the nonuniformity of the light source can be considered to be consistent in the images, so the images need to be processed: taking pixel values of the same pixel coordinate position in each image to form a sequence, and obtaining the median or average of the sequence as the light source brightness corresponding to the pixel position of the point;
further, in the case where the image forming positions are adjacent, it can be considered that the nonuniformity of the light source is kept uniform in these images, that is
Figure 406416DEST_PATH_IMAGE013
Thus, therefore, it is
Figure 523408DEST_PATH_IMAGE014
. The surface of a workpiece in a machine vision defect detection system is often a uniform medium surface, the defect detection is to identify and classify the number and the types of the defects existing sparsely on the surface, the minimum feature of the defects on the surface of the workpiece is equivalent to the pixel spatial resolution of a camera, and the feature size of the defects is generally far smaller than the imaging view field of the camera, such as the defect detection scene of the workpieces of flat panel display glass, semiconductor wafers, mobile phone back plates and the like. And (4) performing the step (3) to obtain the median or average of the pixel sequence, filtering out the defect information in the image, and obtaining the brightness information of the current pixel position under the condition of no defect on the surface of the workpiece.
Traversing all pixel positions to obtain light source brightness values corresponding to all the pixel positions;
further, the step (4) is carried out to obtain the brightness information of all the pixel positions under the condition that the surface of the workpiece is not defectiveY ij The workpiece is a uniform medium surface, and it can be considered thatr 00 =r 01 =r 10 =⋯r pq =rp,qThe number of pixels in the two directions of the camera, respectively. So that the brightness information of all pixel positions at this timeY ij Will directly correspond to the illumination brightness of the corresponding pixel positionI ij The proportion relation is that,Y ij =G*I ij *r
setting a pixel background brightness value which is expected to homogenize the uneven light source brightness, and dividing the homogenized brightness value by the pixel value corresponding to each pixel position to obtain the final compensation gain corresponding to each pixel;
further, the step (5) is performed to set a desired uniform luminance value of the pixelMThen the compensation gain corresponding to each pixel is the uniform luminance value divided by the luminance value corresponding to each pixel position, i.e. the compensation gain corresponding to each pixel positionC ij =M/Y ij To finally obtain
Figure 921502DEST_PATH_IMAGE016
C ij * Y ij =MIs constant, thereforeC ij *I ij Also constant, thereby realizing non-uniformity of light illumination in the regionI ij Compensation of (2).
And (6) arranging the compensation gains corresponding to the pixels obtained in the step in sequence to obtain a compensation gain table, and using the compensation gain table for gain compensation of the current detection area image.
And (7) after entering other areas, recalculating according to the steps to realize the online compensation effect of the brightness nonuniformity.

Claims (9)

1. An image processing method for online compensation of brightness non-uniformity is characterized by comprising the following steps:
step 1: correcting dark signal nonuniformity and photoresponse nonuniformity of an imaging camera by a machine vision detection system;
step 2: imaging the detection area by an imaging camera to obtain a plurality of image files;
and step 3: taking the pixel values of the same pixel position in each image in the step 2 to form a sequence, and solving the median or average of the pixel value sequence as the pixel value of the current pixel position under the condition of no defect on the surface of the workpieceY ij
And 4, step 4: traversing all pixel positions in each image according to the step 3 to obtain pixel values corresponding to all the pixel positions;
and 5: setting a uniform brightness value for a pixelMDividing the set pixel uniform brightness value by the pixel value corresponding to each pixel position to obtain the final corresponding compensation gain of each pixel;
step 6: arranging the compensation gains corresponding to each pixel obtained in the step (5) in sequence to obtain a compensation gain table, and using the compensation gain table for gain compensation of the image in the current detection area so as to realize compensation of illumination brightness nonuniformity in the current detection area;
and 7: and (4) after entering other detection areas, recalculating according to the steps 1 to 6 to realize the online compensation effect of the brightness nonuniformity.
2. The image processing method for on-line brightness non-uniformity compensation according to claim 1, wherein in step 1:
the photoelectric signal response function of each imaging pixel of the imaging camera is expressed as follows:
y ij =K ij *I ij *r ij +B ij
wherein the content of the first and second substances,i,jis a pixel coordinate;K ij the gain value of each pixel of the camera in a factory state;B ij the offset value of each pixel of the camera in a factory state;I ij the illumination brightness corresponding to each pixel position;r ij an imaging surface reflectivity corresponding to each pixel location;y ij outputting voltage amplitude values corresponding to the pixels, namely pixel values;
after the correction work of the dark signal nonuniformity and the photoresponse nonuniformity, the response function of the photoelectric signal becomes:
y ij = K ij *K' ij * I ij *r ij + B ij +B' ij
make it possible toK ij *K' ij Is a constant value, and is characterized in that, B ij +B' ij after the value is zero, the photoelectric signal response function is simplified as follows:
y ij =G * I ij * r ij
wherein the content of the first and second substances,G= K ij * K' ij K' ij to compensate for gain;B' ij to compensate for the offset.
3. The image processing method for online luminance nonuniformity compensation according to claim 1, wherein the step 2 specifically comprises:
2.1 Placing a workpiece to be inspected in an inspection area of a machine vision inspection system, turning on an illumination light source of the system, and imaging the inspection area by an imaging camera;
2.2 Moving the workpiece to be detected for a small distance, and continuously imaging the detection area at the same position by the imaging camera;
2.3 ) repeat step 2.2) to obtain a plurality of image files.
4. The image processing method for on-line brightness non-uniformity compensation according to claim 3, wherein in the step 2: the photoelectric signal response function corresponding to the image file obtained by each imaging is as follows:
Figure 500DEST_PATH_IMAGE001
wherein the content of the first and second substances,nindicating the corresponding number of the image.
5. The image processing method for on-line brightness non-uniformity compensation according to claim 3, wherein in the step 2: the total distance of movement of the workpiece to be inspected is more than ten times the largest typical dimension of all defect features.
6. The image processing method for on-line brightness non-uniformity compensation according to claim 3, wherein in the step 2: the workpiece to be inspected has a uniform dielectric surface.
7. The image processing method for on-line brightness non-uniformity compensation according to claim 1, wherein in step 3: regarding the nonuniformity of the light source in the image acquired in step 2 as uniform, that is:
Figure 589744DEST_PATH_IMAGE002
the photoelectric signal response function corresponding to the image obtained by imaging in step 2 is:
Figure 274541DEST_PATH_IMAGE003
8. the image processing method for on-line brightness non-uniformity compensation according to claim 1, wherein in the step 4:
obtaining the pixel values of all the pixel positions under the condition that the surface of the workpiece is not defective according to the step 3Y ij
The imaging surface reflectivity for each pixel location is considered to be uniform, i.e.:r 00 =r 01 =r 10 =⋯r pq =rp,qthe number of pixels of the camera in two directions respectively; so that the pixel values of all pixel positionsY ij Illumination intensity corresponding to pixel positionI ij The proportional relation is formed:Y ij =G*I ij *r
9. the image processing method for on-line brightness non-uniformity compensation according to claim 1, wherein in the step 5:
setting the uniform brightness value of the pixel for uniformizing the brightness of the non-uniform light sourceMThen the compensation gain corresponding to each pixelC ij Dividing the pixel uniform luminance value by each pixelPosition-corresponding pixel values, i.e.C ij =M/Y ij
In the imageiPixel value of each pixel after compensation
Figure 328472DEST_PATH_IMAGE005
Comprises the following steps:
Figure DEST_PATH_IMAGE007
wherein the content of the first and second substances,C ij * Y ij =Mis constant, thereforeC ij *I ij Is also constant, thereby realizing non-uniformity of light illumination in the regionI ij Compensation of (2).
CN202211326022.8A 2022-10-27 2022-10-27 Image processing method for online compensation of brightness nonuniformity Active CN115375590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211326022.8A CN115375590B (en) 2022-10-27 2022-10-27 Image processing method for online compensation of brightness nonuniformity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211326022.8A CN115375590B (en) 2022-10-27 2022-10-27 Image processing method for online compensation of brightness nonuniformity

Publications (2)

Publication Number Publication Date
CN115375590A true CN115375590A (en) 2022-11-22
CN115375590B CN115375590B (en) 2023-04-07

Family

ID=84073677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211326022.8A Active CN115375590B (en) 2022-10-27 2022-10-27 Image processing method for online compensation of brightness nonuniformity

Country Status (1)

Country Link
CN (1) CN115375590B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060016648A (en) * 2004-08-18 2006-02-22 엠텍비젼 주식회사 Method and apparatus for compensating image sensor lens shading
CN101340523A (en) * 2008-08-14 2009-01-07 北京中星微电子有限公司 Method and apparatus for exposure compensating digital image
AU2008230061A1 (en) * 2008-10-23 2010-05-13 Canon Kabushiki Kaisha Lighting change correction
JP2010124362A (en) * 2008-11-21 2010-06-03 Nikon Corp Imaging apparatus and image correction program
CN102508144A (en) * 2011-10-26 2012-06-20 西安电子科技大学 Method for measuring dark signal non-uniformity and photon response non-uniformity of photons of CCD (charge coupled device) chip
CN102855610A (en) * 2012-08-03 2013-01-02 南京理工大学 Method for correcting infrared image heterogeneity by using parameter correctness factor
CN102938137A (en) * 2012-10-25 2013-02-20 苏州有色金属研究院有限公司 Dynamic non-uniformity correction method for linear scanned image based on image sequence analysis
CN105466566A (en) * 2015-12-05 2016-04-06 中国航空工业集团公司洛阳电光设备研究所 An infrared nonuniformity correction real time compensation method
CN105869129A (en) * 2015-12-01 2016-08-17 中国科学院上海技术物理研究所 Residual heterogeneous noise elimination method for aiming at thermal infrared image after heterogeneous correction
CN107255521A (en) * 2017-06-28 2017-10-17 华中科技大学鄂州工业技术研究院 A kind of Infrared Image Non-uniformity Correction method and system
CN109872286A (en) * 2019-01-22 2019-06-11 西安电子科技大学 A kind of low power consumption multi-channel heterogeneity method for correcting image and system based on FPGA
CN110033414A (en) * 2019-03-18 2019-07-19 华中科技大学 A kind of Infrared Image Non-uniformity Correction method and system based on equalization processing
CN112330568A (en) * 2020-11-27 2021-02-05 云南省烟草农业科学研究院 Brightness compensation method for tobacco leaf image with uneven illumination
CN112950657A (en) * 2021-03-29 2021-06-11 合肥京东方显示技术有限公司 Gamma value correction method, gamma value correction device, electronic device, and readable storage medium
CN113450270A (en) * 2021-05-26 2021-09-28 浙江大华技术股份有限公司 Correction parameter generation method, electronic device, and storage medium
CN114079735A (en) * 2020-08-19 2022-02-22 瑞昱半导体股份有限公司 Image compensation system for fixed image noise
CN114331873A (en) * 2021-12-07 2022-04-12 南京邮电大学 Non-uniform illumination color image correction method based on region division
CN114627011A (en) * 2022-03-08 2022-06-14 云南师范大学 Infrared sequence image noise reduction method with improved combination of bilateral filtering and multi-frame averaging

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060016648A (en) * 2004-08-18 2006-02-22 엠텍비젼 주식회사 Method and apparatus for compensating image sensor lens shading
CN101340523A (en) * 2008-08-14 2009-01-07 北京中星微电子有限公司 Method and apparatus for exposure compensating digital image
AU2008230061A1 (en) * 2008-10-23 2010-05-13 Canon Kabushiki Kaisha Lighting change correction
JP2010124362A (en) * 2008-11-21 2010-06-03 Nikon Corp Imaging apparatus and image correction program
CN102508144A (en) * 2011-10-26 2012-06-20 西安电子科技大学 Method for measuring dark signal non-uniformity and photon response non-uniformity of photons of CCD (charge coupled device) chip
CN102855610A (en) * 2012-08-03 2013-01-02 南京理工大学 Method for correcting infrared image heterogeneity by using parameter correctness factor
CN102938137A (en) * 2012-10-25 2013-02-20 苏州有色金属研究院有限公司 Dynamic non-uniformity correction method for linear scanned image based on image sequence analysis
CN105869129A (en) * 2015-12-01 2016-08-17 中国科学院上海技术物理研究所 Residual heterogeneous noise elimination method for aiming at thermal infrared image after heterogeneous correction
CN105466566A (en) * 2015-12-05 2016-04-06 中国航空工业集团公司洛阳电光设备研究所 An infrared nonuniformity correction real time compensation method
CN107255521A (en) * 2017-06-28 2017-10-17 华中科技大学鄂州工业技术研究院 A kind of Infrared Image Non-uniformity Correction method and system
CN109872286A (en) * 2019-01-22 2019-06-11 西安电子科技大学 A kind of low power consumption multi-channel heterogeneity method for correcting image and system based on FPGA
CN110033414A (en) * 2019-03-18 2019-07-19 华中科技大学 A kind of Infrared Image Non-uniformity Correction method and system based on equalization processing
CN114079735A (en) * 2020-08-19 2022-02-22 瑞昱半导体股份有限公司 Image compensation system for fixed image noise
CN112330568A (en) * 2020-11-27 2021-02-05 云南省烟草农业科学研究院 Brightness compensation method for tobacco leaf image with uneven illumination
CN112950657A (en) * 2021-03-29 2021-06-11 合肥京东方显示技术有限公司 Gamma value correction method, gamma value correction device, electronic device, and readable storage medium
CN113450270A (en) * 2021-05-26 2021-09-28 浙江大华技术股份有限公司 Correction parameter generation method, electronic device, and storage medium
CN114331873A (en) * 2021-12-07 2022-04-12 南京邮电大学 Non-uniform illumination color image correction method based on region division
CN114627011A (en) * 2022-03-08 2022-06-14 云南师范大学 Infrared sequence image noise reduction method with improved combination of bilateral filtering and multi-frame averaging

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
NILANJAN DEY: "Uneven illumination correction of digital images: A survey of the state-of-the-art", 《OPTIK》 *
张明明: "水下成像校正技术研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
李苏宁: "基于微透镜阵列光场成像的不确定性分析及三维火焰重构", 《中国博士学位论文全文数据库 基础科学辑》 *

Also Published As

Publication number Publication date
CN115375590B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN108088845B (en) Imaging correction method and device based on weak information retention
US5040228A (en) Method and apparatus for automatically focusing an image-acquisition device
JP6615172B2 (en) Systems, devices and methods for quality assessment of OLED stack films
CN110455815B (en) Method and system for detecting appearance defects of electronic components
KR100809346B1 (en) Apparatus and method for correcting edge
TW201706910A (en) Inspection device and substrate processing apparatus
JP2008506174A (en) Method, system, program module and computer program product for restoration of color components in an image model
US8045788B2 (en) Product setup sharing for multiple inspection systems
CN108986170B (en) Linear array camera flat field correction method suitable for field working conditions
JP5702404B2 (en) Optical web-based defect detection using in-sensor uniformity correction
CN112583999B (en) Method for detecting lens dirt of camera module
WO2004074822A1 (en) Method, device and software for the optical inspection of a semi-conductor substrate
CN110060625B (en) LED display screen acquisition vignetting compensation method
CN115375590B (en) Image processing method for online compensation of brightness nonuniformity
CN108508022B (en) Multi-camera splicing imaging detection method
CN108489989B (en) Photovoltaic module double-sided appearance detector based on multi-camera splicing imaging detection
JP4244046B2 (en) Image processing method and image processing apparatus
CN116342435B (en) Distortion correction method for line scanning camera, computing equipment and storage medium
JP2005140655A (en) Method of detecting stain flaw, and stain flaw detector
JP6864738B2 (en) Defocus detection method
CN114354491A (en) DCB ceramic substrate defect detection method based on machine vision
Edwards et al. NextGen calibration utility for tool setup and matching in real-time automated visual inspection systems
CN112017207A (en) Optical filter counting method and counting device
CN110930380A (en) Defect observation machine and image analysis compensation method thereof
JP4893938B2 (en) Defect inspection 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
GR01 Patent grant
GR01 Patent grant