CN108416814A - Quick positioning and recognition methods and the system on a kind of pineapple head - Google Patents

Quick positioning and recognition methods and the system on a kind of pineapple head Download PDF

Info

Publication number
CN108416814A
CN108416814A CN201810139803.3A CN201810139803A CN108416814A CN 108416814 A CN108416814 A CN 108416814A CN 201810139803 A CN201810139803 A CN 201810139803A CN 108416814 A CN108416814 A CN 108416814A
Authority
CN
China
Prior art keywords
image
pineapple
value
color
point
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
CN201810139803.3A
Other languages
Chinese (zh)
Other versions
CN108416814B (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.)
Guangzhou University
Original Assignee
Guangzhou 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 Guangzhou University filed Critical Guangzhou University
Priority to CN201810139803.3A priority Critical patent/CN108416814B/en
Publication of CN108416814A publication Critical patent/CN108416814A/en
Application granted granted Critical
Publication of CN108416814B publication Critical patent/CN108416814B/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/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30188Vegetation; Agriculture

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of quick positioning on pineapple head and recognition methods and system, the method step to specifically include:Acquisition may include the RGB image of pineapple information;RGB image is converted into HSV images, to it into row threshold division, profile processing, the image-region of above-mentioned position in RGB image is extracted, as area-of-interest in location area maximum suspected target object area position;The color histogram for generating area-of-interest, it is matched with the pineapple head color histogram under preset varying environment, judges whether similarity reaches given threshold;Area-of-interest pineapple head fruit eye feature is extracted simultaneously, features described above is input to grader, judgement pineapple head fruit eye whether there is, and calculate the centre coordinate of fruit eye;Similarity and the feature of fruit eye are obtained through the above steps.The present invention can realize the quick positioning and identification to pineapple head, advantageously reduce risk injured in pineapple picking process, improve labor efficiency.

Description

Quick positioning and recognition methods and the system on a kind of pineapple head
Technical field
The invention mainly relates to the quick positioning on the identification of computer vision and positioning more particularly to a kind of pineapple head with Recognition methods and system.
Background technology
Fruit is the necessity in our daily lifes, and fruit-picking how preferably to be gone to be asked at what we needed to solve Topic.Pineapple is a kind of very strong fruit of picking season property, makes fruit peak period and there was only or so two weeks, so improving pineapple picking Efficiency be a certainty developing direction.It is all manually to pick that the picking of pineapple is most of at present, does so and consumes largely Manpower and materials, and pineapple has larger thorn, it is possible to orchard worker can be caused to damage.So the automatic picking of research pineapple, For the loss for reducing labour, the quality for increasing pineapple picking, the harvest for stablizing pineapple and the sales rate for improving fruit, all It is of great significance.
Invention content
It is an object of the invention to be related to a kind of pineapple head to be quickly positioned at recognition methods, and this method calculates simpler And rapidly pineapple head can be identified, it solves the problems, such as automatic identification pineapple, pineapple can be effectively improved Automatically the quality picked.
The purpose of the present invention can be realized by following technical solution:
A kind of quick positioning and recognition methods on pineapple head, specifically include:
S1, acquisition may include the RGB image of pineapple information;
S2, RGB image is converted to HSV images, to it into row threshold division, image preprocessing, it is doubtful obtains several The image-region of above-mentioned position in RGB image is extracted, as sense in target object area, the maximum region position of location area Interest region;
S3, the color histogram for generating area-of-interest, by itself and the pineapple head face under preset varying environment Color Histogram is matched, and judges whether similarity reaches setting pre-value;
Meanwhile the pineapple head fruit eye feature of area-of-interest is extracted, features described above is input to grader, judges pineapple Head fruit eye whether there is, and calculate the centre coordinate of fruit eye;
S4, the feature by exporting pineapple head color similarity and fruit eye that step S3 is obtained, judge the figure of acquisition Seem it is no include pineapple head.
Further, the Threshold segmentation, specific steps include:
3 groups of threshold values are set according to the maximum color accounting of HSV image inspections target after conversion first, are tone threshold respectively It is worth range [H_down, H_up], saturation degree threshold range [S_down, S_up], brightness threshold range [V_down, V_up]; The tone of HSV images, saturation degree, the value of brightness and above-mentioned 3 groups of threshold ranges are compared respectively, specially:If falling In threshold range, it is set as 255;If beyond outside threshold range, it is set as 0;Described 255 indicate the pixel of white;0 table Show the pixel of black.
When further, in step s 2 to image into row threshold division, due to most of pineapple cultivation external environment out of office, Therefore certain undulating value is had below different luminous intensities by the brightness-value on the pineapple head of camera crawl.Cause This, after obtaining luminous intensity according to luminous intensity equations, needs to compensate the threshold value of brightness according to luminous intensity.
Therefore, 3 groups of threshold values [H_down, H_up], [S_down, S_up], [V_down, V_up] setting formula are as follows:
H_up=upper_H
H_down=lower_H
S_up=upper_S
S_down=lower_S
V_up=upper_V+I × b
V_down=lower_V+I × b
Wherein, upper_H, lower_H, upper_S, lower_S, upper_V, lower_V indicate tone, saturation respectively Degree and the bound color value of brightness, check in all in accordance with the hsv color table of comparisons, and b is illumination compensation coefficient, for a setting Value, I is intensity of illumination, is calculated by following formula:
I=hvN/ (At)
Wherein, h is planck constant, and v indicates that frequency, A indicate that irradiation area area, N indicate to be irradiated in time interval t Number of photons on A.In above-mentioned expression formula, it is [0, I*b] that I × b was indicated, which is the fluctuation range of upper limit threshold and lower threshold, It is not offered as strictly increasing this value of I × b.In real process, undulating value should be adjusted according to the effect of identification.
Further, in the image preprocessing after step S2 Threshold segmentations, gray-scale map is first converted images into, then carry out Corresponding processing.The thickness of image can be reduced and improve the processing speed of image by being converted into gray-scale map.After Threshold segmentation The conversion formula that image is converted to gray-scale map is as follows:
Gray=0.3414 × H+0.5478 × S+0.1108 × V
Image after the Threshold segmentation is binary map, is the image of triple channel, and color thickness is 3, transformed gray scale It is 1 that the value of pixel, which only has 0 and 255, transformed color of image thickness, in figure, substantially increases arithmetic speed.
Further, it in described image pretreatment, is specifically included by the transformed respective handling of image:Be filtered with And edge filling.
It is filtered using a kind of method for the discontinuous white point polishing continuous X-axis and Y-axis, is named as XY axis and does not connect Continuous Denoising Algorithm.Further, the discontinuous Denoising Algorithm of XY axis specifically includes:
Preset a judgment value, respectively to discontinuous small particles in the X-axis and Y-axis of transformed gray level image into Row polishes, if white point is less than judgment value in the continuation degree of X-axis or Y-axis, then the small particles in X-axis or Y-axis will be smoothed, Become black;If white point is greater than or equal to judgment value in the continuation degree of X-axis or Y-axis, then the small particles in X-axis or Y-axis It would not be smoothed, that is, be left white.By the discontinuous Denoising Algorithm of XY axis, can quickly remove extra non-after Threshold segmentation The color point of object.
For image after carrying out denoising according to the discontinuous Denoising Algorithm of XY axis, target image edge can become incomplete, be not easy to catch Catch profile, it is therefore desirable to which edge filling is carried out to the image after denoising.
Further, the edge filling, specifically includes:
The rough edge treated for carrying out X-axis to the image after being filtered first, using the image after thresholding, to pixel Point carries out the right side and subtracts a left side, as a result takes absolute value, if the point of white subtracts each other or the point of black subtracts each other, the value after subtracting each other all is 0, when The point of black takes absolute value after subtracting the point of white or the point of white subtracts the point of black, and obtained value is just 255;By rough side Edge treated point be image marginal point;
Edge filling is carried out, selects a marginal point first, using it as the center of circle, radius is 1 pair and is filtered in rear image Edge judged;If there is continuous point in the roundlet that radius is 1, i.e., the quantity of 255 pixel is more than or equal to 3, i.e., The radius of a filling circle is set to carry out edge filling then just using the marginal point of the selection as the center of circle for continuous boundary;Weight It is complete to obtain edge filling after all marginal points of the obtained image of rough edge treated have all judged for multiple above-mentioned steps At image.Accurate edge detection is carried out to the image after edge filling, profile is stored completely.
It is divided into multiple independent profiles to the profile of continuum to store, it is quasi- to carry out maximum rectangle to each profile It closes, i.e., using profile length and wide maximum value as the length and width in maximum fitted rectangle region, positions the maximum fitting of each profile Region.The image-region of above-mentioned position in RGB image is extracted in the maximum fitted area position of location area, emerging as feeling Interesting region.
Further, pixel color is carried out to area-of-interest according to distribution of color and statistic algorithm in the step S3 Statistics, specifically include:
The Color Statistical that each pixel in area-of-interest indicates is got up, certain color dividing regions are set Between, color histogram is generated, is matched with color histogram pre-set under varying environment, if similarity reaches threshold Value, then can be expressed as the pineapple head of certain similarity.
Further, color histogram pre-set under the varying environment, specifically includes:
The number of colours magnitude in same color section under varying environment is acquired, Xi is expressed as the environment under i-th kind of environment It is worth variable, with the number of colours magnitude in a color interval under F (X1, X2, X3....) the expressions varying environment.Pass through The data for inputting a large amount of same color sections (such as yellow) allow neural network constantly to change its Weight value and biases values, and Deviation is reduced, similar function is fitted, generates canonical function histogram.
Further, pineapple head fruit eye feature recognition is carried out to area-of-interest in the step S3, specifically included:
Pineapple head fruit eye sample is acquired, positive negative sample is classified as, trains grader to carry out positive and negative sample by OpenCV This training, wherein positive sample is target sample to be checked, and negative sample is other any images.It sizes picture and positive and negative The ratio of sample carries out feature extraction training by a large amount of pineapple head fruit eye data, sets the parameter of grader, for example, Peak excursion degree, maximum rotation angle, modified weight values and the biases values of background color;Positive negative sample is placed on same Catalogue is trained, and the feature of fruit eye is obtained after training.
The system of another object of the present invention is to provide a kind of quick positioning and recognition methods based on pineapple head, promotees Into the research to the automatic picker system of pineapple.
A kind of quick positioning on pineapple head and identifying system, specifically include:Acquisition module, processing module, supporting module;
Further, acquisition module is used to carry out Image Acquisition to pineapple, and will acquire image transmitting back to processing Module;
Further, processing module is used to transmit acquisition module image progress Color Statistical and to the head of pineapple into The extraction and matching of row feature export the information after image procossing;Acquisition module is fixed in supporting module;
Further, supporting module specifically includes:Parallel-plate, supporting rack;Parallel-plate by two supporting racks be placed on away from The place of certain altitude from the ground, acquisition module are placed on parallel-plate center close to ground side, and processing module is placed on parallel Plate center is far from ground side;Supporting module is used to support processing module, and certain height and angle are provided for acquisition module To carry out Image Acquisition.
Further, the embeded processor in the processing module, may be used the calculating with image-capable The arbitrary combination of machine is substituted.
Further, the camera minute surface of the acquisition module is parallel to the ground;The camera of the acquisition module uses Resolution ratio is 640X480, size is that 350X350 is acquired image;Under this resolution ratio and size, the camera can The feature and details for accurately grabbing pineapple head, efficiently reduce processing time.
The present invention has advantageous effect below compared with prior art:
Comparison for calculation methods of the present invention is simple and arithmetic speed is fast, can realize to the quick fixed of pineapple head Position with more accurately identify, and need not cost can be reduced using high speed processor in systems in practice.
Description of the drawings
Fig. 1 is a kind of flow chart of the quick positioning and recognition methods on pineapple head in the embodiment of the present invention;
Fig. 2 is thresholding treated image in the embodiment of the present invention;
Fig. 3 is the discontinuous Denoising Algorithm schematic diagram of XY axis in the embodiment of the present invention;
Fig. 4 is the figure judged Y-axis in the embodiment of the present invention;
Fig. 5 is in the embodiment of the present invention to the figure after X-axis and Y-axis denoising;
Fig. 6 is that transformed gray-scale map carries out the filtered image of the discontinuous Denoising Algorithm of XY axis in the embodiment of the present invention;
Fig. 7 is the schematic diagram that edge picture point is chosen in the embodiment of the present invention;
Fig. 8 is that the marginal point chosen in the embodiment of the present invention carries out the image before edge filling;
Fig. 9 is that the marginal point chosen in the embodiment of the present invention carries out the image after edge filling;
Figure 10 is to carry out the image after edge filling in the embodiment of the present invention to the image after being filtered;
Figure 11 is to carry out the maximum fitted area that maximum process of fitting treatment obtains to entire target image in the embodiment of the present invention And the figure of maximum fitted area centre coordinate;
Figure 12 is the 24 by stages figure of color that Color Statistical is used in the embodiment of the present invention;
Figure 13 is pineapple sarcocarp eye pattern in the embodiment of the present invention.
Specific implementation mode
Technical solution of the present invention is further described with reference to the accompanying drawings and embodiments, but protection scope of the present invention It is not limited to that.
Embodiment:
A kind of quick positioning on pineapple head is as shown in Figure 1 with the flow chart of recognition methods.
S1, acquisition may contain pineapple head image information RGB image;
Further, the camera that described image uses is placed on apart from ground level as on 1.2 meters of parallel-plate, It is fitted in side of the parallel-plate center close to ground.
Further, the camera that described image acquisition uses uses resolution ratio, the size pair of 350X350 of 640X480 Image is acquired, and under above-mentioned resolution ratio and size, camera can accurately grab the feature and details on pineapple head, Efficiently reduce processing time.
S2, RGB image is converted to HSV images, to it into row threshold division, image preprocessing, it is doubtful obtains several The image-region of above-mentioned position in RGB image is extracted, as sense in target object area, the maximum region position of location area Interest region;
Further, Threshold segmentation specifically includes:
3 groups of threshold values are set according to the maximum color accounting of HSV image inspections target after conversion first, are tone threshold respectively It is worth range [H_down, H_up], saturation degree threshold range [S_down, S_up], brightness threshold range [V_down, V_up]; The tone of HSV images, saturation degree, the value of brightness and above-mentioned 3 groups of threshold ranges are compared respectively, specially:If falling In threshold range, it is set as 255;If beyond outside threshold range, it is set as 0;Described 255 indicate the pixel of white;0 table Show the pixel of black.
Further, due to most of pineapple cultivation external environment out of office, by the bright of the pineapple head of camera crawl Brightness value has certain undulating value below different luminous intensities.Therefore, it is shone according to luminous intensity equations After intensity, need to compensate the threshold value of brightness according to luminous intensity.
Therefore, 3 groups of threshold values [H_down, H_up], [S_down, S_up], [V_down, V_up] setting formula are as follows:
H_up=upper_H
H_down=lower_H
S_up=upper_S
S_down=lower_S
V_up=upper_V+I × b
V_down=lower_V+I × b
Wherein, upper_H, lower_H, upper_S, lower_S, upper_V, lower_V indicate tone, saturation respectively Degree and the bound color value of brightness, check in all in accordance with the hsv color table of comparisons, and b is illumination compensation coefficient, for a setting Value, I is intensity of illumination, is calculated by following formula:
I=hvN/ (At)
Wherein, h is planck constant, and v indicates that frequency, A indicate that irradiation area area, N indicate to be irradiated in time interval t Number of photons on A;The hsv color table of comparisons is as follows.
The 1 hsv color table of comparisons of table
In the present embodiment, indoors due to the place of Image Acquisition, undulating value can be set to:It shines strong Degree * 0.5%;
Therefore, it sets brightness threshold value to [V_down, V_up], it is as follows specifically to set formula:
V_up=upper_V+I × 0.005
V_down=lower_V+I × 0.005
Wherein, upper_V, lower_V are respectively brightness upper limit color value and brightness lower limit color value, according to HSV Color chart checks in, and it is intensity of illumination that illumination compensation coefficient, which is set as 0.005, I,.
The general intensity of illumination in interior ideally is 2000lx, therefore in the present embodiment, brightness upper limit threshold It is set as 41+10, lower threshold is set as 153+10, this data is obtained by normal illumination in ideally room on daytime;Not With under intensity of illumination, the value corresponding to bound in the hsv color table of comparisons can also change, therefore in reality, root The value of specific illumination compensation value and upper limit color and lower limit color is determined according to actual conditions;In the present embodiment, by bright The undulating value of brightness threshold value known to the threshold setting procedure of brightness can fluctuate in [0, I*0.005] range, therefore, according to The effect of the hsv color table of comparisons and actual feedback can set the brightness threshold value on pineapple head in actual conditions to adjust The brightness-value of image.
Fig. 2 is shown carries out the image that thresholding processing obtains later to original shooting image, and white area is maximum in Fig. 2 It is pineapple head, image can see that the small particles being much included in, these small particles are the non-targeted object in image Noise need that the image after Threshold segmentation is further processed in order to eliminate these noises, that is, convert the image into ash Image is filtered after degree figure and edge filling.
It is filtered using a kind of method for the discontinuous white point polishing continuous X-axis and Y-axis, is named as XY axis and does not connect Continuous Denoising Algorithm.The discontinuous Denoising Algorithm schematic diagram of XY axis is as shown in Figure 3.
Further, the discontinuous Denoising Algorithm of XY axis specifically includes:
Preset a judgment value, respectively to discontinuous small particles in the X-axis and Y-axis of transformed gray level image into Row polishes, if white point is less than judgment value in the continuation degree of X-axis or Y-axis, then the small particles in X-axis or Y-axis will be smoothed, Become black;If white point X-axis or Y-axis continuation degree heavy rain or be equal to judgment value, then the small particles in X-axis or Y-axis It would not be smoothed, that is, be left white.By the discontinuous Denoising Algorithm of XY axis, can quickly remove extra non-after Threshold segmentation The color point of object.
As shown in figure 4, gray-scale map carries out denoising according to the discontinuous Denoising Algorithm of XY axis:Judgment value is set as 3, is located in X-axis 3 points meet judgment value, 2 in Y-axis point does not meet judgment value.Result such as Fig. 5 institutes after gray-scale map denoising in Fig. 4 Show:3 points in X-axis are not smoothed, and 2 in Y-axis point is smoothed.In the present embodiment, selection uses and sentences Disconnected value carries out the discontinuous Denoising Algorithm denoising of XY axis for 2.
For image after carrying out denoising according to the discontinuous Denoising Algorithm of XY axis, target image edge can become incomplete, be not easy to catch Profile is caught, as shown in Figure 6, it is therefore desirable to which edge filling is carried out to the image after denoising.
Further, the edge filling, specifically includes:
The rough edge treated for carrying out X-axis to the image after being filtered first, using the image after thresholding, to pixel Point carries out the right side and subtracts a left side, as a result takes absolute value, if the point of white subtracts each other or the point of black subtracts each other, the value after subtracting each other all is 0, when The point of black takes absolute value after subtracting the point of white or the point of white subtracts the point of black, and obtained value is just 255;By rough side Edge treated point be image marginal point;
According to rough edge treated, the marginal point in image is obtained, according to the marginal point of gained, to the figure after being filtered Picture, i.e. Fig. 6 in the present embodiment carry out edge filling.
Edge filling is carried out, selects a marginal point, the principle for choosing marginal point as shown in Figure 7 first;With the side of selection Edge point is the center of circle, and radius is that the edge in 1 pair of image judges;If there is continuous point in the roundlet that radius is 1, i.e., 255 The quantity of pixel be more than or equal to 3, as continuous boundary, then just using the marginal point of the selection as the center of circle, the edge of selection Image before point progress edge filling is as shown in figure 8, setting one fills round radius to carry out edge filling;In the present embodiment In, it fills round radius and takes R=3;The pixel that all values are 0 is set to 255 in this circle, the marginal point of selection carries out Image after edge filling is as shown in Figure 9;It repeats the above steps, until all edges of the obtained image of rough edge treated After point has all judged, the image of edge filling completion is obtained.Image after being filtered to the present embodiment Fig. 6 carries out edge filling The image obtained afterwards is as shown in Figure 10.
Accurate edge detection is carried out to the image after edge filling, profile is stored completely.
It is divided into multiple independent profiles to the profile of continuum to store, it is quasi- to carry out maximum rectangle to each profile It closes, i.e., using profile length and wide maximum value as the length and width in maximum fitted rectangle region, to obtain the maximum of each profile Fitted area.
The maximum rectangle fitting method, specially:The edge pixel point for finding a profile, defines the maximum of X-coordinate Value is Max.x, minimum value is Min.x and the maximum value of Y-axis is Max.y, minimum value Min.y.Therefore, the width of profile is defined Length for Wide, profile is Length and the centre coordinate of profile is (X, Y), the width of profile, the length of profile with And the solution formula of the centre coordinate of profile is as follows:
Wide=Max.x-Min.x
Length=Max.y-Min.y
X=(Max.x+Min.x)/2
Y=(Max.y+Min.y)/2
Referring to Figure 11, maximum fitted area and maximum to be obtained to the maximum process of fitting treatment of entire target image progress are intended Close the figure of regional center coordinate;Wherein, W indicates that maximum width, L indicate maximum length in figure, and black indicates in profile at center Imago element.The maximum fitted area, for the rectangle of the maximum region fitting of area obtained after all contour fittings;Extraction The image-region of above-mentioned maximum fitted area in RGB image, as area-of-interest;
S3, the color histogram for generating area-of-interest, by itself and the pineapple head face under preset varying environment Color Histogram is matched, and judges whether similarity reaches setting pre-value;
The pineapple head fruit eye feature for extracting area-of-interest, grader, judgement pineapple head are input to by features described above Fruit eye whether there is, and calculate the centre coordinate of fruit eye;
Further, the statistics for carrying out pixel color to area-of-interest according to distribution of color and statistic algorithm, It specifically includes:
The Color Statistical that each pixel in area-of-interest indicates is got up, certain color dividing regions are set Between, color histogram is generated, is matched with color histogram pre-set under varying environment, if similarity reaches threshold Value, then can be expressed as the pineapple head of certain similarity.
Further, color demarcation interval can be divided into the section of the colors such as 12,24,46,72 point, what color interval divided More, precision is higher, but operation efficiency is slower, therefore, in the present embodiment, in order to realize quick identification, for pineapple Head feature identification uses 24 points of color interval.24 points of color interval is as shown in figure 12.
Further, color histogram pre-set under the varying environment, specifically includes:
The number of colours magnitude in same color section under varying environment is acquired, Xi is expressed as the environment under i-th kind of environment It is worth variable, with the number of colours magnitude in a color interval under F (X1, X2, X3....) the expressions varying environment.Pass through The data for inputting a large amount of same color sections (such as yellow) allow neural network constantly to change its Weight value and biases values, and Deviation is reduced, similar function is fitted.
In the present embodiment, in order to reduce the complexity of calculating, just using intensity of illumination for 2000lx indoor environment as ring Border variable.So just there are the reference axis of Y=F (X), input sample to generate data point, Function Fitting is carried out to data point.Not After obtaining relatively good fitting function with color interval, the Color Statistical figure of standard comparing can be generated.It is carried out with object Matching, according to similarity obtain whether be pineapple head.
Further, described that pineapple head fruit eye feature recognition is carried out to area-of-interest, it specifically includes:
Pineapple head fruit eye sample is acquired, positive negative sample is classified as, trains grader to carry out positive and negative sample by OpenCV This training, wherein positive sample is target sample to be checked, and negative sample is other any images.It sizes picture and positive and negative The ratio of sample carries out feature extraction training by a large amount of pineapple head fruit eye data, sets the parameter of grader, for example, Peak excursion degree, maximum rotation angle, modified weight values and the biases values of background color, positive negative sample are placed on same Catalogue is trained, and the feature of fruit eye is obtained after training.Pineapple head fruit eye is as shown in figure 13.
S4, the spy by exporting the pineapple head color similarity obtained after step S3 image recognition processings and fruit eye Sign judges whether the image of acquisition includes pineapple head.
The foregoing is merely the protection domains of the preferred embodiment of the invention, but patent of the present invention to be not limited thereto, and appoints What those familiar with the art is in the range disclosed in patent of the present invention, according to the inventive concept of patent of the present invention Or technical solution is subject to equivalent substitution or change, belongs to the protection domain of patent of the present invention.

Claims (10)

1. the quick positioning and recognition methods on a kind of pineapple head, it is characterised in that:Specific steps include:
S1, acquisition may include the RGB image of pineapple information;
S2, RGB image is converted to HSV images, to it into row threshold division, image preprocessing, obtains several suspected targets The image-region of above-mentioned position in RGB image is extracted, as interested in object area, the maximum region position of location area Region;
S3, the color histogram for generating area-of-interest are straight with the pineapple head color under preset varying environment by it Square figure is matched, and judges whether similarity reaches given threshold;
Meanwhile area-of-interest pineapple head fruit eye feature is extracted, features described above is input to grader, judgement pineapple head fruit Eye whether there is, and calculate the centre coordinate of fruit eye;
S4, the feature by exporting pineapple head color similarity and pineapple head fruit eye that step S3 is obtained, judge to acquire Image whether include pineapple head.
2. the quick positioning and recognition methods on a kind of pineapple head according to claim 1, it is characterised in that:The threshold value Segmentation, specifically includes:
3 groups of threshold values are set according to the maximum color accounting of HSV image inspections target after conversion first, are hue threshold model respectively Enclose [H_down, H_up], saturation degree threshold range [S_down, S_up], brightness threshold range [V_down, V_up];By HSV The tone of image, saturation degree, the value of brightness are compared respectively with above-mentioned 3 groups of threshold ranges, specially:If falling in threshold value model In enclosing, it is set as 255;If beyond outside threshold range, it is set as 0;Described 255 indicate the pixel of white;Described 0 indicates black Pixel.
3. the quick positioning and recognition methods on a kind of pineapple head according to claim 2, it is characterised in that:3 groups of threshold values [H_down, H_up], [S_down, S_up], [V_down, V_up] setting formula are as follows:
H_up=upper_H
H_down=lower_H
S_up=upper_S
S_down=lower_S
V_up=upper_V+I × b
V_down=lower_V+I × b
Wherein, upper_H, lower_H, upper_S, lower_S, upper_V, lower_V indicate respectively tone, saturation degree with And the bound color value of brightness, it is checked in all in accordance with the hsv color table of comparisons;Brightness-value has wave under different illumination intensity Dynamic value, it is therefore desirable to the threshold value of brightness be compensated according to intensity of illumination;B is illumination compensation coefficient, is a setting value, I For intensity of illumination, calculated by following formula:
I=hvN/ (At)
Wherein, h is planck constant, and v indicates that frequency, A indicate that irradiation area area, N indicate to be irradiated on A in time interval t Number of photons.
4. the quick positioning and recognition methods on a kind of pineapple head according to claim 1, it is characterised in that:In the threshold In image preprocessing after value segmentation, in order to reduce the thickness of image and improve the processing speed of image, need HSV images Gray-scale map is converted to, conversion formula is as follows:
Gray=0.3414 × H+0.5478 × S+0.1108 × V
Wherein, Gray is gradation of image, and H, S, V are respectively tone, saturation degree and the value of brightness of image.
5. the quick positioning and recognition methods on a kind of pineapple head according to claim 4, it is characterised in that:Step S2's In described image pretreatment, gray-scale map after conversion is filtered, method is as follows:
A judgment value is preset, discontinuous white point in the X-axis and Y-axis of transformed gray-scale map is polished respectively, I.e.:If white point becomes black less than judgment value in the continuation degree of X-axis or Y-axis then the white point in X-axis or Y-axis will be smoothed Color;If white point is greater than or equal to judgment value in the continuation degree of X-axis or Y-axis, then the white point in X-axis or Y-axis would not be smoothed, It is left white.
6. the quick positioning and recognition methods on a kind of pineapple head according to claim 1, it is characterised in that:Step S2's In image preprocessing, profile processing is carried out to image after being filtered, specific steps include:
First, the rough edge treated of X-axis is carried out to filtered treated image, it is right for the image after being filtered Pixel carries out the right side and subtracts a left side, the operation as a result to take absolute value, if the point of white subtracts each other or the point of black subtracts each other, after subtracting each other Value is all 0, takes absolute value after the point of black subtracts the point of white or the point of white subtracts the point of black, obtained value is just 255; Point after rough edge treated is the marginal point of image;
Then, edge filling is carried out to the image after being filtered, selects a marginal point, using it as the center of circle, radius 1 first Edge in image is judged;If thering is continuous point, i.e., the quantity of 255 pixel to be more than in the roundlet that radius is 1 Equal to 3, as continuous boundary sets the radius of a filling circle to carry out side then just using the marginal point of the selection as the center of circle Edge is filled;It repeats the above steps, after all marginal points of the obtained image of rough edge treated have all judged, obtains side The image that edge filling is completed;Accurate edge detection is carried out to the image after edge filling, profile is stored completely.
7. the quick positioning and recognition methods on a kind of pineapple head according to claim 1, it is characterised in that:Step S3 In, the Color Statistical that each pixel in area-of-interest indicates is got up, certain color demarcation interval is set, is generated Color histogram is matched with color histogram pre-set under varying environment, if similarity reaches threshold value, then it represents that It include pineapple head in the image of acquisition;
The feature recognition that pineapple head fruit eye is carried out to area-of-interest, specifically includes:
Pineapple head fruit eye sample is acquired, positive negative sample is classified as, trains grader to carry out positive negative sample by OpenCV Training, wherein positive sample is target sample to be checked, and negative sample is other any images;It sizes picture and positive and negative sample Ratio, by a large amount of pineapple head fruit eye data carry out feature extraction training, the parameter of grader is set, by positive negative sample It is placed on same catalogue to be trained, the feature of fruit eye is obtained after training.
8. the quick positioning and recognition methods on a kind of pineapple head according to claim 7, it is characterised in that:The difference Pre-set color histogram, specifically includes under environment:
The number of colours magnitude in same color section under varying environment is acquired, Xi indicates the environment value variable under i-th kind of environment, F (X1, X2, X3....) indicates the number of colours magnitude in a color interval under varying environment;By inputting a large amount of same face The data in color section allow neural network constantly to change its Weight value and biases values, and reduce deviation, fit similar Function generates canonical function histogram.
9. a kind of quick positioning of quick positioning and recognition methods for realizing the pineapple heads any one of claim 1-8 With identifying system, it is characterised in that:The system comprises:
Acquisition module for carrying out Image Acquisition to pineapple, and will acquire image transmitting back to processing module;
Processing module, the image for being transmitted to acquisition module carry out Color Statistical and carry out the extraction of feature to the head of pineapple And matching, export the information after image procossing;Acquisition module is fixed in supporting module;
Supporting module, including parallel-plate and supporting rack;Parallel-plate is placed on by two supporting racks apart from ground certain altitude Place, acquisition module are placed on parallel-plate center close to ground side, and processing module is placed on parallel-plate center far from ground one Side;Supporting module is used to support processing module, and provides certain height and angle for acquisition module to carry out Image Acquisition.
10. quick positioning according to claim 9 and identifying system, it is characterised in that:The camera of the acquisition module Minute surface is parallel to the ground;The camera of the acquisition module use resolution ratio for 640X480, size be 350X350 to image into Row acquisition.
CN201810139803.3A 2018-02-08 2018-02-08 Method and system for quickly positioning and identifying pineapple head Active CN108416814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810139803.3A CN108416814B (en) 2018-02-08 2018-02-08 Method and system for quickly positioning and identifying pineapple head

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810139803.3A CN108416814B (en) 2018-02-08 2018-02-08 Method and system for quickly positioning and identifying pineapple head

Publications (2)

Publication Number Publication Date
CN108416814A true CN108416814A (en) 2018-08-17
CN108416814B CN108416814B (en) 2020-07-31

Family

ID=63128336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810139803.3A Active CN108416814B (en) 2018-02-08 2018-02-08 Method and system for quickly positioning and identifying pineapple head

Country Status (1)

Country Link
CN (1) CN108416814B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376746A (en) * 2018-10-25 2019-02-22 黄子骞 A kind of image identification method and system
CN109376257A (en) * 2018-10-24 2019-02-22 贵州省机电研究设计院 Tealeaves recognition methods based on image procossing
CN109903275A (en) * 2019-02-13 2019-06-18 湖北工业大学 A kind of mouldy method for detecting area of fermented grain based on self-adapting multi-dimension filtering and histogram comparison
CN110415181A (en) * 2019-06-12 2019-11-05 勤耕仁现代农业科技发展(淮安)有限责任公司 Flue-cured tobacco RGB image intelligent recognition and grade determination method under a kind of open environment
CN112183230A (en) * 2020-09-09 2021-01-05 上海大学 Identification and central point positioning method for pears in natural pear orchard environment
CN113902909A (en) * 2021-10-15 2022-01-07 江阴仟亿日化包装有限公司 Cloud storage type appearance analysis system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201600330U (en) * 2009-09-23 2010-10-06 中国农业大学 System for recognizing and locating mature pineapples
CN105095880A (en) * 2015-08-20 2015-11-25 中国民航大学 LGBP encoding-based finger multi-modal feature fusion method
US20160203591A1 (en) * 2015-01-09 2016-07-14 Umm Al-Qura University System and process for monitoring the quality of food in a refrigerator

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201600330U (en) * 2009-09-23 2010-10-06 中国农业大学 System for recognizing and locating mature pineapples
US20160203591A1 (en) * 2015-01-09 2016-07-14 Umm Al-Qura University System and process for monitoring the quality of food in a refrigerator
CN105095880A (en) * 2015-08-20 2015-11-25 中国民航大学 LGBP encoding-based finger multi-modal feature fusion method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
F. GARCÍA ET.AL: "Fruit Classification by Extracting Color Chromaticity, Shape and Texture Features: Towards an Application for Supermarkets", 《IEEE LATIN AMERICA TRANSACTIONS》 *
LI BIN ET.AL: "Construction and in-field experiment of low-cost binocular vision platform for pineapple harvesting robot", 《农业工程学报》 *
MUHAMMAD AZMI AHMED NAWAWI ET.AL: "Simulation and Segmentation Techniques for Crop Maturity Identification of Pineapple Fruit", 《SPRINGER NATURE SINGAPORE PTE LTD》 *
李斌 等: "基于单目视觉的田间菠萝果实识别", 《农业工程学报》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376257A (en) * 2018-10-24 2019-02-22 贵州省机电研究设计院 Tealeaves recognition methods based on image procossing
CN109376746A (en) * 2018-10-25 2019-02-22 黄子骞 A kind of image identification method and system
CN109903275A (en) * 2019-02-13 2019-06-18 湖北工业大学 A kind of mouldy method for detecting area of fermented grain based on self-adapting multi-dimension filtering and histogram comparison
CN109903275B (en) * 2019-02-13 2021-05-18 湖北工业大学 Fermented grain mildewing area detection method based on self-adaptive multi-scale filtering and histogram comparison
CN110415181A (en) * 2019-06-12 2019-11-05 勤耕仁现代农业科技发展(淮安)有限责任公司 Flue-cured tobacco RGB image intelligent recognition and grade determination method under a kind of open environment
CN110415181B (en) * 2019-06-12 2023-07-14 勤耕仁现代农业科技发展(淮安)有限责任公司 Intelligent identification and grade judgment method for RGB (red, green and blue) images of flue-cured tobacco in open environment
CN112183230A (en) * 2020-09-09 2021-01-05 上海大学 Identification and central point positioning method for pears in natural pear orchard environment
CN113902909A (en) * 2021-10-15 2022-01-07 江阴仟亿日化包装有限公司 Cloud storage type appearance analysis system

Also Published As

Publication number Publication date
CN108416814B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN108416814A (en) Quick positioning and recognition methods and the system on a kind of pineapple head
CN105354865B (en) The automatic cloud detection method of optic of multispectral remote sensing satellite image and system
CN104483326B (en) High-voltage line defects of insulator detection method and system based on depth belief network
CN109584251A (en) A kind of tongue body image partition method based on single goal region segmentation
CN106651872A (en) Prewitt operator-based pavement crack recognition method and system
CN111915704A (en) Apple hierarchical identification method based on deep learning
CN103679173B (en) Method for detecting image salient region
CN110276386A (en) A kind of apple grading method and system based on machine vision
CN108549910A (en) A kind of corn seed producing fruit ear image preliminary classification method based on convolutional neural networks
CN105447825B (en) Image defogging method and its system
CN108664839A (en) A kind of image processing method and equipment
CN108470338A (en) A kind of water level monitoring method
CN109543518A (en) A kind of human face precise recognition method based on integral projection
CN111985435A (en) Unmanned aerial vehicle water area monitoring and cruising method based on machine vision
Mei et al. Single image dehazing using dark channel fusion and haze density weight
Ali et al. Low cost solution for rice quality analysis using morphological parameters and its comparison with standard measurements
CN103778428B (en) Disease area-of-interest exacting method and system based on block labelling
CN107545565A (en) A kind of solar energy half tone detection method
CN112288682A (en) Electric power equipment defect positioning method based on image registration
CN112101260A (en) Method, device, equipment and storage medium for identifying safety belt of operator
Yang et al. Cherry recognition based on color channel transform
CN109993228A (en) Plant protection drone rice sheath blight disease recognition methods based on machine vision
CN111882529B (en) Mura defect detection method and device for display screen
CN112337810B (en) Vision guiding pearl sorting robot and sorting method thereof
CN108007929A (en) A kind of automatic judging method of beef physiological makeup

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