CN105046700A - Brightness correction and color classification-based fruit surface defect detection method and system - Google Patents

Brightness correction and color classification-based fruit surface defect detection method and system Download PDF

Info

Publication number
CN105046700A
CN105046700A CN201510401682.1A CN201510401682A CN105046700A CN 105046700 A CN105046700 A CN 105046700A CN 201510401682 A CN201510401682 A CN 201510401682A CN 105046700 A CN105046700 A CN 105046700A
Authority
CN
China
Prior art keywords
color
image
pixel
component image
gamma correction
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
CN201510401682.1A
Other languages
Chinese (zh)
Other versions
CN105046700B (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 relates to a brightness correction and color classification-based fruit surface defect detection method and system. The method includes the following steps that: a R component image in an RGB image of fruit to be detected is extracted, brightness correction is performed on the R component image, so that the brightness of the R component image can be uniform; HSI transform is performed on the RGB image, so that an H value in the HSI transform corresponding to each pixel in the RGB image is obtained, the H values are compared with the H values of preset colors, so that the color of each pixel can be judged; and the color of each pixel is compared with a preset threshed value corresponding to the color, so that judgment can be performed, a defective region to be confirmed is obtained from the R component image which has been subjected to the brightness correction, the gray values of all pixels except the defective region to be confirmed in the R component image are zeroed, and based on further judgment, the gray values of recognized fruit stem/calyx regions in the defective region to be confirmed are zeroed, and finally, a defective region of the surface of the fruit can be obtained. With the method and the system of the invention adopted, the accuracy of fruit defect detection can be improved.

Description

Based on fruit surface defect detection method and the system of gamma correction and color classification
Technical field
The present invention relates to vegetable and fruit detection field, be specifically related to a kind of fruit surface defect detection method based on gamma correction and color classification and system.
Background technology
China's fruit total production occupies first of the world, and wherein the output of apple and pears ranks first in the world.But the proportion that the export volume of current China fruit accounts for fruits output is lower, this is mainly because its postrharvest handling technology is relatively backward, for apple, apple dealer only does rough classification to apple size, and classification means mainly rely on and manually carry out classification, classification results is not accurate enough, and simultaneously along with the raising of labor cost, the cost of manual grading skill also can be more and more higher.Utilize machine vision technique to carry out classification to apple, can not only cost of labor be reduced, detection efficiency and accuracy of detection can also be improved.At present, utilize the size of machine vision technique to fruit (such as: apple) and the detection comparative maturity of color, and be widely applied in the middle of actual production.But the on-line checkingi of apple surface defect is remained to a difficult point of fruit sorting field solution not yet in effect.
Apple surface defect cannot a main cause of on-line checkingi be because apple is usually in spheroid or spheroid, at the edge of apple, the reflection direction of light and the angle of camera very large, according to the light reflection law of lambert, from camera direction, the brightness of apple fringe region is lower, the gray-scale value showing as fringe region in the Apple image gathered is lower, and the notable feature of apple surface defect is it usually has lower gray-scale value, the fringe region and the surface defect areas which results in apple in Apple image all have lower gray feature, make to be difficult to the two to distinguish by image processing techniques.Simultaneously because the carpopodium/calyx region of apple also shows as lower gray feature in the picture, this just further increases the difficulty of Apple surface defect detection, because apple surface is the spherical bending curve of class, thus cause the uneven distribution of Apple image zone line and fringe region brightness, cause the surface imperfection information being difficult to accurately detect in Apple image.Simultaneously because apple surface peony area grayscale value is lower, peony region is caused to be easily defect area by flase drop.Therefore, how existing proposition a kind ofly improves the method for accuracy detecting fruit defects.
Summary of the invention
For defect of the prior art, the invention provides a kind of fruit surface defect detection method based on gamma correction and color classification and system, improve the accuracy detecting fruit defects.
First aspect, the invention provides a kind of fruit surface defect detection method based on gamma correction and color classification, comprising:
Extract the R component image in the RGB image of fruit to be detected, gamma correction is carried out to described R component image, make the brightness uniformity of described R component image;
Described RGB image is carried out HSI conversion, obtains the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
In R component image after gamma correction, judge, to obtain defect area to be confirmed in the R image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with this Color pair respectively;
By the gray-scale value zero setting of the pixel except described defect area to be confirmed in R image after gamma correction, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
Optionally, the R component image in the RGB image of described extraction fruit to be detected, carries out gamma correction to described R component image, makes the brightness uniformity of described R component image, comprising:
Extract the R component image in the RGB image of fruit to be detected, described R component image is divided into fringe region and zone line;
Utilize correction function to reduce the brightness of described zone line, make the brightness uniformity of described R component image.
Optionally, the described H value by described H value and pre-set color compares the color judging described each pixel, comprising:
Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.
Optionally, the predetermined threshold value that the described color corresponding in RGB image according to each pixel in the R component image after described gamma correction is answered with described Color pair respectively judges, to obtain defect area to be confirmed in the R component image after gamma correction, comprising:
In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.
Optionally, described by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface, comprising:
Obtain the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identify and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
Second aspect, present invention also offers a kind of fruit surface defect detection system based on gamma correction and color classification, comprising:
Luminance correction module, for extracting the R component image in the RGB image of fruit to be detected, carrying out gamma correction to described R component image, making the brightness uniformity of described R component image;
Multilevel iudge module, for described RGB image is carried out HSI conversion, obtains the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
First acquisition module, in the R component image after gamma correction, judges, to obtain defect area to be confirmed in the R image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with this Color pair respectively;
Second acquisition module, after gamma correction in R component image by the gray-scale value zero setting of the pixel except described defect area to be confirmed, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
Optionally, described luminance correction module, for:
Extract the R component image in the RGB image of fruit to be detected, described R component image is divided into fringe region and zone line;
Utilize correction function to reduce the brightness of described zone line, make the brightness uniformity of described R component image.
Optionally, described multilevel iudge module, for:
Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.
Optionally, described first acquisition module, for:
In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.
Optionally, described second acquisition module, for:
Obtain the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identify and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
As shown from the above technical solution, the present invention proposes a kind of fruit surface defect detection method based on gamma correction and color classification and system, the brightness irregularities Distribution Phenomena of a kind of converse thought to apple surface is adopted to be corrected, and according to apple coat color feature determination defect Segmentation threshold value, verified by on-line checkingi, the computing velocity of the method and accuracy of detection meet the demand of on-line checkingi, possess the condition be applied in actual production, also improved the accuracy detecting fruit defects simultaneously.
Accompanying drawing explanation
The schematic flow sheet of the fruit surface defect detection method based on gamma correction and color classification that Fig. 1 provides for one embodiment of the invention;
The RGB image of the apple that two CCD camera that Fig. 2 A and Fig. 2 B provides for one embodiment of the invention gather and near-infrared image;
The lattice structure light in near-infrared image that utilizes that Fig. 3 provides for one embodiment of the invention detects the design sketch in apple stem/calyx region;
The 3 d effect graph of the corresponding correction function of 20 × 20 Apple image to be corrected that Fig. 4 provides for one embodiment of the invention;
What Fig. 5 A and Fig. 5 B provided for one embodiment of the invention does not carry out gamma correction image segmentation figure;
Segmentation effect figure after color classification is carried out after the gamma correction that Fig. 6 A and Fig. 6 B provides for one embodiment of the invention;
The structural representation of the fruit surface defect detection system based on gamma correction and color classification that Fig. 7 provides for one embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing, the embodiment of invention is further described.Following examples only for technical scheme of the present invention is clearly described, and can not limit the scope of the invention with this.
The schematic flow sheet of the fruit surface defect detection method based on gamma correction and color classification that Fig. 1 shows that one embodiment of the invention provides, as shown in Figure 1, the method comprises the steps:
101, extract the R component image in the RGB image of fruit to be detected, gamma correction is carried out to described R component image, make the brightness uniformity of described R component image;
102, described RGB image is carried out HSI conversion, obtain the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
103, in R component image, judge, to obtain defect area to be confirmed in the R component image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with this Color pair respectively after gamma correction;
104, after gamma correction in R component image by the gray-scale value zero setting of the pixel except described defect area to be confirmed, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
Said method adopts the brightness irregularities Distribution Phenomena of a kind of converse thought to apple surface to be corrected (also just by reducing the brightness of zone line), and according to apple coat color feature determination defect Segmentation threshold value, verified by on-line checkingi, the computing velocity of the method and accuracy of detection meet the demand of on-line checkingi, possess the condition be applied in actual production, also improved the accuracy detecting fruit defects simultaneously.
Below in conjunction with specific embodiment, said method is described in detail, it should be noted that, be all described with representational apples in the present embodiment, but the present embodiment does not limit and only detects this kind of fruit defects of apple, and other fruit are also suitable for.
The two CCD industrial camera of visible/near infrared can gather near-infrared image and RGB image simultaneously, and its collection effect as shown in Figure 2 A and 2 B.By the analysis to apple surface lattice structure light hot spot in near-infrared image, can determine the position in carpopodium in Apple image/calyx region, its Detection results as shown in Figure 3.Behind the position determining carpopodium in Apple image/calyx region, can by determine in image whether existing defects region further to the analysis of RGB image.
Apple is class spherical fruit, and surface exists larger Curvature varying.According to Lambertian reflection principle, on sphere, the brightness of any point is directly proportional to the cosine of this normal vector and the angle θ between this point to light source line.In the online assorting room of apple, source symmetric is installed on above the side of apple, and fixed camera is directly over apple, and therefore in the image that obtains of camera, apple surface each point luminance difference determines primarily of angle theta.Because the angle of apple fringe region reflection ray and normal vector is greater than the angle of zone line, so the brightness of apple surface is shown as that zone line is brighter and fringe region is darker.Because the defect area in image is also comparatively dark, this just causes normal region, edge and middle part defect area in testing process easily to be obscured and causes segmentation by mistake.
The thinking of usual rectification apple surface brightness strengthens the fringe region that in Apple image, brightness value is lower, and the brightness uniformity realizing all regions in Apple image is consistent.This research adopts a kind of converse thought, namely reduces the brightness of image zone line, thus realizes being uniformly distributed of whole brightness of image.Correction function is made to be:
Wherein C is constant, and a=width/2, b=height/2, width and height are respectively width and the height of image, and suppose the Apple image to be corrected having 20 × 20, the 3-D view of the F (x, y) of its correspondence as shown in Figure 4.
R component image in extraction RGB image, as Apple image to be corrected, obtains correcting image, that is: after being multiplied with correction function by Apple image to be corrected
I' R(x,y)=I R(x,y)×F(x,y)(2)
Wherein I r(x, y) represents the gray-scale value of image to be corrected at (x, y) place, I' r(x, y) represents the gray-scale value of correcting image at (x, y) place.
Detection method of the present invention comprises the following steps:
S1, extracts the R component image in the RGB image of fruit to be detected, and described R component image is divided into fringe region and zone line, utilizes correction function to reduce the brightness of described zone line, makes the brightness uniformity of view picture R component image.Fig. 5 A and Fig. 5 B and Fig. 6 A and Fig. 6 B is the design sketch before and after gamma correction, R component image being carried out to Iamge Segmentation respectively.
S2, RGB Apple image is carried out HSI conversion, H value in the HSI conversion utilizing each pixel corresponding, judge that this pixel belongs to the first color (peony), which kind of color in the second color (light red) and these three kinds of situations of the 3rd color (other colors).Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.In actual applications, if the color of apple pericarp is peony, then peony region may be mistaken for defect area.Therefore the image partition method of multi thresholds is adopted, namely for each pixel, first the H value in its HSI conversion is calculated, if 280 °≤H<360 °, represent that this pixel is peony, whether it is normal pericarp to adopt first threshold T1 to judge in the R component image after gamma correction; If 0 °≤H≤20 °, represent that this pixel is light red, after gamma correction, adopting Second Threshold T2 to judge in R component image, whether it is normal pericarp, if H value is other numerical value, then the 3rd threshold value T3 is adopted to judge whether this pixel is normal pericarp in the R component image after gamma correction.
S3, for three kinds of situations in S2, adopts three different threshold values to carry out Iamge Segmentation, extracts the area-of-interest that gray-scale value in Apple image is lower, and set to 0 by the gray-scale value of background.
S4, obtains the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identifies and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
According to the coding dot matrix structured light in apple near-infrared image, identify and mark the carpopodium/calyx region in Apple image, its effect as shown in Figure 3.By above step, can be partitioned into the defect area to be confirmed that gray-scale value in Apple image is lower, the defect area to be confirmed of acquisition may be defect area, also may be carpopodium/calyx region.
S5, owing to being identified the position in the carpopodium/calyx region in Apple image by near infrared coding dot matrix method of structured light, so contrasted in carpopodium/calyx region and the defect area to be confirmed be partitioned into, the presence or absence of surface imperfection in Apple image finally can be determined.According to the position in the carpopodium detected in near-infrared image/calyx region, the gray-scale value in region, relevant position in RGB image is set to 0.If the pixel value in defect area to be confirmed is set to 0, the area that this region non-zero gray-scale value represents can change, and then this region can be judged as carpopodium/calyx region and got rid of, and the defect area to be confirmed that area does not change is judged as the defect area of apple surface.
In order to test the validity of this method further, we test on the detection system to 110 Fuji apples, the detection accuracy of put forward the methods of the present invention is up to 90.9%, and Apple image size being about to 200 × 200 carries out gamma correction, is on average consuming timely less than 1 millisecond.
The structural representation of a kind of fruit surface defect detection system based on gamma correction and color classification that Fig. 7 shows that one embodiment of the invention provides, as shown in Figure 7, this system comprises:
Luminance correction module 71, for extracting the R component image in the RGB image of fruit to be detected, carrying out gamma correction to described R component image, making the brightness uniformity of described R component image;
Multilevel iudge module 72, for described RGB image is carried out HSI conversion, obtains the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
First acquisition module 73, for in the R component image after gamma correction, judge, to obtain defect area to be confirmed in the R image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with described Color pair respectively;
Second acquisition module 74, after gamma correction in R component image by the gray-scale value zero setting of the pixel except described defect area to be confirmed, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
In a preferred embodiment of the present embodiment, described luminance correction module 71, for:
Extract the R component image in the RGB image of fruit to be detected, described R component image is divided into fringe region and zone line;
Utilize correction function to reduce the brightness of described zone line, make the brightness uniformity of described R component image.
In a preferred embodiment of the present embodiment, described multilevel iudge module 72, for:
Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.
In a preferred embodiment of the present embodiment, described first acquisition module 73, for:
In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.
In a preferred embodiment of the present embodiment, described second acquisition module 74, for:
Obtain the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identify and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
The above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1., based on a fruit surface defect detection method for gamma correction and color classification, it is characterized in that, comprising:
Extract the R component image in the RGB image of fruit to be detected, gamma correction is carried out to described R component image, make the brightness uniformity of described R component image;
Described RGB image is carried out HSI conversion, obtains the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
In R component image after gamma correction, judge, to obtain defect area to be confirmed in the R image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with this Color pair respectively;
By the gray-scale value zero setting of the pixel except described defect area to be confirmed in R image after gamma correction, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
2. method according to claim 1, is characterized in that, the R component image in the RGB image of described extraction fruit to be detected, carries out gamma correction to described R component image, makes the brightness uniformity of described R component image, comprising:
Extract the R component image in the RGB image of fruit to be detected, described R component image is divided into fringe region and zone line;
Utilize correction function to reduce the brightness of described zone line, make the brightness uniformity of described R component image.
3. method according to claim 1, is characterized in that, the described H value by described H value and pre-set color compares the color judging described each pixel, comprising:
Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.
4. method according to claim 3, it is characterized in that, the predetermined threshold value that the described color corresponding in RGB image according to each pixel in the R component image after described gamma correction is answered with described Color pair respectively judges, to obtain defect area to be confirmed in the R component image after gamma correction, comprising:
In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.
5. method according to claim 1, is characterized in that, described by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface, comprising:
Obtain the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identify and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
6., based on a fruit surface defect detection system for gamma correction and color classification, it is characterized in that, comprising:
Luminance correction module, for extracting the R component image in the RGB image of fruit to be detected, carrying out gamma correction to described R component image, making the brightness uniformity of described R component image;
Multilevel iudge module, for described RGB image is carried out HSI conversion, obtains the H value in the HSI conversion that in described RGB image, each pixel is corresponding, and the H value of described H value and pre-set color is compared the color judging described each pixel;
First acquisition module, in the R component image after gamma correction, judges, to obtain defect area to be confirmed in the R image after gamma correction according to the predetermined threshold value that the color of each pixel in described RGB image is answered with this Color pair respectively;
Second acquisition module, after gamma correction in R component image by the gray-scale value zero setting of the pixel except described defect area to be confirmed, and by the gray-scale value zero setting in the carpopodium in described defect area to be confirmed/calyx region, to obtain the defect area of fruit surface.
7. system according to claim 6, is characterized in that, described luminance correction module, for:
Extract the R component image in the RGB image of fruit to be detected, described R component image is divided into fringe region and zone line;
Utilize correction function to reduce the brightness of described zone line, make the brightness uniformity of described R component image.
8. system according to claim 6, is characterized in that, described multilevel iudge module, for:
Represent that when 0 °≤H≤20 ° H value corresponding pixel points belongs to the first color, represent that as 280 °≤H<360 ° H value corresponding pixel points belongs to the second color, when described H value neither belong to the first color do not belong to the scope of the second color yet time, then belong to the 3rd color.
9. system according to claim 8, is characterized in that, described first acquisition module, for:
In R component image after gamma correction, if described pixel is corresponding first color in RGB image, the preset first threshold value utilizing the first Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding second color in RGB image, the default Second Threshold utilizing the second Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed, in R component image after gamma correction, if described pixel is corresponding 3rd color in RGB image, default 3rd threshold value utilizing the 3rd Color pair to answer and described pixel compare and judge whether it is defect area to be confirmed.
10. system according to claim 6, is characterized in that, described second acquisition module, for:
Obtain the near-infrared image of fruit to be detected, and according to the coding dot matrix structured light in described near-infrared image, identify and mark the carpopodium/calyx region in described near-infrared image;
In R component image after described gamma correction, obtain and be positioned in described infrared image the carpopodium/calyx region of same position, and by the gray-scale value zero setting in described carpopodium/calyx region, and then in described defect area to be confirmed, obtain the defect area of fruit surface.
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 true CN105046700A (en) 2015-11-11
CN105046700B 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)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106297653A (en) * 2016-10-28 2017-01-04 重庆工商职业学院 A kind of LED screen pixel brightness correcting method based on image procossing and system thereof
CN106442561A (en) * 2016-08-29 2017-02-22 北京农业智能装备技术研究中心 Online image acquisition system for detecting citrus skin defects and method
CN106645179A (en) * 2017-01-24 2017-05-10 湖北商贸学院 Automatic detection system and automatic detection method for workpiece defects
CN108489989A (en) * 2018-03-28 2018-09-04 苏州巨能图像检测技术有限公司 The two-sided appearance detecting instrument of photovoltaic module based on the detection of polyphaser joining image-forming
CN108508022A (en) * 2018-03-28 2018-09-07 苏州巨能图像检测技术有限公司 Polyphaser joining image-forming 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
CN109060842A (en) * 2018-08-14 2018-12-21 西南大学 Citrus detection method of surface flaw, computer program based on surface fitting correction
CN110944111A (en) * 2019-10-27 2020-03-31 张姣姣 Big data analysis platform, method and storage medium based on channel detection
CN113052177A (en) * 2019-12-26 2021-06-29 合肥美亚光电技术股份有限公司 Garlic scar identification method and device and sorting equipment
CN113051992A (en) * 2020-11-16 2021-06-29 泰州无印广告传媒有限公司 Uniform speed identification system applying transparent card slot
CN113128249A (en) * 2019-12-26 2021-07-16 合肥美亚光电技术股份有限公司 Garlic scar identification method and system and sorting equipment
CN113177925A (en) * 2021-05-11 2021-07-27 昆明理工大学 Method for nondestructive detection of fruit surface defects
CN113870233A (en) * 2021-09-30 2021-12-31 常州市宏发纵横新材料科技股份有限公司 Binding yarn detection method, computer equipment and storage medium
CN114663788A (en) * 2022-03-29 2022-06-24 浙江奥脉特智能科技有限公司 Electric tower defect detection method and system based on Yolo V5
CN114749383A (en) * 2022-03-18 2022-07-15 海南思沃家电子商务有限公司 Tropical agricultural product screening device based on Internet platform
CN115301576A (en) * 2022-08-04 2022-11-08 河南职业技术学院 Intelligent control method of fruit and vegetable sorting robot based on visual identification

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
GHOBAD MORADI ET AL: "Apple defect detection using statistical histogram based EM algorithm", 《AMERICAN JOURNAL OF SIGNAL PROCESSING》 *
高林杰: "基于DSP机器视觉的水果分级系统", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
黄文倩 等: "基于类球形亮度变换的水果表面缺陷提取", 《农业机械学报》 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106442561A (en) * 2016-08-29 2017-02-22 北京农业智能装备技术研究中心 Online image acquisition system for detecting citrus skin defects and method
CN106442561B (en) * 2016-08-29 2023-10-31 北京农业智能装备技术研究中心 Online image acquisition system and method for detecting citrus peel defects
CN106297653A (en) * 2016-10-28 2017-01-04 重庆工商职业学院 A kind of LED screen pixel brightness correcting method based on image procossing and system thereof
CN106645179A (en) * 2017-01-24 2017-05-10 湖北商贸学院 Automatic detection system and automatic detection method for workpiece defects
CN108508022B (en) * 2018-03-28 2021-07-13 苏州巨能图像检测技术有限公司 Multi-camera splicing imaging detection method
CN108489989A (en) * 2018-03-28 2018-09-04 苏州巨能图像检测技术有限公司 The two-sided appearance detecting instrument of photovoltaic module based on the detection of polyphaser joining image-forming
CN108508022A (en) * 2018-03-28 2018-09-07 苏州巨能图像检测技术有限公司 Polyphaser joining image-forming 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
CN109060842A (en) * 2018-08-14 2018-12-21 西南大学 Citrus detection method of surface flaw, computer program based on surface fitting correction
CN110944111A (en) * 2019-10-27 2020-03-31 张姣姣 Big data analysis platform, method and storage medium based on channel detection
CN113128249A (en) * 2019-12-26 2021-07-16 合肥美亚光电技术股份有限公司 Garlic scar identification method and system and sorting equipment
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
CN113052177A (en) * 2019-12-26 2021-06-29 合肥美亚光电技术股份有限公司 Garlic scar identification method and device and sorting equipment
CN113051992A (en) * 2020-11-16 2021-06-29 泰州无印广告传媒有限公司 Uniform speed identification system applying transparent card slot
CN113051992B (en) * 2020-11-16 2022-01-18 山东米捷软件有限公司 Uniform speed identification system applying transparent card slot
CN113177925A (en) * 2021-05-11 2021-07-27 昆明理工大学 Method for nondestructive detection of fruit surface defects
CN113177925B (en) * 2021-05-11 2022-11-11 昆明理工大学 Method for nondestructive detection of fruit surface defects
CN113870233A (en) * 2021-09-30 2021-12-31 常州市宏发纵横新材料科技股份有限公司 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
CN114663788A (en) * 2022-03-29 2022-06-24 浙江奥脉特智能科技有限公司 Electric tower defect detection method and system based on Yolo V5
CN115301576A (en) * 2022-08-04 2022-11-08 河南职业技术学院 Intelligent control method of fruit and vegetable sorting robot based on visual identification
CN115301576B (en) * 2022-08-04 2024-07-23 河南职业技术学院 Visual identification-based intelligent control method for fruit and vegetable sorting robot

Also Published As

Publication number Publication date
CN105046700B (en) 2018-03-09

Similar Documents

Publication Publication Date Title
CN105046700A (en) Brightness correction and color classification-based fruit surface defect detection method and system
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN102385753B (en) Illumination-classification-based adaptive image segmentation method
CN103177259A (en) Color block identification method and device
CN105158258A (en) Computer vision-based bamboo strip surface defect detection method
CN109859181A (en) A kind of PCB welding point defect detection method
CN113109348B (en) Paddle image transfer printing defect identification method based on machine vision
CN104537651B (en) Proportion detecting method and system for cracks in road surface image
CN104574389A (en) Battery piece chromatism selection control method based on color machine vision
CN116228772B (en) Quick detection method and system for fresh food spoilage area
CN102305798A (en) Method for detecting and classifying glass defects based on machine vision
CN102654464A (en) Copper strip surface defect detection system based on multi-feature fuzzy recognition
CN109886960A (en) The method of glass edge defects detection based on machine vision
CN103914708A (en) Food variety detection method and system based on machine vision
CN109540925B (en) Complex ceramic tile surface defect detection method based on difference method and local variance measurement operator
CN110070526A (en) Defect inspection method based on the prediction of deep neural network temperature figure
CN104899871A (en) Missing solder detection method of IC element solder joints
CN109146878A (en) A kind of method for detecting impurities based on image procossing
CN103759644A (en) Separating and refining type intelligent optical filter surface defect detecting method
CN106651831B (en) Bamboo block defect detection method and system
CN112819844B (en) Image edge detection method and device
CN109461156B (en) Threaded sealing plug assembly detection method based on vision
CN106872488A (en) A kind of double surface defect visible detection methods of rapid large-area transparent substrate and device
CN114708325A (en) Method for quickly positioning rubber production problem based on rubber blooming defect
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