CN115797343A - Livestock and poultry breeding environment video monitoring method based on image data - Google Patents

Livestock and poultry breeding environment video monitoring method based on image data Download PDF

Info

Publication number
CN115797343A
CN115797343A CN202310064136.8A CN202310064136A CN115797343A CN 115797343 A CN115797343 A CN 115797343A CN 202310064136 A CN202310064136 A CN 202310064136A CN 115797343 A CN115797343 A CN 115797343A
Authority
CN
China
Prior art keywords
pixel point
dust
livestock
target pixel
breeding environment
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
CN202310064136.8A
Other languages
Chinese (zh)
Other versions
CN115797343B (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.)
Shandong Tobetter Machinery Co ltd
Original Assignee
Shandong Tobetter Machinery Co ltd
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 Shandong Tobetter Machinery Co ltd filed Critical Shandong Tobetter Machinery Co ltd
Priority to CN202310064136.8A priority Critical patent/CN115797343B/en
Publication of CN115797343A publication Critical patent/CN115797343A/en
Application granted granted Critical
Publication of CN115797343B publication Critical patent/CN115797343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Abstract

The invention relates to the technical field of image data processing, in particular to a livestock and poultry breeding environment video monitoring method based on image data.

Description

Livestock and poultry breeding environment video monitoring method based on image data
Technical Field
The invention relates to the technical field of image data processing, in particular to a livestock and poultry breeding environment video monitoring method based on image data.
Background
For livestock and poultry farms, in the livestock and poultry breeding process, due to the fact that feathers or villi of livestock fall off, feed powder, excrement, padding materials, livestock activities and the like can generate dust, and a large amount of dust can cause the livestock to be sick and even dead, the dust amount in the livestock and poultry breeding environment needs to be detected timely and accurately. However, the method for detecting the dust amount in the livestock and poultry breeding environment by using the photoelectric detector is not accurate enough, and the cost is high because a large number of photoelectric detectors need to be arranged in the livestock and poultry breeding farm, so that the high-efficiency detection of the dust amount in the livestock and poultry breeding environment can be realized by adopting the conventional technology for detecting dust after processing images.
In practice, the inventors found that the above prior art has the following disadvantages:
in the prior art, the method for identifying the environmental dust concentration through image detection only determines the dust concentration according to the noise in the image, and the detected dust concentration has low precision; because the influence of the dust with different spatial heights on the livestock and poultry in the livestock and poultry breeding environment is different, the dust concentration in the livestock and poultry breeding environment is simply detected according to the noise information in the image, and the influence of the dust with different spatial heights on the livestock and poultry in the breeding environment cannot be accurately judged by providing the dust concentration data with different spatial heights; therefore, the prior art has overhigh cost and is not accurate enough for detecting the dust in the livestock and poultry breeding environment.
Disclosure of Invention
In order to solve the technical problem of detecting the dust amount of the livestock and poultry breeding environment, the invention aims to provide a video monitoring method of the livestock and poultry breeding environment based on image data, and the adopted technical scheme is as follows:
the invention provides a livestock and poultry breeding environment video monitoring method based on image data, which comprises the following steps:
acquiring each frame of livestock and poultry breeding environment image in the livestock and poultry breeding environment video;
acquiring gray value distribution characteristics of each pixel point in the livestock and poultry breeding environment image within a preset first neighborhood range, performing region growth by taking each pixel point as a center, acquiring a growth region area corresponding to each pixel point, and acquiring dust concentration corresponding to each pixel point according to the growth region area and the gray value distribution characteristics;
obtaining the dust position influence rate corresponding to each pixel point according to the position information of each pixel point in the livestock and poultry breeding environment image and the dust concentration;
the method comprises the steps of obtaining dust concentrations of each pixel point and other pixel points in a preset second neighborhood range, obtaining dust concentration distribution characteristics according to the dust concentrations of each pixel point and other pixel points in the preset second neighborhood range, obtaining dust significance of each pixel point according to the dust concentration distribution characteristics and dust position influence rate of each pixel point, and achieving video monitoring of the livestock and poultry breeding environment according to the dust significance.
Further, the presetting of the gray value distribution characteristics in the first neighborhood range by each pixel point comprises the following steps:
acquiring the mean value of gray values of all pixel points in the livestock and poultry breeding environment image, acquiring the gray values, the maximum values of the gray values and the minimum values of the gray values of all the pixel points of a target pixel point in a preset first neighborhood range except the target pixel point, and taking the mean value of the gray values, the gray values of the target pixel point, the gray values, the maximum values of the gray values and the minimum values of the gray values of all the pixel points of the target pixel point in the preset first neighborhood range except the target pixel point as the gray value distribution characteristics of the target pixel point in the preset first neighborhood range; and changing the target pixel points to obtain the gray value distribution characteristics of each pixel point in a preset first neighborhood range.
Further, the acquiring the dust concentration corresponding to each pixel point according to the growth area and the gray value distribution characteristics includes:
obtaining a dust concentration value corresponding to the target pixel point through a dust concentration value model according to the gray value distribution characteristic corresponding to the target pixel point and the growth area, wherein the dust concentration value model comprises:
Figure SMS_1
wherein ,
Figure SMS_4
the dust concentration value corresponding to the target pixel point,
Figure SMS_6
is the gray value corresponding to the target pixel point,
Figure SMS_9
is the mean value of the gray values,
Figure SMS_3
the serial numbers of the pixel points in the preset first neighborhood range,
Figure SMS_5
the second neighborhood except the target pixel point within the preset first neighborhood range
Figure SMS_8
The gray value corresponding to each pixel point,
Figure SMS_10
the maximum value of the gray values of all the pixel points except the target pixel point in the preset first neighborhood range is set as the target pixel point,
Figure SMS_2
the gray value of all pixels except the target pixel in the preset first neighborhood range is the minimum value of the gray value of the target pixel,
Figure SMS_7
the growth region area corresponding to the target pixel point;
and normalizing the dust concentration value corresponding to each pixel point to obtain the dust concentration corresponding to each pixel point.
Further, the position information of each pixel point in the livestock and poultry breeding environment image comprises:
establishing a planar rectangular coordinate system by taking the leftmost pixel point in the livestock and poultry breeding environment image as an origin, taking the transverse edge of the livestock and poultry breeding environment image where the leftmost pixel point is located as an x-axis and taking the longitudinal edge of the livestock and poultry breeding environment image as a y-axis, recording the length of the livestock and poultry breeding environment image in the y-axis direction on the planar rectangular coordinate system as the image length, recording the Euclidean distance from a target pixel point to the upper edge of the livestock and poultry breeding environment image in the vertical direction as an upper spatial distance, and taking the Euclidean distance from the target pixel point to the lower edge of the livestock and poultry breeding environment image in the vertical direction as a lower spatial distance;
the image length of the livestock and poultry breeding environment image, the upper space distance of the target pixel points and the lower space distance of the target pixel points form position information of each pixel point in the plane rectangular coordinate system.
Further, the method for obtaining the influence coefficient of each pixel point includes:
when the distance between the upper space and the lower space corresponding to the target pixel point is larger than the distance between the upper space and the lower space, the influence coefficient of the target pixel point is the dust concentration of the target pixel point; when the distance between the upper spaces corresponding to the target pixel points is smaller than or equal to the distance between the lower spaces, the influence coefficient of the target pixel points is the dust concentration of the target pixel points plus a preset first adjusting parameter;
and changing the target pixel points to obtain the influence coefficient of each pixel point.
Further, the obtaining of the dust position influence rate corresponding to each pixel point according to the position information of each pixel point in the livestock and poultry breeding environment image and the dust concentration comprises:
and obtaining a product of a preset second adjusting parameter and the minimum value of the upper spatial distance and the lower spatial distance corresponding to the target pixel point, multiplying the ratio of the product to the image length by the influence coefficient of the target pixel point to obtain the dust position influence rate of the target pixel point, and obtaining the dust position influence rate corresponding to each pixel point according to the dust position influence rate of the target pixel point.
Further, the obtaining of the dust significance of each pixel point according to the dust concentration distribution characteristics and the dust position influence rate of each pixel point comprises:
calculating the absolute value of the difference between the dust concentration of a target pixel point and the dust concentrations of other pixel points in a preset second neighborhood range, and taking the product of the maximum value of the ratio of the dust concentration of the target pixel point to the absolute value of the difference and the dust position influence rate of the target pixel point as the dust significance of the target pixel point;
and changing the target pixel points to obtain the dust significance of each pixel point.
Further, the video monitoring of the livestock and poultry breeding environment according to the dust significance comprises the following steps:
marking the pixels with the dust significance degree larger than or equal to a preset first dust threshold as suspected dust pixels, counting the number of all the dust pixels in the livestock and poultry breeding environment image, and marking the pixels with the dust significance degree larger than or equal to a preset second dust threshold as dust pixels;
when the number of the suspected dust pixel points is greater than or equal to a preset first dust concentration threshold value and the number of the dust pixel points is smaller than a preset second dust concentration threshold value, the risk that dust affects livestock is considered to exist, and the area corresponding to the livestock breeding environment image is monitored in a key mode; and when the number of the dust pixel points is larger than or equal to a preset second concentration threshold value, the dust concentration is considered to influence the livestock and poultry, and a ventilation command is fed back.
The invention has the following beneficial effects:
in the embodiment of the invention, the characteristic that dust with high dust concentration is reflected by light rays and then shows higher and uniform brightness on the image is considered, the dust concentration of each pixel point is obtained according to the gray value distribution characteristics and the region growing area of each pixel point in the livestock and poultry breeding image, and the method can accurately reflect the dust concentration corresponding to each pixel point, thereby more accurately calculating the dust significance in the subsequent process; according to the embodiment of the invention, the influence on livestock and poultry caused by different spatial distribution of dust is considered, and the influence rate of the dust position is introduced according to the position information and the dust concentration of each pixel point, so that the influence of the dust concentration at different positions on the livestock and poultry is accurately obtained, the subsequent dust is calculated more accurately, and the method is more suitable for livestock and poultry breeding environments. The invention ensures high adaptability to the livestock and poultry breeding environment and also ensures the accuracy of the detection of the dust amount of the livestock and poultry breeding environment.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of 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 some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a video monitoring method for a livestock and poultry breeding environment based on image data according to an embodiment of the present invention.
Detailed Description
In order to further illustrate the technical means and effects of the present invention adopted to achieve the predetermined invention purpose, the following detailed description, the structure, the features and the effects of the method for monitoring the livestock and poultry breeding environment video based on the image data according to the present invention are provided with the accompanying drawings and the preferred embodiments. In the following description, the different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the image data-based livestock and poultry breeding environment video monitoring method specifically with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a video monitoring method for a livestock and poultry breeding environment based on image data according to an embodiment of the present invention is shown, where the method includes:
step S1: and acquiring each frame of livestock and poultry breeding environment image in the livestock and poultry breeding environment video.
According to the invention, each frame of image in the livestock and poultry breeding environment is analyzed on the basis of the video of the livestock and poultry breeding environment, so that firstly, shooting equipment needs to be arranged to shoot the images of the livestock and poultry breeding environment, and a plurality of shooting equipment needs to be arranged to collect the image data of the livestock and poultry breeding environment because the livestock and poultry breeding environment is generally very wide. In the embodiment of the invention, a plurality of industrial cameras are arranged in the livestock and poultry breeding environment to shoot the livestock and poultry breeding environment, and the industrial cameras are arranged in the horizontal direction to shoot the dust conditions in different space heights of the livestock and poultry breeding environment.
In consideration of the fact that the dust concentration is obtained based on the characteristic that the dust is reflected on the image to have high brightness after being scattered under the influence of light, a light source needs to be additionally arranged to collect the images of the livestock and poultry breeding environment. However, livestock and poultry are sensitive to light and are susceptible to strong light, so that a high-intensity and long-time light source needs to be avoided for ambient light. In the embodiment of the invention, the flash lamp is turned on for light supplement only when the camera collects the image, so that the influence on the livestock and the poultry is reduced to the maximum extent, and the high-brightness characteristic of dust on the image can be accurately obtained.
The livestock and poultry breeding environment gray level image is obtained by graying the image after the livestock and poultry breeding environment image is collected by the camera, but due to the influence of the environment light, the camera and other off-site factors, the obtained livestock and poultry breeding environment gray level image inevitably generates noise, so that the livestock and poultry breeding environment gray level image needs to be subjected to denoising pretreatment. In the embodiment of the invention, the Gaussian filtering and each channel of the livestock and poultry breeding environment gray level image are convolved to obtain the breeding environment gray level image subjected to denoising pretreatment, so that the precision and the quality of the image are improved. It should be noted that the process of performing convolution on each channel of the gray scale image of the livestock and poultry raising environment by using gaussian filtering is well known in the prior art, and is not further defined and described herein. In order to facilitate the processing of the subsequent livestock and poultry breeding environment images, the subsequent livestock and poultry breeding environment images are all the breeding environment gray level images subjected to denoising pretreatment.
Step S2: the method comprises the steps of obtaining gray value distribution characteristics of each pixel point in a preset first neighborhood range in a livestock and poultry breeding environment image, carrying out region growth by taking each pixel point as a center, obtaining the growth region area corresponding to each pixel point, and obtaining the dust concentration corresponding to each pixel point according to the growth region area and the gray value distribution characteristics.
And obtaining the livestock and poultry breeding environment image through the process of the step S1. Considering that when the dust is irradiated by light, the diameter of the dust is generally smaller than the length of the incident light wave, so that the scattering of the light generated by the dust is reflected on the livestock and poultry breeding environment image and is represented as light waves scattered to the surroundings of the livestock and poultry breeding environment image by surrounding particles, and the gray value in the corresponding pixel point range is high. In the livestock and poultry breeding environment, the dust is mainly generated by raising the dust in the livestock and poultry breeding environment field due to the movement of the livestock and poultry, so that the dust is gradually diffused from the ground to the air in the generation process, the dust concentration is high at the position close to the raised position of the dust on the livestock and poultry breeding environment image, and the concentration is smaller when the position of the raised dust is taken as the center and is farther away from the center.
Therefore, when the pixel points in the images of the livestock and poultry breeding environment correspond to dust and the corresponding dust concentration in the space range of the pixel points is higher, the gray values corresponding to the pixel points and the pixel points nearby are higher, and the gray value distribution is more uniform. Therefore, in order to accurately reflect the dust concentration corresponding to each pixel point, the dust concentration needs to be further obtained according to the gray value distribution characteristics of each pixel point in the livestock and poultry breeding environment image and the region growing area obtained by performing region growing on each pixel point. Specifically, the method comprises the following steps:
and acquiring the gray value distribution characteristics of each pixel point in a corresponding preset first neighborhood range in the livestock and poultry breeding environment image. In the embodiment of the invention, the gray value average value of all pixel points in the livestock and poultry breeding environment image is calculated firstly, each pixel point in the livestock and poultry breeding environment image is taken as a central pixel point, a 3 x 3 window is established, namely a first neighborhood range is preset as an eight neighborhood range, the gray values of all the pixel points in the window are counted, the gray values of the other pixel points except the central pixel point in the window are marked in sequence, the maximum value and the minimum value of the gray values of the other pixel points except the central pixel point in the window range are counted, and the gray value average value, the gray value of a target pixel point, the gray value of all the pixel points except the target pixel point in the preset first neighborhood range of the target pixel point, the maximum value and the minimum value of the gray value are taken as the gray value distribution characteristics of the target pixel point in the preset first neighborhood range. And carrying out regional growth in eight surrounding neighborhoods by taking each pixel point as a seed point, continuing the growth when the gray value difference between the adjacent pixel points and the seed points is less than 5, and stopping the growth until the gray value difference between all the adjacent pixel points and the seed points is more than or equal to 5, thereby obtaining the regional growth area corresponding to each pixel point.
Obtaining the dust concentration value of each pixel point through a dust concentration value model according to the gray value distribution characteristics of each pixel point in the livestock and poultry breeding environment image and the corresponding region growing area, wherein the dust concentration value model comprises the following components:
Figure SMS_11
wherein ,
Figure SMS_14
is the corresponding dust concentration value of the target pixel point,
Figure SMS_17
is the gray value corresponding to the target pixel point,
Figure SMS_18
is the mean of the gray values,
Figure SMS_13
for presetting the order of pixel points in the first neighborhood rangeThe number of the mobile station is,
Figure SMS_16
presetting the first neighborhood range except the target pixel point
Figure SMS_19
The gray value corresponding to each pixel point,
Figure SMS_20
the gray value of all pixels except the target pixel in the preset first neighborhood range is the maximum value of the gray value of the target pixel,
Figure SMS_12
the gray value of all pixels except the target pixel in the preset first neighborhood range is the minimum value of the gray value of the target pixel,
Figure SMS_15
and the area of the growth region corresponding to the target pixel point.
The dust concentration value model represents the dust concentration value corresponding to the target pixel point by adopting the product of the brightness characteristic of the target pixel point in the livestock and poultry breeding environment image and the surrounding brightness distribution, and when the gray value difference absolute value of other pixel points except the target pixel point in the preset first neighborhood range of the target pixel point and the target pixel point is smaller, the smaller the difference absolute value between the maximum gray value and the minimum gray value is, the more uniform the gray value distribution near the target pixel point is. When the gray value of the target pixel point is larger and the distribution of the nearby gray values is more uniform, the dust concentration value of the corresponding target pixel point is higher. The dust concentration value model gives consideration to the significance of dust corresponding to each pixel point in the livestock and poultry breeding environment image and the significance of the dust concentration, and further enables the obtained dust concentration value to be more accurate.
Normalizing the dust concentration value corresponding to each pixel point to obtain the dust concentration corresponding to each pixel point, which is explained as the prior art well known to those skilled in the art, and is not further limited and described herein.
And step S3: and obtaining the dust position influence rate corresponding to each pixel point according to the position information and the dust concentration of each pixel point in the livestock and poultry breeding environment image.
So far, the dust concentration corresponding to each pixel point in the image of the livestock and poultry breeding environment is obtained through the step S2, but the dust concentration of each pixel point is only used as a dust monitoring result in the livestock and poultry breeding environment, and the actual dust influence in the livestock and poultry breeding environment cannot be accurately reflected, because when dust is raised, if the dust distribution is far from the spatial range of livestock and poultry activities and the distribution range is small, the dust generated at the moment has little influence on the livestock and poultry; however, if a large amount of dust is contained in the space where livestock breathe, the dust generated at this time has a great influence on the livestock. Therefore, the breathing of the livestock and poultry needs to be monitored in a spatial manner. Therefore, the dust position influence rate is introduced as a space influence parameter to further characterize the influence of dust on livestock and poultry.
In order to introduce the dust influence rate as a space influence parameter to further analyze the dust influence, the dust position influence rate corresponding to each pixel point is obtained in the livestock and poultry breeding environment image according to the position information and the dust concentration of each pixel point. Specifically, the method comprises the following steps:
and establishing a plane rectangular coordinate system by taking the leftmost pixel point of the livestock and poultry breeding environment image as an original point, and the transverse edge of the livestock and poultry breeding environment image where the leftmost pixel point is located as an x-axis and the longitudinal edge as a y-axis. The method comprises the steps of counting the length of a livestock and poultry breeding environment image in the y-axis direction, the Euclidean distance from each pixel point to the upper edge of the livestock and poultry breeding environment image in the vertical direction, the Euclidean distance from each pixel point to the lower edge of the livestock and poultry breeding environment image in the vertical direction, recording the length of the livestock and poultry breeding environment image in the y-axis direction as the image length, recording the Euclidean distance from each pixel point to the upper edge of the livestock and poultry breeding environment image in the vertical direction as the upper spatial distance, and recording the Euclidean distance from each pixel point to the lower edge of the livestock and poultry breeding environment image in the vertical direction as the lower spatial distance. And recording the image length, the upper space distance and the lower space distance corresponding to each pixel point as the position information of each pixel point.
After the position information of the pixel points is obtained, in order to better combine the influence of the dust at different spatial positions on the livestock and poultry, influence coefficients are introduced to adjust the attention degree of the dust at different heights. The method for acquiring the influence coefficient of each pixel point comprises the following steps:
when the distance between the upper space and the lower space corresponding to the target pixel point is larger than the distance between the upper space and the lower space, the influence coefficient of the target pixel point is the dust concentration of the target pixel point; when the distance between the upper space and the lower space corresponding to the target pixel point is smaller than or equal to the distance between the lower space and the upper space, the influence coefficient of the target pixel point is the dust concentration of the target pixel point plus a preset first adjusting parameter, and the influence coefficient of each pixel point is obtained according to the influence coefficient of the target pixel point. The mapping is represented on the formula as:
Figure SMS_21
wherein ,
Figure SMS_22
for the influence coefficient corresponding to the target pixel point,
Figure SMS_23
is the dust concentration corresponding to the target pixel point,
Figure SMS_24
is the distance above the target pixel point,
Figure SMS_25
is the lower spatial distance of the target pixel point,
Figure SMS_26
presetting a first adjusting parameter; in the embodiment of the present invention, the first adjustment parameter is preset to be 1.
After the influence coefficient of each pixel point is obtained, in order to enable the dust significance obtained in the following process to be more accurate, the relative significance value of the position of each pixel point is introduced to serve as another parameter to further obtain the dust position influence rate corresponding to each pixel point, and the influence coefficient of each pixel point is used as a weight to obtain the dust position influence rate corresponding to each pixel point through a dust position influence rate model according to the position information of each pixel point. Specifically, the method comprises the following steps:
and multiplying the ratio of the preset second adjusting parameter to the minimum value of the upper spatial distance and the lower spatial distance corresponding to the target pixel point and the image length by the influence coefficient of the target pixel point to obtain the dust position influence rate of the target pixel point, and obtaining the dust position influence rate corresponding to each pixel point according to the dust position influence rate of the target pixel point. Mapping to the formula is represented as:
Figure SMS_27
wherein ,
Figure SMS_28
the dust position influence rate corresponding to the target pixel point,
Figure SMS_29
is the distance above the target pixel point,
Figure SMS_30
is the lower spatial distance of the target pixel point,
Figure SMS_31
the influence coefficients corresponding to the target pixel points are set,
Figure SMS_32
for the image length corresponding to each pixel point,
Figure SMS_33
for the second preset adjustment parameter, set to 2 in the present embodiment,
Figure SMS_34
a function is chosen for the minimum.
The obtained dust position influence rate combines the spatial position information of each pixel point, the attention degree of dust is adjusted according to the spatial position information, different dust influence degrees are obtained according to the position of each pixel point, the position of each pixel point is closer to an area with large dust influence degree, the dust position influence rate corresponding to the pixel point is larger, and the pixel point is more likely to correspond to the position corresponding to the dust in the image.
And step S4: the method comprises the steps of obtaining the dust concentration of each pixel point and other pixel points in a preset second neighborhood range, obtaining the dust concentration distribution characteristics according to the dust concentration of each pixel point and other pixel points in the preset second neighborhood range, obtaining the dust significance of each pixel point according to the dust concentration distribution characteristics and the dust position influence rate of each pixel point, and achieving video monitoring of the livestock and poultry breeding environment according to the dust significance.
The dust concentration and the dust position influence rate corresponding to each pixel point are obtained according to the steps S2 and S3, wherein the dust concentration represents the dust distribution characteristics corresponding to each pixel point, and the dust position influence rate represents the influence degree of the position corresponding to each pixel point on the dust. Specifically, the method comprises the following steps:
the method comprises the steps of firstly obtaining the dust concentration of each pixel point and other pixel points in a preset second neighborhood range, further obtaining the dust concentration distribution characteristics according to the dust concentration of a target pixel point and other pixel points in the preset second neighborhood range, and obtaining the dust significance of each pixel point according to the dust concentration distribution characteristics and the dust position influence rate of each pixel point, thereby further completing the monitoring of the livestock and poultry breeding environment. Specifically, the method comprises the following steps:
calculating the difference absolute value of the dust concentration of the target pixel point and the dust concentrations of other pixel points in a preset second neighborhood range, taking the product of the maximum value of the ratio of the dust concentration of the target pixel point to the difference absolute value and the dust position influence rate of the target pixel point as the dust significance of the target pixel point, and changing the target pixel point to obtain the dust significance of each pixel point. In the embodiment of the present invention, it is preset that the second neighborhood range is set as four neighborhoods, so that the method for obtaining the dust significance of each pixel point is mapped to a formula to be represented as:
Figure SMS_35
wherein ,
Figure SMS_37
is the dust significance corresponding to the target pixel point,
Figure SMS_40
is the dust concentration of the target pixel point,
Figure SMS_42
Figure SMS_38
Figure SMS_39
Figure SMS_41
representing the dust concentration corresponding to four pixel points in the range of four adjacent domains of the target pixel point,
Figure SMS_43
the dust position influence rate corresponding to the target pixel point,
Figure SMS_36
a function is chosen for the maximum.
Recording the maximum value in the ratio of the dust concentration of the target pixel point to the absolute value of the difference as a dust concentration relative value, wherein the dust significance of the target pixel point is obtained according to the product of the dust position influence rate of the target pixel point and the dust concentration relative values of the target pixel point and the surrounding pixel points, and when the dust concentration of the surrounding pixel points of the target pixel point is closer to the dust concentration of the target pixel point, the corresponding dust concentration relative value is larger; when the dust concentration relative value of the target pixel point is larger and the dust position influence rate is larger, the dust significance of the corresponding target pixel point is larger. The obtained dust significance considers the dust concentration and the dust position influence rate of each pixel point and the corresponding dust possibility of other pixel points in the preset second neighborhood range of each pixel point, and the significance of each pixel point in the image as dust is accurately reflected.
And obtaining the dust significance corresponding to each pixel point, wherein the dust significance reflects the significance degree of dust expressed in the livestock and poultry breeding environment image, namely the possibility that the pixel point corresponds to the dust. It is qualitatively shown that the greater the significance of the dust corresponding to the pixel point, the greater the probability that the pixel point corresponds to dust.
After the dust significance of each pixel point is obtained, the dust monitoring result needs to be comprehensively evaluated according to the dust significance of each pixel point. The method specifically comprises the following steps:
marking the pixel points with the dust significance degree larger than or equal to a preset first dust threshold as suspected dust pixel points, counting the number of all dust pixel points in the livestock and poultry breeding environment image, and marking the pixel points with the dust significance degree larger than or equal to a preset second dust threshold as dust pixel points; when the number of suspected dust pixel points is greater than or equal to a preset first dust concentration threshold and the number of dust pixel points is smaller than a preset second dust concentration threshold, the risk that dust affects livestock and poultry is considered to exist, and whether the dust concentration condition is aggravated needs to be paid attention to at the moment; when the number of dust pixel points is more than or equal to the preset second concentration threshold value, the dust concentration is considered to influence the livestock and poultry, and ventilation is needed at the moment. In the embodiment of the present invention, the first dust threshold is set to 2.25, the second dust threshold is set to 3, and the first dust concentration threshold is set to
Figure SMS_44
The second dust concentration threshold is set to
Figure SMS_45
In summary, the invention obtains each corresponding dust concentration through the gray value distribution characteristics and the growth area of each pixel point in the livestock and poultry breeding environment image, obtains the dust position influence rate of each pixel point according to the position information and the dust concentration of each pixel point, obtains the dust significance of each pixel point according to the dust position influence rate of each pixel point and the dust concentration distribution characteristics of other pixel points in the neighborhood range of each pixel point, and realizes video monitoring on the livestock and poultry breeding environment according to the dust significance of each pixel point.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. The processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.

Claims (8)

1. The image data-based livestock and poultry breeding environment video monitoring method is characterized by comprising the following steps of:
acquiring each frame of livestock and poultry breeding environment image in the livestock and poultry breeding environment video;
acquiring gray value distribution characteristics of each pixel point in the livestock and poultry breeding environment image within a preset first neighborhood range, performing region growth by taking each pixel point as a center, acquiring a growth region area corresponding to each pixel point, and acquiring dust concentration corresponding to each pixel point according to the growth region area and the gray value distribution characteristics;
obtaining the dust position influence rate corresponding to each pixel point according to the position information of each pixel point in the livestock and poultry breeding environment image and the dust concentration;
the method comprises the steps of obtaining dust concentrations of each pixel point and other pixel points in a preset second neighborhood range, obtaining dust concentration distribution characteristics according to the dust concentrations of each pixel point and other pixel points in the preset second neighborhood range, obtaining dust significance of each pixel point according to the dust concentration distribution characteristics and dust position influence rate of each pixel point, and achieving video monitoring of the livestock and poultry breeding environment according to the dust significance.
2. The image data-based livestock and poultry breeding environment video monitoring method according to claim 1, wherein presetting the gray value distribution characteristic in the first neighborhood range by each pixel point comprises:
acquiring the mean value of gray values of all pixel points in the livestock and poultry breeding environment image, acquiring the gray values, the maximum values of the gray values and the minimum values of the gray values of all the pixel points of a target pixel point in a preset first neighborhood range except the target pixel point, and taking the mean value of the gray values, the gray values of the target pixel point, the gray values, the maximum values of the gray values and the minimum values of the gray values of all the pixel points of the target pixel point in the preset first neighborhood range except the target pixel point as the gray value distribution characteristics of the target pixel point in the preset first neighborhood range; and changing the target pixel points to obtain the gray value distribution characteristics of each pixel point in a preset first neighborhood range.
3. The image data-based livestock and poultry breeding environment video monitoring method according to claim 2, wherein the obtaining of the dust concentration corresponding to each pixel point according to the growth area and the gray value distribution characteristics comprises:
obtaining a dust concentration value corresponding to the target pixel point through a dust concentration value model according to the gray value distribution characteristics corresponding to the target pixel point and the area of the growth area, wherein the dust concentration value model comprises:
Figure QLYQS_1
wherein ,
Figure QLYQS_3
the dust concentration value corresponding to the target pixel point,
Figure QLYQS_6
is the gray value corresponding to the target pixel point,
Figure QLYQS_8
is the mean value of the gray values,
Figure QLYQS_4
the serial numbers of the pixel points in the preset first neighborhood range,
Figure QLYQS_7
the second neighborhood except the target pixel point within the preset first neighborhood range
Figure QLYQS_9
The gray value corresponding to each pixel point is obtained,
Figure QLYQS_10
the maximum value of the gray values of all the pixel points except the target pixel point in the preset first neighborhood range is set as the target pixel point,
Figure QLYQS_2
the gray value of all pixel points except the target pixel point in a preset first neighborhood range is the minimum value of the gray values of the target pixel point,
Figure QLYQS_5
the area of the growth region corresponding to the target pixel point;
and normalizing the dust concentration value corresponding to each pixel point to obtain the dust concentration corresponding to each pixel point.
4. The image data-based livestock breeding environment video monitoring method according to claim 1, wherein the position information of each pixel point in the images of the livestock breeding environment comprises:
establishing a planar rectangular coordinate system by taking the leftmost pixel point in the livestock and poultry breeding environment image as an origin, taking the transverse edge of the livestock and poultry breeding environment image where the leftmost pixel point is located as an x-axis and taking the longitudinal edge of the livestock and poultry breeding environment image as a y-axis, recording the length of the livestock and poultry breeding environment image in the y-axis direction on the planar rectangular coordinate system as the image length, recording the Euclidean distance from a target pixel point to the upper edge of the livestock and poultry breeding environment image in the vertical direction as an upper spatial distance, and taking the Euclidean distance from the target pixel point to the lower edge of the livestock and poultry breeding environment image in the vertical direction as a lower spatial distance;
and the image length of the livestock and poultry breeding environment image, the upper space distance of the target pixel points and the lower space distance of the target pixel points form the position information of each pixel point in the plane rectangular coordinate system.
5. The image data-based livestock and poultry breeding environment video monitoring method according to claim 4, wherein the influence coefficient obtaining method of each pixel point comprises the following steps:
when the distance between the upper space and the lower space corresponding to the target pixel point is larger than the distance between the upper space and the lower space, the influence coefficient of the target pixel point is the dust concentration of the target pixel point; when the distance between the upper space and the lower space corresponding to the target pixel point is smaller than or equal to the distance between the lower space and the upper space, the influence coefficient of the target pixel point is the dust concentration of the target pixel point plus a preset first adjusting parameter;
and changing the target pixel points to obtain the influence coefficient of each pixel point.
6. The image data-based livestock and poultry breeding environment video monitoring method according to claim 4, wherein the obtaining of the dust position influence rate corresponding to each pixel point according to the position information of each pixel point in the livestock and poultry breeding environment image and the dust concentration comprises:
and obtaining a product of a preset second adjusting parameter and the minimum value of the upper spatial distance and the lower spatial distance corresponding to the target pixel point, multiplying the ratio of the product to the image length by the influence coefficient of the target pixel point to obtain the dust position influence rate of the target pixel point, and obtaining the dust position influence rate corresponding to each pixel point according to the dust position influence rate of the target pixel point.
7. The image data-based livestock and poultry breeding environment video monitoring method according to claim 1, wherein the obtaining of the dust significance of each pixel point according to the dust concentration distribution characteristics and the dust position influence rate of each pixel point comprises:
calculating the absolute value of the difference between the dust concentration of a target pixel point and the dust concentrations of other pixel points in a preset second neighborhood range, and taking the product of the maximum value of the ratio of the dust concentration of the target pixel point to the absolute value of the difference and the dust position influence rate of the target pixel point as the dust significance of the target pixel point;
and changing the target pixel points to obtain the dust significance of each pixel point.
8. The image data-based livestock and poultry breeding environment video monitoring method according to claim 1, wherein the realizing of the livestock and poultry breeding environment video monitoring according to the dust significance comprises:
marking the pixel points with the dust significance degree larger than or equal to a preset first dust threshold as suspected dust pixel points, counting the number of all the dust pixel points in the livestock and poultry breeding environment image, and marking the pixel points with the dust significance degree larger than or equal to a preset second dust threshold as dust pixel points;
when the number of the suspected dust pixel points is greater than or equal to a preset first dust concentration threshold value and the number of the dust pixel points is smaller than a preset second dust concentration threshold value, the risk that dust affects livestock is considered to exist, and the area corresponding to the livestock breeding environment image is monitored in a key mode; and when the number of the dust pixel points is larger than or equal to a preset second concentration threshold value, the dust concentration is considered to influence the livestock and poultry, and a ventilation command is fed back.
CN202310064136.8A 2023-02-06 2023-02-06 Livestock and poultry breeding environment video monitoring method based on image data Active CN115797343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310064136.8A CN115797343B (en) 2023-02-06 2023-02-06 Livestock and poultry breeding environment video monitoring method based on image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310064136.8A CN115797343B (en) 2023-02-06 2023-02-06 Livestock and poultry breeding environment video monitoring method based on image data

Publications (2)

Publication Number Publication Date
CN115797343A true CN115797343A (en) 2023-03-14
CN115797343B CN115797343B (en) 2023-04-21

Family

ID=85429850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310064136.8A Active CN115797343B (en) 2023-02-06 2023-02-06 Livestock and poultry breeding environment video monitoring method based on image data

Country Status (1)

Country Link
CN (1) CN115797343B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229335A (en) * 2023-05-10 2023-06-06 山东大佳机械有限公司 Livestock and poultry farm environment recognition method based on image data
CN116340801A (en) * 2023-05-31 2023-06-27 烟台市福山区动物疫病预防控制中心 Intelligent monitoring method for abnormal environmental data of livestock breeding

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203377A (en) * 2016-07-20 2016-12-07 西安科技大学 A kind of coal dust image-recognizing method
CN112580600A (en) * 2020-12-29 2021-03-30 神华黄骅港务有限责任公司 Dust concentration detection method and device, computer equipment and storage medium
CN114005058A (en) * 2021-10-28 2022-02-01 河北省科学院应用数学研究所 Dust identification method and device and terminal equipment
CN114387273A (en) * 2022-03-24 2022-04-22 莱芜职业技术学院 Environmental dust concentration detection method and system based on computer image recognition
WO2022257759A1 (en) * 2021-06-08 2022-12-15 百果园技术(新加坡)有限公司 Image banding artifact removal method and apparatus, and device and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203377A (en) * 2016-07-20 2016-12-07 西安科技大学 A kind of coal dust image-recognizing method
CN112580600A (en) * 2020-12-29 2021-03-30 神华黄骅港务有限责任公司 Dust concentration detection method and device, computer equipment and storage medium
WO2022257759A1 (en) * 2021-06-08 2022-12-15 百果园技术(新加坡)有限公司 Image banding artifact removal method and apparatus, and device and medium
CN114005058A (en) * 2021-10-28 2022-02-01 河北省科学院应用数学研究所 Dust identification method and device and terminal equipment
CN114387273A (en) * 2022-03-24 2022-04-22 莱芜职业技术学院 Environmental dust concentration detection method and system based on computer image recognition

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
RYOSUKE T. TOMINAGA等: "Nonlinear Outcome of Coagulation Instability in Protoplanetary Disks II: Dust Ring Formation Mediated by Backreaction and Fragmentation" *
黄晶晶;: "基于噪声检测的矿井视频监控图像投票中值滤波" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116229335A (en) * 2023-05-10 2023-06-06 山东大佳机械有限公司 Livestock and poultry farm environment recognition method based on image data
CN116340801A (en) * 2023-05-31 2023-06-27 烟台市福山区动物疫病预防控制中心 Intelligent monitoring method for abnormal environmental data of livestock breeding

Also Published As

Publication number Publication date
CN115797343B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN115797343A (en) Livestock and poultry breeding environment video monitoring method based on image data
US9264629B2 (en) Suppressing flicker in digital images
US8189050B1 (en) Filtering systems and methods for infrared image processing
US7542614B2 (en) Image feature identification and motion compensation apparatus, systems, and methods
CN109816697B (en) System and method for establishing map by unmanned model vehicle
CN110414308B (en) Target identification method for dynamic foreign matters on power transmission line
CN109738072B (en) cross blind pixel detection and correction device and method for InGaAs short-wave infrared imager
US20180352177A1 (en) Image-processing device
CN111972700B (en) Cigarette appearance detection method and device, equipment, system and medium thereof
CN104200457A (en) Wide-angle camera shooting based discrete type canopy leaf area index detection system and method
CN115131325A (en) Breaker fault operation and maintenance monitoring method and system based on image recognition and analysis
CN116228780A (en) Silicon wafer defect detection method and system based on computer vision
CN113362253B (en) Image shading correction method, system and device
CN117593193B (en) Sheet metal image enhancement method and system based on machine learning
CN117241134B (en) Shooting mode switching method for camera
EP2817959A1 (en) Vision system comprising an image sensor and means for analysis and reducing loss of illumination towards periphery of the field of view using multiple frames
CN114782561B (en) Smart agriculture cloud platform monitoring system based on big data
CN116678395A (en) Navigation method and system for breeding inspection robot based on dynamic fusion of 2D laser and visual edge line
CN114445358A (en) Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment
CN109658359B (en) Atmospheric suspended matter detection system and detection method thereof
CN114283170A (en) Light spot extraction method
KR100615672B1 (en) Fire observation system using xy axis projection graph and its fire observation method and computer-readable recording medium to realize fire observation method
CN112651925A (en) Diagnosis method and device of photovoltaic module
CN117640898A (en) Monitoring self-adaptive adjusting method based on agricultural Internet of things technology
CN113949830B (en) Image processing method

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