CN117455909B - Automatic fish body disease detection method for fish in and out - Google Patents

Automatic fish body disease detection method for fish in and out Download PDF

Info

Publication number
CN117455909B
CN117455909B CN202311774872.9A CN202311774872A CN117455909B CN 117455909 B CN117455909 B CN 117455909B CN 202311774872 A CN202311774872 A CN 202311774872A CN 117455909 B CN117455909 B CN 117455909B
Authority
CN
China
Prior art keywords
fish
abnormal
scale
disease
severity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311774872.9A
Other languages
Chinese (zh)
Other versions
CN117455909A (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.)
Guangdong Mars Aquatic Products Co ltd
Original Assignee
Guangdong Mars Aquatic Products 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 Guangdong Mars Aquatic Products Co ltd filed Critical Guangdong Mars Aquatic Products Co ltd
Priority to CN202311774872.9A priority Critical patent/CN117455909B/en
Publication of CN117455909A publication Critical patent/CN117455909A/en
Application granted granted Critical
Publication of CN117455909B publication Critical patent/CN117455909B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/255Detecting or recognising potential candidate objects based on visual cues, e.g. shapes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/68Food, e.g. fruit or vegetables

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Ultra Sonic Daignosis Equipment (AREA)

Abstract

The invention relates to the technical field of image data processing, and provides a fish in and out automatic line fish disease detection method, which comprises the following steps: acquiring a fish body image, acquiring a fish body image to be detected according to the fish body image, and acquiring a fish scale area; acquiring a fish scale region characteristic value of a fish scale region, and acquiring an abnormal region and a normal region in an image to be measured of a fish body according to the fish scale region characteristic value; acquiring neighbor fish scale areas of the abnormal areas, and acquiring R anomaly degree, G anomaly degree and B anomaly degree of the abnormal areas, so as to acquire regional fish disease severity and overall fish disease complexity of the fish body image to be detected; and acquiring the severity of the overall fish disease according to the complexity of the overall fish disease of the image to be detected of the fish body and the severity of the regional fish disease of the abnormal region, and acquiring the fish disease detection result of the fish entering and exiting the automatic line fish body according to the severity of the overall fish disease. The invention aims to solve the problem of insufficient accuracy in the evaluation of the severity of the fish disease of the existing fish body.

Description

Automatic fish body disease detection method for fish in and out
Technical Field
The invention relates to the technical field of image data processing, in particular to a fish disease detection method for fish in and out automatic line fish body.
Background
Along with the gradual improvement of the living standard of people, the demand of the market for edible fishes is gradually increased, so that the freshwater aquaculture industry is well developed. However, in the freshwater aquaculture industry, various diseases may occur in freshwater aquaculture fishes due to the difficulty in ensuring the aquaculture environment and the gradual increase of the aquaculture density, which affects the healthy growth of the fishes and causes loss to local aquaculture economy. Therefore, detection of fish diseases of fish bodies has become a problem to be solved in the current economic development of cultivation.
In order to improve the efficiency of fish disease detection, machine vision can be used for detecting the fish disease of the cultured fish, however, the symptoms of the fish disease are complex and similar, when the fish disease is detected by the existing visual detection method, the severity of the fish disease is only estimated according to the size of a fish disease area, and the accuracy of the estimation of the severity of the fish disease is insufficient.
Disclosure of Invention
The invention provides a fish in-out automatic line fish disease detection method, which aims to solve the problem of insufficient accuracy in evaluating the severity of the existing fish disease, and adopts the following technical scheme:
the embodiment of the invention provides a fish disease detection method for fish in and out automatic line fish, which comprises the following steps:
acquiring a fish body image, acquiring a fish body image to be detected according to the fish body image, and acquiring a fish scale area according to the fish body image to be detected;
acquiring a shape number sequence and an order of shape numbers of the edges of the fish scale regions, acquiring shape similarity between every two fish scale regions according to the shape number sequence and the order of the shape numbers of the edges of the fish scale regions, acquiring a fish scale region characteristic value of the fish scale regions, and acquiring an abnormal region and a normal region in an image to be measured of the fish body according to the fish scale region characteristic value;
acquiring neighbor fish scale areas of the abnormal area, acquiring R abnormal degree, G abnormal degree and B abnormal degree of the abnormal area, acquiring a fish disease feature vector of the abnormal area, acquiring regional fish disease severity according to the fish disease feature vector of the abnormal area, and acquiring overall fish disease complexity of an image to be detected of the fish body;
and acquiring the severity of the overall fish disease according to the complexity of the overall fish disease of the image to be detected of the fish body and the severity of the regional fish disease of the abnormal region, and acquiring the fish disease detection result of the fish entering and exiting the automatic line fish body according to the severity of the overall fish disease.
Further, the method for obtaining the shape similarity between every two fish scale areas according to the shape number sequence and the order of the shape numbers of the edges of the fish scale areas comprises the following specific steps:
marking any two fish scale areas as a first fish scale area and a second fish scale area respectively;
the average value of the absolute values of element differences at all corresponding positions in the shape number sequences of the first scale region and the second scale region is recorded as the first average value of the first scale region and the second scale region;
the square of the difference value of the shape number of the first scale area and the second scale area is marked as the first square of the first scale area and the second scale area;
marking the sum of the first average value and the first square of the first scale area and the second scale area as a first sum value;
and marking the normalized value of the first sum value as the shape similarity of the first fish scale area and the second fish scale area, wherein the normalized value of the first sum value and the first sum value are in negative correlation.
Further, the method for obtaining the characteristic value of the fish scale region comprises the following specific steps:
and respectively taking each fish scale region as a fish scale region to be analyzed, and recording the average value of the shape similarity between the fish scale region to be analyzed and all other fish scale regions as a fish scale region characteristic value of the fish scale region to be analyzed.
Further, the specific method for acquiring the abnormal region and the normal region in the fish body image to be detected according to the characteristic value of the fish scale region comprises the following steps:
when the characteristic value of the fish scale area is smaller than a first abnormal threshold value, the fish scale area is considered to be an abnormal area;
and when the characteristic value of the fish scale area is larger than or equal to a first abnormal threshold value, the fish scale area is considered to be a normal area.
Further, the method for obtaining the neighbor fish scale area of the abnormal area comprises the following specific steps:
taking the average value of the abscissas of all the pixel points contained in the scale area as the abscissas of the scale area, taking the average value of the ordinates of all the pixel points contained in the scale area as the ordinates of the scale area, and obtaining the coordinates of the scale area;
taking Euclidean distance between coordinates of the two fish scale areas as the distance between the two fish scale areas;
and respectively taking each abnormal region as an abnormal region to be detected, and recording the first preset threshold value normal regions closest to the abnormal region to be detected as neighbor fish scale regions of the abnormal region to be detected.
Further, the method for obtaining the abnormal region R, G and B abnormal degrees includes the specific steps of:
the average value of R channel pixel values of all pixel points contained in a neighbor fish scale area of the abnormal area to be detected is marked as R average value of the neighbor fish scale area;
the average value of the R channel pixel values of all the pixel points contained in the abnormal region to be detected is recorded as the R average value of the abnormal region to be detected;
the absolute value of the difference value between the R average value of the adjacent fish scale area and the R average value of the abnormal area to be detected is recorded as the R difference value of the adjacent fish scale area;
the average value of R difference values of all neighboring fish scale areas of the abnormal area to be measured is recorded as the R abnormal degree of the abnormal area to be measured;
acquiring G anomaly degree and B anomaly degree of an anomaly area to be detected;
and sequentially arranging the number of pixel points contained in the abnormal region, the R abnormality degree, the G abnormality degree and the B abnormality degree of the abnormal region to obtain the fish disease feature vector of the abnormal region.
Further, the method for obtaining the severity of the regional fish disease according to the characteristic vector of the fish disease of the abnormal region comprises the following specific steps:
marking the sum of the R degree of abnormality, the G degree of abnormality and the B degree of abnormality of the abnormal region as a second sum value of the abnormal region;
and (3) recording the product of the number of the pixels contained in the abnormal region and the second sum value of the abnormal region as the severity of the regional fish disease of the abnormal region.
Further, the method for obtaining the overall fish disease complexity of the fish body image to be detected comprises the following specific steps:
the average value of Euclidean distances between the regional fish disease severity of the abnormal region to be detected and the regional fish disease severity of all other abnormal regions is recorded as the fish disease severity difference degree of the abnormal region to be detected;
and (5) recording the average value of the severity difference degrees of the fish diseases in all abnormal areas as the overall fish disease complexity of the fish body image to be detected.
Further, the method for obtaining the severity of the overall fish disease according to the complexity of the overall fish disease of the fish body to be detected image and the severity of the regional fish disease of the abnormal region comprises the following specific steps:
the sum of the regional fish disease severity of all abnormal regions in the fish body image to be detected is recorded as a third sum value;
and (3) recording a normalized value of the product of the overall fish disease complexity of the fish body image to be detected and the third sum value as the overall fish disease severity of the fish body image to be detected.
Further, the method for obtaining the fish disease detection result of the fish in and out automatic line fish body according to the severity of the overall fish disease comprises the following specific steps:
when the severity of the overall fish disease of the fish body to-be-detected image is smaller than a mild severity threshold value, the fish body is considered to be normal and free of the disease;
when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a mild severity threshold value and less than a moderate severity threshold value, the severity of the fish disease of the fish body is considered to be mild;
when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a moderate severity threshold value and less than the severe severity threshold value, the severity of the fish disease of the fish body is considered to be moderate;
and when the severity of the overall fish disease of the fish body to be detected image is greater than the equal-weight severity threshold, the severity of the fish disease of the fish body is considered to be severe.
The beneficial effects of the invention are as follows:
according to the method, the fish body image to be detected is obtained according to the fish body image to be detected, the fish scale area is obtained according to the fish body image to be detected, the edge shape of the diseased area is irregular according to the diseased area when the fish is diseased, the edge of the normal and disease-free fish body surface scale is generally in a regular and uniform sector shape, the characteristic value of the fish scale area is obtained, the abnormal area and the normal area in the fish body image to be detected are further divided, only the abnormal area is analyzed, the fish disease detection rate of the fish body is improved, and the real-time performance of fish body fish disease detection is ensured; then, according to the characteristics that red blood spots, local festers and scales fall off when the fish body is in a fish disease state, fish disease characteristic vectors of an abnormal region are obtained, and the regional fish disease severity of the abnormal region and the overall fish disease complexity of an image to be detected of the fish body are obtained according to the fish disease characteristic vectors of the abnormal region; finally, the severity of the overall fish disease is obtained, the fish disease detection result of the fish in and out automatic line fish body is obtained according to the severity of the overall fish disease, the severity of the fish disease of the fish body is divided into four grades of normal disease-free, mild, moderate and severe, in the process of obtaining the fish in and out automatic line fish body disease detection result, the edge distribution characteristics and the scale color characteristics of scales on the surface of the fish body are synthesized, the problem that the evaluation accuracy of the severity of the fish body fish disease is insufficient in the prior art is solved, and the accuracy of fish disease detection is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for detecting fish diseases of an automatic line fish in and out according to an embodiment of the invention;
FIG. 2 is a schematic view of diseased fish.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a method for detecting fish diseases of fish in and out automatic line fish according to an embodiment of the invention is shown, the method includes the following steps:
step S001, acquiring a fish body image to be detected according to the fish body image, and acquiring a fish scale area according to the fish body image to be detected.
The industrial camera is arranged above the automation line, and the image information of the fish body transmitted on the automation line is acquired in real time to obtain a fish body image, wherein the fish body image is an RGB image. And converting the fish body image into a gray image, and obtaining the fish body gray image.
In order to obtain texture features of the surface of the fish body, fish diseases of the fish body are detected, and the bilateral filtering is used for preprocessing gray images of the fish body so as to achieve the effects of denoising and enhancing, so that the texture features of the gray images of the fish body are clearer, and the accuracy of the subsequent fish disease detection is improved. The bilateral filtering is a known technique, and will not be described in detail.
The fishes living in the water form special body characteristics for adapting to the water area environment, because the freshwater aquaculture fishes have similar body types, the fishes mostly present spindle type, the heads and the tails are slightly pointed, the middle section of the bodies is thicker, the cross section of the fishes is elliptical, the side-view fishes are spindle-shaped, such as grass carp, crucian, and the like, and the body types of the freshwater aquaculture fishes enable the fishes to be suitable for rapid swimming in still water or running water. In order to avoid the interference of other positions of the fish body, a BBS template matching algorithm is used for carrying out template matching on the acquired gray level image of the fish body and the standard gray level image of the fish body, and a region corresponding to the fish body in the gray level image of the fish body is obtained.
And recording the RGB space image only containing the area corresponding to the fish body as an image to be detected of the fish body. Converting the fish body image to be detected into a gray level image, and recording the gray level image as the fish body image to be detected.
The fish scales are part of the skin of the fish, play a role in protecting the fish body, and can also help the fish resist diseases and prevent the fish from being affected by microorganisms in water. The body surface of most fishes is covered with solid scales, normal and disease-free fish body surface scales are in a fan shape and are arranged in a tile shape, the canny edge detection operator is used for obtaining the edge information of the gray level image to be detected of the fish body, the binary image to be detected of the fish body is obtained, and the area divided by all the closed edges in the binary image to be detected of the fish body is marked as a scale area.
Thus, a fish scale area is obtained.
Step S002, obtaining a shape number sequence and an order of the shape number of the edge of the fish scale area, obtaining the shape similarity between every two fish scale areas according to the shape number sequence and the order of the shape number of the edge of the fish scale area, obtaining a fish scale area characteristic value of the fish scale area, and obtaining an abnormal area and a normal area in the fish body image to be detected according to the fish scale area characteristic value.
For freshwater farmed fishes, when the fishes are ill, the edge shape of the ill area presents an irregular characteristic, and the edge of the scale on the surface of the normal and ill fishes is usually fan-shaped, meanwhile, red blood spots, local fester and even scale falling off can occur in the ill area, so that whether the fishes are ill or not can be judged by analyzing the edge distribution characteristic and the scale color characteristic of the scale on the surface of the fishes. A schematic diagram of the diseased fish is shown in figure 2.
First, edge distribution characteristics of scales on the surface of a fish body are analyzed.
Analyzing each fish scale region respectively, taking each edge pixel point of the fish scale region as a starting point to obtain chain codes of the edge of the fish scale region, taking the chain code with the smallest natural number formed by all the chain codes as a normalized chain code of the fish scale region, and obtaining the shape number sequence and the order of the shape number of the edge of the fish scale region according to the normalized chain code. The chain code is a group of series formed by the starting point of the curve and the direction symbol, and the acquisition process of the chain code and the acquisition of the shape number sequence and the order of the shape number according to the normalized chain code are known techniques and will not be described in detail.
And obtaining the shape similarity between every two fish scale areas according to the shape number sequence and the shape number order of the edges of the fish scale areas.
In the method, in the process of the invention,is->The fish scale region and->Shape similarity between individual fish scale areas, wherein,,/>is the total number of fish scale areas; />Is an exponential function with a natural constant as a base; />Is->The number of the shape number sequence of the fish scale region +.>A personal element value; />Is->The +.f. of the shape number sequence of the individual fish scale regions>A personal element value; />Is->The order of the shape number of the individual fish scale regions; />Is->The order of the shape number of each fish scale area; />Is->The fish scale region and->The minimum value of the shape number order of each fish scale area.
When the order of the shape numbers of the two fish scale regions differ less, the length of the two fish scale regions becomes closer and the shape similarity becomes higher. When the difference of the element values contained in the shape number sequences of the two fish scale regions is smaller, the edge trends of the two fish scale regions are more consistent, namely the shape similarity of the two fish scale regions is higher. When the order difference of the shape numbers of the two scale regions is smaller and the difference of the element values contained in the sequence of shape numbers is smaller, the shape similarity between the two scale regions is larger, that is, the shape similarity of the two scale regions is higher.
The normal disease-free fish body surface is covered with solid scales, and the scales are arranged in a tile-covered manner, so that the shape similarity of the normal scale area and other scale areas is higher, and the shape similarity is consistent.
And respectively taking each fish scale region as a fish scale region to be analyzed, and recording the average value of the shape similarity between the fish scale region to be analyzed and all other fish scale regions as a fish scale region characteristic value of the fish scale region to be analyzed.
When the characteristic value of the fish scale area is smaller than a first abnormal threshold value, the fish scale area is considered to be an abnormal area; and when the characteristic value of the fish scale area is larger than or equal to a first abnormal threshold value, the fish scale area is considered to be a normal area. Wherein the empirical value of the first anomaly threshold value is 0.6.
When all the scale areas in the fish body image to be detected are normal areas, the fish body image to be detected is considered to be corresponding to the disease-free; when the fish scale region in the fish body image to be measured is regarded as an abnormal region, the following analysis is continued.
So far, the abnormal area and the normal area in the fish body image to be detected are obtained.
Step S003, acquiring neighbor fish scale areas of the abnormal area, acquiring R abnormal degree, G abnormal degree and B abnormal degree of the abnormal area, acquiring a fish disease feature vector of the abnormal area, and acquiring the regional fish disease severity according to the fish disease feature vector of the abnormal area to acquire the overall fish disease complexity of the fish body image to be detected.
And analyzing the color characteristics of the fish scales. When the fish body is in a fish disease state, red blood spots, local festers and even scales of the fish body are caused to fall off, so that the R, G, B three-channel values of the abnormal region and the normal disease-free region of the fish body are different, and the fish disease feature vector of the abnormal region of the fish body is obtained according to the difference of the area of the abnormal region of the fish body and the three-channel values of the surrounding fish scale region R, G, B.
Taking the average value of the abscissas of all the pixel points contained in the scale area as the abscissas of the scale area, taking the average value of the ordinates of all the pixel points contained in the scale area as the ordinates of the scale area, and obtaining the coordinates of the scale area. The euclidean distance between the coordinates of the two fish scale areas is taken as the distance between the two fish scale areas.
And respectively taking each abnormal region as an abnormal region to be detected, and recording the first preset threshold value normal regions closest to the abnormal region to be detected as neighbor fish scale regions of the abnormal region to be detected.
Wherein the first preset threshold has an empirical value of. Wherein (1)>For the number of abnormal areas contained in the fish body test image, < > for>Is the total number of fish scale areas, < >>Is a round down function.
The average value of R channel pixel values of all pixel points contained in a neighbor fish scale area of an abnormal area to be measured is recorded as the R average value of the neighbor fish scale area, the average value of R channel pixel values of all pixel points contained in the abnormal area to be measured is recorded as the R average value of the abnormal area to be measured, the absolute value of the difference value between the R average value of the neighbor fish scale area and the R average value of the abnormal area to be measured is recorded as the R difference value of the neighbor fish scale area, and the average value of the R difference values of all neighbor fish scale areas of the abnormal area to be measured is recorded as the R anomaly of the abnormal area to be measured.
And similarly, acquiring G anomaly degree and B anomaly degree of the abnormal region to be detected.
When the average value difference of the pixel values of the abnormal region and the neighboring fish scale region is larger, the greater the R abnormality degree, G abnormality degree and B abnormality degree of the abnormal region are, namely the more serious the fish disease corresponding to the abnormal region is.
And sequentially arranging the number of pixel points contained in the abnormal region, the R abnormality degree, the G abnormality degree and the B abnormality degree of the abnormal region to obtain the fish disease feature vector of the abnormal region.
And obtaining the regional fish disease severity of the abnormal region according to the fish disease feature vector of the abnormal region.
In the method, in the process of the invention,is->Regional fish disease severity in the individual abnormal regions, wherein, < >>,/>The number of abnormal areas contained in the fish body image to be detected; />Is->The number of pixel points contained in the abnormal areas;is->R anomaly degree of each anomaly region; />Is->G anomaly degree of each anomaly region; />Is->B degree of abnormality of each abnormal region.
When the number of pixel points contained in the abnormal region, the R abnormal degree, the G abnormal degree and the B abnormal degree of the abnormal region are larger, the severity of the fish disease in the abnormal region is larger, the characteristic of the fish disease represented by the abnormal region is more obvious, and the fish disease corresponding to the fish body is more serious.
And (3) marking the average value of Euclidean distance between the regional fish disease severity of the abnormal region to be detected and the regional fish disease severity of all other abnormal regions as the fish disease severity difference degree of the abnormal region to be detected, and marking the average value of the fish disease severity difference degree of all abnormal regions as the overall fish disease complexity of the fish body image to be detected.
When the regional fish disease severity difference of different abnormal regions is larger, the overall fish disease complexity of the fish body image to be detected is larger, namely the fish disease degree and the fish disease characteristic difference of the fish diseases corresponding to different scales of the fish body surface are larger, and the fish body disease corresponding to the fish body image to be detected is more serious.
So far, the overall fish disease complexity of the fish body image to be detected is obtained.
Step S004, according to the overall fish disease complexity of the fish body to-be-detected image and the regional fish disease severity of the abnormal region, acquiring the overall fish disease severity, and according to the overall fish disease severity, acquiring the fish in-out automatic line fish body fish disease detection result.
Fish may be simultaneously infected with a variety of different pathogens, such as bacteria, viruses, parasites, etc. These pathogens can interact such that the immune system of the fish is inhibited or damaged, exacerbating the complexity and severity of fish disease.
And acquiring the severity of the overall fish diseases according to the complexity of the overall fish diseases of the image to be detected of the fish body and the severity of the regional fish diseases of the abnormal region.
Wherein,the overall fish disease severity of the fish body image to be detected; />The overall fish disease complexity of the image to be measured of the fish body; />Is->Regional fish disease severity in the individual abnormal regions, wherein, < >>,/>The number of abnormal areas contained in the fish body image to be detected; />Is an exponential function with a base of natural constant.
When the overall fish disease complexity of the fish body to-be-detected image and the regional fish disease severity of the abnormal region are larger, the overall fish disease severity of the fish body to-be-detected image is larger, namely the fish body to-be-detected image corresponds to the fish body to-be-detected image, the fish body is infected with more fish disease types, and the possibility that the immune system of the fish body is inhibited or damaged is higher.
When the severity of the overall fish disease of the fish body to-be-detected image is smaller than a mild severity threshold value, the fish body is considered to be normal and free of the disease; when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a mild severity threshold value and less than a moderate severity threshold value, the severity of the fish disease of the fish body is considered to be mild; when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a moderate severity threshold value and less than the severe severity threshold value, the severity of the fish disease of the fish body is considered to be moderate; and when the severity of the overall fish disease of the fish body to be detected image is greater than the equal-weight severity threshold, the severity of the fish disease of the fish body is considered to be severe.
Wherein the empirical values of the mild severity threshold, the moderate severity threshold, and the severe severity threshold are 0.3,0.5,0.8, respectively.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.

Claims (4)

1. The method for detecting fish diseases of fish in and out automatic line fish body is characterized by comprising the following steps:
acquiring a fish body image, acquiring a fish body image to be detected according to the fish body image, and acquiring a fish scale area according to the fish body image to be detected;
acquiring a shape number sequence and an order of shape numbers of the edges of the fish scale regions, acquiring shape similarity between every two fish scale regions according to the shape number sequence and the order of the shape numbers of the edges of the fish scale regions, acquiring a fish scale region characteristic value of the fish scale regions, and acquiring an abnormal region and a normal region in an image to be measured of the fish body according to the fish scale region characteristic value;
acquiring neighbor fish scale areas of the abnormal area, acquiring R abnormal degree, G abnormal degree and B abnormal degree of the abnormal area, acquiring a fish disease feature vector of the abnormal area, acquiring regional fish disease severity according to the fish disease feature vector of the abnormal area, and acquiring overall fish disease complexity of an image to be detected of the fish body;
acquiring the severity of the overall fish disease according to the complexity of the overall fish disease of the image to be detected of the fish body and the severity of the regional fish disease of the abnormal region, and acquiring the fish disease detection result of the fish entering and exiting the automatic line fish body according to the severity of the overall fish disease;
the method for obtaining the shape similarity between every two fish scale areas according to the shape number sequence and the order of the shape numbers of the edges of the fish scale areas comprises the following specific steps:
marking any two fish scale areas as a first fish scale area and a second fish scale area respectively;
the average value of the absolute values of element differences at all corresponding positions in the shape number sequences of the first scale region and the second scale region is recorded as the first average value of the first scale region and the second scale region;
the square of the difference value of the shape number of the first scale area and the second scale area is marked as the first square of the first scale area and the second scale area;
marking the sum of the first average value and the first square of the first scale area and the second scale area as a first sum value;
marking the normalized value of the first sum value as the shape similarity of the first fish scale area and the second fish scale area, wherein the normalized value of the first sum value and the first sum value are in negative correlation;
the method for acquiring the neighbor fish scale area of the abnormal area comprises the following specific steps:
taking the average value of the abscissas of all the pixel points contained in the scale area as the abscissas of the scale area, taking the average value of the ordinates of all the pixel points contained in the scale area as the ordinates of the scale area, and obtaining the coordinates of the scale area;
taking Euclidean distance between coordinates of the two fish scale areas as the distance between the two fish scale areas;
each abnormal region is used as an abnormal region to be detected, and the first preset threshold value normal regions closest to the abnormal region to be detected are marked as neighbor fish scale regions of the abnormal region to be detected;
the method for acquiring the abnormal region R, G and B abnormal degrees and the abnormal region fish disease feature vector comprises the following specific steps:
the average value of R channel pixel values of all pixel points contained in a neighbor fish scale area of the abnormal area to be detected is marked as R average value of the neighbor fish scale area;
the average value of the R channel pixel values of all the pixel points contained in the abnormal region to be detected is recorded as the R average value of the abnormal region to be detected;
the absolute value of the difference value between the R average value of the adjacent fish scale area and the R average value of the abnormal area to be detected is recorded as the R difference value of the adjacent fish scale area;
the average value of R difference values of all neighboring fish scale areas of the abnormal area to be measured is recorded as the R abnormal degree of the abnormal area to be measured;
acquiring G anomaly degree and B anomaly degree of an anomaly area to be detected;
sequentially arranging the number of pixel points contained in the abnormal region, the R abnormality degree, the G abnormality degree and the B abnormality degree of the abnormal region to obtain a fish disease feature vector of the abnormal region;
the method for acquiring the regional fish disease severity according to the fish disease feature vector of the abnormal region comprises the following specific steps:
marking the sum of the R degree of abnormality, the G degree of abnormality and the B degree of abnormality of the abnormal region as a second sum value of the abnormal region;
the product of the number of the pixel points contained in the abnormal region and the second sum value of the abnormal region is recorded as the severity of the regional fish disease of the abnormal region;
the method for acquiring the overall fish disease complexity of the fish body image to be detected comprises the following specific steps:
the average value of Euclidean distances between the regional fish disease severity of the abnormal region to be detected and the regional fish disease severity of all other abnormal regions is recorded as the fish disease severity difference degree of the abnormal region to be detected;
the average value of the severity difference degrees of the fish diseases in all abnormal areas is recorded as the overall fish disease complexity of the fish body image to be detected;
the method for acquiring the severity of the overall fish disease according to the complexity of the overall fish disease of the fish body to-be-detected image and the severity of the regional fish disease of the abnormal region comprises the following specific steps:
the sum of the regional fish disease severity of all abnormal regions in the fish body image to be detected is recorded as a third sum value;
and (3) recording a normalized value of the product of the overall fish disease complexity of the fish body image to be detected and the third sum value as the overall fish disease severity of the fish body image to be detected.
2. The method for detecting fish diseases of fish in and out automatic line fish according to claim 1, wherein the step of obtaining the characteristic value of the fish scale region comprises the following specific steps:
and respectively taking each fish scale region as a fish scale region to be analyzed, and recording the average value of the shape similarity between the fish scale region to be analyzed and all other fish scale regions as a fish scale region characteristic value of the fish scale region to be analyzed.
3. The method for detecting fish diseases of fish in and out automatic line fish according to claim 1, wherein the method for obtaining abnormal areas and normal areas in the fish body image to be detected according to the characteristic values of the fish scale areas comprises the following specific steps:
when the characteristic value of the fish scale area is smaller than a first abnormal threshold value, the fish scale area is considered to be an abnormal area;
and when the characteristic value of the fish scale area is larger than or equal to a first abnormal threshold value, the fish scale area is considered to be a normal area.
4. The method for detecting fish diseases of fish in and out automatic line fish according to claim 1, wherein the method for obtaining fish disease detection results of fish in and out automatic line fish according to the severity of the overall fish disease comprises the following specific steps:
when the severity of the overall fish disease of the fish body to-be-detected image is smaller than a mild severity threshold value, the fish body is considered to be normal and free of the disease;
when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a mild severity threshold value and less than a moderate severity threshold value, the severity of the fish disease of the fish body is considered to be mild;
when the severity of the overall fish disease of the fish body to-be-detected image is greater than or equal to a moderate severity threshold value and less than the severe severity threshold value, the severity of the fish disease of the fish body is considered to be moderate;
and when the severity of the overall fish disease of the fish body to be detected image is greater than the equal-weight severity threshold, the severity of the fish disease of the fish body is considered to be severe.
CN202311774872.9A 2023-12-22 2023-12-22 Automatic fish body disease detection method for fish in and out Active CN117455909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311774872.9A CN117455909B (en) 2023-12-22 2023-12-22 Automatic fish body disease detection method for fish in and out

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311774872.9A CN117455909B (en) 2023-12-22 2023-12-22 Automatic fish body disease detection method for fish in and out

Publications (2)

Publication Number Publication Date
CN117455909A CN117455909A (en) 2024-01-26
CN117455909B true CN117455909B (en) 2024-03-29

Family

ID=89591473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311774872.9A Active CN117455909B (en) 2023-12-22 2023-12-22 Automatic fish body disease detection method for fish in and out

Country Status (1)

Country Link
CN (1) CN117455909B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110294A (en) * 2011-02-21 2011-06-29 中国农业大学 Method and system for processing image of diseased fish body
CN114943929A (en) * 2022-04-20 2022-08-26 中国农业大学 Real-time detection method for abnormal behaviors of fishes based on image fusion technology
CN115272341A (en) * 2022-09-29 2022-11-01 华联机械集团有限公司 Packaging machine defect product detection method based on machine vision
CN115330688A (en) * 2022-07-14 2022-11-11 华中科技大学 Image anomaly detection method considering tag uncertainty
CN115797844A (en) * 2022-12-16 2023-03-14 上海海洋大学 Fish body fish disease detection method and system based on neural network
CN116012700A (en) * 2022-12-16 2023-04-25 咸宁市农业科学院 Real-time fish disease detection system based on YOLO-v5
CN116758084A (en) * 2023-08-21 2023-09-15 金恒山电气无锡有限公司 Intelligent detection method for welding defects of sheet metal parts based on image data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110294A (en) * 2011-02-21 2011-06-29 中国农业大学 Method and system for processing image of diseased fish body
CN114943929A (en) * 2022-04-20 2022-08-26 中国农业大学 Real-time detection method for abnormal behaviors of fishes based on image fusion technology
CN115330688A (en) * 2022-07-14 2022-11-11 华中科技大学 Image anomaly detection method considering tag uncertainty
CN115272341A (en) * 2022-09-29 2022-11-01 华联机械集团有限公司 Packaging machine defect product detection method based on machine vision
CN115797844A (en) * 2022-12-16 2023-03-14 上海海洋大学 Fish body fish disease detection method and system based on neural network
CN116012700A (en) * 2022-12-16 2023-04-25 咸宁市农业科学院 Real-time fish disease detection system based on YOLO-v5
CN116758084A (en) * 2023-08-21 2023-09-15 金恒山电气无锡有限公司 Intelligent detection method for welding defects of sheet metal parts based on image data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于图像处理的鱼群运动监测方法研究;袁永明 等;南方水产科学;20181031;第14卷(第5期);第109-114页 *
基于机器视觉的点带石斑鱼异常行为识别方法研究;徐愫 等;渔业现代化;20160229;第43卷(第1期);第18-23页 *

Also Published As

Publication number Publication date
CN117455909A (en) 2024-01-26

Similar Documents

Publication Publication Date Title
Zion et al. Real-time underwater sorting of edible fish species
CN110120042B (en) Crop image pest and disease damage area extraction method based on SLIC super-pixel and automatic threshold segmentation
CN106778784B (en) Pig individual identification and drinking behavior analysis method based on machine vision
CN112598713A (en) Offshore submarine fish detection and tracking statistical method based on deep learning
CN107256398B (en) Feature fusion based individual milk cow identification method
CN111145205B (en) Pig body temperature detection method based on infrared image under multiple pig scenes
CN111507179A (en) Live pig feeding behavior analysis method
CN116228772B (en) Quick detection method and system for fresh food spoilage area
CN115861721B (en) Livestock and poultry breeding spraying equipment state identification method based on image data
CN116246174B (en) Sweet potato variety identification method based on image processing
Misimi et al. Quality grading of Atlantic salmon (Salmo salar) by computer vision
CN115512215A (en) Underwater biological monitoring method and device and storage medium
CN117495851B (en) Image contour processing-based water environment microorganism detection method
Aliyu et al. Incorporating recognition in catfish counting algorithm using artificial neural network and geometry
CN114092378A (en) Animal health detection method, device, equipment and storage medium
CN113222889B (en) Industrial aquaculture counting method and device for aquaculture under high-resolution image
CN116912260B (en) Broiler chicken breeding health state detection method based on artificial intelligence
CN117455909B (en) Automatic fish body disease detection method for fish in and out
CN111369497B (en) Walking type tree fruit continuous counting method and device
CN111562273A (en) Hyperspectrum-based fish water jet descaling slight damage visualization method
CN115187790A (en) Image contour extraction method based on reference region binarization result
CN112464742B (en) Method and device for automatically identifying red tide image
Ambata et al. Foreground background separation and tracking
CN113269750A (en) Banana leaf disease image detection method and system, storage medium and detection device
Yao et al. Abnormality detection on gastroscopic images using patches assembled by local weights

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