Method and System for Detecting and Correcting the Status of a Camera for Aquaculture

By detecting and correcting the state of the camera for breeding, the training feature vector set and SIFT algorithm are used to process the image content, calculate the matching rate and vector distance, and perform logistic regression operations, solving the monitoring instability caused by camera offset, and achieving the stability of the aquaculture biological monitoring process.

CN114495002BActive Publication Date: 2025-07-25ANYOU BIOTECH GRP +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210074475.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2025-07-25
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

During normal operation, the camera for breeding may be deviated due to loose support structures or human factors, which may affect the stability of the breeding biological monitoring process.

Method used

By training the preset standard monitoring pictures to generate a training feature vector set, obtain the monitoring pictures taken by the breeding camera, use the object detection algorithm and SIFT algorithm to process the image content, calculate the matching rate and average vector distance, perform logistic regression operations to generate logistic regression values, and judge the camera status based on the judgment threshold and correct it.

Benefits of technology

It improves the stability of the aquaculture biological monitoring process, ensures that the difference between the pictures taken by the camera and the standard pictures is intuitive and visible, and facilitates the camera to correct abnormal states in a timely manner.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114495002B_ABST
    Figure CN114495002B_ABST
Patent Text Reader

Abstract

This application relates to the field of aquaculture monitoring, and in particular to a method and system for detecting and correcting the state of an aquaculture camera. The method includes generating a training feature vector set by training a preset standard monitoring picture; obtaining a monitoring picture taken by the aquaculture camera, and determining the effective image content by processing the monitoring picture through an object detection algorithm; processing the image content through the SIFT algorithm to obtain a SIFT feature vector set; calculating the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture according to the training feature vector set and the SIFT feature vector set; performing a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value; judging the logistic regression value according to a preset judgment threshold to generate a judgment value; judging the state of the aquaculture camera according to the judgment value and correcting the aquaculture camera according to the state. This application has the effect of improving the stability of the aquaculture biological monitoring process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of aquaculture monitoring, and in particular to a method and system for detecting and correcting the state of an aquaculture camera. Background Art

[0002] With the continuous popularization of information technology in social production and life, the information-based monitoring of aquaculture organisms in aquaculture farms has now become the norm.

[0003] Currently, in order to facilitate timely understanding of the survival status of aquaculture organisms in aquaculture farms, aquaculture cameras are often set up near aquaculture enclosures to photograph aquaculture organisms, and then the captured videos are processed to facilitate timely obtaining of the survival status of aquaculture organisms.

[0004] In the process of implementing the present application, the inventors found that the above technologies have at least the following problems: During the normal operation of aquaculture cameras, the shooting direction may shift and rotate due to factors such as the loosening of their support structures and human factors, thus affecting the stability of the aquaculture organism monitoring process. Summary of the Invention

[0005] In order to facilitate improving the stability of the aquaculture organism monitoring process, the present application provides a method and system for detecting and correcting the state of an aquaculture camera.

[0006] In a first aspect, the present application provides a method for detecting and correcting the state of an aquaculture camera, adopting the following technical solution:

[0007] A method for detecting and correcting the state of an aquaculture camera includes:

[0008] Training a preset standard monitoring picture to generate a training feature vector set;

[0009] Obtaining a monitoring picture captured by an aquaculture camera, and processing the monitoring picture through an object detection algorithm to determine effective image content;

[0010] Processing the image content through the SIFT algorithm to obtain a SIFT feature vector set;

[0011] Calculating the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture according to the training feature vector set and the SIFT feature vector set;

[0012] Performing a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value;

[0013] Judging the logistic regression value according to a preset judgment threshold to generate a judgment value;

[0014] Judge the state of the breeding camera according to the judgment value and correct the breeding camera according to the state.

[0015] By adopting the above technical solution, first train the normal photos taken by the breeding camera to generate a corresponding training feature vector set. The purpose of obtaining the training feature vector set is to use it as the basis for subsequent comparison. Further, obtain the pictures taken during the breeding monitoring process and process the pictures to obtain the SIFT feature vector set of the pictures. By comparing and calculating the training feature vector set and the SIFT feature vector set, the matching rate reflecting the similarity between the pictures taken during the monitoring process and the normal photos and the average vector distance reflecting the difference between the pictures taken during the monitoring process and the normal photos can be obtained. In order to intuitively reflect the difference degree between the pictures taken during the monitoring process and the normal photos, perform a logistic regression operation on the matching rate and the average vector distance to obtain the corresponding logistic regression value. In order to facilitate understanding whether the breeding camera needs to be corrected, then compare the logistic regression value with a preset judgment threshold to obtain the comparison result, that is, the judgment value. Finally, through the judgment value, it is easy to know the state of the breeding camera and correct the camera according to the state, so as to improve the stability of the breeding biological monitoring process.

[0016] In a specific feasible implementation, the training of the preset standard monitoring pictures to generate a training feature vector set includes:

[0017] Obtain the standard monitoring pictures;

[0018] Calculate the SIFT feature vector of each standard monitoring picture;

[0019] Obtain the SIFT feature vectors that appear in several standard monitoring pictures and exceed the preset threshold ratio to generate the training feature vector set.

[0020] By adopting the above technical solution, the standard monitoring pictures are the pictures taken when the camera is in a normal state. The SIFT feature vector represents the features of each picture, and the SIFT feature vectors that appear in several standard monitoring pictures and exceed the preset threshold ratio reflect the common features of all standard monitoring pictures, and also represent the features that the pictures taken by the breeding camera under normal shooting should have. Such common features can judge whether a picture is taken by the breeding camera in a normal state.

[0021] In a specific feasible implementation, the processing of the monitoring pictures by the target detection algorithm to determine the effective image content includes:

[0022] Determine the outer edge detection points of the monitoring pictures through the target detection algorithm;

[0023] Determine the outer edge boundary of the monitoring picture and the outer circle corresponding to the outer edge boundary based on the outer edge detection points;

[0024] Calculate the inner circle based on the outer circle and a preset boundary distance;

[0025] Process the monitoring picture with the target detection algorithm and the inner circle to obtain the inner edge boundary;

[0026] Process the monitoring picture based on the outer edge boundary and the inner edge boundary to obtain the effective image content.

[0027] By adopting the above technical solution, generally, the cultured organisms captive in the breeding enclosure often move in the central area of the breeding enclosure and rest in the circular area around the central area. When processing the captured pictures, since the cultured organisms often move in the central area of the breeding enclosure, the feature vectors in the central area are not only numerous but also basically different from the feature vectors in the central area of the standard monitoring pictures. Therefore, it is of little significance to compare and calculate the feature vectors in the central area of the breeding enclosure subsequently. Thus, the outer edge boundary and the inner edge boundary are obtained through the above solution, which facilitates removing the image of the central area of the breeding enclosure corresponding to the inner edge boundary during implementation and only retaining the image between the outer edge boundary and the inner edge boundary. This also facilitates reducing the calculation amount of obtaining the matching rate and the average vector distance to improve the efficiency of calculating the matching rate and the average vector distance.

[0028] In a specific feasible implementation scheme, the calculating the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture based on the training feature vector set and the SIFT feature vector set includes:

[0029] Calculate the ratio of the training feature vectors in the training feature vector set that appear in the SIFT feature vector set to obtain the matching rate;

[0030] Obtain the SIFT feature vectors in sequence, and calculate the Euclidean distances between the SIFT feature vectors and the training feature vectors in the training feature vector set in sequence to obtain a vector distance set;

[0031] Perform an average calculation on the Euclidean distances in the vector distance set to obtain the average vector distance.

[0032] By adopting the above technical solution, by obtaining the matching rate, it is convenient to know the similarity degree between the picture captured during monitoring and the standard monitoring picture, and by obtaining the average vector distance, it is convenient to know the difference size between the picture captured during monitoring and the standard monitoring picture.

[0033] In a specific feasible implementation, the logical regression operation on the vector distance and the matching rate to generate a logical regression value includes:

[0034] Matching a first regression coefficient to the matching rate and a second regression coefficient to the vector distance;

[0035] Performing a logical regression operation on the vector distance and the matching rate according to the first regression coefficient and the second regression coefficient to generate a logical regression value.

[0036] By adopting the above technical solution, both the matching rate and the average vector distance are used to reflect the difference degree between the pictures taken during monitoring and the standard monitoring pictures. By performing a logical regression operation on the matching rate and the average vector distance, the two can be combined and a corresponding logical regression value can be generated to characterize the difference degree between the pictures taken during monitoring and the standard monitoring pictures, thus facilitating the improvement of the intuitiveness of the difference degree.

[0037] In a specific feasible implementation, the determining the state of the breeding camera according to the judgment value and correcting the breeding camera according to the state includes:

[0038] Determining the state of the breeding camera according to the judgment value, where the state includes normal and abnormal;

[0039] Correcting the breeding camera when the state of the breeding camera is abnormal.

[0040] By adopting the above technical solution, the state of the breeding camera can be intuitively understood through the judgment value, so that it is convenient for workers to timely understand the breeding cameras with abnormal states and correct the breeding cameras with abnormal states.

[0041] In a specific feasible implementation, the judgment value has and only has two values, including: a first judgment value corresponding to the normal state and a second judgment value corresponding to the abnormal state.

[0042] By adopting the above technical solution, since the judgment value has and only has two values, it is convenient to correspond to whether the camera state is normal or not.

[0043] In a second aspect, the present application provides a system for detecting and correcting the state of a breeding camera, adopting the following technical solution:

[0044] A system for detecting and correcting the state of a breeding camera includes:

[0045] A picture training module, configured to train preset standard monitoring pictures to generate a training feature vector set;

[0046] An image content determination module, configured to obtain monitoring pictures captured by a breeding camera, and process the monitoring pictures through a target detection algorithm to determine valid image content;

[0047] A SIFT operation module, configured to process the image content through the SIFT algorithm to obtain a set of SIFT feature vectors;

[0048] A matching rate and average vector distance calculation module, configured to calculate the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture according to the set of training feature vectors and the set of SIFT feature vectors;

[0049] A logistic regression value calculation module, configured to perform a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value;

[0050] A judgment value generation module, configured to judge the logistic regression value according to a preset judgment threshold to generate a judgment value;

[0051] A status judgment and correction module, configured to judge the status of the breeding camera according to the judgment value and correct the breeding camera according to the status.

[0052] By adopting the above technical solution, normal pictures captured by the breeding camera are first trained to generate a corresponding set of training feature vectors. The purpose of obtaining the set of training feature vectors is to use it as the basis for subsequent comparison; further, pictures captured during the breeding monitoring process are obtained and processed to obtain a set of SIFT feature vectors of the pictures. By comparing and calculating the set of training feature vectors and the set of SIFT feature vectors, a matching rate that reflects the similarity between the pictures captured during the monitoring process and the normal pictures, and an average vector distance that reflects the difference between the pictures captured during the monitoring process and the normal pictures can be obtained; in order to intuitively reflect the degree of difference between the pictures captured during the monitoring process and the normal pictures, a logistic regression operation is performed on the matching rate and the average vector distance to obtain a corresponding logistic regression value. In order to facilitate understanding whether the breeding camera needs to be corrected, the logistic regression value is then compared with a preset judgment threshold to obtain the result of the comparison, that is, the judgment value. Finally, the status of the breeding camera can be known through the judgment value, and the camera is corrected according to the status, so as to improve the stability of the breeding biological monitoring process.

[0053] In a third aspect, the present application provides a computer device, adopting the following technical solution: including a memory and a processor, and a computer program capable of being loaded and executed by the processor, such as any one of the above-mentioned breeding camera status detection and correction methods, is stored on the memory.

[0054] By adopting the above technical solution, first, the normal photos taken by the aquaculture camera are trained to generate a corresponding training feature vector set. The purpose of obtaining the training feature vector set is to use it as the basis for subsequent comparison. Further, the pictures taken during the aquaculture monitoring process are obtained and processed to obtain the SIFT feature vector set of the pictures. By comparing and calculating the training feature vector set and the SIFT feature vector set, the matching rate reflecting the similarity between the pictures taken during the monitoring process and the normal photos and the average vector distance reflecting the difference between the pictures taken during the monitoring process and the normal photos can be obtained. In order to intuitively reflect the degree of difference between the pictures taken during the monitoring process and the normal photos, a logistic regression operation is performed on the matching rate and the average vector distance to obtain the corresponding logistic regression value. In order to facilitate understanding whether the aquaculture camera needs to be corrected, the logistic regression value is further compared with a preset judgment threshold to obtain the comparison result, that is, the judgment value. Finally, the status of the aquaculture camera can be known through the judgment value, and the camera is corrected according to the status, so as to improve the stability of the aquaculture biological monitoring process.

[0055] In a fourth aspect, the present application provides a computer-readable storage medium, adopting the following technical solution: storing a computer program that can be loaded and executed by a processor to perform any one of the above methods for detecting and correcting the status of an aquaculture camera.

[0056] By adopting the above technical solution, first, the normal photos taken by the aquaculture camera are trained to generate a corresponding training feature vector set. The purpose of obtaining the training feature vector set is to use it as the basis for subsequent comparison. Further, the pictures taken during the aquaculture monitoring process are obtained and processed to obtain the SIFT feature vector set of the pictures. By comparing and calculating the training feature vector set and the SIFT feature vector set, the matching rate reflecting the similarity between the pictures taken during the monitoring process and the normal photos and the average vector distance reflecting the difference between the pictures taken during the monitoring process and the normal photos can be obtained. In order to intuitively reflect the degree of difference between the pictures taken during the monitoring process and the normal photos, a logistic regression operation is performed on the matching rate and the average vector distance to obtain the corresponding logistic regression value. In order to facilitate understanding whether the aquaculture camera needs to be corrected, the logistic regression value is further compared with a preset judgment threshold to obtain the comparison result, that is, the judgment value. Finally, the status of the aquaculture camera can be known through the judgment value, and the camera is corrected according to the status, so as to improve the stability of the aquaculture biological monitoring process.

[0057] In summary, the present application includes at least one of the following beneficial technical effects:

[0058] 1. First, obtain the training feature vector set. Further, obtain the pictures taken during the aquaculture monitoring process and process the pictures to obtain the SIFT feature vector set of the pictures. By comparing and calculating the training feature vector set and the SIFT feature vector set, the matching rate reflecting the similarity between the pictures taken during the monitoring process and the normal photos, and the average vector distance reflecting the difference between the pictures taken during the monitoring process and the normal photos can be obtained. In order to intuitively reflect the degree of difference between the pictures taken during the monitoring process and the normal photos, perform a logistic regression operation on the matching rate and the average vector distance to obtain the corresponding logistic regression value. In order to facilitate understanding whether the aquaculture camera needs to be corrected, then compare the logistic regression value with a preset judgment threshold to obtain the comparison result, that is, the judgment value. Finally, through the judgment value, it is convenient to know the state of the aquaculture camera, and correct the camera according to the state, so as to improve the stability of the aquaculture biological monitoring process.

[0059] 2. The standard monitoring pictures are the pictures taken when the camera is in a normal state. The SIFT feature vector represents the features of each picture, and the SIFT feature vectors that appear in several standard monitoring pictures and exceed the preset threshold ratio reflect the common features of all the standard monitoring pictures, and also represent the features that the pictures taken by the aquaculture camera under normal conditions should have. Such common features can be used to judge whether a picture is taken by the aquaculture camera under normal conditions.

[0060] 3. Both the matching rate and the average vector distance are used to reflect the degree of difference between the pictures taken during the monitoring and the standard monitoring pictures. By performing a logistic regression operation on the matching rate and the average vector distance, the two can be combined and the corresponding logistic regression value can be generated to represent the degree of difference between the pictures taken during the monitoring and the standard monitoring pictures, so as to improve the intuitiveness of reflecting the degree of difference. Description of the Drawings

[0061] Figure 1 is a schematic flowchart of a method for detecting and correcting the state of an aquaculture camera in Embodiment 1 of the present application.

[0062] Figure 2 is a structural block diagram of a system for detecting and correcting the state of an aquaculture camera in Embodiment 2 of the present application.

[0063] Description of the reference numerals: 100, picture training module; 200, image content determination module; 300, SIFT operation module; 400, matching rate and average vector distance calculation module; 500, logistic regression value calculation module; 600, judgment value generation module; 700, state judgment and correction module. Detailed Embodiment

[0064] The following is combined with the attached Figure 1-2Further detailed description of the present application is provided below.

[0065] Embodiment 1

[0066] Embodiment 1 of the present application discloses a method for detecting and correcting the state of a breeding camera. Referring to Figure 1 , the method for detecting and correcting the state of a breeding camera includes:

[0067] S100. Generate a set of training feature vectors by training a preset standard monitoring picture.

[0068] Specifically, S100 includes the following steps:

[0069] S101. Obtain a standard monitoring picture.

[0070] In Embodiment 1, a pig farm is used as the application scenario. In order to facilitate the captive breeding of pigs, several pig pens are set up in the pig farm. In order to facilitate the monitoring of the pigs in the pig pens, a breeding camera is generally installed directly above each pig pen. In this way, the pigs in the corresponding pig pen can be photographed by the breeding camera to obtain corresponding monitoring pictures or monitoring videos, and then it is convenient to understand the situation of the pigs based on the monitoring pictures or monitoring videos.

[0071] After the breeding camera is installed above the pig pen, over time, its support structure may become loose, which may cause the shooting direction of the breeding camera to deviate or the breeding camera to rotate; in addition, during the breeding process by the staff, when moving some objects (such as a long pole), it may touch the breeding camera, causing the breeding camera to deviate or rotate; thus, it is easy to cause situations such as incomplete shooting of the pig pen situation and skewed imaging of the pig pen situation in the captured pictures or videos.

[0072] In practice, within 2 hours after the breeding camera is just installed on the pig pen, 30 monitoring pictures are taken on the premise of calibrating the shooting direction of the breeding camera. At this time, the captured pig pen pictures are relatively standard, and this monitoring picture is recorded as the standard monitoring picture.

[0073] S102. Calculate the SIFT feature vector of each standard monitoring picture.

[0074] Each standard monitoring picture has its corresponding pixel points. After obtaining the standard monitoring picture, the SIFT (Scale-invariant feature transform) algorithm is used to perform SIFT operations on the matrix composed of the pixel points of the standard monitoring picture to obtain several SIFT feature vectors of each standard monitoring picture.

[0075] S103. Obtain a set of training feature vectors by generating SIFT feature vectors that commonly appear in a number of standard monitoring images and exceed a preset threshold ratio.

[0076] In the pig breeding monitoring system, a threshold ratio is preset, and in practice, this threshold ratio is 60%. For the sake of easy understanding, assume that after the implementation of steps S101 and S102, each standard monitoring image generates 100 SIFT feature vectors. If the probability of a SIFT feature vector appearing in these 30 standard monitoring images is not less than 60%, then obtain this SIFT feature vector, that is, if there are no less than 18 standard monitoring images among the 30 standard monitoring images that all have this SIFT feature vector, then obtain this SIFT feature vector.

[0077] By analogy in the above way, gather together the SIFT feature vectors that are common to no less than 18 standard monitoring images among the 30 standard monitoring images to generate a set of training feature vectors. It can be understood that the SIFT feature vectors in the set of training feature vectors are the features common to most standard monitoring images and can be used to reflect the commonalities of the standard monitoring images.

[0078] In practice, pigs often move in the central area of the pigsty and often rest in the edge area inside the pigsty. After performing SIFT operations on the 30 standard monitoring images obtained by taking pictures of the situation inside the pigsty to obtain the corresponding SIFT feature vectors, it can be found that the SIFT feature vectors in the set of training feature vectors are basically concentrated in the edge area inside the pigsty in the standard monitoring images.

[0079] S200. Obtain the monitoring images taken by the breeding camera, and process the monitoring images through the target detection algorithm to determine the effective image content.

[0080] Specifically, S200 includes the following steps:

[0081] S201. Obtain the monitoring images taken by the breeding camera.

[0082] After obtaining the set of training feature vectors, during the monitoring of the pig breeding situation, continue to take the monitoring images of the breeding situation in the pigsty through the breeding camera. Further, send the taken monitoring images to the breeding monitoring system for storage.

[0083] S202. Determine the outer edge detection points of the monitoring images through the target detection algorithm.

[0084] In order to make the comparison areas of the monitoring images and the standard monitoring images as consistent as possible, it is necessary to determine the edge area inside the pigsty in each monitoring image.

[0085] After obtaining a number of monitoring pictures through S201, each monitoring picture is processed by a target detection algorithm to obtain the outer edge detection points of each monitoring picture. In implementation, the Detectron model is used as the target detection algorithm.

[0086] S203. Determine the outer edge boundary of the monitoring picture and the circumcircle corresponding to the outer edge boundary based on the outer edge detection points.

[0087] The Detectron model can calculate a number of outer edge detection points on each monitoring picture. Then, connecting these outer edge detection points in sequence can obtain the outer edge boundary of the pigsty shown in the corresponding monitoring picture. Then, based on the coordinate data of the outer edge detection points, the Detectron model obtains the circumcircle with the smallest diameter that can enclose all the monitoring points on a monitoring picture, and this circumcircle can enclose the outer edge boundary formed by connecting all the monitoring points it encloses.

[0088] S204. Calculate the inner circle based on the circumcircle and a preset boundary distance.

[0089] There is a preset boundary distance in the breeding monitoring system. In the following implementation, it is necessary to calculate an inner circle that is convenient for determining the central area of the pigsty in the monitoring picture, and this inner circle has the same center as the circumcircle obtained in step S203. The above-mentioned boundary distance is also the radius difference L between the concentric inner circle and circumcircle, and the expression of L is as follows:

[0090] L = ( ) / 30;

[0091] It should be noted that: w represents the length of the monitoring picture, and h represents the width of the monitoring picture.

[0092] When the circumcircle is known through step S203, the center of the circumcircle can be determined. Further, in combination with the preset boundary distance L in the breeding monitoring system, the inner circle can be determined.

[0093] S205. Process the monitoring picture through the target detection algorithm and the inner circle to obtain the inner edge boundary.

[0094] After obtaining the SIFT feature vectors of the monitoring picture through step S102 and obtaining the inner circle through step S204, then the target detection algorithm is used to obtain the SIFT feature vectors located in the inner circle and close to the inner circle. Then, the obtained SIFT feature vectors are used as the inner edge detection points, and then the inner edge detection points are connected in sequence to form the inner edge boundary.

[0095] S206. Process the monitoring picture based on the outer edge boundary and the inner edge boundary to obtain the effective image content.

[0096] Through step S203, the outer boundary of the pigsty in the monitoring image can be obtained. Through step S205, the inner boundary of the pigsty in the monitoring image can be obtained. The image content outside the outer boundary and the image content inside the inner boundary of each monitoring picture are subjected to a blackening-type hiding process, and the image content between the outer boundary and the inner boundary is recorded as valid image content.

[0097] S300. Process the image content through the SIFT algorithm to obtain a set of SIFT feature vectors.

[0098] Through step S200, the valid image content of each monitoring picture can be obtained. In implementation, SIFT operations are performed on the pixel points in the image area where the valid image content is located through the SIFT algorithm. Then, several SIFT feature vectors of each monitoring picture can be obtained, and the several SIFT feature vectors of each monitoring picture are combined into a set of SIFT feature vectors.

[0099] S400. Calculate the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture based on the training feature vector set and the SIFT feature vector set.

[0100] Specifically, S400 includes the following steps:

[0101] S401. Calculate the ratio of the training feature vectors in the training feature vector set that appear in the SIFT feature vector set to obtain the matching rate.

[0102] Through the pre-training of the standard monitoring picture, a training feature vector set composed of training feature vectors can be obtained. Through step S300, a set of SIFT feature vectors of the valid image content of each monitoring picture can be obtained.

[0103] In implementation, in a traversal manner, each training feature vector in the training feature vector set is compared with the SIFT feature vectors in the SIFT feature vector set of the valid image content of the monitoring picture in turn. If there is a SIFT feature vector in the SIFT feature vector set of the valid image content of the monitoring picture that is the same as the training feature vector being compared, this SIFT feature vector is recorded. After comparing all the training feature vectors in the training feature vector set in the above manner, the number of the recorded SIFT feature vectors is counted, and then the number of the recorded SIFT feature vectors is compared with the total number of SIFT feature vectors in the SIFT feature vector set to obtain the ratio and record it as the matching rate. It can be understood that the matching rate represents the similarity degree between the monitoring picture and the standard monitoring picture.

[0104] S402. Sequentially obtain SIFT feature vectors, and sequentially calculate the Euclidean distances between the SIFT feature vectors and the training feature vectors in the training feature vector set to obtain a vector distance set.

[0105] There are several SIFT feature vectors in the SIFT feature vector set corresponding to each monitoring image. Each time, a SIFT feature vector is selected without repetition from the SIFT feature vector set, and the Euclidean distance between this SIFT feature vector and each training feature vector in the training feature vector set is calculated. Then, the Euclidean distance between the next SIFT feature vector and each training feature vector in the training feature vector set is calculated. In the above manner, the Euclidean distances between all SIFT feature vectors in the SIFT feature vector set and each training feature vector in the training feature vector set are calculated; further, all the calculated Euclidean distances are combined into a vector distance set.

[0106] S403. Perform an average calculation on the Euclidean distances in the vector distance set to obtain an average vector distance.

[0107] To facilitate an intuitive understanding of the gap between a monitoring image and a standard monitoring image, it is necessary to statistically quantify all the Euclidean distances in the vector distance set, that is, calculate the average value of all the Euclidean distances in the vector distance set, and record the obtained average value as the average vector distance. The average vector distance is used to characterize the degree of difference between the monitoring image and the standard monitoring image.

[0108] S500. Perform a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value.

[0109] Specifically, S500 includes the following steps:

[0110] S501. Match a first regression coefficient for the matching rate and a second regression coefficient for the vector distance.

[0111] From one perspective, the matching rate characterizes the similarity degree between the monitoring image and the standard monitoring image. From another perspective, the matching rate is similar to the average vector distance and can also characterize the degree of difference between the monitoring image and the standard monitoring image.

[0112] The matching rate and the average vector distance are two variables that determine the degree of difference between the monitoring image and the standard monitoring image. In order to comprehensively consider these two variables and thus more intuitively understand the degree of difference between the monitoring image and the standard monitoring image, the Logistic Regression (logistic regression algorithm) can be introduced to comprehensively consider these two variables, namely the matching rate and the average vector distance.

[0113] Although both the matching rate and the average vector distance are variables that determine the degree of difference between the monitored image and the standard monitored image, the weights of the matching rate and the average vector distance in determining the degree of difference between the monitored image and the standard monitored image are different. Therefore, during the process of processing the matching rate and the average vector distance through Logistic Regression, in combination with historical experimental data, a first regression coefficient for reflecting the weight of the matching rate is first matched for the matching rate, and a second regression coefficient for reflecting the weight of the average vector distance is also matched for the average vector distance.

[0114] S502. Perform a logistic regression operation on the vector distance and the matching rate according to the first regression coefficient and the second regression coefficient to generate a logistic regression value.

[0115] The matching rate is obtained through step S401, the average vector distance is obtained through step S403, and the first regression coefficient and the second regression coefficient are obtained through step S501. Further, a logistic regression operation is performed on the matching rate and the average vector distance according to the first regression coefficient and the second regression coefficient, that is, a weighted operation is performed on the matching rate and the average vector distance according to the first regression coefficient and the second regression coefficient, so as to obtain a logistic regression value for intuitively reflecting the degree of difference between the monitored image and the standard monitored image.

[0116] S600. Judge the logistic regression value according to a preset judgment threshold to generate a judgment value.

[0117] The logistic regression value obtained through S502 can numerically represent the degree of difference between the monitored image and the standard monitored image. However, it is difficult for the aquaculture monitoring system to determine the state of the aquaculture camera only based on the logistic regression value. Therefore, a judgment threshold can be summarized through historical experimental data as the judgment basis for the state of the aquaculture camera.

[0118] When the logistic regression value is greater than the judgment threshold, the judgment value is the first judgment value;

[0119] When the logistic regression value is not greater than the judgment threshold, the judgment value is the second judgment value.

[0120] S700. Judge the state of the aquaculture camera according to the judgment value and correct the aquaculture camera according to the state.

[0121] Specifically, S700 includes the following steps:

[0122] S701. Determine the state of the aquaculture camera according to the judgment value, and the state includes normal and abnormal.

[0123] In practice, the first judgment value is 1, and when the first judgment value is 1, it indicates that the state of the aquaculture camera is abnormal; the aquaculture monitoring system sends an alarm message to the staff when the first judgment value is 1.

[0124] In implementation, the first judgment value is 0, and when the first judgment value is 0, it indicates that the state of the breeding camera is normal.

[0125] S702. Correct the breeding camera when the state of the breeding camera is abnormal.

[0126] In implementation, when the staff receives the alarm information, they will conduct on-site inspection of the corresponding breeding camera and correct the breeding camera until the first judgment value is 0.

[0127] Figure 1 It is a schematic flowchart of the method for detecting and correcting the state of the breeding camera in an embodiment. It should be understood that although Figure 1 the steps in the flowchart are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows; unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders; and Figure 1 at least a part of the steps in

[0128] Embodiment 2

[0129] Embodiment 2 of the present application discloses a system for detecting and correcting the state of a breeding camera. Referring to Figure 2 , the system for detecting and correcting the state of the breeding camera includes:

[0130] A picture training module 100 for training a preset standard monitoring picture to generate a training feature vector set;

[0131] An image content determination module 200 for obtaining a monitoring picture taken by the breeding camera and determining the effective image content by processing the monitoring picture through an object detection algorithm;

[0132] A SIFT operation module 300 for processing the image content through the SIFT algorithm to obtain a SIFT feature vector set;

[0133] A matching rate and average vector distance calculation module 400 for calculating the matching rate and average vector distance between the monitoring picture and the standard monitoring picture based on the training feature vector set and the SIFT feature vector set;

[0134] The logistic regression value calculation module 500 is configured to perform a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value;

[0135] The judgment value generation module 600 is configured to judge the logistic regression value according to a preset judgment threshold to generate a judgment value;

[0136] The state judgment and correction module 700 is configured to judge the state of the breeding camera according to the judgment value and correct the breeding camera according to the state.

[0137] Embodiment 3

[0138] In this Embodiment 3, a computer device is disclosed, which includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is caused to execute the steps of the above-mentioned method for detecting and correcting the state of a breeding camera. Here, the steps of the method for detecting and correcting the state of a breeding camera may be the steps in the method for detecting and correcting the state of a breeding camera in each of the above embodiments.

[0139] Embodiment 4

[0140] In this Embodiment 4, a computer-readable storage medium is disclosed, which stores a computer program that can be loaded and executed by a processor such as the above-mentioned method for detecting and correcting the state of a breeding camera. The computer-readable storage medium includes, for example: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0141] This specific embodiment is only an interpretation of the present invention and is not a limitation to the present invention. After reading this specification, those skilled in the art can make modifications to this embodiment without creative contributions as needed, but as long as it is within the scope of the claims of the present invention, it is protected by the patent law.

Claims

1. A method for detecting and correcting the state of a camera for aquaculture, characterized in that: Including: Training a preset standard monitoring picture to generate a set of training feature vectors; Obtaining a monitoring picture captured by a breeding camera, and processing the monitoring picture through an object detection algorithm to determine effective image content, including: determining outer edge detection points of the monitoring picture through the object detection algorithm; determining an outer edge boundary of the monitoring picture and a circumcircle corresponding to the outer edge boundary based on the outer edge detection points; calculating an inner circle based on the circumcircle and a preset boundary distance; processing the monitoring picture through the object detection algorithm and the inner circle to obtain an inner edge boundary; processing the monitoring picture based on the outer edge boundary and the inner edge boundary to obtain the effective image content; Processing the image content through the SIFT algorithm to obtain a set of SIFT feature vectors; Calculating a matching rate and an average vector distance between the monitoring picture and the standard monitoring picture based on the set of training feature vectors and the set of SIFT feature vectors; Performing a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value, including: matching a first regression coefficient to the matching rate and a second regression coefficient to the vector distance; performing a logistic regression operation on the vector distance and the matching rate based on the first regression coefficient and the second regression coefficient to generate a logistic regression value; Judging the logistic regression value based on a preset judgment threshold to generate a judgment value; Judging the state of the breeding camera based on the judgment value and correcting the breeding camera according to the state.

2. The method for detecting and correcting the state of a camera for aquaculture according to claim 1, characterized in that: The training of the preset standard monitoring picture to generate a set of training feature vectors includes: Obtaining the standard monitoring picture; Calculating SIFT feature vectors of each standard monitoring picture; Obtaining SIFT feature vectors that commonly appear in a number of the standard monitoring pictures and exceed a preset threshold ratio to generate the set of training feature vectors.

3. A method for detecting and correcting the state of a camera for aquaculture according to claim 2, characterized in that: The calculating of the matching rate and the average vector distance between the monitoring picture and the standard monitoring picture based on the set of training feature vectors and the set of SIFT feature vectors includes: Calculating the ratio of the training feature vectors in the set of training feature vectors that appear in the set of SIFT feature vectors to obtain the matching rate; Sequentially obtaining the SIFT feature vectors, and sequentially calculating the Euclidean distances between the SIFT feature vectors and the training feature vectors in the set of training feature vectors to obtain a set of vector distances; Averaging the Euclidean distances in the set of vector distances to obtain the average vector distance.

4. A method for detecting and correcting the state of a camera for aquaculture according to claim 1, characterized in that: The judging of the state of the breeding camera based on the judgment value and the correcting of the breeding camera according to the state includes: Determining the state of the breeding camera based on the judgment value, where the state includes normal and abnormal; Correcting the breeding camera when the state of the breeding camera is abnormal.

5. A method for detecting and correcting the state of a camera for aquaculture according to claim 4, characterized in that: The judgment value has and only has two values, including: a first judgment value corresponding to the normal state and a second judgment value corresponding to the abnormal state.

6. A camera status detection and correction system for aquaculture, characterized in that: Including: An image training module for training a preset standard monitoring image to generate a set of training feature vectors; An image content determination module for obtaining a monitoring image captured by a breeding camera, and processing the monitoring image through an object detection algorithm to determine effective image content, including: determining outer edge detection points of the monitoring image through the object detection algorithm; determining an outer edge boundary of the monitoring image and a circumcircle corresponding to the outer edge boundary based on the outer edge detection points; calculating an inner circle based on the circumcircle and a preset boundary distance; processing the monitoring image through the object detection algorithm and the inner circle to obtain an inner edge boundary; processing the monitoring image based on the outer edge boundary and the inner edge boundary to obtain the effective image content; A SIFT operation module for processing the image content through the SIFT algorithm to obtain a set of SIFT feature vectors; A matching rate and average vector distance calculation module for calculating the matching rate and average vector distance between the monitoring image and the standard monitoring image based on the set of training feature vectors and the set of SIFT feature vectors; A logistic regression value calculation module for performing a logistic regression operation on the vector distance and the matching rate to generate a logistic regression value, including: matching a first regression coefficient to the matching rate and a second regression coefficient to the vector distance; performing a logistic regression operation on the vector distance and the matching rate based on the first regression coefficient and the second regression coefficient to generate a logistic regression value; A judgment value generation module for judging the logistic regression value based on a preset judgment threshold to generate a judgment value; A state judgment and correction module for judging the state of the breeding camera based on the judgment value and correcting the breeding camera based on the state; 7. A computer device, characterized in that, The computer device includes a memory and a processor. When the computer program stored in the memory is executed by the processor, the processor executes the method for detecting and correcting the state of the breeding camera according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, which when executed by a processor, causes the processor to execute the method for detecting and correcting the state of the breeding camera according to any one of claims 1-5.

Citation Information

Patent Citations

  • Iris locating method based on boundary point search and SUSAN edge detection

    CN101246544A

  • Monitoring equipment fault identification method and device, equipment and storage medium

    CN112584135A