CN104063851A - Industrial transparent film package test method based on Retinex - Google Patents

Industrial transparent film package test method based on Retinex Download PDF

Info

Publication number
CN104063851A
CN104063851A CN201410317695.6A CN201410317695A CN104063851A CN 104063851 A CN104063851 A CN 104063851A CN 201410317695 A CN201410317695 A CN 201410317695A CN 104063851 A CN104063851 A CN 104063851A
Authority
CN
China
Prior art keywords
image
overbar
log
enhanced
transparent film
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
CN201410317695.6A
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.)
Donghua University
Original Assignee
Donghua University
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 Donghua University filed Critical Donghua University
Priority to CN201410317695.6A priority Critical patent/CN104063851A/en
Publication of CN104063851A publication Critical patent/CN104063851A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to an industrial transparent film package test method based on Retinex. The industrial transparent film package test method is characterized by including the steps that (1), a shot industrial transparent film package image is enhanced preliminarily through a multi-scale Retinex algorithm; (2), enhancement coefficients are determined according to the image enhanced preliminarily; (3), the image enhanced preliminarily and a negative film of the image enhanced preliminarily are combined for processing, and the image is enhanced based on color constancy; (4), the enhanced image is converted into a saturation space, and threshold segmentation and breakage detection are carried out; (5), breakage is judged through a BP neural network. A new image processing algorithm is provided, the image enhanced preliminarily and the negative film of the image enhanced preliminarily are combined for processing, linear transformation is adopted for different brightness regions, and the brightness and the contrast ratio of characteristic regions of the image are enhanced; the industrial transparent film package test method has the advantages that operation time is short, and detection accuracy is high.

Description

A kind of industrial transparent film packaging detection method based on Retinex
Technical field
The present invention relates to a kind of method that whether occurs cavity, scratch, crackle etc. for detection of packaging, belong to industrial detection technical field.
Background technology
After the sixties the 3rd in 20th century, algebraically word computer came out, there is unprecedented development in digital image processing techniques, for the mankind have brought huge economic and social benefit, object the earliest of research digital image processing techniques is the image information of employing when improving people's alanysis and judge.The condition precedent of Digital Image Processing is that image is converted into digital form, then by specific target, uses specific operation to carry out " transformation " image.
Compared with traditional industrial detection, use Digital Image Processing to reduce cost, improve the accuracy detecting.Carry out in the process of industrial detection in the processing of utilization image, having related at present a series of algorithm proposes, wherein involve small echo variation, Retine x theory, these algorithms such as the figure image intensifying in HSI space can carry out figure image intensifying, but small echo delta data treatment capacity is large, long operational time, and be generally used for the processing of gray level image, Retine x algorithm is easily subject to the interference of noise, and cross-color easily appears in the figure image intensifying in HSI space.
In recent color image enhancement, main method comprises RGB image is transformed into HSI space, according to the heterogeneity of image saturation component and tone component, the method that the tone component based on saturation degree component and edge maintenance strengthens strengthens coloured image.
Summary of the invention
The object of this invention is to provide a kind of automatic testing method detects for the disrepair phenomenon occurring in packaging process.
In order to achieve the above object, technical scheme of the present invention provides a kind of industrial transparent film packaging detection method based on Retine x, it is characterized in that uses algorithm replaces traditional hardware, carries out transparent film packaging detection, and step is:
The first step, use multiple dimensioned Retine x algorithm to carry out image to the industrial transparent film packaging image photographing tentatively to strengthen, multiple dimensioned Retine x algorithmic notation is:
S ( x , y ) = R ( x , y ) × L ( x , y ) L ( x , y ) = S ( x , y ) * G ( x , y ) , In formula, L (x, y) represents incident light, is high-frequency signal; R (x, y) represents the reflectivity properties of object, is low frequency signal; L (x, y) is carried out to low-pass filtering, just obtain R (x, y); S (x, y) is the image that light that camera receives forms; G (x, y) represents Gaussian filter: G (x, y)=λ exp[-(x 2+ y 2)/σ 2], wherein, σ is scale parameter, and larger sharpening is more severe, and λ is normaliztion constant, and ∫ ∫ G (x, y) dxdy=1 is set up;
Image after second step, the preliminary enhancing of basis, determines and strengthens coefficient;
The 3rd step, by tentatively strengthen after image and its negative film in conjunction with processing, on the basis of color constancy, strengthen image, second step and the 3rd step comprise:
Step 1, on log-domain, have: log (S (x, y))=log (R (x, y))+log (G (x, y) × S (x, y)), has:
log R ( x , y ) = log S ( x , y ) - log [ G ( x , y ) × S ( x , y ) ] = Σ k = 1 K ω k { log S ( x , y ) - log [ G ( x , y ) × S ( x , y ) ] } , in formula, K is 3, ω kbe 1/3;
Step 2, R (x, y) is expressed as w represents the matrix identical with S (x, y) size, and the numerical value of matrix is 255; the negative film of presentation video; { B} represents each Color Channel to c ∈ for R, G;
Color in step 3, picture is by R, G, and the ratio between B determines, brightness is by R, G, B size determines, in order to remain on the basis of constant color, carries out the enhancing of image characteristic region, and negative film is carried out to linear transformation, has:
I c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ + λ 2 R 2 c ( x , y ) ‾ I 1 c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ I 2 c ( x , y ) ‾ = λ 2 R 2 c ( x , y ) ‾ , In formula, the brightness of negative film and R (x, y) are contrary, the bright area correspondence in R (x, y) in dark areas, will be divided into wherein, represent brightness in front 20% region, in negative film space the brightness of damaged area larger, increase the coefficient of its linear transformation, be conducive to strengthen its feature in saturation degree space;
Step 4, right respectively linear stretch is carried out in region, in order to strengthen negative film brightness, gets λ 1, λ 2for being greater than 1 numerical value;
Step 5, basis I ( x , y ) = R ( x , y ) - β 1 R 1 ( x , y ) ‾ - β 2 R 2 ( x , y ) ‾ Image I (x, y) after being enhanced, in formula, β 11-1, β 22-1;
The 4th step, image I (x, the y) sheet after strengthening is transformed into saturation degree space, Threshold segmentation, carries out breakage detection;
The 5th step, use neural BP neural network to carry out about damaged differentiation.
Preferably, in described step 4, λ 2=2 λ 1, in formula, R ' (x, y), S ' (x, y) is R (x, y), the gray level image after S (x, y) normalization.
The present invention is on the basis of Retine x algorithm, a kind of new image processing algorithm has been proposed, image after tentatively strengthening is combined and is processed with its negative film, different luminance areas are adopted to linear transformation, strengthened the brightness and contrast of image characteristic region, and it is short to have working time, the advantage that detection accuracy is high, applied to the damaged real-time detection of industry, there is feasibility.
Brief description of the drawings
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is the former figure taking;
Fig. 3 is the picture after Retine x strengthens;
Fig. 4 is the picture after the first step to the three step algorithms;
Fig. 5 is saturation degree spatial image.
Embodiment
For the present invention is become apparent, hereby with preferred embodiment, and coordinate accompanying drawing to be described in detail below.
In conjunction with Fig. 1, the invention provides a kind of industrial transparent film packaging detection method based on Retine x, the steps include:
The first step, use multiple dimensioned Retine x algorithm to carry out image to the industrial transparent film packaging image as shown in Figure 2 photographing tentatively to strengthen, as shown in Figure 3, multi-Scale Retinex Algorithm is expressed as the picture after Retine x strengthens:
S ( x , y ) = R ( x , y ) × L ( x , y ) L ( x , y ) = S ( x , y ) * G ( x , y ) , In formula, L (x, y) represents incident light, is high-frequency signal; R (x, y) represents the reflectivity properties of object, is low frequency signal; L (x, y) is carried out to low-pass filtering, just obtain R (x, y); S (x, y) is the image that light that camera receives forms; G (x, y) represents Gaussian filter: G (x, y)=λ exp[-(x 2+ y 2)/σ 2], wherein, σ is scale parameter, and larger sharpening is more severe, and λ is normaliztion constant, and ∫ ∫ G (x, y) dxdy=1 is set up.
Image rgb space, trivector [R, G, B] has not only comprised color, has also comprised brightness, if two pixel (R 1, G 1, B 1), (R 2, G 2, B 2) be proportional in the value of rgb space, these 2 have identical color, just brightness difference, and brightness gain is ε, so can adjust by adjusting ε the rgb value of pixel.Image after tentatively strengthening is combined and is processed with its negative film, different luminance areas are adopted to linear transformation, strengthened the brightness and contrast of image characteristic region, and retained the colouring information of image
Image after second step, the preliminary enhancing of basis, determines and strengthens coefficient;
The 3rd step, by tentatively strengthen after image and its negative film in conjunction with processing, on the basis of color constancy, strengthen image, second step and the 3rd step comprise:
Step 1, on log-domain, have: log (S (x, y))=log (R (x, y))+log (G (x, y) × S (x, y)), has:
log R ( x , y ) = Σ k = 1 K ω k { log S ( x , y ) - log [ G ( x , y ) × S ( x , y ) ] } , In formula, K=3, ω kbe 1/3;
Step 2, R (x, y) is expressed as R ( x , y ) = W - R c ( x , y ) ‾ c ∈ { r , g , b } , It is identical with S (x, y) size that W represents, value is 255 matrix; the negative film of presentation video; C represents each Color Channel;
Color in step 3, picture is by R, G, and the ratio between B determines, brightness is by R, G, the size of B determines, in order to remain on the basis of constant color, carries out the enhancing of image characteristic region, and negative film is carried out to linear transformation, has:
I c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ + λ 2 R 2 c ( x , y ) ‾ I 1 c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ I 2 c ( x , y ) ‾ = λ 2 R 2 c ( x , y ) ‾ c ∈ { r , g , b } , In formula, the brightness of negative film and R (x, y) are contrary, the bright area correspondence in R (x, y) in dark areas, will be divided into wherein, represent brightness in front 20% region, in negative film space the brightness of damaged area larger, increase the coefficient of its linear transformation, be conducive to strengthen its feature in saturation degree space;
Step 4, right respectively linear stretch is carried out in region, in order to strengthen negative film brightness, gets λ 1, λ 2for being greater than 1 numerical value, in the present embodiment:
in formula, R ' (x, y), S ' (x, y) is R (x, y), the gray level image after S (x, y) normalization;
Step 5, basis I c ( x , y ) = R c ( x , y ) - β 1 R 1 c ( x , y ) ‾ - β 2 R 2 c ( x , y ) ‾ Image I (x, y) after being enhanced, as shown in Figure 4, in formula, β 11-1, β 22-1;
The 4th step, image I (x, the y) sheet after strengthening is transformed into saturation degree space, the image obtaining as shown in Figure 5, to its Threshold segmentation, carries out breakage detection;
The 5th step, use neural BP neural network to carry out about damaged differentiation.

Claims (2)

1. the industrial transparent film packaging detection method based on Retine x, is characterized in that using algorithm herein to replace hardware, and the breakage of carrying out transparent film packaging detects, and step is:
The first step, use multiple dimensioned Retine x algorithm to carry out image to the industrial transparent film packaging image photographing tentatively to strengthen, multiple dimensioned Retine x algorithmic notation is:
S ( x , y ) = R ( x , y ) × L ( x , y ) L ( x , y ) = S ( x , y ) * G ( x , y ) , In formula, L (x, y) represents incident light, is high-frequency signal; R (x, y) represents the reflectivity properties of object, is low frequency signal; L (x, y) is carried out to low-pass filtering, just obtain R (x, y); S (x, y) is the image that light that camera receives forms; G (x, y) represents Gaussian filter: G (x, y)=λ exp[-(x 2+ y 2)/σ 2], wherein, σ is scale parameter, and larger sharpening is more severe, and λ is normaliztion constant, and ∫ ∫ G (x, y) dxdy=1 is set up;
Image after second step, the preliminary enhancing of basis, determines and strengthens coefficient;
The 3rd step, by tentatively strengthen after image and its negative film in conjunction with processing, on the basis of color constancy, strengthen image, second step and the 3rd step comprise:
Step 1, on log-domain, have: log (S (x, y))=log (R (x, y))+log (G (x, y) × S (x, y)), has:
log R ( x , y ) = Σ k = 1 K ω k { log S ( x , y ) - log [ G ( x , y ) × S ( x , y ) ] } , In formula, K is 3, ω kbe 1/3;
Step 2, R (x, y) is expressed as R ( x , y ) = W - R c ( x , y ) ‾ c ∈ { r , g , b } , W represents the matrix identical with S (x, y) size, and the numerical value of matrix is 255; the negative film of presentation video; C represents each Color Channel;
Color in step 3, picture is by R, G, and the ratio between B determines, brightness is by R, G, the size of B determines, in order to remain on the basis of constant color, carries out the enhancing of image characteristic region, and negative film is carried out to linear transformation, has:
I c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ + λ 2 R 2 c ( x , y ) ‾ I 1 c ( x , y ) ‾ = λ 1 R 1 c ( x , y ) ‾ I 2 c ( x , y ) ‾ = λ 2 R 2 c ( x , y ) ‾ c ∈ { r , g , b } , In formula, the brightness of negative film and R (x, y) are contrary, the bright area correspondence in R (x, y) in dark areas, will be divided into wherein, represent brightness in front 20% region, in negative film space the brightness of damaged area larger, increase the coefficient of its linear transformation, be conducive to strengthen its feature in saturation degree space;
Step 4, right respectively linear stretch is carried out in region, in order to strengthen negative film brightness, gets λ 1, λ 2for being greater than 1 numerical value;
Step 5, basis I c ( x , y ) = R c ( x , y ) - β 1 R 1 c ( x , y ) ‾ - β 2 R 2 c ( x , y ) ‾ C ∈ r, and g, the image I (x, y) after b} is enhanced, in formula, β 11-1, β 22-1;
The 4th step, image I (x, the y) sheet after strengthening is transformed into saturation degree space, Threshold segmentation, carries out breakage detection;
The 5th step, use neural BP neural network to carry out about damaged differentiation.
2. a kind of industrial transparent film packaging detection method based on Retine x as claimed in claim 1, is characterized in that, in described step 4, in formula, R ' (x, y), S ' (x, y) is R (x, y), the normalized gray level image of S (x, y).
CN201410317695.6A 2014-07-03 2014-07-03 Industrial transparent film package test method based on Retinex Pending CN104063851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410317695.6A CN104063851A (en) 2014-07-03 2014-07-03 Industrial transparent film package test method based on Retinex

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410317695.6A CN104063851A (en) 2014-07-03 2014-07-03 Industrial transparent film package test method based on Retinex

Publications (1)

Publication Number Publication Date
CN104063851A true CN104063851A (en) 2014-09-24

Family

ID=51551543

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410317695.6A Pending CN104063851A (en) 2014-07-03 2014-07-03 Industrial transparent film package test method based on Retinex

Country Status (1)

Country Link
CN (1) CN104063851A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574408A (en) * 2015-01-16 2015-04-29 东华大学 Industry transparent film package detecting method and device based on shape feature extraction
CN109557109A (en) * 2018-12-29 2019-04-02 中国肉类食品综合研究中心 Freeze the detection method and device of meat packed state
CN110232661A (en) * 2019-05-03 2019-09-13 天津大学 Low illumination colour-image reinforcing method based on Retinex and convolutional neural networks

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574408A (en) * 2015-01-16 2015-04-29 东华大学 Industry transparent film package detecting method and device based on shape feature extraction
CN109557109A (en) * 2018-12-29 2019-04-02 中国肉类食品综合研究中心 Freeze the detection method and device of meat packed state
CN109557109B (en) * 2018-12-29 2021-07-30 中国肉类食品综合研究中心 Method and device for detecting packaging state of frozen meat
CN110232661A (en) * 2019-05-03 2019-09-13 天津大学 Low illumination colour-image reinforcing method based on Retinex and convolutional neural networks
CN110232661B (en) * 2019-05-03 2023-01-06 天津大学 Low-illumination color image enhancement method based on Retinex and convolutional neural network

Similar Documents

Publication Publication Date Title
Wang et al. Adaptive image enhancement method for correcting low-illumination images
Wang et al. Simple low-light image enhancement based on Weber–Fechner law in logarithmic space
CN104240194B (en) A kind of enhancement algorithm for low-illumination image based on parabolic function
Gao et al. Sand-dust image restoration based on reversing the blue channel prior
CN104637067B (en) A kind of defect inspection method of grain surface
CN112132196B (en) Cigarette case defect identification method combining deep learning and image processing
CN107705268B (en) Improved Retinex and Welsh near-infrared image enhancement and colorization algorithm
CN115082427B (en) Aluminum material calendering process parameter control method based on artificial intelligence
CN104063851A (en) Industrial transparent film package test method based on Retinex
Gui et al. Adaptive single image dehazing method based on support vector machine
Román et al. Image color contrast enhancement using multiscale morphology
Li et al. Grain depot image dehazing via quadtree decomposition and convolutional neural networks
Al-Ameen Expeditious contrast enhancement for grayscale images using a new swift algorithm
CN115131336A (en) Dark line defect detection method under four-color background picture of display screen
CN112991236B (en) Image enhancement method and device based on template
CN107680068A (en) A kind of digital image enhancement method for considering image naturalness
CN114092441A (en) Product surface defect detection method and system based on dual neural network
Shao et al. An adaptive image contrast enhancement algorithm based on retinex
Li et al. A low-illuminance image enhancement method in YUV color space
Quach et al. Combining Contrast Limited Adaptive Histogram Equalization and Canny’s Algorithm for the Problem of Counting Seeds on Rice
CN112001850B (en) Optical cable detection image enhancement method based on image pyramid structure
Li et al. Image fast dehazing algorithm based on dark channel prior improvement
CN108133467A (en) Underwater picture enhancing system and Enhancement Method based on Granule Computing
Xie et al. Adaptive grayscale method based on weighted guided filtering
CN116645368B (en) Online visual detection method for edge curl of casting film

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140924

WD01 Invention patent application deemed withdrawn after publication