CN113256703A - Method and system for determining shape of cockscomb based on image processing - Google Patents
Method and system for determining shape of cockscomb based on image processing Download PDFInfo
- Publication number
- CN113256703A CN113256703A CN202110621112.9A CN202110621112A CN113256703A CN 113256703 A CN113256703 A CN 113256703A CN 202110621112 A CN202110621112 A CN 202110621112A CN 113256703 A CN113256703 A CN 113256703A
- Authority
- CN
- China
- Prior art keywords
- cockscomb
- image
- color
- comb
- area
- 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
Links
- 241000561734 Celosia cristata Species 0.000 title claims abstract description 164
- 210000001520 comb Anatomy 0.000 title claims abstract description 164
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012545 processing Methods 0.000 title claims abstract description 23
- 238000005259 measurement Methods 0.000 claims abstract description 13
- 238000007781 pre-processing Methods 0.000 claims abstract description 10
- 241000287828 Gallus gallus Species 0.000 claims description 33
- 238000000605 extraction Methods 0.000 claims description 5
- 230000011218 segmentation Effects 0.000 claims description 5
- 238000003708 edge detection Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 238000003709 image segmentation Methods 0.000 claims description 3
- 238000000926 separation method Methods 0.000 claims description 3
- 239000000126 substance Substances 0.000 claims description 2
- 230000000877 morphologic effect Effects 0.000 abstract 2
- 235000013330 chicken meat Nutrition 0.000 description 12
- 238000012360 testing method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000009395 breeding Methods 0.000 description 3
- 230000001488 breeding effect Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 210000003746 feather Anatomy 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000001568 sexual effect Effects 0.000 description 2
- 235000011746 Amaranthus hypochondriacus Nutrition 0.000 description 1
- 240000003147 Amaranthus hypochondriacus Species 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 244000144977 poultry Species 0.000 description 1
- 235000013594 poultry meat Nutrition 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a method and a system for determining the shape of a cockscomb based on image processing, wherein the method comprises the following steps: collecting a side view image of the cockscomb; preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part; calculating the area and the length of the cockscomb according to the contour of the cockscomb; and comparing the real color image of the cockscomb part with a standard color card to determine the color grade of the cockscomb. The side-looking images of the cockscomb are processed to obtain the morphological characteristics of the cockscomb, such as the area, the length, the color grade and the like of the cockscomb, and the morphological characteristics of the cockscomb can be determined in a non-contact manner, so that the influence of stress reaction on the measurement result is effectively reduced, and the determination result is more efficient, accurate and reliable.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a system for determining a shape of a cockscomb based on image processing.
Background
At present, the development of cockscomb is the most obvious and important phenotypic characteristic in the second sexual characteristics of poultry, and can be used as one of important reference indexes for indirectly selecting the production performance and the sexual maturity traits of chicken. The earliness is an important economic character of high-quality chickens, the production performance of the high-quality chickens is indirectly improved through breeding cockscombs on the basis of not influencing the quality and the growth performance of the chickens, the high-quality chickens are accelerated to come into the market in advance, meanwhile, the breeding cost is reduced, and the improvement of the overall benefits of the industry becomes an important research subject of the breeding research of the high-quality chickens at present.
However, the existing measurement of the size of the cockscomb is usually completed by using a vernier caliper, the cockscomb is measured after a test chicken is manually fixed, time and labor are consumed, stress reaction of the test chicken is easily caused, and the production performance of the test chicken is influenced; and due to struggle of the test chicken, the measurement result may not be accurate; in addition, the measurement by the vernier caliper can only measure the characteristics such as crown length and the like, and the area of the vernier caliper cannot be accurately measured. Meanwhile, for the color characteristics of cockscombs, the existing color grading method is visual observation and has great limitation. The existing cockscomb shape determination method is not only time-consuming and labor-consuming, but also the accuracy of the measurement result is difficult to meet the actual requirement.
Therefore, how to provide an efficient and accurate determination method of the shape of the cockscomb is a problem that needs to be solved urgently by the technical personnel in the field.
Disclosure of Invention
In view of the above, the invention provides a method and a system for determining a shape of a cockscomb based on image processing, which realize accurate measurement of the shape of the cockscomb by extracting and processing images of the cockscomb, and effectively solve the technical problems that the existing method for determining the shape of the cockscomb wastes time and labor, and the accuracy of a measurement result is difficult to meet actual requirements.
In order to achieve the purpose, the invention adopts the following technical scheme:
in one aspect, the invention provides a method for determining a shape of a rooster comb based on image processing, comprising the following steps:
collecting a side view image of the cockscomb;
preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part;
calculating the area and the length of the cockscomb according to the contour of the cockscomb;
and comparing the real color image of the part of the cockscomb with a standard color card, determining the color grade of the cockscomb, and outputting a cockscomb shape determination result.
Further, the process of collecting the side view image of the cockscomb is completed under a black background. Because the color difference between the black background and the cockscomb is obvious, the cockscomb image is clearer, and the extraction of the cockscomb outline at the later stage is convenient, so that the more complete cockscomb outline is obtained.
Further, the process of preprocessing the side view image of the comb to obtain a true color image and a binary image of the comb part, and extracting the contour of the comb from the binary image specifically includes:
removing noise: removing image noise in the cockscomb side-looking image by using median filtering;
separating color channels: converting the cockscomb side-view image after the noise is removed into an HSV mode, and carrying out H, S, V three-channel separation;
image segmentation: determining a threshold value through a maximum inter-class variance method, and performing threshold value segmentation on the S channel component image to obtain a real color image of the cockscomb part and a binary image of the cockscomb part;
contour extraction: and carrying out edge detection on the binary image of the comb part, and extracting the outline of the comb.
Further, the process of calculating the area of the comb according to the contour of the comb specifically includes:
calculating the area of the image pixel by means of counting the number of the pixel, wherein the calculation formula is as follows:
in the formula, l is the length of the binary image, w is the width of the binary image, and f (i, j) is the gray value of the binary image;
and calculating the area proportion coefficient, wherein the calculation formula is as follows:
in the formula: Δ x is an area proportionality coefficient, S is a target actual area, and N is a target pixel area;
calculating the actual area of the cockscomb according to the image pixel area and the area proportion coefficient, wherein the calculation formula is as follows:
Sx=Δx×Nx
in the formula, SxIs the actual area of the comb,. DELTA.x is the area proportionality coefficient, NxIs the area of a pixel of the image of the rooster comb.
Further, according to the outline of the cockscomb, calculating the length of the cockscomb specifically comprises the following steps:
constructing a two-dimensional coordinate system, and placing an origin of the two-dimensional coordinate system at the lower left corner of the outline of the cockscomb;
calculating the pixel distance of any two points of the outline edge of the cockscomb, and obtaining the crown length pixel distance according to the maximum value of the pixel distance;
and calculating to obtain the crown length according to the product of the crown length pixel distance and a distance proportion coefficient obtained in advance.
Further, the calculation formula of the crown-length pixel distance is as follows:
H=max(d)
wherein the content of the first and second substances,
wherein H is the crown-length pixel distance, d is the pixel distance between two points, (x)i,yi) And (x)j,yj) Respectively are the coordinates of any two points on the outline edge of the cockscomb.
Further, the distance scaling factor is calculated by the following formula:
in the formula, Δ y is a distance scale coefficient, len is a target actual length, and h is a target pixel distance.
Further, the process of comparing the real color image of the comb part with a standard color chart to determine the color grade of the comb specifically comprises the following steps:
respectively determining the color grade of each pixel point in the real-color image of the cockscomb part;
and taking the color grade with the most corresponding pixel points as the color grade of the cockscomb.
Further, the process of respectively determining the color grade of each pixel point in the real-color image of the rooster comb part comprises the following steps:
respectively calculating the Euclidean distance between the color component of each pixel point in the real color image of the cockscomb part and the color component of each grade on the standard color card;
and determining the color grade of each pixel point according to the color grade corresponding to the color component with the minimum Euclidean distance.
Further, the calculation formula of the euclidean distance is:
where dis represents the color C1And C2Euclidean distance of C1,RRepresents the color C1Red component value of, C1,GRepresents the color C1Green component value of, C1,BRepresents the color C1The blue component value of (a).
In another aspect, the present invention further provides a system for determining a shape of a rooster comb based on image processing, including: the system comprises image acquisition equipment, a data processor and display equipment;
the image acquisition equipment is used for acquiring a side view image of the cockscomb;
the data processor is used for preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part; calculating the area and the length of the cockscomb according to the contour of the cockscomb; comparing the real color image of the cockscomb part with a standard color card to determine the color grade of the cockscomb;
the display device is used for outputting a cockscomb shape determination result comprising the area and the length of the cockscomb and the color grade of the cockscomb.
According to the technical scheme, compared with the prior art, the method and the system for determining the shape of the cockscomb based on image processing are disclosed, the side-view image of the cockscomb is processed to obtain the shape characteristics of the cockscomb, such as the area, the length, the color grade and the like of the cockscomb, and the shape characteristics of the cockscomb can be determined in a non-contact manner, so that the influence of stress reaction on the measurement result is effectively reduced, and the determination result is more efficient, accurate and reliable.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of an implementation of a method for determining a shape of a rooster comb based on image processing according to the present invention;
FIG. 2 is a schematic diagram of the implementation principle of the image processing-based cockscomb morphology determination method;
FIG. 3 is a side view of a comb taken in practice in accordance with the present embodiment;
FIG. 4 is a pre-processed true color image of a portion of a rooster comb;
FIG. 5 is a preprocessed binary image of a portion of a comb;
FIG. 6 is a representation of a rooster comb profile;
FIG. 7 is a schematic diagram of extraction of feature points of a rooster comb profile in a two-dimensional coordinate system;
FIG. 8 is a schematic view of a control color chart of the color characteristics of cockscomb;
FIG. 9 is a schematic structural diagram of a rooster comb shape measuring system based on image processing according to the present invention;
FIG. 10 is a schematic diagram of a display interface of a side view result of a shape of a rooster comb.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In one aspect, referring to fig. 1 and fig. 2, an embodiment of the present invention discloses a method for determining a shape of a chicken comb based on image processing, the method including:
s1: collecting a side view image of the cockscomb.
In order to ensure that the collected side view images of the cockscomb are clearer and the cockscomb outline is clearer, the black background plate is arranged during image collection in the embodiment, the image collection work is completed under the black background, and the obtained side view images of the cockscomb are shown in fig. 3.
S2: preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part.
In the step, the process of preprocessing the side view image of the cockscomb mainly relates to the following scheme:
1. removing noise, namely removing the noise in the side-looking images of the cockscomb by using median filtering;
2. separating color channels, converting the image into an HSV mode, and carrying out H, S, V three-channel separation;
3. image segmentation, namely determining a threshold value by using a maximum inter-class variance method, and performing threshold value segmentation on the S-channel component image to obtain a real color image and a binary image of the cockscomb part, wherein the real color image of the cockscomb part is shown in fig. 4, and the binary image is shown in fig. 5;
because the background color selected by the side-looking cockscomb image is black, the black HSV three-channel values are respectively as follows: hue H is 0, saturation S is 0%, lightness V is 0%; in order to extract the image of the cockscomb part, the image of the light-colored feather part of the test cockscomb needs to be removed, and the white HSV three-channel values are respectively as follows: hue H is 0, saturation S is 0%, lightness V is 100%; while cocks are often red or pink in color, the red HSV three-channel values are: hue H is 0, saturation S is 100%, and lightness V is 0%.
The comparison shows that the S component values of the black background and the white feather to be removed are both near 0%, and the S component value of the red cockscomb is near 100%, namely the S component value of the target is greatly different from the S component value of the partial image to be removed, so that the S component is selected as the characteristic component of threshold segmentation.
The maximum inter-class variance method divides the image into a background part and a target part according to the gray characteristic of the image. Variance is a measure of the uniformity of the gray scale distribution, and the larger the inter-class variance between the background and the target, the larger the difference between the two parts constituting the image, and therefore, the segmentation that maximizes the inter-class variance means the least probability of erroneous classification.
To obtain the maximum inter-class variance method, a threshold TH needs to be set first, all pixels in an image can be divided into two classes, C1 (smaller than TH) and C2 (larger than TH), the two classes of averages are m1 and m2 respectively, the image global average is mG, and the probabilities that the pixels are divided into C1 and C2 classes are p1 and p2 respectively. Thus, there are:
p1×m1+p2×m2=mG
p1+p2=1
the between-class variance expression is:
σ2=p1(m1-mG)2+p2(m2-mG)2=p1×p2(m1-m2)2
the threshold TH is traversed by 0 to 255 gray levels, and a gray level at which the maximum variance (i.e., the inter-class variance represented by the above equation) is maximized, that is, a threshold for division is obtained. And (4) dividing the S component by using a threshold value obtained by a maximum variance method to obtain a binary image after the S component is divided.
And in the obtained binary image, reserving the pixel point with the gray value of 1 as original RGB data, and setting the color of the pixel point with the gray value of 0 as black, so as to obtain the true color image only reserving the true color data of the cockscomb part.
4. And (3) contour extraction, namely performing edge detection on the segmented binary image of the comb part by using a Canny operator to extract a comb contour, wherein the extracted comb contour image is shown in fig. 6.
S3: and calculating the area and the length of the cockscomb according to the contour of the cockscomb.
The calculation process of the area of the cockscomb in the embodiment is as follows:
first, the area of the image pixel is calculated, and the image pixel is calculated by using a statistical pixel number, and the formula is as follows:
in the formula, l is a binary image length, w is a binary image width, and f (i, j) is a gray scale value of the binary image.
Calculating the area proportion coefficient, wherein the formula is as follows:
in the formula: Δ x is the area scaling factor, S is the target actual area, and N is the target pixel area.
Calculating the actual area of the cockscomb according to the following formula:
Sx=Δx×Nx
in the formula, SxIs the actual area of the comb,. DELTA.x is the area proportionality coefficient, NxIs the area of a pixel of the image of the rooster comb.
The calculation process of the crown length of the cockscomb in the embodiment is as follows:
after the outline of the edge of the rooster comb is extracted, as shown in fig. 7, the origin of the coordinate system is placed at the lower left corner of the outline of the rooster comb, xmaxIs the maximum value of the outline of the edge of the cockscomb in the direction of the x axis, ymaxIs the maximum value of the outline of the edge of the cockscomb in the direction of the y axis.
The pixel distance of the crown length is calculated by the following formula:
in the formula: d is the pixel distance between two points, (x)i,yi) And (x)j,yj) The coordinates of any two points of the external contour of the cockscomb are shown, wherein i, j is 1,2, ….
Calculating the crown length pixel distance of the image cockscomb by the following formula:
H=max(d)
h represents the crown length pixel distance of the comb of this image.
Calculating a distance proportion coefficient according to the following formula:
in the formula: Δ y is the distance scaling factor, len is the actual length of the target, and h is the target pixel distance.
The expression of the actual length of the comb is:
L=Δy×H
in the formula: l is the target actual length, Δ y is the distance scaling factor, and H is the crown length pixel distance.
S4: and comparing the true color image of the cockscomb part with a standard color card, determining the color grade of the cockscomb, and outputting a cockscomb shape determination result.
In this embodiment, each point of the cockscomb true color image is sequentially compared with the color chart shown in fig. 8, the levels of the color charts are 1-7 levels from top to bottom, and according to the euclidean distance, any pixel point in the cockscomb true color image is calculated to be closest to which color on the color chart, that is, the color grade is determined.
The color distance is calculated using the following formula:
where dis represents the color C1And C2Euclidean distance of C1,RRepresents the color C1Red component (R) value of, C1,GRepresents the color C1Green component (G) value of (C)1,BRepresents the color C1The value of the blue component (B).
And calculating Euclidean distances between any pixel point and the colors on the color card in sequence, so that the grade represented by the color card with the minimum dis value is regarded as the color grade of the pixel point.
And after traversing, the color grade of the most pixel points in the image is regarded as the integral color grade of the cockscomb.
And finally, taking the area, the crown length and the color grade of the cockscomb as the shape measurement result of the cockscomb and outputting the result.
On the other hand, referring to fig. 9, the embodiment of the present invention further discloses a system for determining a shape of a chicken comb based on image processing, the system includes: the system comprises an image acquisition device 1, a data processor 2 and a display device 3;
the image acquisition equipment 1 is used for acquiring a side view image of the cockscomb;
the data processor 2 is used for preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part; calculating the area and the length of the cockscomb according to the contour of the cockscomb; comparing the real color image of the cockscomb part with a standard color card to determine the color grade of the cockscomb;
the display device 3 is used for outputting the measurement result of the shape of the rooster comb including the area and the length of the rooster comb and the color grade of the rooster comb.
In this embodiment, the area of the comb, the length of the comb, and the color grade of the comb are used as the result of measuring the shape of the comb, the shape of the comb is measured, and the measurement result is output and displayed, where the display interface of the measurement result is shown in fig. 10, and the interface includes the side view image of the comb, the true color image of the comb portion, the calculation result of the length of the comb, the estimated value of the area of the comb, and the comparison result of the color grade of the comb.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A method for determining the shape of a cockscomb based on image processing is characterized by comprising the following steps:
collecting a side view image of the cockscomb;
preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part;
calculating the area and the length of the cockscomb according to the contour of the cockscomb;
and comparing the real color image of the part of the cockscomb with a standard color card, determining the color grade of the cockscomb, and outputting a cockscomb shape determination result.
2. The image processing-based cockscomb morphology determination method according to claim 1, wherein the process of collecting the cockscomb side view image is completed under a black background.
3. The method as claimed in claim 1, wherein the process of preprocessing the side view image of the comb to obtain a true color image and a binary image of the comb part and extracting the contour of the comb from the binary image includes:
removing noise: removing image noise in the cockscomb side-looking image by using median filtering;
separating color channels: converting the cockscomb side-view image after the noise is removed into an HSV mode, and carrying out H, S, V three-channel separation;
image segmentation: determining a threshold value by a maximum inter-class variance method, and performing threshold value segmentation on the S channel component image to obtain a real color image of the cockscomb part and a binary image of the cockscomb part;
contour extraction: and carrying out edge detection on the binary image of the comb part, and extracting the outline of the comb.
4. The image processing-based method for determining the shape of the rooster comb according to claim 1, wherein the process of calculating the area of the rooster comb according to the outline of the rooster comb specifically comprises:
calculating the area of the image pixel by means of counting the number of the pixel, wherein the calculation formula is as follows:
in the formula, l is the length of the binary image, w is the width of the binary image, and f (i, j) is the gray value of the binary image;
and calculating the area proportion coefficient, wherein the calculation formula is as follows:
in the formula: Δ x is an area proportionality coefficient, S is a target actual area, and N is a target pixel area;
calculating the actual area of the cockscomb according to the image pixel area and the area proportion coefficient, wherein the calculation formula is as follows:
Sx=Δx×Nx
in the formula, SxIs the actual area of the comb,. DELTA.x is the area proportionality coefficient, NxIs the area of a pixel of the image of the rooster comb.
5. The method for determining the shape of a comb based on image processing as claimed in claim 1, wherein the process of calculating the crown length according to the contour of the comb specifically comprises:
constructing a two-dimensional coordinate system, and placing an origin of the two-dimensional coordinate system at the lower left corner of the outline of the cockscomb;
calculating the pixel distance of any two points of the outline edge of the cockscomb, and obtaining the crown length pixel distance according to the maximum value of the pixel distance;
and calculating to obtain the crown length according to the product of the crown length pixel distance and a distance proportion coefficient obtained in advance.
6. The image processing-based cockscomb shape measuring method according to claim 5, wherein the calculation formula of the crown length pixel distance is:
H=max(d)
wherein the content of the first and second substances,
wherein H is the crown-length pixel distance, d is the pixel distance between two points, (x)i,yi) And (x)j,yj) Respectively representing the coordinates of any two points on the outline edge of the cockscomb;
the calculation formula of the distance proportionality coefficient is as follows:
in the formula, Δ y is a distance scale coefficient, len is a target actual length, and h is a target pixel distance.
7. The method as claimed in claim 1, wherein the step of comparing the image of the true color of the comb with a standard color chart to determine the color grade of the comb comprises:
respectively determining the color grade of each pixel point in the real-color image of the cockscomb part;
and taking the color grade with the most corresponding pixel points as the color grade of the cockscomb.
8. The image-processing-based cockscomb shape measuring method according to claim 7, wherein the process of respectively determining the color grade of each pixel point in the true-color image of the cockscomb portion comprises:
respectively calculating the Euclidean distance between the color component of each pixel point in the real color image of the cockscomb part and the color component of each grade on the standard color card;
and determining the color grade of each pixel point according to the color grade corresponding to the color component with the minimum Euclidean distance.
9. The image processing-based cockscomb shape measuring method according to claim 8, wherein the Euclidean distance is calculated by the formula:
where dis represents the color C1And C2Euclidean distance of C1,RRepresents the color C1Red component value of, C1,GRepresents the color C1Green component value of, C1,BRepresents the color C1The blue component value of (a).
10. A rooster comb morphology measurement system based on image processing is characterized by comprising: the system comprises image acquisition equipment, a data processor and display equipment;
the image acquisition equipment is used for acquiring a side view image of the cockscomb;
the data processor is used for preprocessing the side view image of the cockscomb to obtain a true color image of the cockscomb part and a binary image of the cockscomb part, and extracting a cockscomb outline from the binary image of the cockscomb part; calculating the area and the length of the cockscomb according to the contour of the cockscomb; comparing the real color image of the cockscomb part with a standard color card to determine the color grade of the cockscomb;
the display device is used for outputting a cockscomb shape determination result comprising the area and the length of the cockscomb and the color grade of the cockscomb.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110621112.9A CN113256703A (en) | 2021-06-03 | 2021-06-03 | Method and system for determining shape of cockscomb based on image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110621112.9A CN113256703A (en) | 2021-06-03 | 2021-06-03 | Method and system for determining shape of cockscomb based on image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113256703A true CN113256703A (en) | 2021-08-13 |
Family
ID=77186383
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110621112.9A Pending CN113256703A (en) | 2021-06-03 | 2021-06-03 | Method and system for determining shape of cockscomb based on image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113256703A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117422716A (en) * | 2023-12-19 | 2024-01-19 | 沂水友邦养殖服务有限公司 | Ecological early warning method and system for broiler chicken breeding based on artificial intelligence |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106482643A (en) * | 2016-06-30 | 2017-03-08 | 江苏省家禽科学研究所 | Cockscomb size and colour measurement plate and assay method |
CN109509202A (en) * | 2018-09-21 | 2019-03-22 | 浙江大学 | A kind of batterylaying image partition method based on improvement movable contour model |
CN110826418A (en) * | 2019-10-15 | 2020-02-21 | 深圳和而泰家居在线网络科技有限公司 | Face feature extraction method and device |
CN111652084A (en) * | 2020-05-13 | 2020-09-11 | 清远市智慧农业研究院 | Abnormal laying hen identification method and device |
-
2021
- 2021-06-03 CN CN202110621112.9A patent/CN113256703A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106482643A (en) * | 2016-06-30 | 2017-03-08 | 江苏省家禽科学研究所 | Cockscomb size and colour measurement plate and assay method |
CN109509202A (en) * | 2018-09-21 | 2019-03-22 | 浙江大学 | A kind of batterylaying image partition method based on improvement movable contour model |
CN110826418A (en) * | 2019-10-15 | 2020-02-21 | 深圳和而泰家居在线网络科技有限公司 | Face feature extraction method and device |
CN111652084A (en) * | 2020-05-13 | 2020-09-11 | 清远市智慧农业研究院 | Abnormal laying hen identification method and device |
Non-Patent Citations (1)
Title |
---|
彭彦松: "基于支持向量机的养鸡场死鸡检测方法研究", 《中国优秀硕博士学位论文全文数据库(硕士) 农业科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117422716A (en) * | 2023-12-19 | 2024-01-19 | 沂水友邦养殖服务有限公司 | Ecological early warning method and system for broiler chicken breeding based on artificial intelligence |
CN117422716B (en) * | 2023-12-19 | 2024-03-08 | 沂水友邦养殖服务有限公司 | Ecological early warning method and system for broiler chicken breeding based on artificial intelligence |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106651872B (en) | Pavement crack identification method and system based on Prewitt operator | |
CN110210477B (en) | Digital instrument reading identification method | |
CN110120042B (en) | Crop image pest and disease damage area extraction method based on SLIC super-pixel and automatic threshold segmentation | |
CN108564085B (en) | Method for automatically reading of pointer type instrument | |
US20070253040A1 (en) | Color scanning to enhance bitonal image | |
CN108960237B (en) | Reading identification method for pointer type oil level indicator | |
CN110189383B (en) | Traditional Chinese medicine tongue color and fur color quantitative analysis method based on machine learning | |
CN108181316B (en) | Bamboo strip defect detection method based on machine vision | |
CN108186051B (en) | Image processing method and system for automatically measuring double-apical-diameter length of fetus from ultrasonic image | |
CN108378869B (en) | Image processing method and processing system for automatically measuring head circumference length of fetus from ultrasonic image | |
CN112149543B (en) | Building dust recognition system and method based on computer vision | |
CN109800619B (en) | Image recognition method for citrus fruits in mature period | |
CN114926410A (en) | Method for detecting appearance defects of brake disc | |
CN114331986A (en) | Dam crack identification and measurement method based on unmanned aerial vehicle vision | |
CN114998214A (en) | Sampling speed control method and system for cable defect detection | |
CN113256703A (en) | Method and system for determining shape of cockscomb based on image processing | |
CN110580697B (en) | Video image processing method and system for measuring thickness of fetal nape transparency from ultrasonic video image | |
CN111986157B (en) | Digital pathological image quality evaluation system | |
Ouji et al. | Chromatic/achromatic separation in noisy document images | |
CN110051384B (en) | Method and system for detecting position of transparency of neck and back of fetus by combining medical statistical information | |
CN112884002B (en) | Intelligent electric meter version classification method | |
CN115170561A (en) | Roundness detection method and system of laser cutting workpiece based on visual processing | |
CN114881984A (en) | Detection method and device for rice processing precision, electronic equipment and medium | |
JP5424694B2 (en) | Image recognition apparatus and program | |
CN110827272B (en) | Tire X-ray image defect detection method based on image processing |
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: 20210813 |
|
RJ01 | Rejection of invention patent application after publication |