CN112287913B - Intelligent supervisory system for fish video identification - Google Patents

Intelligent supervisory system for fish video identification Download PDF

Info

Publication number
CN112287913B
CN112287913B CN202011564844.0A CN202011564844A CN112287913B CN 112287913 B CN112287913 B CN 112287913B CN 202011564844 A CN202011564844 A CN 202011564844A CN 112287913 B CN112287913 B CN 112287913B
Authority
CN
China
Prior art keywords
fish
video
clustering
color
model
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
CN202011564844.0A
Other languages
Chinese (zh)
Other versions
CN112287913A (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.)
Zhejiang Yushengtai Technology Co ltd
Original Assignee
Zhejiang Yushengtai Technology 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 Zhejiang Yushengtai Technology Co ltd filed Critical Zhejiang Yushengtai Technology Co ltd
Priority to CN202011564844.0A priority Critical patent/CN112287913B/en
Publication of CN112287913A publication Critical patent/CN112287913A/en
Application granted granted Critical
Publication of CN112287913B publication Critical patent/CN112287913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis
    • G06V10/507Summing image-intensity values; Histogram projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an intelligent monitoring system for fish video identification, which comprises a service layer, a data layer and a presentation layer, wherein the service layer comprises a user system, a service system and an algorithm system; the service system is used for managing the services among the whole platform modules; the algorithm system realizes video identification of the fish through a fish model clustering algorithm. According to the method, a fish model is fixed at the origin of a coordinate system, and an independent fish clustering color library is constructed by utilizing the gray distribution statistics of fish schools and background targets according to the characteristics of color clustering and fish videos; clustering time is reduced, and efficiency is improved; the clustering value is determined in a self-adaptive mode through the valley value of the normalized histogram, and therefore the low efficiency and invalid segmentation caused by manual experience are avoided.

Description

Intelligent supervisory system for fish video identification
Technical Field
The invention belongs to the field of intelligent supervision systems, and particularly relates to an intelligent supervision system for fish video identification.
Background
Currently, big data has become a fundamental and strategic resource for national economy and social development. With the continuous development of information acquisition technology, various basic data such as regional resource environment background data, management service data, monitoring data and the like rapidly increase, and big data characteristics are gradually presented. The demands of management departments at all levels on real-time and visual display and analysis of big data are increasing. And the method also puts more comprehensive and urgent requirements on the expansion, mining and application of the space resource big data. The current various service management systems are independent of each other, lack integration and shared utilization of information resources, serious 'information isolated island' phenomenon, insufficient deep data application, imperfect data updating mechanism and the like.
Fish classification has been more and more emphasized for decades, is vital to reasonable regulation and control of fish schools, effectively and accurately extracts and classifies fish, is essential for analyzing and identifying the relation between fish behavior characteristics and environmental factors and accurately controlling fish growth environments, is based on artificial identification at present, and lacks an effective algorithm identification means for fish videos.
Disclosure of Invention
In order to solve the problems, particularly to identify the video of the fishes, the invention utilizes a GIS technology and an area projection outline and Cartesian projection profile feature extraction technology to identify the habitat of the fishes and further identify the fishes, and the specific scheme is as follows:
an intelligent monitoring system for fish video identification comprises a service layer, a data layer and a display layer,
the service layer comprises three systems, namely a user system, a service system and an algorithm system, wherein the user system is mainly used for managing platform user operation behaviors and information management; the service system is used for managing the services among the whole platform modules; the algorithm system realizes video identification of the fish through a fish model clustering algorithm;
the data layer is used for storing data and is divided into a data center, a system database and a video database, and the data center is used for storing various service data including the number, date, position and the like of fish identification; the system database stores service relation data among system modules, including maps, video storage addresses and the like; the video database stores video data of all fishes and remote sensing map data;
the display layer outputs the interactive returned result among the functional modules through the WEB end, and the developer of the open API interface calling method can call according to the provided calling rule through the related open interface address.
The service system obtains the fish video through the video extraction equipment, and the algorithm system is used as a background system to realize fish video identification through a fish video identification method.
The system service adopts a lightweight FlaskWeb application framework, a WSGI tool box adopts Werkzeug, a Flask has a built-in server and unit test, adapts RESTful and supports safe cookies; a machine deep learning algorithm Keras artificial neural network and an OpenCV machine learning visual algorithm are used for capturing a dynamic video in real time for recognition; and the data video is automatically acquired, so that accurate and intelligent identification is realized.
The fish model clustering algorithm comprises the following steps:
step 1, regarding the fish as a three-dimensional model of a closed curved surface formed by a plurality of polygonal or triangular meshes, fixing the three-dimensional model at the origin of a coordinate system, regarding a camera as a point, emitting straight lines with various spatial angles, wherein the straight lines are light beam models of the camera, the straight lines emitted by the camera are intersected with the triangular meshes of the three-dimensional fish model, assuming that a straight line passes through the meshes at the centroid, and calculating the backscattering intensity of each mesh on the surface of the fish, wherein the backscattering intensity is expressed by brightness;
step 2, building a three-dimensional fish model;
step 3, setting coordinates;
step 4, calculating the backscattering intensity;
step 5, establishing a model;
step 6, reading the fish model file and moving the fish model file to the origin;
step 7, moving the fish model to a target point through rotation and parallel movement;
step 8, checking the gravity centers and normal vectors of all grids, and judging whether the gravity centers are in the light beam range and meet the vector limitation; if yes, entering step 9, otherwise, not saving and exiting;
step 9, storing the barycentric coordinates, the distance from the barycentric coordinates to the original point and the angle from the barycentric coordinates to the original point, judging whether the cycle times reach a preset number, if not, returning to the step 8, and if so, entering the step 10;
step 10, storing information of all selected grids, and drawing a 2D video;
step 11, color clustering segmentation;
step 12, establishing a fish color library;
step 13, mean value clustering;
and step 14, fish school segmentation.
The invention has the beneficial effects that:
the invention has certain advancement, foresight and expandability on design ideas, system architecture, adopted technology and selected platform. Advancement is one of the main goals of system construction. The advancement is mainly represented by: on the basis of fully understanding and mastering the development trend of information technology and adopting the current advanced database technology, the technology such as data exchange among distributed databases, multi-source heterogeneous data integration and the like is realized, the data maintenance cost is reduced, the data management efficiency is improved, and the system can represent the mainstream development direction of fishery production safety environment guarantee application.
Therefore, the selected software platform is not only an advanced product mature at the present stage, but also a mainstream of international like products, and accords with the development direction in the future; in the software development concept, the system must be designed, managed and developed strictly according to the standards of software engineering and object-oriented theory, and the high starting point of system development is ensured.
The invention provides a simple and convenient operation mode and a visual operation interface by fully considering the convenience and flexibility of application and maintenance, so that a user can easily master and use the operation mode and the visual operation interface. Many software systems often have a contradiction between powerful functions and easy use, i.e., the powerful software with complete functions is often difficult to master because of too many menus; on the contrary, the functions of the software which is easy to use are not perfect. The system should overcome the above two tendencies, and achieve easy use and strong function.
The invention establishes and sets scientific and reasonable data standards, sets and perfects related data operation technical rules, ensures the compatibility and openness of basic geographic data, improves the interoperability of the data level and can effectively support and expand the data platform service.
The invention has flexible and convenient secondary development interface, and can customize service based on components to ensure the expandable capability of the system. The concrete points are as follows: in order to meet the demands of users on system capacity expansion and application range expansion in the future, the system should fully consider the function expansion from the aspects of system structure, function design, management objects and the like; upgrading software: the system should fully consider the scalability and load balancing mechanisms of the platform. The system has flexible and smooth expansion capability; the system is designed and developed by adopting the current popular technology, and the module encapsulation of the service logic is realized, so that the system has excellent reconfigurable capability and extensible capability.
The invention designs and develops the data resource sharing and data security and confidentiality relation which follows the principles of security, confidentiality and sharing. The design of the project database fully considers the overall design and planning of fishery production safety environment guarantee informatization construction, and data sharing with all relevant departments and units is guaranteed on the premise of safety and confidentiality.
The invention fixes the fish model at the origin of the coordinate system, can detect the change of the backscattering intensity of each part of the fish body through the brightness along with the motion of the camera in the space, generates a plane simulation video when the fish is underwater at various positions and angles, and provides the possibility of comparing the simulation video with the plane real video. Based on a K mean + + algorithm, a self-adaptive fast clustering fish shoal color image segmentation algorithm is provided. And a new image is generated to replace the original image through channel color compensation, so that a large amount of complex noise is reduced. Aiming at the characteristics of color clustering and fish videos, an independent fish clustering color library is constructed by utilizing the gray level distribution statistics of fish schools and background targets; clustering time is reduced, and efficiency is improved; the clustering value is determined in a self-adaptive mode through the valley value of the normalized histogram, so that the low efficiency and invalid segmentation caused by manual experience are avoided; compared with other methods, the quality and the accuracy are obviously improved; the algorithm furthest retains the color information of the fish school and eliminates a large amount of irrelevant noise.
Drawings
FIG. 1 is a flow chart of a fish model clustering algorithm method of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
An embodiment of the present invention is illustrated with reference to fig. 1.
An intelligent monitoring system for fish video identification comprises a service layer, a data layer and a display layer,
the service layer comprises three systems, namely a user system, a service system and an algorithm system, wherein the user system is mainly used for managing platform user operation behaviors and information management; the service system is used for managing the services among the whole platform modules; the algorithm system realizes video identification of the fish through a fish model clustering algorithm;
the data layer is used for storing data and is divided into a data center, a system database and a video database, and the data center is used for storing various service data including the number, date, position and the like of fish identification; the system database stores service relation data among system modules, including maps, video storage addresses and the like; the video database stores video data of all fishes and remote sensing map data;
the display layer outputs the interactive returned result among the functional modules through the WEB end, and the developer of the open API interface calling method can call according to the provided calling rule through the related open interface address.
The service system obtains the fish video through the video extraction equipment, and the algorithm system is used as a background system to realize fish video identification through a fish video identification method.
The system service adopts a lightweight FlaskWeb application framework, a WSGI tool box adopts Werkzeug, a Flask has a built-in server and unit test, adapts RESTful and supports safe cookies; a machine deep learning algorithm Keras artificial neural network and an OpenCV machine learning visual algorithm are used for capturing a dynamic video in real time for recognition; and the data video is automatically acquired, so that accurate and intelligent identification is realized.
The fish model clustering algorithm comprises the following steps:
step 1, regarding the fish as a three-dimensional model of a shxiangji closed curved surface formed by a plurality of polygonal or triangular meshes, fixing the three-dimensional model at the origin of a coordinate system, regarding a camera as a point, emitting straight lines of various spatial angles, wherein the straight lines are a light beam model of the camera, intersecting the straight lines emitted by the camera with the triangular meshes of the three-dimensional fish model, assuming that a straight line passes through the meshes at the centroid, and calculating the backscattering intensity of each mesh on the surface of the fish, wherein the backscattering intensity is expressed by brightness;
step 2, the construction of a three-dimensional fish model,
the model is a dense point cloud model of fish, the coordinates of all dense cloud points are derived into txt files, a three-dimensional model of the fish consisting of triangular meshes is obtained after mesh processing, the resolution of the three-dimensional model is about 2 mm, normal vectors and coordinates of 3 vertexes of each mesh and the number of the meshes are derived into stl files, and the stl files are read and processed through a program;
step 3, setting the coordinates,
setting the center of the fish model to the origin of the coordinate system, comparing the x, y and z coordinates of all vertexes to obtain xmin、xmax、ymin、ymax、zmin、zmaxCoordinate x of center of fish modelcenter、ycenter、zcenterThe calculation formula is as follows:
Figure 412062DEST_PATH_IMAGE001
Figure 402146DEST_PATH_IMAGE002
Figure 700403DEST_PATH_IMAGE003
wherein the new coordinates
Figure 25205DEST_PATH_IMAGE004
All vertices of the fish model replace the old coordinates
Figure 332690DEST_PATH_IMAGE005
By the following formula, the center of the fish model will move to the origin,
Figure 160969DEST_PATH_IMAGE006
Figure 895707DEST_PATH_IMAGE007
Figure 442226DEST_PATH_IMAGE008
the fish model is parallel to the x-axis, the calculation should be from right to left, x, y, z represent transformed coordinates, alpha, beta, gamma represent the angle of rotation of the model around the x, y, z-axis, when the fish is parallel to the x-axis, the values of alpha, beta, gamma are adjusted and fixed,
Figure 553401DEST_PATH_IMAGE010
,
moving around the fish model by adjusting the values of phi and theta, P representing the vector from the centroid of the mesh to the camera, N being the normal vector to the mesh, and P and N having coordinates of
Figure 501765DEST_PATH_IMAGE011
R represents the distance from the origin, and the values of phi and theta are changed by controlling the position of the camera
Figure 407405DEST_PATH_IMAGE012
The angle δ between the two vectors P and N is:
Figure 441220DEST_PATH_IMAGE014
when in use
Figure 90507DEST_PATH_IMAGE015
When the fish is in a fish-;
step 4, calculating the back scattering intensity,
when the light beam meets different objects, the light beam is back-scattered, the surface of the fish skin is rough, the roughness of the fish skin is less than the wavelength, and the back-scattering intensity S is determined according to the Lambert ruleBComprises the following steps:
Figure 893378DEST_PATH_IMAGE016
wherein mu is the scattering coefficient of the fish skin;
step 5, establishing a model,
calculating the backscattering intensity of each grid on the surface of the three-dimensional fish model according to the included angle delta, wherein the backscattering intensity is represented by grid brightness, the brighter the grid is, the fish model is fixed at the original point, the camera is moved around the fish model, and the position of the camera is adjusted by changing the space angles phi and theta so that the backscattering intensity on the surface of the fish model is changed; since the real video of the camera is a flat video, the new simulator must be able to generate a flat simulated video for comparison and matching with the real video, the camera is considered as a point and fixed at the origin, emitting a 30 x 3 light beam, when the fish moves to the range of this light beam, a flat simulated video of the fish will be formed, the resolution of the simulated video can be adjusted;
step 6, reading the fish model file and moving the fish model file to the origin;
step 7, moving the fish model to a target point through rotation and parallel movement;
step 8, checking the gravity centers and normal vectors of all grids, and judging whether the gravity centers are in the light beam range and meet the vector limitation; if yes, entering step 9, otherwise, not saving and exiting;
step 9, storing the barycentric coordinates, the distance from the barycentric coordinates to the original point and the angle from the barycentric coordinates to the original point, judging whether the cycle times reach a preset number, if not, returning to the step 8, and if so, entering the step 10;
step 10, storing information of all selected grids, and drawing a 2D video;
step 11, the color clustering segmentation is carried out,
the cluster is composed of objects with close Euclidean spatial distance, and takes compactness and independence as a final target, and pixel groups in the video are assumed to be represented as follows:
Figure 969918DEST_PATH_IMAGE017
where N is the total number of pixels,
Figure 491029DEST_PATH_IMAGE018
randomly selecting k clustering centroids
Figure 678428DEST_PATH_IMAGE019
D of color similarity of two pixels without considering spatial position of a pointijThe formula is calculated according to the principle of similar color values as follows:
Figure 601385DEST_PATH_IMAGE020
(ii) a The following formula is satisfied:
Figure 798228DEST_PATH_IMAGE021
wherein, OiRepresents a sample xiAnd the closest point, λ, between k cluster centersjThe method is a guess value of the centers of the same type of samples, and each point is replaced by a clustering center point after clustering is finished;
step 12, establishing a fish color library,
analyzing the influence of different channels on video brightness and contrast, randomly selecting a plurality of fish videos, carrying out channel separation operation on the fish videos, carrying out statistics on the average value of gray scale distribution of the different channels, generating an average normalized histogram aiming at the gray scale video of the R, G, B channel, obtaining the brightness and contrast characteristics of the different channels, and expressing the overall brightness by the peak value position of the histogram;
constructing a fish shoal color library L according to the brightness contributions of different channelsiI =0,1,2, the fish school color library comprises three parts, l0The method is characterized in that only brightness information of an R channel video is reserved in a fish school color library; l1Only the brightness information of the G channel video is reserved; l2Only the brightness information of the B channel video is reserved; wherein l1The range of gray values in the library is 0, 255]The gray level compensation for the remaining two channels is zero, and the table below shows l1Colors in the libraryInformation, wherein R _ P represents the gray value of the R channel pixel, G _ P represents the value of the G channel, and B _ P represents the B channel;
TABLE 1 color information base
Figure 150843DEST_PATH_IMAGE023
Step 13, mean value clustering, which comprises the following steps:
step 13.1, randomly selecting k samples from the data set as initial clustering centers;
Figure 673092DEST_PATH_IMAGE024
wherein,
Figure 325921DEST_PATH_IMAGE025
represents the center of a cluster that is randomly selected,
Figure 744264DEST_PATH_IMAGE026
a set representing a cluster center;
step 13.2, for each sample x in the datasetiCalculating the distances from the k clustering centers to the k clustering centers, and dividing the distances into categories corresponding to the clustering centers with the minimum distances;
step 13.3, for each OiThe class, its cluster center is calculated as follows:
Figure 974388DEST_PATH_IMAGE027
wherein the sample set is xiN, N being the total number of pixels;
step 13.4, returning to step 13.2 until the clustering center is not changed any more;
step 14, the fish school is divided into a plurality of fish schools,
step 14.1, generating a characteristic video;
in the RGB color space, the channel with the maximum average brightness in the three channels of videos is taken as a target channel, other channels with lower brightness are compensated to be zero, the generated new video replaces the original video, and three components of the color video are represented in a vector form:
Figure 769169DEST_PATH_IMAGE028
Figure 401138DEST_PATH_IMAGE029
is the pixel value of an arbitrary point, where (x, y) represents the position coordinate, R (x, y) is the luminance value of the pixel point of the R channel (x, y), G (x, y) represents the luminance value of the G channel, and B (x, y) represents the luminance value of the pixel point of the B channel (x, y); separating channels of the three-color video, keeping the channel characteristics with the maximum average brightness, keeping the rest compensation to be zero, representing the generated characteristic video by Seg (x, y),
Figure 990383DEST_PATH_IMAGE030
wherein
Figure 973382DEST_PATH_IMAGE029
Representing the original video, MiIs a different compensation operation, M0Indicating that the brightness information of the R channel is reserved, and the rest is zero; miIndicating that the brightness information of the G channel is reserved, and the rest is zero; indicating that the brightness information of the B channel is reserved, and the rest is zero;
step 14.2, determining a clustering value;
step 14.3, selecting a color library;
by pairs
Figure 306275DEST_PATH_IMAGE029
Analyzing the brightness of different channels, and generating a new color compensation video Seg (x, y) to replace an original video by adopting different color compensation methods; miRepresents different compensation operations, where i =0,1, 2;
if i =0, it means "onOver M0Color compensation of the operation, the resulting video will be color clusters of the R library,
Figure 792751DEST_PATH_IMAGE031
if i =1, indicates a pass through M1Color compensation of the operation, the generated video is color clustering through a G library,
Figure 818476DEST_PATH_IMAGE032
if i =2, indicates a pass through M2Color compensation of the operation, the generated video is clustered by colors of a B library,
Figure 23192DEST_PATH_IMAGE033
step 14.4, clustering the colors of the videos,
according to the determined clustering value K and the fish color library as LiI =0,1,2, clustering the video, from a cluster color library LiRandomly selecting a sample point as an initial clustering center OiAnd the remaining cluster centers satisfy the following condition:
Figure 159775DEST_PATH_IMAGE034
calculate each sample point at LiAnd OiThe probability is as follows:
Figure 500758DEST_PATH_IMAGE036
wherein, D (L)i) Selecting a point with the highest probability as the next initial clustering center from the distance from each sampling point to the nearest center, and repeating the step 14.4 until k initial centers are selected; lyIs a sample point located in the color library; according to k initialsAnd the heart segments the video image to further obtain the number of fishes in the video.
Wherein, the step 14.2 specifically comprises the following steps:
step 14.2.1, the gray interval is set,
setting the gray level video of the fish school after color compensation as gradient (x, y), wherein (x, y) is the space coordinate of the pixel, comprising
Figure 697384DEST_PATH_IMAGE037
The video is divided into T gray intervals according to the gray levels to form a new pixel space R' represented as:
Figure 451713DEST_PATH_IMAGE038
,
for each small gray interval, the number of pixels is:
r(ci,cj)=║Segray(x,y,ci)+ Segray(x,y,ci+1)+…+ Segray(x,y,cj)║ (i<j),
wherein R' is the new pixel space, | represents ciAnd cjThe norm of the sum of the number of pixels in the gray scale interval of (2), Segray (x, y, c)i) Means that the gray value is cjIs the spatial coordinate of the pixel, r (c)i,cj) Denotes ciAnd cjThe number of pixels between the gray scale intervals of (a);
step 14.2.2, traversing the pixels, calculating the total number of pixels in each gray scale interval, and taking any rtE to R, calculating the total number of pixels in the gray scale interval according to the formula, calculating the percentage of the pixels in each gray scale interval to the total number of the pixels, and using ptDenotes, T =1, 2, 3.. T,
Figure 126408DEST_PATH_IMAGE039
wherein (x, y) is the spatial coordinate of the pixel and (c)i,cj) Denotes ciAnd cjIn (2) pixel assemblyNumber, N is the total number of pixels in the video, t is a positive integer;
step 14.2.3, sorting the pixel distribution probability value of each gray scale interval in step 14.2.2, and setting the reference probability value as p0By traversing the probability value of each pixel distribution, a probability distribution value p satisfying the following equation is foundt:
Figure 587477DEST_PATH_IMAGE040
The clustering value K is determined as follows:
Figure 955004DEST_PATH_IMAGE042
wherein (x, y) is the spatial coordinate of the pixel and (c)i,cj) Denotes ciAnd cjN is the total number of pixels in the video, and is the reference probability value.
The above-described embodiment merely represents one embodiment of the present invention, but is not to be construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.

Claims (10)

1. An intelligent monitoring system for fish video identification, which comprises a service layer, a data layer and a display layer, and is characterized in that,
the service layer consists of three systems, namely a user system, a service system and an algorithm system, wherein the user system is used for managing platform user operation behaviors and information management; the service system is used for managing the services among the whole platform modules; the algorithm system realizes video identification of the fish through a fish model clustering algorithm;
the data layer is used for storing data and is divided into a data center, a system database and a video database, and the data center is used for storing various service data including the number, date and position of fish identification; the system database stores service relation data among system modules, including maps and video storage addresses; the video database stores video data of all fishes and remote sensing map data;
the display layer outputs the interactive returned result among the functional modules through a WEB end, and an open API interface calling method developer can call according to the provided calling rule through a related open interface address;
the service system acquires fish videos through video extraction equipment, and the algorithm system serves as a background system to realize fish video identification through a fish video identification method;
the system service adopts a lightweight FlaskWeb application framework, a WSGI tool box adopts Werkzeug, a Flask has a built-in server and unit test, adapts RESTful and supports safe cookies; a machine deep learning algorithm Keras artificial neural network and an OpenCV machine learning visual algorithm are used for capturing a dynamic video in real time for recognition; automatically acquiring a data video to realize accurate and intelligent identification;
the fish model clustering algorithm comprises the following steps:
step 1, regarding the fish as a three-dimensional model of a closed curved surface formed by a plurality of polygonal or triangular meshes, fixing the three-dimensional model at the origin of a coordinate system, regarding a camera as a point, emitting straight lines with various spatial angles, wherein the straight lines are light beam models of the camera, the straight lines emitted by the camera are intersected with the triangular meshes of the three-dimensional fish model, assuming that a straight line passes through the meshes at the centroid, and calculating the backscattering intensity of each mesh on the surface of the fish, wherein the backscattering intensity is expressed by brightness;
step 2, building a three-dimensional fish model;
step 3, setting coordinates;
step 4, calculating the backscattering intensity;
step 5, establishing a model;
step 6, reading the fish model file and moving the fish model file to the origin;
step 7, moving the fish model to a target point through rotation and parallel movement;
step 8, checking the gravity centers and normal vectors of all grids, judging whether the gravity centers are in the light beam range and meet the vector limitation, if so, entering step 9, otherwise, not storing and exiting;
step 9, storing the barycentric coordinates, the distance from the barycentric coordinates to the original point and the angle from the barycentric coordinates to the original point, judging whether the cycle times reach a preset number, if not, returning to the step 8, and if so, entering the step 10;
step 10, storing information of all selected grids, and drawing a 2D video;
step 11, color clustering segmentation;
step 12, establishing a fish color library;
step 13, mean value clustering;
and step 14, fish school segmentation.
2. The intelligent monitoring system for fish video identification according to claim 1, wherein the step 2 is specifically: the model is a dense point cloud model of fish, the coordinates of all dense cloud points are derived into txt files, after grid processing, a three-dimensional model of the fish consisting of triangular grids is obtained, the resolution of the three-dimensional model is 2 mm, normal vectors and coordinates of 3 vertexes of each grid and the grid number are derived into stl files, and the files are read and processed through a program.
3. The intelligent monitoring system for fish video identification according to claim 1, wherein step 3 specifically comprises:
setting the center of the fish model to the origin of the coordinate system, comparing the X, y and z coordinates of all vertexes to obtain Xmin、Xmax、Ymin、Ymax、Zmin、ZmaxCoordinate X of center of fish modelcenter、Ycenter、ZcenterThe calculation formula is as follows:
Figure 744690DEST_PATH_IMAGE001
Figure 562343DEST_PATH_IMAGE002
Figure 903194DEST_PATH_IMAGE003
wherein the new coordinates
Figure 850946DEST_PATH_IMAGE004
Figure 328064DEST_PATH_IMAGE005
Figure 395246DEST_PATH_IMAGE006
All vertices of the fish model replace the old coordinates
Figure 957814DEST_PATH_IMAGE007
Figure 692945DEST_PATH_IMAGE008
Figure 290149DEST_PATH_IMAGE009
By the following formula, the center of the fish model will move to the origin,
Figure 262653DEST_PATH_IMAGE010
the fish model is parallel to the X-axis, the calculation should be from right to left, X, Y, Z represent transformed coordinates, alpha, beta, gamma represent the angle of rotation of the model around the X, Y, Z-axis, when the fish is parallel to the X-axis, the values of alpha, beta, gamma are adjusted and fixed,
Figure 327166DEST_PATH_IMAGE011
by adjusting
Figure 676107DEST_PATH_IMAGE012
And
Figure 127817DEST_PATH_IMAGE013
is moved around the fish model, P represents the vector from the centroid of the mesh to the camera, N is the normal vector to the mesh, and the coordinates of P and N are
Figure 474485DEST_PATH_IMAGE014
Figure 14575DEST_PATH_IMAGE015
R represents the distance to the origin, modified by controlling the position of the camera
Figure 901629DEST_PATH_IMAGE016
And
Figure 207845DEST_PATH_IMAGE017
the value of (a) is,
Figure 977611DEST_PATH_IMAGE018
angle between two vectors P and N
Figure 2068DEST_PATH_IMAGE019
Comprises the following steps:
Figure 692812DEST_PATH_IMAGE020
when in use
Figure 853535DEST_PATH_IMAGE021
The backscatter intensity of the grid will not be calculated, and the surface of the fish opposite the camera, the illumination beam cannot reach.
4. According to claim 3The intelligent monitoring system for fish video identification is characterized in that the step 4 specifically comprises the following steps: calculation of backscattering intensity: when the light beam meets different objects, the light beam is back-scattered, the surface of the fish skin is rough, the roughness of the fish skin is less than the wavelength, and the back-scattering intensity is determined according to the Lambert rule
Figure 607252DEST_PATH_IMAGE022
Comprises the following steps:
Figure 119005DEST_PATH_IMAGE023
wherein,
Figure 285544DEST_PATH_IMAGE024
the scattering coefficient of the fish skin is shown.
5. The intelligent monitoring system for fish video identification according to claim 3, wherein the step 5 specifically comprises: according to the included angle
Figure 566353DEST_PATH_IMAGE019
Calculating the backscattering intensity of each grid on the surface of the three-dimensional fish model, wherein the backscattering intensity is represented by grid brightness, the higher the backscattering intensity is, the brighter the grid is, fixing the fish model at the original point, moving a camera around the fish model, and changing the space angle
Figure 479252DEST_PATH_IMAGE025
And
Figure 212722DEST_PATH_IMAGE026
the position of the camera is adjusted to change the backscattering intensity of the surface of the fish model; since the real video of the camera is a flat video, the new simulator must be able to generate a flat simulated video for comparison and matching with the real video, the camera being considered as a point and fixed at the origin, emitting a signal30 x 3, when the fish moves to the beam range, a planar analog video of the fish will be formed, and the resolution of the analog video can be adjusted.
6. The intelligent monitoring system for fish video identification according to claim 1, wherein step 11 specifically comprises: the cluster is composed of objects with close Euclidean spatial distance, and takes compactness and independence as a final target, and pixel groups in the video are assumed to be represented as follows:
Figure 510848DEST_PATH_IMAGE027
where N is the total number of pixels,
Figure 836044DEST_PATH_IMAGE028
randomly selecting k clustering centroids
Figure 928633DEST_PATH_IMAGE029
The colour similarity of two pixels being independent of the spatial position of the point
Figure 149399DEST_PATH_IMAGE030
The formula is calculated according to the principle of similar color values as follows:
Figure 657741DEST_PATH_IMAGE031
(ii) a The following formula is satisfied:
Figure 916071DEST_PATH_IMAGE032
wherein,
Figure 179562DEST_PATH_IMAGE033
represents a sample xiAnd the closest point between the k cluster centers,
Figure 887624DEST_PATH_IMAGE034
is the guess value of the center of the same type of sample, and each point is replaced by the center point of the cluster after the clustering is finished.
7. The intelligent monitoring system for fish video identification according to claim 1, wherein step 12 specifically comprises:
analyzing the influence of different channels on video brightness and contrast, randomly selecting a plurality of fish videos, carrying out channel separation operation on the fish videos, carrying out statistics on the average value of gray scale distribution of the different channels, generating an average normalized histogram aiming at the gray scale video of the R, G, B channel, obtaining the brightness and contrast characteristics of the different channels, and expressing the overall brightness by the peak value position of the histogram;
constructing a fish shoal color library according to the brightness contributions of different channels as
Figure 261974DEST_PATH_IMAGE035
The fish color library comprises three parts, L0The method is characterized in that only brightness information of an R channel video is reserved in a fish school color library; l is1Only the brightness information of the G channel video is reserved; l is2Only the brightness information of the B channel video is reserved; wherein,
Figure 561762DEST_PATH_IMAGE036
the range of gray values in the library is 0, 255]The gray level compensation for the remaining two channels is zero, and the following table shows
Figure 996154DEST_PATH_IMAGE036
Color information in the library, wherein R _ P represents the gray value of the R channel pixel, G _ P represents the value of the G channel, and B _ P represents the B channel;
Figure 191512DEST_PATH_IMAGE037
8. the intelligent monitoring system for fish video identification according to claim 1, wherein step 13 specifically comprises: step 13.1, randomly selecting k samples from the data set as initial clustering centers;
Figure 384201DEST_PATH_IMAGE038
wherein,
Figure 286298DEST_PATH_IMAGE039
represents the center of a cluster that is randomly selected,
Figure 891591DEST_PATH_IMAGE040
a set representing a cluster center;
step 13.2, for each sample x in the datasetiCalculating the distances from the k clustering centers to the k clustering centers, and dividing the distances into categories corresponding to the clustering centers with the minimum distances;
step 13.3, for each OiThe class, its cluster center is calculated as follows:
Figure 308666DEST_PATH_IMAGE041
wherein the sample set is xiN, N being the total number of pixels;
and step 13.4, returning to the step 13.2 until the cluster center is not changed any more.
9. The intelligent monitoring system for fish video identification according to claim 1, wherein step 14 specifically comprises: step 14.1, generating a characteristic video;
in the RGB color space, the channel with the maximum average brightness in the three channels of videos is taken as a target channel, other channels with lower brightness are compensated to be zero, the generated new video replaces the original video, and three components of the color video are represented in a vector form:
Figure 293327DEST_PATH_IMAGE042
Figure 112248DEST_PATH_IMAGE043
is the pixel value of an arbitrary point, where (x, y) represents the position coordinate, R (x, y) is the luminance value of the pixel point of the R channel (x, y), G (x, y) represents the luminance value of the G channel, and B (x, y) represents the luminance value of the pixel point of the B channel (x, y); separating channels of the three-color video, keeping the channel characteristics with the maximum average brightness, keeping the rest compensation to be zero, representing the generated characteristic video by Seg (x, y),
Figure 75393DEST_PATH_IMAGE044
wherein
Figure 248273DEST_PATH_IMAGE045
Representing the original video, MiIs a different compensation operation, M0Indicating that the brightness information of the R channel is reserved, and the rest is zero; m1Indicating that the brightness information of the G channel is reserved, and the rest is zero; m2Indicating that the brightness information of the B channel is reserved, and the rest is zero;
step 14.2, determining a clustering value;
step 14.3, selecting a color library;
by pairs
Figure 768116DEST_PATH_IMAGE046
Analyzing the brightness of different channels, and generating a new color compensation video Seg (x, y) to replace an original video by adopting different color compensation methods;
if i =0, it is indicated as passing
Figure 441543DEST_PATH_IMAGE047
Color compensation of the operation, the resulting video will be color clusters of the R library,
Figure 654219DEST_PATH_IMAGE048
if i =1, it is indicated as passing
Figure 48815DEST_PATH_IMAGE049
Color compensation of the operation, the generated video is color clustering through a G library,
Figure 44453DEST_PATH_IMAGE050
if i =2, indicate passing
Figure 837966DEST_PATH_IMAGE051
Color compensation of the operation, the generated video is clustered by colors of a B library,
Figure 221542DEST_PATH_IMAGE052
step 14.4, clustering the colors of the videos,
according to the determined clustering value K and the fish color library as
Figure 826137DEST_PATH_IMAGE035
Clustering videos from a clustered color library
Figure 953362DEST_PATH_IMAGE053
Randomly selecting sample points as initial clustering centers
Figure 601381DEST_PATH_IMAGE054
And the remaining cluster centers satisfy the following condition:
Figure 80160DEST_PATH_IMAGE055
calculate each sample point at
Figure 446420DEST_PATH_IMAGE053
And
Figure 111756DEST_PATH_IMAGE054
the probability is as follows:
Figure 551965DEST_PATH_IMAGE056
wherein,
Figure 280274DEST_PATH_IMAGE057
selecting a point with the highest probability as the next initial clustering center from the distance from each sampling point to the nearest center, and repeating the step 14.4 until k initial centers are selected;
Figure 868250DEST_PATH_IMAGE058
is a sample point located in the color library; and segmenting the video image according to the k initial centers to further obtain the number of fishes in the video.
10. The intelligent monitoring system for fish video identification according to claim 9, wherein step 14.2 is specifically:
step 14.2.1, the gray interval is set,
setting the gray level video of the fish school after color compensation as gradient (x, y), wherein (x, y) is the space coordinate of the pixel, comprising
Figure 524228DEST_PATH_IMAGE059
The video is divided into T gray intervals according to the gray levels to form a new pixel space R' represented as:
Figure 149769DEST_PATH_IMAGE060
,
for each small gray interval, the number of pixels is:
Figure 780471DEST_PATH_IMAGE061
wherein R' is the new pixel space, | represents
Figure 121322DEST_PATH_IMAGE062
And
Figure 128461DEST_PATH_IMAGE063
the norm of the sum of the number of pixels in the gray scale interval of (a),
Figure 557911DEST_PATH_IMAGE064
means a gray value of
Figure 359513DEST_PATH_IMAGE065
(x, y) are the spatial coordinates of the pixel,
Figure 922082DEST_PATH_IMAGE066
to represent
Figure 732912DEST_PATH_IMAGE062
And
Figure 67466DEST_PATH_IMAGE063
the number of pixels between the gray scale intervals of (a);
step 14.2.2, traversing the pixels, calculating the total number of pixels in each gray scale interval, and selecting any pixel
Figure 305549DEST_PATH_IMAGE067
Calculating the total number of pixels in the gray scale interval according to the formula, and calculating the total number of pixels in each gray scale intervalPercentage of number, use
Figure 542364DEST_PATH_IMAGE068
Denotes, T =1, 2, 3.. T,
Figure 894236DEST_PATH_IMAGE069
where (x, y) is the spatial coordinate of the pixel,
Figure 345946DEST_PATH_IMAGE070
to represent
Figure 754930DEST_PATH_IMAGE062
And
Figure 26511DEST_PATH_IMAGE063
n is the total number of pixels in the video, t is a positive integer;
step 14.2.3, sorting the pixel distribution probability value of each gray scale interval in the step 14.2.2, and setting the reference probability value asP 0 By traversing the probability value of each pixel distribution, the probability distribution value satisfying the following equation is found
Figure 182074DEST_PATH_IMAGE068
:
Figure 425973DEST_PATH_IMAGE071
The clustering value K is determined as follows:
Figure 5859DEST_PATH_IMAGE072
where (x, y) is the spatial coordinate of the pixel,
Figure 30316DEST_PATH_IMAGE070
to represent
Figure 712271DEST_PATH_IMAGE062
And
Figure 872994DEST_PATH_IMAGE063
and N is the total number of pixels in the video.
CN202011564844.0A 2020-12-25 2020-12-25 Intelligent supervisory system for fish video identification Active CN112287913B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011564844.0A CN112287913B (en) 2020-12-25 2020-12-25 Intelligent supervisory system for fish video identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011564844.0A CN112287913B (en) 2020-12-25 2020-12-25 Intelligent supervisory system for fish video identification

Publications (2)

Publication Number Publication Date
CN112287913A CN112287913A (en) 2021-01-29
CN112287913B true CN112287913B (en) 2021-04-06

Family

ID=74426356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011564844.0A Active CN112287913B (en) 2020-12-25 2020-12-25 Intelligent supervisory system for fish video identification

Country Status (1)

Country Link
CN (1) CN112287913B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966698A (en) * 2021-03-23 2021-06-15 西安电子科技大学 Freshwater fish image real-time identification method based on lightweight convolutional network
CN115690570B (en) * 2023-01-05 2023-03-28 中国水产科学研究院黄海水产研究所 Fish shoal feeding intensity prediction method based on ST-GCN
CN117274651B (en) * 2023-11-17 2024-02-09 北京亮道智能汽车技术有限公司 Object detection method and device based on point cloud and computer readable storage medium
CN118314407A (en) * 2024-06-05 2024-07-09 中国水产科学研究院珠江水产研究所 Shrimp sorting optimization method and system based on biological characteristics

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493524A (en) * 2009-02-19 2009-07-29 浙江海洋学院 Sonar detecting method for large yellow croaker escaping from deep water net cage and special equipment thereof
CN109064497A (en) * 2018-07-16 2018-12-21 南京信息工程大学 A kind of video tracing method based on color cluster accretion learning

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101753101B1 (en) * 2015-11-28 2017-07-03 계명대학교 산학협력단 Automatic source classification method and apparatus using mean-shift clustering and stepwise merging in color image
CN106997592A (en) * 2017-03-30 2017-08-01 鲁东大学 Fuzzy clustering medical image cutting method with real-time
CN109784378A (en) * 2018-12-27 2019-05-21 南京芊玥机器人科技有限公司 A kind of underwater fishing method based on machine vision
CN111401308B (en) * 2020-04-08 2023-03-24 蚌埠学院 Fish behavior video identification method based on optical flow effect
CN112102288B (en) * 2020-09-15 2023-11-07 应急管理部大数据中心 Water body identification and water body change detection method, device, equipment and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493524A (en) * 2009-02-19 2009-07-29 浙江海洋学院 Sonar detecting method for large yellow croaker escaping from deep water net cage and special equipment thereof
CN109064497A (en) * 2018-07-16 2018-12-21 南京信息工程大学 A kind of video tracing method based on color cluster accretion learning

Also Published As

Publication number Publication date
CN112287913A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
CN112287913B (en) Intelligent supervisory system for fish video identification
WO2022121645A1 (en) Method for generating sense of reality of virtual object in teaching scene
US20180225539A1 (en) Systems and methods for extracting information about objects from scene information
KR101555347B1 (en) Apparatus and method for generating video-guided facial animation
US20190087985A1 (en) Differentiable rendering pipeline for inverse graphics
CN114155299B (en) Building digital twinning construction method and system
CN108648269A (en) The monomerization approach and system of three-dimensional building object model
Poux et al. Unsupervised segmentation of indoor 3D point cloud: Application to object-based classification
CN105631892B (en) It is a kind of that detection method is damaged based on the aviation image building of shade and textural characteristics
AU2014241771A1 (en) Mapping augmented reality experience to various environments
CN110378997A (en) A kind of dynamic scene based on ORB-SLAM2 builds figure and localization method
CN110379020A (en) A kind of laser point cloud painting methods and device based on generation confrontation network
CN111753698A (en) Multi-mode three-dimensional point cloud segmentation system and method
CN113538574B (en) Pose positioning method, device and equipment and computer readable storage medium
CN107871143B (en) Image-recognizing method and device, computer installation and computer readable storage medium
CN115035260A (en) Indoor mobile robot three-dimensional semantic map construction method
Pound et al. A patch-based approach to 3D plant shoot phenotyping
Li Film and TV animation production based on artificial intelligence AlphaGd
CN112102480A (en) Image data processing method, apparatus, device and medium
CN115937461B (en) Multi-source fusion model construction and texture generation method, device, medium and equipment
Ishikawa et al. Semantic segmentation of 3D point cloud to virtually manipulate real living space
Zhang et al. 3D viewpoint estimation based on aesthetics
CN105957148A (en) Granularity balance data organization method of complicated three-dimensional building model
CN117496086A (en) Indoor geometric reconstruction method for semantic perception
CN107909111A (en) A kind of multilevel scheme clustering method of settlement place polygon

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