CN108872085B - Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection - Google Patents

Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection Download PDF

Info

Publication number
CN108872085B
CN108872085B CN201810435737.4A CN201810435737A CN108872085B CN 108872085 B CN108872085 B CN 108872085B CN 201810435737 A CN201810435737 A CN 201810435737A CN 108872085 B CN108872085 B CN 108872085B
Authority
CN
China
Prior art keywords
image
navel orange
pixel
area
detection
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
CN201810435737.4A
Other languages
Chinese (zh)
Other versions
CN108872085A (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.)
Nanjing Forestry University
Original Assignee
Nanjing Forestry University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Forestry University filed Critical Nanjing Forestry University
Priority to CN201810435737.4A priority Critical patent/CN108872085B/en
Publication of CN108872085A publication Critical patent/CN108872085A/en
Application granted granted Critical
Publication of CN108872085B publication Critical patent/CN108872085B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N2021/1765Method using an image detector and processing of image signal

Abstract

A navel orange heart rot nondestructive testing method based on blue wave band transmission image detection comprises the following steps: 1. the original image is collected in the camera bellows, and the picture is obtained in the following mode: adopting a white light source to irradiate a part of area of one side face of the navel orange, and adopting a camera to acquire images on the other side face of the navel orange; the axis of the camera lens and the axis of the white light source are in the same straight line; the white light source and the irradiated area of the navel orange are in the same tight and opaque space, and the light rays of the white light source are focused and then parallelly irradiated on the navel orange; 2. firstly, selecting a field area on an acquired original image, and then performing subsequent step processing; s1: performing image decomposition on the RGB image to obtain a red, green and blue component diagram; then selecting a blue component diagram for processing to obtain a tested navel orange mask; s2: the obtained blue wave band transmission image is compared with a tested navel orange mask to obtain a navel orange defect part; s3: judging whether the navel orange is rotten by taking whether the size of the defective part exceeds the detection requirement as a standard.

Description

Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection
Technical Field
A nondestructive testing technology for the defective part of navel orange with soft epidermis due to rotten heart inside based on blue wave band transmission image detection belongs to the technical field of nondestructive testing of fruits.
Background
The quality of fruit has been an important issue in the research of agricultural products and is also a consumer concern. Fruits can be damaged due to different reasons during storage, navel oranges are easy to rot in the storage process, and the damaged navel oranges are not easy to operate and can be more lost due to untimely treatment.
The image processing technique is a technique of processing image information with a computer. Mainly comprises image digitizing, image enhancing and restoring, image data encoding, image dividing, image identifying and the like.
How to apply the image processing technology to the detection of the internal decay of the navel orange is a problem to be solved.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a nondestructive testing method for a defective part of navel orange with soft skin due to internal rotted heart based on blue wave band transmission image detection and an image acquisition system for the nondestructive testing of the rotted heart of the navel orange.
An image acquisition system for nondestructive testing of navel orange heart rot comprises a camera, a computer and a structural part; the camera is communicated with a computer;
the structure part comprises a collecting box, a slideway, a fixed tray, a movable positioning mechanism, a lifting mechanism, a focusing lens (which can be a convex lens) and a white light source, wherein the slideway, the fixed tray, the movable positioning mechanism, the lifting mechanism, the focusing lens (which can be a convex lens) and the white light source are positioned in the collecting box;
the inner wall of the collecting box is covered with a low-reflectivity material layer; a door which can be opened and closed is arranged on one side wall of the collection box;
the fixed tray is fixed on the bottom surface of the collecting box through a vertical supporting column; the inner wall of the fixed tray is in the shape of a spherical belt; the support column is internally provided with a first through hole, the bottom in the first through hole is provided with a white light source, the first through hole is internally provided with a focusing lens, the focusing lens is arranged above the white light source, and the top of the first through hole is connected with a second through hole on the bottom surface of the fixed tray;
the movable positioning mechanism is connected to the lifting mechanism; the inner cavity of the movable positioning mechanism is in a shape of a circular truncated cone, the smaller bottom of the circular truncated cone is arranged below, and the diameter of the inner cavity corresponds to the diameter of the second through hole; the side wall of the movable positioning mechanism is provided with a notch, and the shape of the notch corresponds to the section symptoms of the slideway; the axis of the movable positioning mechanism coincides with the axis of the support column, and the movable positioning mechanism moves up and down along the axis of the movable positioning mechanism;
the head end of the slideway is positioned at the position of the box door, and the position of the tail end of the slideway corresponds to the notch position of the side wall of the movable positioning mechanism when the movable positioning mechanism is lifted to the top; the head end of the slideway is higher than the tail end;
the camera lens is in the collection box and is positioned right above the fixed tray.
The inner wall surface of the fixed tray is covered with a black soft elastic fabric soft material layer.
The positions of the white light source, the focusing lens and the second through hole are in accordance with: the light emitted by the white light source is formed into parallel light beams by the focusing lens and is concentrated on the end face of the second through hole.
A navel orange heart rot nondestructive testing method based on blue wave band transmission image detection comprises the following steps:
1. the original image is collected in the camera bellows, and the picture is obtained in the following mode:
adopting a white light source to irradiate a part of area of one side face of the navel orange, and adopting a camera to acquire images on the other side face of the navel orange;
the axis of the camera lens and the axis of the white light source are in the same straight line; the white light source and the irradiated area of the navel orange are in the same tight and opaque space, and the light rays of the white light source are focused and then parallelly irradiated on the navel orange;
2. firstly, selecting a field area on an acquired original image, and then performing subsequent step processing;
s1: performing image decomposition on the RGB image to obtain a red, green and blue component diagram; then selecting a blue component diagram for processing to obtain a tested navel orange mask;
s2: the obtained blue wave band transmission image is compared with a tested navel orange mask to obtain a navel orange defect part;
s3: judging whether the navel orange is rotten by taking whether the size of the defective part exceeds the detection requirement as a standard.
In the first step, because the camera and the fixed tray are both in relative fixed positions, the navel orange placed on the fixed tray is also under the coaxial position of the camera, the original image acquired after the calibration of the initial position does not need to adopt motion positioning to select a view field area, the original image is acquired under the imaging proportion of the corresponding imaging system, the geometric center position of the navel orange in the original image is unchanged, and meanwhile, the position is also suitable for other navel orange images.
The step S1 includes:
1) Position calibration and image detection region segmentation:
firstly, automatically intercepting a detection target area image in an original picture; therefore, after the mechanical installation of the tray frame and the imaging system, the imaging system should be calibrated in position for the first time (specifically, the operation is that an orange hollow (such as made of polypropylene material) calibration ball with the diameter of 42mm is placed on the tray frame, and the transmission image of the calibration ball is collected as a positioning calibration image)
Extracting the image coordinates (x 0 ,y 0 ) Calculating a size conversion coefficient R pixel/mm of world coordinates and image coordinates according to the measured pixel size of the diameter of the calibration sphere in the positioning calibration chart;
setting the range requirement of the nominal diameter D of the navel orange size to be detected as (1);
D Min ≤D≤D Max (1)
wherein D is Min And D Max The upper limit and the lower limit of the nominal diameter of the fruits to be detected are respectively set;
then the side length L of the square detection area is calculated according to equation (2):
L=f·D Max ·R (2)
wherein f is a constant coefficient (which may take a general value of 1.2); d (D) Max The maximum value of the nominal diameter range of the fruit to be measured is measured in mm; r is the conversion coefficient of world coordinates and pixel coordinates, and the unit is pixel/mm;
and determining a detection region in the image according to formula (3), represented by a set of pixels a:
Figure BDA0001654280750000041
in (x) 0 ,y 0 ) For calibrating coordinates of the center of the sphere in the image, L is the side length of the detection area calculated according to the formula (2), and L is the image coordinates of any point in the pixel set A of the detection area in the image;
2) The color components of the detection area are segmented with the fruit image to be detected:
color-decomposing the color image of the separated detection area to obtain monochromatic component images of the detection area, namely red component images A of the detection area respectively R Detection zone green component image A G And detection area blue component image a B
In blue component image A B The method comprises the following steps of:
obtaining the area N of the fruit to be detected in the detection area according to the diameter range of the fruit to be detected and the size of the detection area F With background area N BG The ratio should be within the range of formula (3'), otherwise the detection flow is skipped, indicating "size out-of-limit".
Figure BDA0001654280750000042
Wherein D is Min And D Max The upper limit and the lower limit of the nominal diameter of the fruits to be detected are respectively set; f is a constant coefficient (general value 1.2);
map A of blue component of detection zone B The pixels in the pixel list V are arranged in ascending order according to the gray value AB From the ordered list of pixels V, according to the upper and lower proportional limits determined by equation (3') AB The selected pixel p 1 And p is as follows 2 Pixel subset V 'in between' AB 。p 1 And p is as follows 2 At V AB The percentile values of the two are calculated according to formulas (4 and 5) respectively.
Figure BDA0001654280750000043
Figure BDA0001654280750000044
Wherein D is Min And D Max The upper limit and the lower limit of the nominal diameter of the fruits to be detected are respectively set; f is a constant coefficient (general value 1.2)
Let pixel i belong to set V' AB The gray value of which is V (i), then the set of pixels V' AB The gray level set of (2) is V as in equation (6). Wherein the range of arbitrary pixel gray values j corresponds to equation (7).
V={j|j=v(i)},i∈V′ AB (6)
Wherein i is a set V' AB V (i) is the color of pixel i in blueGray values in the component map are denoted by j; v is V' AB A set of gray values that occur at all pixel locations;
υ(p 1 )<j<v(p 2 ) (7)
wherein j is any gray value in V; v (p) 1 ) Is pixel p 1 Is equal to the gray value of v (p 2 ) Is pixel p 2 Gray values of (2);
let the number of occurrences of the gray value j in the set V be n j T is the gray value with the least occurrence number in V, and then T is the blue component image A from the detection area B Extracting a global threshold of a navel orange area, wherein the global threshold is shown in formulas (8 and 9);
n T =min({n j }),j∈V (8)
in n T The number of occurrences of the threshold T in V is the minimum value of the number of occurrences of any gray value j;
dividing out image area F of navel orange to be tested bw As shown in formula (9);
F bw ={(x,y)|v(x,y)>T} (9)
f in the formula bw The method is characterized in that the navel orange fruit to be tested is an area of the navel orange fruit to be tested in an image; (x, y) is the coordinates of any pixel in the navel orange area to be tested; v (x, y) is the gray value of the pixel at the image coordinate (x, y); t is a global threshold for navel orange image segmentation.
An arrangement, the step S2 includes:
s2-1, selecting a plurality of fresh navel orange fruits without heart rot defects for systematic gray scale calibration:
collecting blue component transmission images, and obtaining a blue component pixel set B of the batch of fruit-free areas through measured fruit segmentation operation set
Measurement of the B set Average value G of pixel gray scale in region AVG And standard deviation S TD As shown in formulas (9, 10);
Figure BDA0001654280750000061
g in AVG Is B set The average value of the pixel gray scale in the region; n is B set Total number of pixels in the region; (x, y) is B set Image coordinates of any pixel in the region; v (x, y) is the pixel at A at the image coordinates (x, y) B Gray values of (a);
Figure BDA0001654280750000062
s in TD Is B set Pixel a in a region B Standard deviation of gray values in (a); g AVG Is B set The average value of the pixel gray scale in the region; n is B set Total number of pixels in the region; (x, y) is B set Image coordinates of any pixel in the region; v (x, y) is the pixel at A at the image coordinates (x, y) B Gray values of (a);
s2-2 takes the mean value plus 3 times of standard deviation value as a defect segmentation threshold value T D Screening F bw A region in which the gray level exceeds the threshold value in the range is regarded as a defective portion D F As shown in formulas (11, 12);
T D =G AVG +3·S TD (11)
t in D Dividing a threshold for a defect; g AVG Is B set The average value of the pixel gray values in the region; s is S TD Is the corresponding standard deviation;
D F ={(x,y)|v(x,y)>T D ,(x,y)∈F bw } (12)。
alternatively, the step of S2 further includes:
s2-1' performs color space transformation on the R, G, B component diagram to obtain H, S, V components of HSV color space;
s2-2' detects a blue region in the H component diagram by using threshold segmentation (150-240), and the part of the blue region in the tested navel orange mask is used as a defect part.
The principle of the technical proposal is that,
1) The device comprises a collecting camera, a computer, a collecting box, a slideway, a fixed tray, a movable positioning mechanism, a lifting mechanism, a focusing lens and a white light source, wherein the slideway, the fixed tray, the movable positioning mechanism, the lifting mechanism, the focusing lens and the white light source are arranged in the collecting box;
2) The collecting box is a dark closed space when in work, and the internal material is a low-reflectivity material;
3) The collecting box is provided with a box door for taking and placing navel oranges, and the navel oranges enter the box door and roll down to the movable positioning mechanism along the slideway;
4) The data collected by the camera is transmitted to a computer for image processing;
5) The backlight transmitted light is focused through the lens and concentrated in a small range at the bottom center of the navel orange, and stray light leakage is reduced by reducing the irradiation area;
6) When the backlight illumination is performed, the defective part is brighter than other parts in a blue wave band, and the navel orange transmission image in the blue wave band is processed by an image processing method to detect the defective part due to internal heart rot and skin limp.
In image acquisition, it is necessary to ensure that the detection area is not disturbed by stray light. The corresponding image acquisition structure and mechanical part are designed accordingly.
a) Image acquisition structure part:
to ensure that ambient light effects are avoided, image acquisition should be performed in a darkened room. In order to avoid the leakage of the backlight source, a special fixing tray is designed to ensure that the head of the lighting device is tightly contacted with the surface of the navel orange and is light-tight and leakage-proof.
b) Mechanical part:
in order to ensure that the navel orange movable positioning mechanism is not illuminated by light transmitted from the navel orange to interfere with the background part in the transmission image, and further to avoid changing the gray distribution on the surface of the navel orange due to reflection of the movable positioning mechanism, the mechanical movement device is designed to ensure that the navel orange to be detected is positioned on the fixed tray, and the image is withdrawn from the image acquisition background area by moving away from the mechanical movement device before the image is acquired, namely, the image acquisition state from the loading positioning state of the detection device to the detection device is realized.
The working principle of the detection method is as follows:
1) The light transmittance of the soft part of the navel orange epidermis of the heart rot is increased.
2) Experiments show that in the visible light part, the transmittance of the blue wave band is most obvious at the defect part, and the transmittance is enhanced. Because the healthy navel orange absorbs blue light obviously, the healthy navel orange part transmits little blue light, and the heart-rotting navel orange has reduced absorption capacity to blue light due to deterioration of internal components, so the proportion of transmitted energy is obviously increased. The green wave band is also absorbed more by the flesh of healthy navel orange, but because of the existence of chlorophyll on the skin of the navel orange, a large amount of green tiny spots can exist on the skin of the healthy orange, and not only is the fruit stem generally green, but also the interference factors can interfere with green component enhancement signals caused by defects in backlight detection, so compared with the blue wave band, the detection effect is poorer, as shown in fig. 4-1 to 4-3, the fig. 4-1 is a color image of the front light illumination of the navel orange, if the defect part can obviously feel limp by hand, but is difficult to distinguish in the image by naked eyes, the position of the defect part in fig. 4-1 is marked by a white circle, the gray level of the defect part is obviously higher than other parts by the transmission illumination of the navel orange, and the defect part (shown in red in fig. 4-2) can be separated from other parts by simple threshold segmentation; fig. 4-3 show green component images of navel orange in transmission illumination, and although the gray scale of defective parts is generally higher than other parts, the areas (red areas in fig. 4-2) obtained by simple threshold segmentation contain more interference.
3) When the backlight illumination is performed, the defective part is brighter than other parts in a blue wave band, and the navel orange transmission image in the blue wave band is processed by an image processing method to detect the defective part due to internal heart rot and skin limp.
4) In order to obtain 1) the blue band transmission image, an image acquisition scheme is adopted:
white light is used for illumination, a color camera is used for collecting a color transmission image, and then a blue wave band transmission image is obtained through an image processing method.
There are two image processing methods:
and c.1, directly extracting a blue (B) component in the RGB image to obtain a blue band image B1. The blue image obtained by the method has more noise points, and the area segmentation and the screening of defective parts are carried out by a morphological image processing method, and the blue image is sensitive to the change of the backlight illumination gray level and needs to be compensated by an additional gray level self-adaptive algorithm;
c.2 transforming the RGB transmission image to HSV color space by image color space transformation calculation. The blue part is extracted by setting a threshold value of a blue band by image segmentation of the hue (H) component map. The method is insensitive to the change of the gray level of the backlight illumination, has stable performance, has obvious detection effect and obviously reduces interference factors because the blue wave band transmission energy of healthy navel orange and fruit stalks is weak.
The detection method comprises the following specific steps:
1. and (3) image acquisition:
1) Preparing a certain number of navel oranges, wherein the navel oranges comprise defective and normal areas with limp areas on the surfaces;
2) Opening the collection box door, and enabling navel oranges to roll on the fixed tray freely through the slideway;
3) Closing the collection box door, and driving the movable positioning mechanism at the periphery of the fixed tray to descend from the state 1 to the state 2 by the lifting mechanism to be far away from the fixed tray;
4) Opening a back transmission lamp, focusing into parallel light beams through a lens, and concentrating in a small range at the bottom center of the navel orange;
5) Opening a camera to collect images, and transmitting and storing the collected images to a computer;
6) Image processing is performed using computer software.
2. Image processing:
step 1, performing image decomposition on an acquired RGB image to obtain a R, G, B component diagram;
and step 1.1, obtaining the spatial range of the measured fruit in the transmission image by image segmentation by utilizing the gray level difference of the background and the measured fruit. The method comprises the following specific steps:
1.1-1, picking up proper picture size in original picture, making image decomposition on RGB image to obtain R, G, B component image, comparing, and making blue component image possess good distinguishing effect, so that in the blue component image, making automatic threshold segmentation and area screening (the size area of pixel area according to the detection system calibration is equivalent to diameter range of fruit to be detected is 60-80mm, when the proportion of acquisition system is 14.6 pixels/mm, the correspondent area screening threshold lower limit is TL=41259 pixels, and threshold upper limit is TH= 73350 pixels), excluding the condition of only backlight source when no fruit is detected
Step 1.1-2, obtaining the tested fruit mask.
Case (1) if the blue band transmission image obtained by the image processing method c.1 (as in fig. 5-2),
and 2, extracting a gray level histogram of the blue component image in the measured fruit mask area. The homogeneity and standard deviation of the gray level histogram of the region are measured.
And 3, taking the average value plus 3 times of standard deviation value as a threshold value, and detecting the region with the gray level exceeding the threshold value as a defect part.
Case (2) if the blue band transmission image obtained by the image processing method c.2 (see figure 5-2),
step 2, performing color space transformation on the R, G, B component diagram to obtain H, S, V components of the HSV color space;
and 3, detecting a blue region in the H component diagram by using threshold segmentation (150-240), wherein the part of the blue region in the detected fruit mask obtained in the 1.1-2 steps is used as a defect part.
Obtaining a blue wave band transmission image by the two image processing methods, further processing to obtain a defect part, and then performing the processing of the step 4:
and step 4, judging whether the size of the defect part exceeds the detection requirement, outputting a detection result as a defect result if the area of a single part or all the defect parts exceeds a set threshold value, otherwise outputting a pass detection or performing defect grading according to the area and gray scale of the defect part.
Advantageous effects
1) The invention provides a nondestructive testing method for the defective part of navel orange with soft epidermis due to internal rotted heart based on blue wave band transmission image detection;
2) In the detection device provided by the invention, the black soft elastic fabric layer design of the fixed tray can effectively prevent the light leakage of the back light source; the movable positioning mechanism is far away from the navel orange through the lifting mechanism in the state of collecting images, so that objects around the sample are effectively prevented from reflecting; the slide way design can effectively convey the sample to the fixed tray;
4) In the invention, the backlight transmission light source is focused into parallel light beams through the convex lens and is concentrated in a small range at the bottom center of the navel orange, and the stray light leakage is reduced by reducing the irradiation area;
5) The invention utilizes image segmentation to find out that the blue wave band has better distinguishing effect, and can clearly find out the navel orange with broken inside after the subsequent two methods are processed;
6) The invention has simple operation, good effect and high intelligent degree; the method has no damage to the sample, and belongs to nondestructive detection;
7) The detection of the invention does not need pretreatment, simplifies operation and saves time.
When the back light is utilized for illumination, the light transmittance of the soft part of the navel orange epidermis of the navel orange heart rot is increased; in the visible light portion, the transmittance of the blue band is most remarkable at the defective portion and the magnitude of the transmittance enhancement is most remarkable, so that the internal rotting is detected in this way. The invention has accurate and objective test result and visual expression mode, thereby providing means for monitoring and controlling the storage quality of the product.
Drawings
FIG. 1 is a diagram of a loading positioning state (State 1) of an image acquisition system;
FIG. 2 is a schematic diagram of an image acquisition state (State 2) of the image acquisition system;
in the figure: camera 1, collection box 2, slide 3, sample 4, fixed tray 5, movable positioning mechanism 6, elevating mechanism 7, focusing lens 8, transmission light source (white light source) 9, computer 10, opening (i.e. notch) 11 of the positioning mechanism connected with the slide.
FIG. 3 is a flow chart of the present detection method;
FIG. 4-1 is a color image of the front-side illumination of navel orange;
FIG. 4-2 is a navel orange transmission illumination blue component image;
4-3 are green component images of navel orange in transmitted illumination;
FIG. 5-1 shows a blue band transmission image obtained by image processing method c.1;
fig. 5-2 shows a blue band transmission image obtained by the image processing method c.2.
Detailed Description
The present solution is illustrated by the drawings and examples below.
The invention provides a nondestructive testing method and an image acquisition system for a defective part of navel orange with soft skin due to internal rotten heart based on blue wave band transmission image detection, which specifically comprises the following steps:
as shown in fig. 1 and 2, an image acquisition system for the nondestructive testing of the heart rot of navel orange,
1) The device comprises a collection camera 1, a collection box 2, a slideway 3, a sample 4, a fixed tray 5, a movable positioning mechanism 6, a lifting mechanism 7, a focusing lens 8, a transmission light source 9, a computer 10 and the like;
2) The size of the collecting box is 300x300x500mm, the collecting box is a dark closed space when in work, and the material with low reflectivity inside is black flannelette;
3) The collecting box is provided with a box door for taking and placing navel oranges, the diameter of a measured object is 60-80mm, the collecting box door is 200mmx200mm, the box door is arranged such that the navel oranges roll down to the movable positioning mechanism along a slide way, the upper opening of the slide way is 100mm wide, the lower opening of the slide way is 80mm wide, the diameter of the large opening end of the movable positioning mechanism is 140mm, and the small opening end is 75mm;
4) The data collected by the camera is 3024x4032 pixels, and the data are transmitted to a computer for image processing;
5) The backlight transmission lamp is a 50W halogen lamp which is focused through a lens and is concentrated in a small range at the center of the bottom of the navel orange, and stray light leakage is reduced by reducing the irradiation area;
6) When the backlight illumination is performed, the defective part is brighter than other parts in a blue wave band, and the navel orange transmission image in the blue wave band is processed by an image processing method to detect the defective part due to internal heart rot and skin limp.
7) In image acquisition, it is necessary to ensure that the detection area is not disturbed by stray light. The corresponding image acquisition structure and mechanical part are designed accordingly.
a) Image acquisition structure part:
to ensure that ambient light effects are avoided, image acquisition should be performed in a darkened room. In order to avoid the leakage of the backlight source, a special fixed tray (the diameter of the large opening end of the fixed tray is 56mm, the diameter of the small opening end of the fixed tray is 40mm, and the diameter of the internal projection light channel is 30 mm) is designed to ensure that the head of the lighting device is in tight contact with the surface of the navel orange, and the lighting device is light-tight and does not leak.
b) Mechanical part:
in order to ensure that the navel orange movable positioning mechanism is not illuminated by light transmitted from the navel orange to interfere with the background part in the transmission image, and further to avoid changing the gray distribution on the surface of the navel orange due to reflection of the movable positioning mechanism, the mechanical movement device is designed to ensure that the navel orange to be detected is positioned on the fixed tray, and moves away from the detected target by the mechanical movement device before the image is acquired, and the image acquisition background area is withdrawn, namely from state 1 to state 2.
As in fig. 3:
the detection method comprises the following steps:
1. the image acquisition process comprises the following steps:
1) Preparing a certain number of navel oranges, wherein the navel oranges comprise a soft area and a normal navel orange;
2) Opening the collection box door, and automatically rolling the navel orange onto a fixed tray through a slideway;
3) Closing the collection box door, and driving the movable positioning mechanism for fixing the tray for one circle to descend from the station 1 to the station 2 by the lifting mechanism, so as to be far away from the fixed tray;
4) The back transmission lamp is turned on, and the back transmission lamp is focused into parallel light beams through a lens and is concentrated in a small range at the center of the bottom of the navel orange
5) Opening a camera to collect images, and transmitting and storing the collected images to a computer;
2. the image processing process comprises the following steps:
firstly, automatically selecting a view field area on an acquired original image, and then carrying out subsequent step processing;
step 1, performing image decomposition on an RGB image to obtain a R, G, B component diagram;
and step 1.1, obtaining the spatial range of the measured fruit in the transmission image by image segmentation by utilizing the gray level difference of the background and the measured fruit. The method comprises the following specific steps:
1.1-1, selecting proper picture size from original pictures, carrying out image decomposition on RGB images to obtain R, G, B component images, and comparing the images to obtain a blue component image with better distinguishing effect, so that in the blue component image, carrying out automatic threshold segmentation by using an Ojin method, and carrying out area screening (the equivalent of the pixel area to the size area calibrated by a detection system is 60-80mm in diameter range of fruits to be detected, when the proportion of an acquisition system is 14.6 pixels/mm, the lower limit of the corresponding area screening threshold is TL=41259 pixels, and the upper limit of the threshold is TH= 73350 pixels), thereby excluding the condition that only backlight sources exist when fruits are not detected
Step 1.1-2, obtaining the tested fruit mask.
A, if the blue band transmission image is obtained through the image acquisition scheme c.1, then:
and 2, extracting a gray level histogram of the blue component image in the measured fruit mask area. The mathematical expectation and standard deviation of the gray level histogram of the region are measured.
And 3, taking the average value plus 3 times of standard deviation value as a threshold value, and detecting the region with the gray level exceeding the threshold value as a defect part.
B if the blue band transmission image obtained by the image acquisition scheme c.2, then:
step 2, performing color space transformation on the R, G, B component diagram to obtain H, S, V components of the HSV color space;
step 3, in the H component diagram, detecting a blue region by using threshold segmentation (150-240), wherein the part of the blue region in the tested navel orange mask is used as a defect part;
and step 4, judging whether the size of the defect part exceeds the detection requirement according to the requirement, outputting a detection result as a defect result if the area of a single part or all the defect parts exceeds a set threshold value, otherwise outputting a pass detection or performing defect grading according to the area and gray level of the defect part.

Claims (3)

1. A navel orange heart rot nondestructive testing method based on blue wave band transmission image detection is characterized by comprising the following steps:
1. the original image is collected in the camera bellows, and the picture is obtained in the following mode: adopting a white light source to irradiate a part of area of one side face of the navel orange, and adopting a camera to acquire images on the other side face of the navel orange; the axis of the camera lens and the axis of the white light source are in the same straight line; the white light source and the irradiated area of the navel orange are in the same tight and opaque space, and after the light rays of the white light source are focused, the white light source and the irradiated area of the navel orange are irradiated on the navel orange in parallel;
2. firstly, selecting a field area on an acquired original image, and then performing subsequent step processing;
s1: performing image decomposition on the RGB image to obtain a red, green and blue component diagram; then selecting a blue component diagram for processing to obtain a tested navel orange mask;
s2: the obtained blue wave band transmission image is compared with a tested navel orange mask to obtain a navel orange defect part;
s3: judging whether the navel orange is rotten by taking whether the size of the defect part exceeds the detection requirement as a standard;
the step S1 includes:
1) Position calibration and image detection region segmentation
Firstly, automatically intercepting a detection target area image in an original image:
after the tray frame and the imaging system are mechanically installed, the position of the imaging system is calibrated by a calibration ball during first image acquisition, so that a positioning calibration image is obtained;
extracting the image coordinates (x 0 ,y 0 ) Obtaining the pixel/mm of the size conversion coefficient of the world coordinate and the image coordinate according to the pixel size of the measured diameter of the calibration sphere in the positioning calibration chart;
setting the range requirement of the nominal diameter D of the size of the navel orange to be measured as (1); if the detected fruits exceed the size range, jumping out of the detection flow after the subsequent fruit segmentation step, and prompting that the size exceeds the limit;
D Min ≤D≤D Max (1)
wherein D is Min And D Max Respectively are provided withNominal diameter upper and lower limits for fruits to be detected;
then the side length L of the square detection area is calculated according to equation (2):
L=f·D Max ·R (2)
wherein f is a constant coefficient; d (D) Max The maximum value of the nominal diameter range of the fruit to be measured is measured in mm; the conversion coefficient is the conversion coefficient of world coordinates and pixel coordinates, and the unit is pixel/mm;
and determining a detection region in the image according to formula (3), represented by a set of pixels a:
Figure FDA0004137943300000021
in (x) 0 ,y 0 ) For calibrating the coordinates of the center of the sphere in the image, L is the side length of the detection area calculated according to the formula (2), and (x, y) is the image coordinates of the pixel points in the pixel set A of the detection area in the image;
2) Detection zone color component and fruit image segmentation to be detected
The color of the divided color image of the detection area is decomposed to obtain single color component images of the detection area, namely red component images A of the detection area respectively R Detection zone green component image A G And detection area blue component image a B
Then blue component image A in detection area B The method comprises the following steps of:
obtaining the area N of the fruit to be detected in the detection area according to the diameter range of the fruit to be detected and the size of the detection area F With background area N BG The ratio should be within the range of formula (3 '), otherwise, the detection flow is jumped out, and the ' size out of range ' is prompted;
Figure FDA0004137943300000022
wherein D is Min And D Max The upper limit and the lower limit of the nominal diameter of the fruits to be detected are respectively set; f is a constant coefficient;
map A of blue component of detection zone B The pixels in the pixel list V are arranged in ascending order according to the gray value AB The method comprises the steps of carrying out a first treatment on the surface of the From the ordered list of pixels V, according to the upper and lower scale limits determined by equation (3') AB The selected pixel p 1 And p is as follows 2 Pixel subset V 'in between' AB
p 1 And p is as follows 2 At V AB The percentile values of (2) are respectively calculated according to formulas (4 and 5):
Figure FDA0004137943300000031
Figure FDA0004137943300000032
wherein D is Min And D Max The upper limit and the lower limit of the nominal diameter of the fruits to be detected are respectively set; f is a constant coefficient;
let pixel i belong to set V' AB The gray value of which is V (i), then the set of pixels V' AB The gray level set of (2) is V, as shown in formula (6), wherein the range of any pixel gray level value j accords with formula (7);
V={j|j=v(i)},i∈V′ AB (6)
wherein i is a set V' AB V (i) is the gray value of pixel i in the blue component map, denoted by j; v is V' AB A set of gray values that occur at all pixel locations;
v(p 1 )<j<v(p 2 ) (7)
wherein j is any gray value in V; v (p) 1 ) Is pixel p 1 Is of the gray scale value of v (p 2 ) Is pixel p 2 Gray values of (2);
let the number of occurrences of the gray value j in the set V be n j T is the gray value with the least occurrence number in V, and then T is the blue component image A from the detection area B Extracting a global threshold of a navel orange area, wherein the global threshold is shown in formulas (8 and 9);
n T =min({n j }),j∈V (8)
in n T The number of occurrences of the threshold T in V is the minimum value of the number of occurrences of any gray value j;
dividing out image area F of navel orange to be tested bw As shown in formula (9);
F bw ={(x,y)|v(x,y)>T} (9)
f in the formula bw The method is characterized in that the navel orange fruit to be tested is an area of the navel orange fruit to be tested in an image; (x, y) is the coordinates of any pixel in the navel orange area to be tested; v (x, y) is the gray value of the pixel at the image coordinates (x, y); t is a global threshold for navel orange image segmentation.
2. The detection method according to claim 1, wherein the step S2 includes:
s2-1, selecting a plurality of fresh navel orange fruits without heart rot defects for systematic gray scale calibration:
collecting blue component transmission images, and obtaining a blue component pixel set B of the batch of fruit-free areas through measured fruit segmentation operation set
Measurement of the B set Average value G of pixel gray scale in region AVG And standard deviation S TD As shown in formulas (9, 10);
Figure FDA0004137943300000041
g in AVG Is B set The average value of the pixel gray scale in the region; n is B set Total number of pixels in the region; (x, y) is B set Image coordinates of any pixel in the region; v (x, y) is the pixel at A at the image coordinates (x, y) B Gray values of (a);
Figure FDA0004137943300000042
s in TD Is B set Pixel a in a region B Standard deviation of gray values in (a);G AVG is B set The average value of the pixel gray scale in the region; n is B set Total number of pixels in the region; (x, y) is B set Image coordinates of any pixel in the region; v (x, y) is the pixel at A at the image coordinates (x, y) B Gray values of (a);
s2-2 takes the mean value plus 3 times of standard deviation value as a defect segmentation threshold value T D Screening F bw In the range the gray level exceeds the threshold T D Is taken as a defect site D F As shown in formulas (11, 12);
T D =G AVG +3·S TD (11)
t in D Dividing a threshold for a defect; g AVG Is B set The average value of the pixel gray values in the region; s is S TD Is the corresponding standard deviation;
D F ={(x,y)|v(x,y)>T D ,(x,y)∈F bw } (12)。
3. the method according to claim 1, wherein the step of S2 comprises:
s2-1' performs color space transformation on the R, G, B component diagram to obtain H, S, V components of HSV color space;
s2-2' detects a blue region in the H component diagram by using threshold segmentation (150-240), and the part of the blue region in the tested navel orange mask is used as a defect part.
CN201810435737.4A 2018-05-09 2018-05-09 Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection Active CN108872085B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810435737.4A CN108872085B (en) 2018-05-09 2018-05-09 Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810435737.4A CN108872085B (en) 2018-05-09 2018-05-09 Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection

Publications (2)

Publication Number Publication Date
CN108872085A CN108872085A (en) 2018-11-23
CN108872085B true CN108872085B (en) 2023-04-25

Family

ID=64332958

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810435737.4A Active CN108872085B (en) 2018-05-09 2018-05-09 Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection

Country Status (1)

Country Link
CN (1) CN108872085B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110132857B (en) * 2019-05-20 2021-09-07 南京林业大学 Internal detection method for navel orange all-dimensional imaging
CN110132858B (en) * 2019-05-20 2021-07-23 南京林业大学 Nondestructive testing method for detecting internal defects of navel oranges
CN110363752B (en) * 2019-07-08 2022-10-14 创新奇智(青岛)科技有限公司 Garment material defect simulation generation method, computer readable medium and system
CN113390834B (en) * 2021-06-23 2023-04-28 长江师范学院 Crisp plum maturity detection method based on visual recognition
CN113390833A (en) * 2021-06-23 2021-09-14 长江师范学院 Crisp plum maturity judging method based on multiple detection modes
CN113850809A (en) * 2021-12-01 2021-12-28 武汉飞恩微电子有限公司 Method for detecting appearance defects of protective film of chip resistor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06288903A (en) * 1993-03-31 1994-10-18 Kajitsu Hihakai Hinshitsu Kenkyusho:Kk Light transmission detector for inspecting internal quality of vegetables and fruits
JPH11132750A (en) * 1997-10-30 1999-05-21 Matsushita Electric Ind Co Ltd Point defect detecting device and method therefor
JP2006170669A (en) * 2004-12-13 2006-06-29 Mitsui Mining & Smelting Co Ltd Quality inspection device of vegetables and fruits
CN101008611A (en) * 2007-01-12 2007-08-01 浙江大学 Portable fruit sugar content non-destructive detection device capable of weighing
CN105158178A (en) * 2015-10-08 2015-12-16 华中农业大学 Rapid modeling method for detecting sugar content of navel orange based on spectral peak area in high spectral transmission technology
WO2017089352A1 (en) * 2015-11-27 2017-06-01 Maf Agrobotic Method and device for optically analysing citrus fruit by scattering/transmitting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06288903A (en) * 1993-03-31 1994-10-18 Kajitsu Hihakai Hinshitsu Kenkyusho:Kk Light transmission detector for inspecting internal quality of vegetables and fruits
JPH11132750A (en) * 1997-10-30 1999-05-21 Matsushita Electric Ind Co Ltd Point defect detecting device and method therefor
JP2006170669A (en) * 2004-12-13 2006-06-29 Mitsui Mining & Smelting Co Ltd Quality inspection device of vegetables and fruits
CN101008611A (en) * 2007-01-12 2007-08-01 浙江大学 Portable fruit sugar content non-destructive detection device capable of weighing
CN105158178A (en) * 2015-10-08 2015-12-16 华中农业大学 Rapid modeling method for detecting sugar content of navel orange based on spectral peak area in high spectral transmission technology
WO2017089352A1 (en) * 2015-11-27 2017-06-01 Maf Agrobotic Method and device for optically analysing citrus fruit by scattering/transmitting

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘国敏 ; 邹猛 ; 刘木华 ; 黎静 ; .脐橙色泽与着色率的机器视觉检测技术研究.江西农业大学学报.2008,(第03期),全文. *
李江波 ; 饶秀勤 ; 应义斌 ; 马本学 ; 郭俊先 ; .基于掩模及边缘灰度补偿算法的脐橙背景及表面缺陷分割.农业工程学报.2009,(第12期),第133-137页. *

Also Published As

Publication number Publication date
CN108872085A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108872085B (en) Navel orange heart rot nondestructive testing method based on blue wave band transmission image detection
JP6791972B2 (en) Methods and Devices for Detecting Interferents in Samples
CN110573883B (en) Method and apparatus for determining tag count during sample characterization
JP7055818B2 (en) HILIN evaluation method and device using convolutional neural network
Mahendran et al. Application of computer vision technique on sorting and grading of fruits and vegetables
JP6879366B2 (en) Methods, devices and quality check modules for detecting hemolysis, jaundice, lipemia, or normality of a sample
US10890537B2 (en) Appearance inspection device, lighting device, and imaging lighting device
TWI499669B (en) Method for detecting a microorganism, apparatus for detecting a microorganism, and program
CN111220582A (en) Fluorescence penetrant inspection system and method
JP5443950B2 (en) Bacterial colony fishing device and method
CN208795671U (en) The structure division of image capturing system for the rotten heart non-destructive testing of navel orange
CN110520737A (en) Method and apparatus for carrying out label compensation during sample characterizes
US11555789B2 (en) Systems, methods and apparatus for autonomous diagnostic verification of optical components of vision-based inspection systems
CN114445330A (en) Method and system for detecting appearance defects of components
CN107969148A (en) Image analysis system and method
CN113177925B (en) Method for nondestructive detection of fruit surface defects
CN107833223B (en) Fruit hyperspectral image segmentation method based on spectral information
CN105954205B (en) Green plum pol based on light spectrum image-forming and acidity Rapid non-destructive testing device
JP3333472B2 (en) Non-destructive detection method and device of blood egg in brown chicken egg
CN116148265A (en) Flaw analysis method and system based on synthetic leather high-quality image acquisition
CN110456010A (en) A kind of method of lossless quick detection egg freshness
JPH04118546A (en) Bottle inspection device
KR102390058B1 (en) Data generation device and method for led panel defect detection
JP2023137057A (en) Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device
JPH0862155A (en) Object 0bserving apparatus

Legal Events

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