CN105046700B - Fruit surface defect detection method and system based on gamma correction and color classification - Google Patents

Fruit surface defect detection method and system based on gamma correction and color classification Download PDF

Info

Publication number
CN105046700B
CN105046700B CN201510401682.1A CN201510401682A CN105046700B CN 105046700 B CN105046700 B CN 105046700B CN 201510401682 A CN201510401682 A CN 201510401682A CN 105046700 B CN105046700 B CN 105046700B
Authority
CN
China
Prior art keywords
color
region
image
pixel
defects
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.)
Active
Application number
CN201510401682.1A
Other languages
Chinese (zh)
Other versions
CN105046700A (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.)
Beijing Research Center of Intelligent Equipment for Agriculture
Original Assignee
Beijing Research Center of Intelligent Equipment for Agriculture
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 Beijing Research Center of Intelligent Equipment for Agriculture filed Critical Beijing Research Center of Intelligent Equipment for Agriculture
Priority to CN201510401682.1A priority Critical patent/CN105046700B/en
Publication of CN105046700A publication Critical patent/CN105046700A/en
Application granted granted Critical
Publication of CN105046700B publication Critical patent/CN105046700B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a kind of fruit surface defect detection method and system based on gamma correction and color classification, this method includes:The R component image in the RGB image of fruit to be detected is extracted, gamma correction is carried out to R component image, makes the brightness uniformity of R component image;RGB image is subjected to HSI conversion, obtains the H values in HSI conversion corresponding to each pixel in RGB image, and H values are judged to the color of each pixel compared with the H values of pre-set color;According to the color of each pixel, predetermined threshold value corresponding with color is judged respectively, the defects of to be confirmed region is obtained in R component image after gamma correction, and by the gray value zero setting of the pixel in addition to the region except to be confirmed the defects of in R component image, by determine whether will be to be confirmed the defects of region in the gray value zero setting in carpopodium/calyx region that identifies, final the defects of obtaining fruit surface region, improves the degree of accuracy of detection fruit defects.

Description

Fruit surface defect detection method and system based on gamma correction and color classification
Technical field
The present invention relates to vegetable and fruit detection field, and in particular to a kind of fruit table based on gamma correction and color classification Planar defect detection method and system.
Background technology
China's fruit total output is occupied first of the world, and the yield of wherein apple and pears ranks first in the world.But current China fruit Export volume account for fruits output proportion it is relatively low, this is relatively backward mainly due to its postrharvest handling technology, by taking apple as an example, apple Fruit dealer only does rough classification to apple size, and is classified means and relies primarily on and be manually classified, and classification results are inadequate Accurately, while with the raising of labor cost, the cost of manual grading skill also can more and more higher.Using machine vision technique to apple Fruit is classified, and can not only reduce cost of labor, moreover it is possible to improve detection efficiency and accuracy of detection.At present, machine vision skill is utilized Art to fruit (such as:Apple) size and color detection comparative maturity, and being widely applied among actual production. But the on-line checking to apple surface defect is still a difficult point of fruit sorting field solution not yet in effect.
Apple surface defect can not one of on-line checking to be primarily due to apple be generally in spheroid or spheroid, The edge of apple, the reflection direction of light and the angle of camera are very big, according to the light reflection law of lambert, from camera direction See, the brightness of apple fringe region is relatively low, and it is relatively low to show as the gray value of fringe region in the Apple image of collection, and apple Surface defect, which is noteworthy characterized by it, generally has relatively low gray value, and which results in the fringe region of apple in Apple image All there is relatively low gray feature with surface defect areas so that by image processing techniques it is difficult to which the two is distinguished.Simultaneously Because carpopodium/calyx region of apple also shows as relatively low gray feature in the picture, this just further increases apple table The difficulty of planar defect detection, because apple surface is spherical bending curve, so as to cause Apple image intermediate region and side The uneven distribution of edge regional luminance, cause the surface defect information being difficult in accurate detection Apple image.Simultaneously because apple Peony area grayscale value in surface is relatively low, causes peony region easily by flase drop to be defect area.Therefore, it is existing not propose A kind of method for the degree of accuracy for how improving detection fruit defects.
The content of the invention
For in the prior art the defects of, the invention provides a kind of fruit surface based on gamma correction and color classification Defect inspection method and system, improve the degree of accuracy of detection fruit defects.
In a first aspect, the present invention provides a kind of fruit surface defect detection method based on gamma correction and color classification, Including:
The R component image in the RGB image of fruit to be detected is extracted, gamma correction is carried out to the R component image, makes institute State the brightness uniformity of R component image;
The RGB image is subjected to HSI conversion, obtained in the RGB image in each conversion of HSI corresponding to pixel H values, and the H values are judged to the color of each pixel compared with the H values of pre-set color;
In R component image after gamma correction, according to the color of each pixel in the RGB image respectively with the face Predetermined threshold value is judged corresponding to color, to obtain the defects of to be confirmed region in the R images after gamma correction;
The gray value of the pixel in addition to the region except described to be confirmed the defects of is put in R images after gamma correction Zero, and will be described to be confirmed the defects of region in carpopodium/calyx region gray value zero setting, the defects of to obtain fruit surface Region.
Optionally, the R component image in the RGB image of the extraction fruit to be detected, is carried out bright to the R component image Degree correction, make the brightness uniformity of the R component image, including:
Extract the R component image in the RGB image of fruit to be detected, by the R component image be divided into fringe region and Intermediate region;
The brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of the R component image.
Optionally, the color that the H values are judged to each pixel compared with the H values of pre-set color, Including:
Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<H values pair are represented at 360 ° Answer pixel to belong to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, then belong to 3rd color.
Optionally, each pixel corresponding in RGB image in the R component image according to after the gamma correction Predetermined threshold value corresponding with the color is judged color respectively, to be confirmed in the R component image after gamma correction to obtain The defects of region, including:
In R component image after gamma correction, if the pixel corresponding first color in RGB image, is utilized Preset first threshold value judges the defects of whether it is to be confirmed region compared with the pixel corresponding to first color, In R component image after gamma correction, if the pixel corresponding second color in RGB image, utilizes the second color pair The default Second Threshold answered judges the defects of whether it is to be confirmed region compared with the pixel, after gamma correction R component image in, if the pixel corresponding 3rd color in RGB image, using presetting the corresponding to the 3rd color Three threshold values judge the defects of whether it is to be confirmed region compared with the pixel.
Optionally, the gray value zero setting in carpopodium/calyx region in will be described to be confirmed the defects of region, to obtain The defects of fruit surface region, including:
The near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, is known Not and mark carpopodium/calyx region in the near-infrared image;
In R component image after the gamma correction, obtain with the infrared image in positioned at same position carpopodium/ Calyx region, and by the gray value zero setting in the carpopodium/calyx region, and then water is obtained in region described to be confirmed the defects of The defects of fruit surface region.
Second aspect, present invention also offers a kind of detected based on the fruit surface defect of gamma correction and color classification to be System, including:
Luminance correction module, the R component image in RGB image for extracting fruit to be detected, to the R component image Gamma correction is carried out, makes the brightness uniformity of the R component image;
Multilevel iudge module, for the RGB image to be carried out into HSI conversion, obtain each pixel in the RGB image H values in corresponding HSI conversion, and the H values are judged to the face of each pixel compared with the H values of pre-set color Color;
First acquisition module, in the R component image after gamma correction, according to each pixel in the RGB image Predetermined threshold value corresponding with the color is judged the color of point respectively, to be confirmed to obtain in the R images after gamma correction The defects of region;
Second acquisition module, by the picture in addition to the region except described to be confirmed the defects of in R component image after gamma correction The gray value zero setting of vegetarian refreshments, and will be described to be confirmed the defects of region in carpopodium/calyx region gray value zero setting, with obtain The defects of fruit surface region.
Optionally, the luminance correction module, is used for:
Extract the R component image in the RGB image of fruit to be detected, by the R component image be divided into fringe region and Intermediate region;
The brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of the R component image.
Optionally, the multilevel iudge module, is used for:
Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<H values pair are represented at 360 ° Answer pixel to belong to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, then belong to 3rd color.
Optionally, first acquisition module, is used for:
In R component image after gamma correction, if the pixel corresponding first color in RGB image, is utilized Preset first threshold value judges the defects of whether it is to be confirmed region compared with the pixel corresponding to first color, In R component image after gamma correction, if the pixel corresponding second color in RGB image, utilizes the second color pair The default Second Threshold answered judges the defects of whether it is to be confirmed region compared with the pixel, after gamma correction R component image in, if the pixel corresponding 3rd color in RGB image, using presetting the corresponding to the 3rd color Three threshold values judge the defects of whether it is to be confirmed region compared with the pixel.
Optionally, second acquisition module, is used for:
The near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, is known Not and mark carpopodium/calyx region in the near-infrared image;
In R component image after the gamma correction, obtain with the infrared image in positioned at same position carpopodium/ Calyx region, and by the gray value zero setting in the carpopodium/calyx region, and then water is obtained in region described to be confirmed the defects of The defects of fruit surface region.
As shown from the above technical solution, the present invention proposes a kind of fruit surface based on gamma correction and color classification and lacked Detection method and system are fallen into, the brightness irregularities Distribution Phenomena of apple surface is corrected using a kind of converse thought, and root Defect Segmentation threshold value is determined according to apple coat color feature, is verified by on-line checking, the calculating speed and detection essence of this method Degree meets the needs of on-line checking, has possessed applied to the condition in actual production, while also improves detection fruit defects The degree of accuracy.
Brief description of the drawings
Fig. 1 is the fruit surface defect detection method based on gamma correction and color classification that one embodiment of the invention provides Schematic flow sheet;
Fig. 2A and Fig. 2 B are the RGB image and near-infrared of the apple for double CCD cameras collection that one embodiment of the invention provides Image;
Fig. 3 is that the lattice structure light utilized in near-infrared image of one embodiment of the invention offer detects apple stem/flower The design sketch in calyx region;
Fig. 4 is the 3-D effect that 20 × 20 Apple images to be corrected that one embodiment of the invention provides correspond to correction function Figure;
Fig. 5 A and Fig. 5 B do not carry out gamma correction image segmentation figure for what one embodiment of the invention provided;
Segmentation effect figure after progress color classification after the gamma correction that Fig. 6 A and Fig. 6 B provide for one embodiment of the invention;
Fig. 7 is the fruit surface defect detecting system based on gamma correction and color classification that one embodiment of the invention provides Structural representation.
Embodiment
Below in conjunction with the accompanying drawings, the embodiment of invention is further described.Following examples are only used for more clear Illustrate to Chu technical scheme, and can not be limited the scope of the invention with this.
Fig. 1 shows being detected based on the fruit surface defect of gamma correction and color classification for one embodiment of the invention offer The schematic flow sheet of method, as shown in figure 1, this method comprises the following steps:
101st, the R component image in the RGB image of fruit to be detected is extracted, gamma correction is carried out to the R component image, Make the brightness uniformity of the R component image;
102nd, the RGB image is subjected to HSI conversion, obtains each conversion of HSI corresponding to pixel in the RGB image In H values, and the H values are judged to the color of each pixel compared with the H values of pre-set color;
103rd, after gamma correction in R component image, according to the color of each pixel in the RGB image respectively with this Predetermined threshold value is judged corresponding to color, to obtain the defects of to be confirmed region in the R component image after gamma correction;
104th, after gamma correction in R component image by the gray scale of the pixel in addition to the region except described to be confirmed the defects of Be worth zero setting, and will be described to be confirmed the defects of region in carpopodium/calyx region gray value zero setting, to obtain fruit surface Defect area.
The above method is corrected (also just logical using a kind of converse thought to the brightness irregularities Distribution Phenomena of apple surface Crossing reduces the brightness of intermediate region), and defect Segmentation threshold value is determined according to apple coat color feature, tested by on-line checking To demonstrate,prove, the calculating speed and accuracy of detection of this method meet the needs of on-line checking, have possessed applied to the condition in actual production, The degree of accuracy of detection fruit defects is also improved simultaneously.
With reference to specific embodiment, the above method is described in detail, it is necessary to which explanation is, in the present embodiment Illustrated with representational apples, but the present embodiment do not limit only to apple, a kind of this fruit defects is examined Survey, other fruit are also suitable.
The double CCD industrial cameras of visible/near infrared can gather near-infrared image and RGB image simultaneously, and its collection effect is such as Shown in Fig. 2A and Fig. 2 B.Pass through the analysis to apple surface lattice structure light hot spot in near-infrared image, it may be determined that apple figure The position in carpopodium/calyx region, its Detection results are as shown in Figure 3 as in.It is determined that in Apple image carpopodium/calyx region position Postpone, can be further determined that by the analysis to RGB image and whether there is defect area in image.
Apple is spherical fruit, and surface has larger Curvature varying.It is any one on sphere according to Lambertian reflection principle The brightness of point is directlyed proportional to the normal vector and the point to the cosine of the angle, θ between light source line.In the online assorting room of apple In, source symmetric is installed on above the side of apple, and fixed camera is in the surface of apple, therefore apple in the image that is obtained of camera Fruit surface each point luminance difference is mainly determined by angle theta.Because the angle of apple fringe region reflection light and normal vector is more than The angle of intermediate region, so the brightness of apple surface is shown as that intermediate region is brighter and fringe region is dark.Due in image The defects of region it is also dark, this results in edge normal region and middle part defect area in detection process and easily obscures and cause to miss Segmentation.
The thinking of generally correction apple surface brightness is to strengthen the fringe region that brightness value is relatively low in Apple image, realizes apple The brightness uniformity of all areas is consistent in fruit image.This research uses a kind of converse thought, that is, reduces the bright of image intermediate region Degree, so as to realize being uniformly distributed for whole brightness of image.The correction function is made to be:
Wherein C is constant, and a=width/2, b=height/2, width and height is respectively the width and height of image Degree, it is assumed that have 20 × 20 Apple image to be corrected, the 3-D view of its corresponding F (x, y) is as shown in Figure 4.
The R component image in RGB image is extracted as Apple image to be corrected, by by Apple image to be corrected with Correction function obtains correction chart picture after being multiplied, i.e.,:
I'R(x, y)=IR(x,y)×F(x,y) (2)
Wherein IR(x, y) represents image to be corrected in the gray value at (x, y) place, I'R(x, y) represents correction chart picture at (x, y) The gray value at place.
Detection method of the present invention comprises the following steps:
S1, the R component image in the RGB image of fruit to be detected is extracted, the R component image is divided into fringe region And intermediate region, the brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of view picture R component image.Fig. 5 A It is the design sketch that carries out image segmentation before and after gamma correction to R component image respectively with Fig. 5 B and Fig. 6 A and Fig. 6 B.
S2, RGB Apple images are subjected to HSI conversion, using the H values in HSI conversion corresponding to each pixel, judging should Pixel belongs to the first color (light red), in the second color (peony) and the 3rd color (other colors) these three situations Which kind of color.Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<Represented at 360 ° H value corresponding pixel points belong to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, Then belong to the 3rd color.In R component image after gamma correction, if the pixel corresponding first face in RGB image Color, the defects of whether it is to be confirmed is judged compared with the pixel using preset first threshold value corresponding to the first color Region, in the R component image after gamma correction, if the pixel corresponding second color in RGB image, utilizes second Second Threshold is preset corresponding to color the defects of whether it is to be confirmed region is judged compared with the pixel, in brightness In R component image after correction, if the pixel corresponding 3rd color in RGB image, using corresponding to the 3rd color Default 3rd threshold value judges the defects of whether it is to be confirmed region compared with the pixel.In actual applications, such as The color of fruit apple pericarp is in peony, then peony region may be mistaken for defect area.Therefore using multi thresholds Image partition method, i.e., for each pixel, the H values in its HSI conversion are calculated first, if 280 °≤H<360 °, table Whether it is peony to show the pixel, use first threshold T1 to judge it for normal fruit in the R component image after gamma correction Skin;If 0 °≤H≤20 °, it is light red to represent the pixel, Second Threshold T2 is used in R component image after gamma correction Judge whether it is normal pericarp, if H values are other numerical value, the 3rd threshold is used in the R component image after gamma correction Value T3 judges whether the pixel is normal pericarp.
S3, for three kinds of situations in S2, image segmentation is carried out using three different threshold values, is extracted grey in Apple image The relatively low area-of-interest of angle value, and the gray value of background is set to 0.
S4, the near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, Identify and mark carpopodium/calyx region in the near-infrared image;
In R component image after the gamma correction, obtain with the infrared image in positioned at same position carpopodium/ Calyx region, and by the gray value zero setting in the carpopodium/calyx region, and then water is obtained in region described to be confirmed the defects of The defects of fruit surface region.
Coding dot matrix structure light in apple near-infrared image, identify and mark carpopodium/calyx in Apple image Region, its effect are as shown in Figure 3.By above step, the relatively low defect to be confirmed of gray value in Apple image can be partitioned into Region, the defect area to be confirmed of acquisition may be defect area, it is also possible to be carpopodium/calyx region.
S5, due to identifying carpopodium/calyx region in Apple image by near-infrared coding dot matrix method of structured light Position, so carpopodium/calyx region is contrasted with the defect area to be confirmed being partitioned into, you can finally determine Apple image The presence or absence of middle surface defect., will be corresponding in RGB image according to the position in the carpopodium detected in near-infrared image/calyx region The gray value of the band of position is set to 0.If the pixel value in defect area to be confirmed is set to 0, what the region non-zero gray value represented Area can change, and then the region can be judged as carpopodium/calyx region and be excluded, and what area did not changed treats Confirm the defects of defect area is judged as apple surface region.
In order to further test the validity of this method, we are surveyed on the detection system to 110 Fuji apples Examination, the detection accuracy of proposition method of the present invention are up to 90.9%, and the Apple image for being about 200 × 200 for size carries out bright Degree correction, it is average time-consuming less than 1 millisecond.
Fig. 7 shows a kind of fruit surface defect based on gamma correction and color classification that one embodiment of the invention provides The structural representation of detecting system, as shown in fig. 7, the system includes:
Luminance correction module 71, the R component image in RGB image for extracting fruit to be detected, to the R component figure As carrying out gamma correction, make the brightness uniformity of the R component image;
Multilevel iudge module 72, for the RGB image to be carried out into HSI conversion, obtain each pixel in the RGB image H values in HSI conversion corresponding to point, and the H values are judged into each pixel compared with the H values of pre-set color Color;
First acquisition module 73, in the R component image after gamma correction, according to each picture in the RGB image Predetermined threshold value corresponding with the color is judged the color of vegetarian refreshments respectively, is treated in the R images after gamma correction with obtaining The defects of confirmation region;
Second acquisition module 74, by addition to the region except described to be confirmed the defects of in R component image after gamma correction The gray value zero setting of pixel, and will be described to be confirmed the defects of region in carpopodium/calyx region gray value zero setting, to obtain The defects of taking fruit surface region.
In a preferred embodiment of the present embodiment, the luminance correction module 71, it is used for:
Extract the R component image in the RGB image of fruit to be detected, by the R component image be divided into fringe region and Intermediate region;
The brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of the R component image.
In a preferred embodiment of the present embodiment, the multilevel iudge module 72, it is used for:
Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<H values pair are represented at 360 ° Answer pixel to belong to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, then belong to 3rd color.
In a preferred embodiment of the present embodiment, first acquisition module 73, it is used for:
In R component image after gamma correction, if the pixel corresponding first color in RGB image, is utilized Preset first threshold value judges the defects of whether it is to be confirmed region compared with the pixel corresponding to first color, In R component image after gamma correction, if the pixel corresponding second color in RGB image, utilizes the second color pair The default Second Threshold answered judges the defects of whether it is to be confirmed region compared with the pixel, after gamma correction R component image in, if the pixel corresponding 3rd color in RGB image, using presetting the corresponding to the 3rd color Three threshold values judge the defects of whether it is to be confirmed region compared with the pixel.
In a preferred embodiment of the present embodiment, second acquisition module 74, it is used for:
The near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, is known Not and mark carpopodium/calyx region in the near-infrared image;
In R component image after the gamma correction, obtain with the infrared image in positioned at same position carpopodium/ Calyx region, and by the gray value zero setting in the carpopodium/calyx region, and then water is obtained in region described to be confirmed the defects of The defects of fruit surface region.
Each embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing The present invention is described in detail each embodiment, it will be understood by those within the art that:It still can be to preceding State the technical scheme described in each embodiment to modify, either which part or all technical characteristic are equally replaced Change;And these modifications or replacement, the essence of appropriate technical solution is departed from the model of various embodiments of the present invention technical scheme Enclose.

Claims (6)

  1. A kind of 1. fruit surface defect detection method based on gamma correction and color classification, it is characterised in that including:
    The R component image in the RGB image of fruit to be detected is extracted, gamma correction is carried out to the R component image, makes the R The brightness uniformity of component image;
    The RGB image is subjected to HSI conversion, obtains the H values in each conversion of HSI corresponding to pixel in the RGB image, And the H values are judged to the color of each pixel compared with the H values of pre-set color;
    In R component image after gamma correction, according to the color of each pixel in the RGB image respectively with the color pair The predetermined threshold value answered judged, to obtain the defects of to be confirmed region in the R images after gamma correction;
    By the gray value zero setting of the pixel in addition to the region except described to be confirmed the defects of in R images after gamma correction, and The gray value zero setting in carpopodium/calyx region in will be described to be confirmed the defects of region, region the defects of to obtain fruit surface;
    The color that the H values are judged to each pixel compared with the H values of pre-set color, including:
    Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<Represent that H values correspond to picture at 360 ° Vegetarian refreshments belongs to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, then belongs to the 3rd Color;
    In the R component image after gamma correction, according to the color of each pixel in the RGB image respectively with the face Predetermined threshold value is judged corresponding to color, to obtain the defects of to be confirmed region in the R images after gamma correction, including:
    In R component image after gamma correction, if the pixel corresponding first color in RGB image, utilizes first Preset first threshold value corresponding to color judges the defects of whether it is to be confirmed region compared with the pixel, in brightness In R component image after correction, if the pixel corresponding second color in RGB image, using corresponding to the second color Default Second Threshold judges the defects of whether it is to be confirmed region, the R after gamma correction compared with the pixel In component image, if the pixel corresponding 3rd color in RGB image, utilizes default 3rd threshold corresponding to the 3rd color Value judges the defects of whether it is to be confirmed region compared with the pixel.
  2. 2. according to the method for claim 1, it is characterised in that the R component in the RGB image of the extraction fruit to be detected Image, gamma correction is carried out to the R component image, make the brightness uniformity of the R component image, including:
    The R component image in the RGB image of fruit to be detected is extracted, the R component image is divided into fringe region and centre Region;
    The brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of the R component image.
  3. 3. according to the method for claim 1, it is characterised in that carpopodium in will be described to be confirmed the defects of region/ The gray value zero setting in calyx region, region the defects of to obtain fruit surface, including:
    The near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, identification is simultaneously Mark carpopodium/calyx region in the near-infrared image;
    In R component image after the gamma correction, carpopodium/calyx with being located at same position in the infrared image is obtained Region, and by the gray value zero setting in the carpopodium/calyx region, and then fruit table is obtained in region described to be confirmed the defects of The defects of face region.
  4. A kind of 4. fruit surface defect detecting system based on gamma correction and color classification, it is characterised in that including:
    Luminance correction module, the R component image in RGB image for extracting fruit to be detected, the R component image is carried out Gamma correction, make the brightness uniformity of the R component image;
    Multilevel iudge module, for the RGB image to be carried out into HSI conversion, it is corresponding to obtain each pixel in the RGB image HSI conversion in H values, and by the H values judge compared with the H values of pre-set color it is described each pixel color;
    First acquisition module, in the R component image after gamma correction, according to each pixel in the RGB image Predetermined threshold value corresponding with the color is judged color respectively, to obtain to be confirmed lack in the R images after gamma correction Fall into region;
    Second acquisition module, by the pixel in addition to the region except described to be confirmed the defects of in R component image after gamma correction Gray value zero setting, and will be described to be confirmed the defects of region in carpopodium/calyx region gray value zero setting, to obtain fruit The defects of surface region;
    Wherein, the multilevel iudge module, is used for:
    Represent that H value corresponding pixel points belong to the first color when 0 °≤H≤20 °, as 280 °≤H<Represent that H values correspond to picture at 360 ° Vegetarian refreshments belongs to the second color, when the H values be both not belonging to the first color or be not belonging to the scope of the second color, then belongs to the 3rd Color;
    Wherein, first acquisition module, is used for:
    In R component image after gamma correction, if the pixel corresponding first color in RGB image, utilizes first Preset first threshold value corresponding to color judges the defects of whether it is to be confirmed region compared with the pixel, in brightness In R component image after correction, if the pixel corresponding second color in RGB image, using corresponding to the second color Default Second Threshold judges the defects of whether it is to be confirmed region, the R after gamma correction compared with the pixel In component image, if the pixel corresponding 3rd color in RGB image, utilizes default 3rd threshold corresponding to the 3rd color Value judges the defects of whether it is to be confirmed region compared with the pixel.
  5. 5. system according to claim 4, it is characterised in that the luminance correction module, be used for:
    The R component image in the RGB image of fruit to be detected is extracted, the R component image is divided into fringe region and centre Region;
    The brightness of the intermediate region is reduced using correction function, makes the brightness uniformity of the R component image.
  6. 6. system according to claim 4, it is characterised in that second acquisition module, be used for:
    The near-infrared image of fruit to be detected, and the coding dot matrix structure light in the near-infrared image are obtained, identification is simultaneously Mark carpopodium/calyx region in the near-infrared image;
    In R component image after the gamma correction, carpopodium/calyx with being located at same position in the infrared image is obtained Region, and by the gray value zero setting in the carpopodium/calyx region, and then fruit table is obtained in region described to be confirmed the defects of The defects of face region.
CN201510401682.1A 2015-07-09 2015-07-09 Fruit surface defect detection method and system based on gamma correction and color classification Active CN105046700B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510401682.1A CN105046700B (en) 2015-07-09 2015-07-09 Fruit surface defect detection method and system based on gamma correction and color classification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510401682.1A CN105046700B (en) 2015-07-09 2015-07-09 Fruit surface defect detection method and system based on gamma correction and color classification

Publications (2)

Publication Number Publication Date
CN105046700A CN105046700A (en) 2015-11-11
CN105046700B true CN105046700B (en) 2018-03-09

Family

ID=54453218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510401682.1A Active CN105046700B (en) 2015-07-09 2015-07-09 Fruit surface defect detection method and system based on gamma correction and color classification

Country Status (1)

Country Link
CN (1) CN105046700B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106442561B (en) * 2016-08-29 2023-10-31 北京农业智能装备技术研究中心 Online image acquisition system and method for detecting citrus peel defects
CN106297653B (en) * 2016-10-28 2018-08-31 重庆工商职业学院 A kind of LED screen pixel brightness correcting method and its system based on image procossing
CN106645179A (en) * 2017-01-24 2017-05-10 湖北商贸学院 Automatic detection system and automatic detection method for workpiece defects
CN108489989B (en) * 2018-03-28 2021-07-13 苏州巨能图像检测技术有限公司 Photovoltaic module double-sided appearance detector based on multi-camera splicing imaging detection
CN108508022B (en) * 2018-03-28 2021-07-13 苏州巨能图像检测技术有限公司 Multi-camera splicing imaging detection method
CN108596909A (en) * 2018-05-09 2018-09-28 芜湖哈特机器人产业技术研究院有限公司 Hollow cylinder Surface Flaw Detection system and method
CN108986076A (en) * 2018-06-15 2018-12-11 重庆大学 A kind of photovoltaic array hot spot detection method based on PSO optimization PCNN
CN109060842B (en) * 2018-08-14 2020-12-29 西南大学 Citrus surface defect detection method based on surface fitting correction
CN110944111B (en) * 2019-10-27 2020-09-08 云南能投信息产业开发有限公司 Big data analysis platform, method and storage medium based on channel detection
CN113052177B (en) * 2019-12-26 2022-08-23 合肥美亚光电技术股份有限公司 Garlic scar identification method and device and sorting equipment
CN113128249B (en) * 2019-12-26 2022-08-23 合肥美亚光电技术股份有限公司 Garlic scar identification method and system and sorting equipment
CN113051992B (en) * 2020-11-16 2022-01-18 山东米捷软件有限公司 Uniform speed identification system applying transparent card slot
CN113177925B (en) * 2021-05-11 2022-11-11 昆明理工大学 Method for nondestructive detection of fruit surface defects
CN113870233B (en) * 2021-09-30 2022-07-15 常州市宏发纵横新材料科技股份有限公司 Binding yarn detection method, computer equipment and storage medium
CN114749383A (en) * 2022-03-18 2022-07-15 海南思沃家电子商务有限公司 Tropical agricultural product screening device based on Internet platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845002A (en) * 1994-11-03 1998-12-01 Sunkist Growers, Inc. Method and apparatus for detecting surface features of translucent objects
CN102854192A (en) * 2012-08-22 2013-01-02 北京农业智能装备技术研究中心 System and method for detecting apple surface defect

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5845002A (en) * 1994-11-03 1998-12-01 Sunkist Growers, Inc. Method and apparatus for detecting surface features of translucent objects
CN102854192A (en) * 2012-08-22 2013-01-02 北京农业智能装备技术研究中心 System and method for detecting apple surface defect

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Apple defect detection using statistical histogram based EM algorithm;Ghobad Moradi et al;《American Journal of Signal Processing》;20121231;第2卷(第2期);10-14 *
基于DSP机器视觉的水果分级系统;高林杰;《中国优秀硕士学位论文全文数据库信息科技辑》;20111115(第11期);第三章 *
基于类球形亮度变换的水果表面缺陷提取;黄文倩 等;《农业机械学报》;20121231;第43卷(第12期);对比文件1摘要,第2,3节,图6 *

Also Published As

Publication number Publication date
CN105046700A (en) 2015-11-11

Similar Documents

Publication Publication Date Title
CN105046700B (en) Fruit surface defect detection method and system based on gamma correction and color classification
CN106568783B (en) A kind of hardware defect detecting system and method
CN104990925B (en) One kind is based on gradient multi thresholds optimization defect inspection method
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN109472822A (en) Dimension of object measurement method based on depth image processing
CN107607554A (en) A kind of Defect Detection and sorting technique of the zinc-plated stamping parts based on full convolutional neural networks
CN108491788A (en) A kind of intelligent extract method and device for financial statement cell
CN109859181A (en) A kind of PCB welding point defect detection method
CN109376792A (en) Photovoltaic cell open defect classification method based on multichannel residual error neural network
CN104537651B (en) Proportion detecting method and system for cracks in road surface image
CN108596880A (en) Weld defect feature extraction based on image procossing and welding quality analysis method
CN104574389A (en) Battery piece chromatism selection control method based on color machine vision
CN104766097B (en) Surface of aluminum plate defect classification method based on BP neural network and SVMs
CN107694962A (en) A kind of fruit automatic sorting method based on machine vision and BP neural network
CN102974551A (en) Machine vision-based method for detecting and sorting polycrystalline silicon solar energy
CN103177259A (en) Color block identification method and device
CN103593670A (en) Copper sheet and strip surface defect detection method based on-line sequential extreme learning machine
CN113109348B (en) Paddle image transfer printing defect identification method based on machine vision
CN116228772B (en) Quick detection method and system for fresh food spoilage area
CN104198497A (en) Surface defect detection method based on visual saliency map and support vector machine
CN105738294A (en) Automatic spikelike fruit detection device and method based on monocular multi-view imaging
CN107490582A (en) A kind of streamline Work Piece Verification System Based
CN104700417A (en) Computer image based automatic identification method of timber knot flaws
CN109215009A (en) Continuous casting billet surface image defect inspection method based on depth convolutional neural networks
CN106872473A (en) A kind of potato defects detection identifying system design based on machine vision

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant