CN108960100A - A kind of recognition methods of the sugarcane sugarcane section based on image procossing - Google Patents

A kind of recognition methods of the sugarcane sugarcane section based on image procossing Download PDF

Info

Publication number
CN108960100A
CN108960100A CN201810653763.4A CN201810653763A CN108960100A CN 108960100 A CN108960100 A CN 108960100A CN 201810653763 A CN201810653763 A CN 201810653763A CN 108960100 A CN108960100 A CN 108960100A
Authority
CN
China
Prior art keywords
image
sugarcane
straight line
point
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810653763.4A
Other languages
Chinese (zh)
Inventor
蒙艳玫
崔耀升
陈昊
李建波
韦俊东
孙启会
余双双
张金来
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangxi University
Original Assignee
Guangxi 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 Guangxi University filed Critical Guangxi University
Priority to CN201810653763.4A priority Critical patent/CN108960100A/en
Publication of CN108960100A publication Critical patent/CN108960100A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The recognition methods of the invention discloses a kind of sugarcane sugarcane section based on image procossing comprising: one, original image is switched into gray level image and carries out median filtering and binary conversion treatment;Two, the image black-and-white two color that step 1 is obtained is replaced, and removes the part of nonlinear organization member;Three, the gray level image background of step 1 is changed to black, sugarcane is changed to white;Four, the image that step 3 is obtained carries out Sobel border detection, extracts apparent boundary characteristic;Five, the image that step 4 is obtained detects straight line using Hough transform, chooses longest straight line, and calculate the angle α with horizontal direction;Six, the image that step 2 is obtained is rotated according to angle α, then carries out column pixel summation, and the extreme point of summing function and the abscissa of maximum of points are stipes position d;Seven, position d of the stipes in original image is obtained by conversion1.The present invention can accurately identify sugarcane section, provide accurate position signal for subsequent cutting, prevent from hurting bud and waste.

Description

A kind of recognition methods of the sugarcane sugarcane section based on image procossing
Technical field
The present invention relates to Sugarcane Industry field, in particular to the recognition methods of a kind of sugarcane sugarcane section based on image procossing.
Background technique
Sugarcane is the important sugaring raw material in China, and in China, sugar industry production field has critical role.In Sugarcane Industry During development, the production method of automation will greatly save human cost, and improve working efficiency.Sugarcane containing sugarcane bud Section may be used as sugarcane kind, accomplish not hurt bud in the preparation process of sugarcane kind, the sugarcane stem at sugarcane section both ends is to survive at sugarcane kind initial stage Major Nutrient source, it is necessary to which there are enough sugarcane stem length degree, so the accuracy of cutting is very heavy in the preparation process of sugarcane kind It wants.By the identification technology based on image procossing, the accurate location of cane stalk can extract, to provide letter for cutting work Number, so that the process of the preparation of sugarcane kind can be realized automated production.
Currently, the research of domestic pair of the sugarcane section identification technology based on image procossing and inadequate, does not consider there are also more Aspect, there are also biggish gaps with industrialized production.Moreover, the existing stipes that carried out by image procossing knows method for distinguishing In often only relate to sugarcane single stipes identification, the target signature of extraction is few.In commercial process, need to examine Multiple target signatures are extracted in the influence for considering sugarcane surface complex characteristic, form one group of signal source.And industrial production uses Sugarcane raw material is not straight, often there is the raw material largely distorted and grown into, to be easy to cause the position identification to sugarcane section inaccurate Really, subsequent cutting and sugarcane stem, sugarcane kind separation in be easy to cause and hurt bud, waste sugarcane kind.
The information disclosed in the background technology section is intended only to increase the understanding to general background of the invention, without answering When being considered as recognizing or imply that the information constitutes the prior art already known to those of ordinary skill in the art in any form.
Summary of the invention
The recognition methods of the purpose of the present invention is to provide a kind of sugarcane sugarcane section based on image procossing, to overcome existing The stipes that carried out by image procossing know the position of sugarcane section for only relating to the identification of single stipes in method for distinguishing and identifying Set the disadvantage for being easy inaccuracy.
To achieve the above object, the recognition methods of the present invention provides a kind of sugarcane sugarcane section based on image procossing, wherein Include the following steps:
Step 1 first acquires original image, original image is then converted to gray level image with matlab software, to gray scale Image carries out median filtering, then carries out binary conversion treatment;
Step 2 will replace through the black-and-white two color in step 1 treated image, recycle opening in Morphological scale-space The part of operation removal nonlinear organization member;
The sugarcane background of gray level image obtained in step 1 is replaced into black by step 3, and sugarcane position is replaced into white Color, and carry out binary conversion treatment;
Step 4 will carry out Sobel border detection through step 3 treated image, and extract apparent boundary characteristic;
Step 5 will detect straight line using Hough transform through step 4 treated image, and choose longest straight line, and Calculate the angle α of longest straight line and image level direction;
Step 6, the angle α obtained using step 5 make the sugarcane of image to treated that image rotates through step 2 Section is on same level straight line, then carries out column pixel summation to image, finds the extreme point and maximum of points of summing function, pole Value point and the abscissa of maximum of points are the position d of cane stalk;
Step 7 passes through reduction formula d according to the position d of the cane stalk obtained after step 6 is handled1=d x Cos α can obtain position d of the cane stalk in original image1
Preferably, in above-mentioned technical proposal, in step 1, when image binaryzation is handled, by the maximum pixel in image The average value of value and minimum pixel value is set as threshold value, and the pixel that gray scale is greater than or equal to threshold value is set as 255, is less than threshold The pixel of value is set as 0, and in order to save the storage of computer, 0 and 255 are further each mapped to 0 and 1.
Preferably, in above-mentioned technical proposal, in step 2, since the stipes of sugarcane is the shape of straight line, in order to identify And retain this feature, and it is 15 using length, 90 ° of flat linear structure member counterclockwise, formula since trunnion axis are as follows:Wherein: B is structural elements, and A is processed image, open operation the result is that B in A The union for exactly matching and translating.
Preferably, in above-mentioned technical proposal, in step 4, Sobel border detection is to be come using two (3x3) matrixes pair Original image carries out convolution algorithm, to calculate the estimated value G of the gray scale local derviation of horizontal directionxWith estimating for the gray scale local derviation of vertical direction Evaluation Gy。GxAnd GyMathematic(al) representation it is as follows:
With
Wherein: A is processed image;
Calculating process is as follows:
Gx=[f (x+1, y-1)+2*f (x+1, y)+f (x+1, y+1)]-[f (x-1, y-1)+2*f (x-1, y)+f (x-1, y +1)];
Gy=[f (x-1, y-1)+2f (x, y-1)+f (x+1, y-1)]-[f (x-1, y+1)+2*f (x, y+1)+f (x+1, y+ 1);
Calculate the G of each pointxAnd GyAfterwards, the gradient G of each point can be obtained by formula below:
Last set threshold value Gmax, when gradient G is greater than Gmax, which is a boundary point.
Preferably, in above-mentioned technical proposal, in step 5, Hough transform is to convert the straight line in plane of delineation space To parameter space, formula are as follows:
Any point (x, y) can form a curve in the space ρ-θ on straight line, if two differences carry out It states the curve obtained after operation to intersect in plane ρ-θ, this means that they are located at same straight line, by the way that threshold value is arranged, hands over In any curve quantity be more than threshold value, then correspond in original image one of the parameter (θ, ρ) for just representing this intersection point is straight Line;First 5 points for being greater than 0.3 times of maximum value in Hough matrix are found, are transformed to line segment, line segment of the combined distance less than 20 is gone Straightway except length less than 5, and recycle to obtain longest line segment by for;Straight line is acquired by the coordinate value of line segment endpoint Slope k, then by formula α=arctank, acquire the angle α of longest straight line Yu image level direction.
Preferably, in above-mentioned technical proposal, in step 6, using the imrotate function in matlab software by image It is rotated, using sum summing function, each column pixel in image is summed, and drafting function image, utilize findpeaks Function and max function find extreme point and maximum of points, and the abscissa of extreme point and maximum of points is the position of cane stalk d。
Compared with prior art, the invention has the following beneficial effects:
The present invention provides technical reference for domestic sugarcane sugarcane kind preparation of industrialization, and core is using based on matlab The image processing techniques of software is by extracting sugarcane surface multiple target, accurately to identify the sugarcane section of sugarcane, effectively The case where avoiding missing inspection and false retrieval is prevented to provide accurate position signal for subsequent cutting and the separation of sugarcane stem, sugarcane kind Only cutting process slanders bud and waste sugarcane kind, and the present invention can also provide amendment reference for charging inclination.
Detailed description of the invention
Fig. 1 is the flow chart of the recognition methods of the sugarcane sugarcane section based on image procossing according to the present invention.
Fig. 2 is original image to be converted in process in accordance with the present invention one schematic diagram after gray level image.
Fig. 3 is that the image schematic diagram after median filtering is carried out in process in accordance with the present invention one.
Fig. 4 is that the image schematic diagram after binary conversion treatment is carried out in process in accordance with the present invention one.
Fig. 5 is the image schematic diagram in process in accordance with the present invention two after black-and-white two color displacement.
Fig. 6 is the image schematic diagram carried out out after operation in process in accordance with the present invention two.
Fig. 7 is to set white for sugarcane position in process in accordance with the present invention three, sugarcane background be set as black after image Schematic diagram.
Fig. 8 is the image schematic diagram for having obvious boundary characteristic in process in accordance with the present invention four after Sobel border detection.
Fig. 9 is the image schematic diagram of the longest straight line detected in process in accordance with the present invention five using Hough transform.
Figure 10 is in process in accordance with the present invention six by the postrotational image schematic diagram of Fig. 6.
Figure 11 is the statistical chart for carrying out column pixel summation in process in accordance with the present invention six to postrotational image.
Figure 12 is the image signal for marking the sugarcane section of identification in process in accordance with the present invention seven in original image and setting Figure.
Specific embodiment
With reference to the accompanying drawing, specific embodiments of the present invention will be described in detail, it is to be understood that guarantor of the invention Shield range is not limited by the specific implementation.
Unless otherwise explicitly stated, otherwise in entire disclosure and claims, term " includes " or its change Changing such as "comprising" or " including " etc. will be understood to comprise stated element or component, and not exclude other members Part or other component parts.
Fig. 1 to Figure 12 shows a kind of knowledge of sugarcane sugarcane section based on image procossing according to the preferred embodiment of the present invention The structural schematic diagram of other method, with reference to Fig. 1, the recognition methods for being somebody's turn to do the sugarcane sugarcane section based on image procossing includes following seven steps altogether It is rapid:
Step 1 first acquires original image, can be through the shooting of camera and obtains original image, and original image is Color image.Then original image is converted into gray level image with matlab software, and median filtering is carried out to gray level image, then Carry out binary conversion treatment.
Each pixel of color image (i.e. RGB figure) can be regarded as establishing in rectangular coordinate system in space by axis of R, G, B Three-dimensional space a point, and each pixel of grayscale image (i.e. Gray figure) can with a point on straight line R=G=B come It indicates.Then, it is exactly to find the mapping of three-dimensional space to the one-dimensional space that RGB figure, which turns the essence of Gray figure, soft in matlab In part, vertical line realization, formula can be done to R=G=B straight line by a point to rgb space are as follows:
Gray=0.299*R+0.587*G+0.114*B; (1)
Image after original image being converted to gray level image is as shown in Figure 2.
When the sampling or transmission of digital picture, be often subject to the interference of noise, in order to subsequent image operation, can to by Image of making an uproar is filtered, and median filtering is that the intermediate value of each point value in a neighborhood the value of the image slices vegetarian refreshments point replaces, Neighborhood in the processing of median filtering is the template M of mxn, formula are as follows:
G (x, y)=med { f (x-m, y-n) }, (m, n ∈ M); (2)
Wherein: (x, y) is the coordinate of point processed, and m is the length of process range range points (x, y), and n is process range distance The width of point (x, y), (m, n) are just a length of m of range points (x, y), and width is the field of n.Figure after image being carried out median filtering As shown in Figure 3.
Image binaryzation processing is exactly to set the pixel of image to 0 or 255, and apparent black and white is presented in whole image Effect highlights the feature in image.The present invention preferably, in step 1, image binaryzation processing when, by the maximum in image Pixel value and the average value of minimum pixel value are set as threshold value, and the pixel that gray scale is greater than or equal to threshold value is set as 255, small It is set as 0 in the pixel of threshold value, in order to save the storage of computer, 0 and 255 are further each mapped to 0 and 1.Figure As the image after progress binary conversion treatment is as shown in Figure 4.
Step 2 will replace through the black-and-white two color in step 1 treated image, recycle opening in Morphological scale-space The part of operation removal nonlinear organization member.Concrete operations are the pixels for first finding pixel value and being 1, its pixel value is changed to 0, The pixel that pixel value is 0 is found, its pixel value is changed to 1, the black-and-white two color in binary image is replaced to realize, is set Image after changing is as shown in Figure 5.
The present invention is preferably, special in order to identify and retain this since the stipes of sugarcane is the shape of straight line in step 2 Sign is 15 using length, 90 ° of flat linear structure member counterclockwise, formula since trunnion axis are as follows:
Wherein: B is structural elements, and A is processed image, open operation the result is that B exactly matched in A and translate and Collection.Open operation eliminate in image it is all cannot include structural elements part, the profile of smooth target be disconnected between image thin Small coupling part, while removing sharp protrusion.Image after opening operation is as shown in Figure 6.
Step 3 will not carry out the sugarcane back of the gray level image of median filtering and binary conversion treatment obtained in step 1 Scape is replaced into black, and sugarcane position is replaced into white, and carries out binary conversion treatment.Specific operation is: due in original image Sugarcane using white background, in the digital picture that data type is uint8, the pixel value of background parts be 255 or Person finds out the pixel of background parts using the find function in matlab software close to 255, and sets 0 for pixel value, this When background parts be rendered as black.Similarly, 255 are set by the pixel value of sugarcane part (i.e. non-background parts), sugarcane part It is rendered as white.Image after displacement is as shown in Figure 7.
Step 4 will carry out Sobel border detection through step 3 treated image, and extract apparent boundary characteristic;This Preferably, in step 4, Sobel operator detection boundary is to carry out convolution fortune to original image using two (3x3) matrixes for invention It calculates, to calculate the estimated value G of the gray scale local derviation of horizontal directionxWith the estimated value G of the gray scale local derviation of vertical directiony。GxAnd Gy's Mathematic(al) representation is as follows:
Wherein: A is processed image;
Calculating process is as follows:
Gx=[f (x+1, y-1)+2*f (x+1, y)+f (x+1, y+1)]-[f (x-1, y-1)+2*f (x-1, y)+f (x-1, y +1)];(6)
Gy=[f (x-1, y-1)+2*f (x, y-1)+f (x+1, y-1)]-[f (x-1, y+1)+2*f (x, y+1)+f (x+1, y +1);(7)
Calculate the G of each pointxAnd GyAfterwards, the gradient G of each point can be obtained by formula below:
Last set threshold value Gmax, when gradient G is greater than Gmax, which is a boundary point.Extract apparent boundary characteristic The image obtained afterwards is as shown in Figure 8.
Step 5 will detect straight line using Hough transform through step 4 treated image, and choose longest straight line, and Calculate the angle α of longest straight line and image level direction.Preferably, Hough transform is by the straight of plane of delineation space to the present invention Line is converted into parameter space, formula are as follows:
Any point (x, y) can form a curve in the space ρ-θ on straight line, if two differences carry out It states the curve obtained after operation to intersect in plane ρ-θ, this means that they are located at same straight line, by the way that threshold value is arranged, hands over In any curve quantity be more than threshold value, then correspond in original image one of the parameter (θ, ρ) for just representing this intersection point is straight Line;First 5 points for being greater than 0.3 times of maximum value in Hough matrix are found, are transformed to line segment, line segment of the combined distance less than 20 is gone Straightway except length less than 5, and recycle to obtain longest line segment by for, obtained longest straight line is in the position of gray level image It sets as shown in Figure 9;The slope k of straight line is acquired by the coordinate value of line segment endpoint, then by formula α=arctank, just can be acquired The angle α of longest straight line and image level direction.
Step 6, angle α obtained in step 5 are the angles of sugarcane longest straight line and image level direction in image, this It is exactly gradient of the sugarcane relative to workbench.The angle α obtained using step 5 is to such as Fig. 6 after step 2 opens operation processing Shown in image rotated, make the sugarcane section of image on the straight line of same level, postrotational image is as shown in Figure 10.Again Column pixel summation is carried out to sugarcane image, finds the extreme point and a maximum of points, extreme point and maximum of points of summing function Abscissa be cane stalk position d.The present invention preferably, in step 6, using in matlab software Imrotate function will image be into rotation after step 2 opens operation processing, using sum summing function, by each column picture in image Element summation, and drafting function image, the statistical chart for carrying out column pixel summation are as shown in figure 11.Utilize findpeaks function and max Function finds extreme point and maximum of points, and the abscissa of extreme point and maximum of points is the position d of cane stalk.Such as Figure 10 institute Showing, sugarcane sugarcane section part is white, and the value of this part all pixels point is 1, and rest part is black, and the value of pixel is 0, because , when column pixel is added, the pixel value of white portion is cumulative to obtain maximum or maximum value, and rest part pixel value is cumulative for this Value or 0, therefore extreme point and the abscissa of maximum of points are the position d of cane stalk, have multiple poles in an image Value point and maximum of points just indicate that there are multiple cane stalks.
Step 7 is carried out according to the position d of the cane stalk obtained after step 6 is handled by following reduction formula It calculates:
d1=d x cos α; (10)
It can obtain position d of the cane stalk in original image1.D is set according to obtained sugarcane section1In original image After being marked as shown in figure 12.
Below with reference to the concrete operations of matlab software, the invention will be further described:
First, the image of acquisition is subjected to greyscale transformation, then median filtering is carried out to gray level image, eliminates making an uproar in image Then image is carried out binary conversion treatment by point, be converted into black-and-white two color image.
A=imread (' ganzhe.jpg');% reads in original image
figure(1),imshow(A);
B=rgb2gray (A);% switchs to gray level image
figure(2),imshow(B);% image is as shown in Figure 2
C=medfilt2 (B, [3,3]);% to gray level image using 3X3 matrix carry out median filtering, figure (3), imshow(C);% image is as shown in Figure 3
Imax=max (max (C));
Imin=min (min (C));
T=round (Imax- (Imax-Imin)/2);Pixel median is selected as threshold value by %
D=(C) >=T;Pixel in %C greater than T takes 1, takes 0 less than T
figure(4),imshow(D);% image is as shown in Figure 4
Second, black-and-white two color in binary image is replaced, then use length for 15, is in 90 degree of straight line with horizontal direction Type structural elements carry out out operation, remove the part of nonlinear organization member in image.
Index1=find (D > 0);% finds out the pixel of white
Index2=find (D < 1);% finds out the pixel of black
Counter1=sum (index1);The quantity of % white pixel point
Counter2=sum (index2);The quantity of % black pixel point
figure(5),imshow(E);% image is as shown in Figure 5
Se=strel (' line', 15,90);% selects linear structure member, and length 15 is 90 degree with level angle
O=imopen (E, se);% carries out morphology and opens operation
figure(6),imshow(O);% image is as shown in Figure 6
Sugarcane background in gray level image is replaced into black by third, and sugarcane position is replaced into white, then carries out at binaryzation Reason.
Index=find (B > 250);
F (index)=0;
G=F;
Index1=find (F > 0);
G (index1)=255;
Imax1=max (max (G));
Imin1=min (min (G));
T1=round ((Imax1-Imin1)/2);
H1=(G) >=T1;
figure(7),imshow(H1);% image is as shown in Figure 7
4th, above-mentioned image is subjected to Sobel border detection, extracts the image for having obvious boundary characteristic.
R1=edge (H1, ' Sobel');
figure(8),imshow(R1);% image is as shown in Figure 8
5th, longest straight line is detected and chosen using Hough transform, calculates the folder of longest straight line and image level direction Angle.
[H, Theta, Rho]=hough (R1);
P=houghpeaks (H, 5, ' threshold', ceil (0.3*max (H (:))));% is sought in Hough matrix Look for first 5 peak values for being greater than 0.3 times of maximum value in Hough matrix
Lines=houghlines (R1, Theta, Rho, P, ' FillGap', 20, ' MinLength', 5);% merge away from From the line segment less than 20, straightway of all length less than 5 is abandoned
End% determines longest line segment
figure(9),imshow(A);% image is as shown in Figure 9
plot(xy_long(:,1),xy_long(:,2),'LineWidth',2,'Color','r');
Gradient=(xy_long (2,2)-xy_long (1,2))/(xy_long (2,1)-xy_long (1,1));
X=atan (gradient);
Jiaodu=x*180/pi;
6th, image is rotated using angle, to treated, sugarcane carries out column pixel summation, finds summing function Extreme point and extreme point abscissa.
E=imrotate (O, jiaodu, ' nearest', ' crop');% will open operation image and rotate
figure(10),imshow(E);% image is as shown in Figure 10
Y=sum (E);% is to the statistical chart for opening operation image column pixel summation after rotation
Figure (' NumberTitle', ' off', ' Name', ' pixels statistics maximum point '), plot (y);
Title (' column pixel summation statistical chart ');
xlabel('x');
ylabel('y');
[a, b]=findpeaks (y, ' minpeakdistance', 50, ' minpeakheight', 9);% finds very big Value
hold on;
[c, d]=max (y);%%, which is found, is most worth point, and d is coordinate where most value
hold on;
plot(b,a,'ro');% draws extreme point
plot(d,c,'ro');% draws most value point
7th, the position of cane stalk is calculated and marked by formula.
Figure (' NumberTitle', ' off', ' Name', ' cane stalk label '), imshow (A);
B1=b*cosd (abs (jiaodu));
For i=1:length (b1)
rectangle('Position',[b1(i)-8,70,20,150]);
end
D=d*cosd (abs (jiaodu));
rectangle('Position',[d-8,70,20,150]);
30 groups of Huang sugarcane samples are randomly selected to be tested, numbering to it is 1 to 30, and the sugarcane joint number on every sugarcane is different, Totally 275 stipes.The sugarcane image of number 1~30 is identified respectively, counts the number of the sugarcane section identified, by its with Actual number comparison, statistical error rate, it is shown that the experimental data are shown in the following table:
As can be seen from the table, having the sugarcane section of 17 sugarcanes to measure rate is 100%, and the missing inspection number of all sugarcane sugarcane sections does not surpass 1 is crossed, in total 275 sugarcane sections, measure 263 sugarcane sections altogether, accuracy rate is up to 95.6%.By analyzing experimental phenomena, the portion of missing inspection Position is distributed mainly on first or last a sugarcane section of sugarcane, and the sugarcane section color of the two parts is lighter than other parts, in image In processing, feature is unobvious, missing inspection occurs.Therefore, program can be advanced optimized, the contrast of image is enhanced, from And reduce detection leakage phenomenon.
The present invention provides technical reference for domestic sugarcane sugarcane kind preparation of industrialization, and core is using based on matlab The image processing techniques of software is by extracting sugarcane surface multiple target, accurately to identify the sugarcane section of sugarcane, effectively The case where avoiding missing inspection and false retrieval is prevented to provide accurate position signal for subsequent cutting and the separation of sugarcane stem, sugarcane kind Only cutting process slanders bud and waste sugarcane kind, and the present invention can also be that inclined raw material carries out when feeding by image rotation Amendment, to improve the accuracy of identification.
The aforementioned description to specific exemplary embodiment of the invention is in order to illustrate and illustration purpose.These descriptions It is not wishing to limit the invention to disclosed precise forms, and it will be apparent that according to the above instruction, can much be changed And variation.The purpose of selecting and describing the exemplary embodiment is that explaining specific principle of the invention and its actually answering With so that those skilled in the art can be realized and utilize a variety of different exemplary implementation schemes of the invention and Various chooses and changes.The scope of the present invention is intended to be limited by claims and its equivalents.

Claims (6)

1. a kind of recognition methods of the sugarcane sugarcane section based on image procossing, which comprises the steps of:
Step 1 first acquires original image, original image is then converted to gray level image with matlab software, to gray level image Median filtering is carried out, then carries out binary conversion treatment;
Step 2 will replace through the black-and-white two color in step 1 treated image, recycle in Morphological scale-space and open operation Remove the part of nonlinear organization member;
The sugarcane background of gray level image obtained in step 1 is replaced into black by step 3, and sugarcane position is replaced into white, and Carry out binary conversion treatment;
Step 4 will carry out Sobel border detection through step 3 treated image, and extract apparent boundary characteristic;
Step 5 will detect straight line using Hough transform through step 4 treated image, and choose longest straight line, and calculate The angle α of longest straight line and image level direction;
Step 6, the angle α obtained using step 5 make the sugarcane section of image to treated that image rotates through step 2 In on same level straight line, then column pixel summation is carried out to image, finds the extreme point and maximum of points of summing function, extreme point Abscissa with maximum of points is the position d of cane stalk;
Step 7 passes through reduction formula d according to the position d of the cane stalk obtained after step 6 is handled1=d x cos α, just Position d of the cane stalk in original image can be obtained1
2. the recognition methods of the sugarcane sugarcane section according to claim 1 based on image procossing, which is characterized in that in step 1 In, when image binaryzation is handled, the average value of max pixel value and minimum pixel value in image is set as threshold value, gray scale Pixel more than or equal to threshold value is set as 255, and the pixel less than threshold value is set as 0, in order to save the storage of computer, then 0 and 255 are further each mapped to 0 and 1.
3. the recognition methods of the sugarcane sugarcane section according to claim 1 based on image procossing, which is characterized in that in step 2 In, it is 15 using length, from trunnion axis to identify and retain this feature since the stipes of sugarcane is the shape of straight line Start 90 ° counterclockwise of flat linear structure member, formula are as follows:Wherein: B is structure Member, A be processed image, open operation the result is that the union that B is exactly matched and translated in A.
4. the recognition methods of the sugarcane sugarcane section according to claim 1 based on image procossing, which is characterized in that in step 4 In, Sobel border detection is to carry out convolution algorithm to original image using two (3x3) matrixes, to calculate the ash of horizontal direction Spend the estimated value G of local derviationxWith the estimated value G of the gray scale local derviation of vertical directiony。GxAnd GyMathematic(al) representation it is as follows:
With
Wherein: A is processed image;
Calculating process is as follows:
Gx=[f (x+1, y-1)+2*f (x+1, y)+f (x+1, y+1)]-[f (x-1, y-1)+2*f (x-1, y)+f (x-1, y+1)];
Gy=[f (x-1, y-1)+2*f (x, y-1)+f (x+1, y-1)]-[f (x-1, y+1)+2*f (x, y+1)+f (x+1, y+1);
Calculate the G of each pointxAnd GyAfterwards, the gradient G of each point can be obtained by formula below:
Last set threshold value Gmax, when gradient G is greater than Gmax, which is a boundary point.
5. the recognition methods of the sugarcane sugarcane section according to claim 1 based on image procossing, which is characterized in that in step 5 In, Hough transform is that the straight line in plane of delineation space is converted into parameter space, formula are as follows:
Any point (x, y) can form a curve in the space ρ-θ on straight line, if two differences carry out above-mentioned behaviour The curve obtained after work intersects in plane ρ-θ, this means that they are located at same straight line, by the way that threshold value is arranged, meets at one The curve quantity of point has been more than threshold value, then the parameter (θ, ρ) for just representing this intersection point corresponds to the straight line in original image;It seeks First 5 points for being greater than 0.3 times of maximum value in Hough matrix are looked for, line segment, line segment of the combined distance less than 20, removal length are transformed to The straightway less than 5 is spent, and recycles to obtain longest line segment by for;The oblique of straight line is acquired by the coordinate value of line segment endpoint Rate k, then by formula α=arctank, acquire the angle α of longest straight line Yu image level direction.
6. the recognition methods of the sugarcane sugarcane section according to claim 1 based on image procossing, which is characterized in that in step 6 In, image is rotated using the imrotate function in matlab software, it, will be every in image using sum summing function The summation of column pixel, and drafting function image, find extreme point and maximum of points, extreme value using findpeaks function and max function Point and the abscissa of maximum of points are the position d of cane stalk.
CN201810653763.4A 2018-06-22 2018-06-22 A kind of recognition methods of the sugarcane sugarcane section based on image procossing Pending CN108960100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810653763.4A CN108960100A (en) 2018-06-22 2018-06-22 A kind of recognition methods of the sugarcane sugarcane section based on image procossing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810653763.4A CN108960100A (en) 2018-06-22 2018-06-22 A kind of recognition methods of the sugarcane sugarcane section based on image procossing

Publications (1)

Publication Number Publication Date
CN108960100A true CN108960100A (en) 2018-12-07

Family

ID=64486237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810653763.4A Pending CN108960100A (en) 2018-06-22 2018-06-22 A kind of recognition methods of the sugarcane sugarcane section based on image procossing

Country Status (1)

Country Link
CN (1) CN108960100A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109859165A (en) * 2018-12-24 2019-06-07 新绎健康科技有限公司 A kind of localization method and device taking arteries and veins point
CN110400350A (en) * 2019-07-19 2019-11-01 江南大学 A kind of cane stalk recognition method based on computer vision
CN112464744A (en) * 2020-11-09 2021-03-09 湖北省农业科学院农产品加工与核农技术研究所 Fish posture identification method
CN113534095A (en) * 2021-06-18 2021-10-22 北京电子工程总体研究所 Laser radar map construction method and robot autonomous navigation method
CN113723314A (en) * 2021-09-01 2021-11-30 江南大学 Sugarcane stem node identification method based on YOLOv3 algorithm

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN102630429A (en) * 2012-04-24 2012-08-15 广西大学 Bud injury preventing system for sugarcane cutting
CN102930247A (en) * 2012-10-18 2013-02-13 广西大学 Sugarcane stalk node recognition method based on computer vision
CN103729645A (en) * 2013-12-20 2014-04-16 湖北微模式科技发展有限公司 Second-generation ID card area positioning and extraction method and device based on monocular camera
CN104050450A (en) * 2014-06-16 2014-09-17 西安通瑞新材料开发有限公司 Vehicle license plate recognition method based on video
CN106370657A (en) * 2016-08-17 2017-02-01 广西民族大学 Sugarcane seed bud section cutting method and sugarcane stalk identification method
CN107680098A (en) * 2017-11-02 2018-02-09 广西民族大学 A kind of recognition methods of sugarcane sugarcane section feature

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625760A (en) * 2009-07-28 2010-01-13 谭洪舟 Method for correcting certificate image inclination
CN102630429A (en) * 2012-04-24 2012-08-15 广西大学 Bud injury preventing system for sugarcane cutting
CN102930247A (en) * 2012-10-18 2013-02-13 广西大学 Sugarcane stalk node recognition method based on computer vision
CN103729645A (en) * 2013-12-20 2014-04-16 湖北微模式科技发展有限公司 Second-generation ID card area positioning and extraction method and device based on monocular camera
CN104050450A (en) * 2014-06-16 2014-09-17 西安通瑞新材料开发有限公司 Vehicle license plate recognition method based on video
CN106370657A (en) * 2016-08-17 2017-02-01 广西民族大学 Sugarcane seed bud section cutting method and sugarcane stalk identification method
CN107680098A (en) * 2017-11-02 2018-02-09 广西民族大学 A kind of recognition methods of sugarcane sugarcane section feature

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
乔铁柱 编著: "《矿用输送带无损检测技术》", 30 June 2015 *
张卫正 等: "基于图像处理的甘蔗茎节识别与定位", 《农机化研究》 *
陆尚平 等: "基于机器视觉的甘蔗茎节特征提取与识别", 《农业机械学报》 *
黄奕其 等: "基于MatLab的甘蔗茎节特征分布定位与试验", 《农业机械学报》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109859165A (en) * 2018-12-24 2019-06-07 新绎健康科技有限公司 A kind of localization method and device taking arteries and veins point
CN109859165B (en) * 2018-12-24 2023-06-09 新绎健康科技有限公司 Pulse taking point positioning method and device
CN110400350A (en) * 2019-07-19 2019-11-01 江南大学 A kind of cane stalk recognition method based on computer vision
CN112464744A (en) * 2020-11-09 2021-03-09 湖北省农业科学院农产品加工与核农技术研究所 Fish posture identification method
CN113534095A (en) * 2021-06-18 2021-10-22 北京电子工程总体研究所 Laser radar map construction method and robot autonomous navigation method
CN113534095B (en) * 2021-06-18 2024-05-07 北京电子工程总体研究所 Laser radar map construction method and robot autonomous navigation method
CN113723314A (en) * 2021-09-01 2021-11-30 江南大学 Sugarcane stem node identification method based on YOLOv3 algorithm

Similar Documents

Publication Publication Date Title
CN108960100A (en) A kind of recognition methods of the sugarcane sugarcane section based on image procossing
CN108764229B (en) Water gauge image automatic identification method based on computer vision technology
CN110443128B (en) Finger vein identification method based on SURF feature point accurate matching
CN109447945B (en) Quick counting method for basic wheat seedlings based on machine vision and graphic processing
CN102704215B (en) Automatic cutting method of embroidery cloth based on combination of DST file parsing and machine vision
CN109767445B (en) High-precision PCB defect intelligent detection method
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN112818988A (en) Automatic reading identification method and system for pointer instrument
CN112613429B (en) Pointer type instrument reading method suitable for multi-view images based on machine vision
CN103955937A (en) Microalgae automatic counting method based on digital image processing
CN112734729B (en) Water gauge water level line image detection method and device suitable for night light supplement condition and storage medium
CN108921813A (en) Unmanned aerial vehicle detection bridge structure crack identification method based on machine vision
CN105447489B (en) A kind of character of picture OCR identifying system and background adhesion noise cancellation method
CN114708208B (en) Machine vision-based famous tea tender bud identification and picking point positioning method
CN109344820A (en) Digital electric meter Recognition of Reading method based on computer vision and deep learning
Feng et al. A separating method of adjacent apples based on machine vision and chain code information
CN108133216A (en) The charactron Recognition of Reading method that achievable decimal point based on machine vision is read
CN111161295A (en) Background stripping method for dish image
CN110807763A (en) Method and system for detecting ceramic tile surface bulge
CN110648312A (en) Method for identifying wool and cashmere fibers based on scale morphological characteristic analysis
CN108171098A (en) A kind of code detection method and equipment
CN115731257A (en) Leaf form information extraction method based on image
CN107993243B (en) Wheat tillering number automatic detection method based on RGB image
CN104966283A (en) Imaging layered registering method
CN112184696A (en) Method and system for counting cell nucleus and cell organelle and calculating area of cell nucleus and cell organelle

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181207

RJ01 Rejection of invention patent application after publication