CN116883483A - Fish body measuring method based on laser camera system - Google Patents

Fish body measuring method based on laser camera system Download PDF

Info

Publication number
CN116883483A
CN116883483A CN202310958533.XA CN202310958533A CN116883483A CN 116883483 A CN116883483 A CN 116883483A CN 202310958533 A CN202310958533 A CN 202310958533A CN 116883483 A CN116883483 A CN 116883483A
Authority
CN
China
Prior art keywords
fish
laser
camera
distance
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310958533.XA
Other languages
Chinese (zh)
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.)
East China Sea Fishery Research Institute Chinese Academy of Fishery Sciences
Original Assignee
East China Sea Fishery Research Institute Chinese Academy of Fishery Sciences
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 East China Sea Fishery Research Institute Chinese Academy of Fishery Sciences filed Critical East China Sea Fishery Research Institute Chinese Academy of Fishery Sciences
Priority to CN202310958533.XA priority Critical patent/CN116883483A/en
Publication of CN116883483A publication Critical patent/CN116883483A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Geometry (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application discloses a fish body measuring method based on a laser camera system, which utilizes laser triangulation distance measurement to calculate a baseline distance between two points on a plane, uses the baseline distance as a baseline for subsequent comparison, combines detection and segmentation into a yolov7 model backbone to realize image example segmentation of fish bodies and laser lines, designs full-connection regression and a DSNT-MobileFaceneT-based characteristic point detection network to detect six characteristic points of fish objects, calculates a two-dimensional gesture of the fish objects according to the relative positions of the characteristic points, deduces distance information from the position of the fish if a laser line exists on the fish body, and calculates morphological information such as body length, fork length and body width by combining the characteristic point information. The application can be applied to the health monitoring of aquaculture, realizes the targets of fish and laser line detection, target segmentation, fish characteristic point detection, measurement of morphological data such as fish length, fork length, body width and the like, and shows practical application potential.

Description

Fish body measuring method based on laser camera system
Technical Field
The application relates to the technical field of underwater object measurement, in particular to a fish body measurement method based on a laser camera system.
Background
Research on fish measurement is focused on scientifically measuring fish parameters to understand their morphological characteristics. The measurement of fish includes a number of aspects such as length, weight, gill, muscle and organs. Among these, length information is the oldest and most widely used method in fish measurement research. The data obtained from these measurements provide the basic information for studying fish ecology, behavior, taxonomy and evolutionary biology.
Fish measurement in fish farming is critical to effective fish health assessment. However, the current industry relies heavily on manual measurements, which are time consuming, labor intensive, and potentially harmful to fish. Under the promotion of the progress of the image processing technology, the method based on computer vision brings great prospect for fish measurement.
Disclosure of Invention
The invention provides a fish body measuring method based on a laser camera system, which is a fish body condition assessment and morphological data measuring system based on a laser camera and is used for measuring farmed fish in aquaculture.
A fish body measuring method based on a laser camera system utilizes laser triangulation to calculate a baseline distance between two points on a plane as a baseline for subsequent comparison, realizes image example segmentation of fish bodies and laser lines by combining detection and segmentation into a yolov7 model backbone, designs full connection regression and a DSNT-MobileFaceneT-based characteristic point detection network to detect six characteristic points of fish objects, calculates a two-dimensional gesture of the fish objects according to the relative positions of the characteristic points, deduces distance information from the position of the fish if one laser line exists on the fish body, and calculates morphological information such as body length, fork length and body width by combining the characteristic point information, wherein hardware comprises a camera and a laser emitter for data acquisition, and specifically comprises the following three operation steps:
(1) Defining six characteristic points, providing a six characteristic point definition scheme specially designed for fish bodies, and realizing a characteristic point detection network by using a MobileFaceNet module and a DSNT module in order to detect the characteristic points;
(2) Providing a fish body and laser line target detection data set, wherein the fish body and laser line target detection data set is a comprehensive data set, and the fish body and laser line target detection and segmentation are realized on a laser camera system;
(3) A laser camera system for measuring fish body is provided, which can measure the posture, length, width and fork length of fish body, and comprises target detection, target segmentation, feature point detection, posture calculation and morphological data calculation.
Further, the two cameras are respectively an upper camera and a lower camera, the two cameras are arranged to double the collected data amount in the same time, the coverage rate of the data is increased at different angles and positions, and the cameras are combined with the cameras by laser triangulation to obtain complete information including distance.
Further, the laser transmitter for data acquisition includes a data acquisition device consisting of a polyvinyl chloride pipe, a t-junction and a cross structure, two underwater Ha Kesi te HK90A cameras equipped with six high-power white lamps for night use, an RJ45 network interface, and supporting a free network, a waterproof laser transmitter of the same straight line shape customized at the factory fixed in a frame, and a line of length 2 meters at a distance of 2 meters from the target is created.
Further, the fish including eight edible fishes including snakehead, catfish and crucian were purchased from a local market and kept in a circular pool of 2 meters in diameter, and for monitoring the survival of the fish and collecting data, a data acquisition system was placed in the pool, and morphological measurements of the 8 fishes were recorded manually and used as reference values for subsequent experiments.
Further, the data collection adopts a computer vision method based on the traditional laser triangulation and laser triangulation principle for fish measurement and physical condition monitoring, including fish target extraction and laser line, and fish characteristic point extraction, so that the quality of data can significantly affect the whole experiment, since a wide-angle camera is used for capturing the whole situation in a propagation pool, the collected image can have wide-angle distortion to a certain extent due to the existence of the camera, after a sufficient amount of representative data is collected, the wide-angle image needs to be corrected first, a target detection segmentation data set and a characteristic point extraction data set can be created after the correction is completed, in order to correct the distorted image, a chessboard calibration method is adopted, one wide-angle camera captures the distorted image, the internal parameter matrix and the distortion coefficient of the camera are calculated through an imaging calibration plate, and all the collected images are corrected, so that the data processing is completed.
Further, the data processing includes a target detection segmented data set, a feature point detection data set, the target detection segmented data set creating two data sets using the corrected image: the method comprises the steps of marking an object segmentation dataset, extracting a minimum rectangular frame containing left and right points from the object segmentation dataset, manually marking fish and laser lines in a representative subset of 298 images, uniformly marking all fish as 'fish', marking the laser lines as 'light', enhancing the marked image by using a method of shearing, gray scale, tone, brightness and the like in order to improve the final generalization capability of the model from the angle of data, wherein the shearing range is 15 degrees in horizontal + -15 degrees, 15 degrees in vertical + -15 degrees, the gray scale of the image is applied to 25 degrees, the hue range is between-41 degrees and +41 degrees, the brightness range is between-30 percent and +30 percent, dividing the enhanced dataset into a training set, a verification set and a test set, and the characteristic point detection dataset, wherein the characteristic point detection dataset of fish is possibly applied to the fields of fish body posture monitoring, health monitoring and the like, and a fish characteristic point standard consisting of 6 key points is provided.
Further, six feature points a-F, which are markers of a general fish species, the distance between points a and D representing the fork length, and the total length being defined as the distance between points C and E, and furthermore, the body width being the distance between points B and F, the relative positions of the six feature points effectively reflecting the body shape of the fish, the creation process of the dataset comprising three main steps, initially, cutting out the smallest rectangular box of all fish according to the target detection and annotation in the segmentation dataset, then, manually labeling all fish feature points using an open source tool imgca, whereby the resulting six feature points are then arranged in a specific order, finally, converting the XML format tag file into a TXT format tag file, each row representing one containing 17 elements, separated by commas, the first element representing the file name, the next four elements representing the starting coordinates (x, y) and width and height (w, h) of the rectangular box, the last 12 elements representing the coordinates of the 6 feature point feature-like building, ensuring that the quality of the feature points is excluded from the dataset, since the feature points are not significant for the image set of 8, and then the feature points are not found in the image set because the feature points are not significant for the image set of the feature points: 1:1 into training, validation and test sets, similar to the target detection and segmentation dataset, 631 cropped fish images were obtained from the captured dataset based on the extracted data preview, however, the size of this dataset was relatively small for accurate feature point detection, and furthermore, by manual observation, some of the 631 images exhibited blurred, unclear, etc. features, in order to address these limitations and enhance the generalization ability of the model, various data enhancement techniques were applied, including random scale, random translation, random shearing, random masking, random blurring, random brightness, random rotation, and random center cropping, each of which was performed within 0.5 and a specific parameter range.
Further, to verify the effect of data enhancement on training results, the enhanced data set is compared to the original data set and comparedThe experiment, measure the form of fish in the aquaculture pond with the laser triangulation method, the laser triangulation method is a commonly used distance measurement method which utilizes the propagation characteristic of the laser beam in the space, can calculate the distance between the object and the measuring device by measuring the laser signal reflected from the object, this distance measurement method is widely applied to various fields such as industry, military, geological exploration, etc., the principle of the laser triangulation is based on the geometric shape of triangle, the measuring device emits a laser beam to the object, this laser beam contacts with the surface of the object, and is reflected back to the measuring device, through controlling the emission angle of the laser beam and the angle of the measuring device receiving the reflected laser, can obtain two inner angles and one side length of triangle, according to the geometric shape of triangle, it is possible to calculate the distance between the target object and the measuring device, when the laser emitted laser is directed towards the target object Obj1, it forms a spot P on the object surface, which spot P is then reflected back to the camera and finally forms a spot P ' on the imaging surface, when the object Obj1 is moved to the position of Obj2, the imaging position of spot Q is also moved to Q ', so that when the distance between the object and the laser is changed from d1 to d2, the corresponding spot on the imaging surface is also subjected to displacement of deltad, in fact, there is an inherent relation between these two variables, the laser emitted by the laser device forms a spot P on the object Obj and the angle of the laser to the vertical direction of the spot P ' mapped onto the imaging surface (N) of the camera is alpha, on the imaging surface the spot Q is located with the line QN parallel to the line AP, delta QNP-deltaapn and the vertical line of the similar triangle, the result is q/s=f/x, since x is composed of x 1 and x2 And the focal length f of the camera is generally known, x1 can be calculated from the focal length and angles α and x 2 It should be determined according to the size of each pixel in the image and the position of P' relative to the center of the image, and thus the distance d between the laser and the object can be calculated by equation (1):
s is the side length of each square pixel on the imaging surface in the final generated image, in cm/pixel, and P Center of the machine Is the pixel distance from the mapping point of the target point on the imaging surface to the center of the image in a certain direction, f represents the focal length of the camera in pixels, s represents the distance between the laser emitter and the camera lens (in the experiments designed herein, the laser emitter and the camera lens remain on the same vertical line), q represents the distance from the target point P to the line where the laser emitter and the camera are located, f, s and q are all in centimeters for ease of calculation, equation (1) shows that the distance of the laser from a certain point on the object can be calculated from five variables of f, s, α, s Pixel arrangement and PCenter of the machine Where f is a camera parameter, which can be derived from hardware specifications or settings, and the other four variables can be measured.
Laser triangulation is a well-established traditional technique that has been widely used in many fields. However, there is little application in aquaculture and offshore fishery, one of the main reasons being that fishery is more concerned with information such as body length, fork length, body width, etc. than distance, and for aquaculture, fish body shape and health are valuable information, and for better use of laser triangulation of fish, two optimizations have been made, the first of which is to reposition the laser transmitter from the traditional "I" shape to the center of rotation of the system, thereby reducing the relative movement speed of the laser transmitter and water, and thus reducing turbulence effects. The second optimization is to extend the laser triangulation from distance measurement to length property measurement of the object, in fig. 5 (b), the distance between points P and N can be obtained from the relationship between Δapo and Δapn, as shown in equation (2), in addition to calculating the distance d of the laser transmitter to the target Obj according to equation (1):
the distance between the point P and the point N plays a vital role in measuring the fish morphology, the optimized line-type laser is fixed on the bracket and emits the laser beam on the plane, the point M and the point N in the figure represent the head and tail of a fish respectively, the point D is the midpoint of the laser beam and the line of the camera is perpendicular to the NM line because the laser beam precisely hits the fish between the point M and the point N and reflects to the camera, two different light points are formed on the imaging plane of the camera, the lengths of AN and AM can be calculated by using the laser triangulation method and the formula (2), the point D can be introduced on the plane of the Δamn, the line AD is perpendicular to the line NM, the relationship between the point D and the line MN affects the calculation of the length of the line NM (the length of the target fish), but since the laser emitter and the camera are kept on the same perpendicular line, the midpoint of the laser beam and the line of the camera are perpendicular to the NM line, and the point D is the midpoint of the laser beam, the relationship between the point D and the line MN may be two cases: when the point D is not on the MN (fig. 6 (b)), and when the point D is on the MN (fig. 6 (c)), the calculation formula of the length in both cases is formula (3):
wherein , and d2 Representing the distance between the laser transmitter and points M and N, respectively.
Further, the method for measuring fish morphology data by combining a deep learning method with laser detection comprises four substeps, wherein the position of a laser line in a captured image changes along with the change of the position of a target object relative to a camera, and a deterministic relationship is followed, so that optical calibration is crucial for establishing the relationship between the position of the laser line and the actual distance; the second step is focused on detecting the fish in the image and the laser emitted by the laser emitter, and the mature technology in the field of deep learning target detection can be used for completing the step, and in addition, the image segmentation can be used for improving the precision and refining; in a third step, key points (characteristic points) of the detected fish are extracted, the characteristic points being reference points for measuring morphological data of the fish, wherein pixel distances between different characteristic points represent pixel-based representations of the morphological data; finally, based on the results of the first three steps, an algorithm for accurately calculating the fish morphology data is provided.
Further, after completing the processes of fish and laser line detection and fish characteristic point detection, basic data for measuring the posture and morphological characteristics of the fish are obtained, for each processed image, all the existing fish are first identified using a target detection model, then characteristic points on each fish are detected using a characteristic point detection model, then, whether one laser line is present on each fish is determined, if no laser line is detected, the two-dimensional body posture of the fish is calculated from the relative positions of the characteristic points, however, if one laser line is detected, the positions of the fish head and the fish tail relative to the camera are determined, so that the z-axis position and measured values such as body length, fork length and body width can be calculated, and finally, the two-dimensional body posture and three-dimensional morphological information are noted on the image.
The beneficial effects are that: the fish body measuring method based on the laser camera system can be applied to health monitoring of aquaculture. In the system, targets such as fish and laser line detection, target segmentation, fish characteristic point detection, measurement of morphological data such as fish length, fork length, body width and the like are realized, and obvious practical application potential is shown.
Drawings
FIG. 1 is a schematic diagram of a hardware device for data acquisition.
Fig. 2 is a schematic diagram of distortion correction of a wide-angle image.
Fig. 3 is a standard schematic diagram of the marking of fish characteristic points with 6 points.
Fig. 4 is a schematic diagram illustrating a data enhancement technique of a feature point data set.
Fig. 5 is a schematic diagram of laser triangulation ranging.
Fig. 6 is a schematic illustration of object size measurement based on laser triangulation.
Fig. 7 is a computational schematic of body posture and morphology data.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the attached drawings: the present embodiment is implemented on the premise of the technical scheme of the present application, and a detailed implementation manner and a specific operation process are provided, but the protection scope of the present application is not limited to the following embodiments.
As shown in fig. 1-7, a fish body measurement method based on a laser camera system uses laser triangulation to calculate a baseline distance between two points on a plane, uses the laser triangulation as a baseline for subsequent comparison, and combines detection and segmentation into a yolov7 model backbone to realize image example segmentation of a fish body and laser lines, designs full-connection regression and a DSNT-MobileFaceNet-based feature point detection network to detect six feature points of a fish body target, calculates a two-dimensional gesture of the fish body target according to the relative positions of the feature points, deduces distance information from the position of the fish body if one laser line exists on the fish body, and calculates morphological information of body length, fork length and body width by combining the feature point information, wherein hardware comprises a camera and a laser emitter for data acquisition, and specifically comprises the following three operation steps:
(1) Defining six characteristic points, providing a six characteristic point definition scheme specially designed for fish bodies, and realizing a characteristic point detection network by using a MobileFaceNet module and a DSNT module in order to detect the characteristic points;
(2) Providing a fish body and laser line target detection data set, wherein the fish body and laser line target detection data set is a comprehensive data set, and the fish body and laser line target detection and segmentation are realized on a laser camera system;
(3) A laser camera system for measuring fish body is provided, which can measure the posture, length, width and fork length of fish body, and comprises target detection, target segmentation, feature point detection, posture calculation and morphological data calculation.
The cameras comprise two cameras, namely an upper camera and a lower camera, the two cameras are arranged to increase the collected data volume by one time in the same time, the coverage rate of the data is increased at different angles and positions, and the cameras are combined with the cameras by using laser triangulation to obtain complete information including distance.
Fig. 1a laser transmitter for data acquisition includes a data acquisition device consisting of a polyvinyl chloride pipe, a t-junction and a cross structure, two underwater Ha Kesi te HK90A cameras equipped with six high-power white lamps for night use, RJ45 network interfaces and supporting free networks, a waterproof laser transmitter of the same straight line shape customized at a factory fixed inside a frame, creating a line of 2 meters in length at a distance of 2 meters from the target, fig. 1 b), (1 c) and (1 d) show front, side and top views of the apparatus, respectively, the bottom of the frame having a body length of 380 mm, a body width of 298 mm, a height of 638.5 mm, camera 1 (upper camera) being inclined downward 20 degrees from the horizontal direction, and camera 2 (lower camera) being inclined downward 10 degrees from the horizontal direction. Fish including eight edible fish, including snakehead, catfish and crucian, were purchased from a local market and kept in a circular pool of 2 meters in diameter, and a data acquisition system was placed in the pool for monitoring fish survival and collecting data, as shown in figure 1. The morphological measurements of these 8 fish were recorded manually and used as reference for subsequent experiments of the application, as shown in table 1.
TABLE 1 morphological data of farmed fish
The data collection adopts a computer vision method based on the traditional laser triangulation and laser triangulation principle, is used for fish measurement and physical condition monitoring, comprises fish target extraction and laser line and fish characteristic point extraction, so that the quality of the data can obviously influence the whole experiment, the whole condition in a propagation pool is captured by using a wide-angle camera, the collected image can have wide-angle distortion to a certain extent due to the existence of the camera, after a sufficient amount of representative data is collected, the wide-angle image needs to be corrected first, a target detection segmentation data set and a characteristic point extraction data set can be created after the correction is completed, in order to correct the distorted image, a chessboard calibration method is adopted, one wide-angle camera captures the distorted image under laboratory conditions, the internal parameter matrix and the distortion coefficient of the camera are calculated through an imaging calibration plate, and all the collected images are corrected by using the collected data, so that the data processing is completed. As shown in fig. 2.
The data processing includes an object detection segmented data set, a feature point detection data set, the object detection segmented data set creating two data sets using the corrected image: the method comprises the steps of marking an object segmentation dataset, wherein the object segmentation dataset comprises a minimum rectangular frame with left and right points, the object segmentation dataset can be used for a target detection network such as YOLO, marking fish and laser lines in a representative subset of 298 images, uniformly marking all fish as fish, marking the laser lines as light, enhancing the marked images by using methods such as shearing, gray scale, tone, brightness and the like in order to improve the final generalization capability of the model from the angle of data, wherein the shearing range is 15 degrees horizontally and 15 degrees vertically, the gray scale of the images is applied to 25 degrees and the hue range is between-41 degrees and +41 degrees, the brightness range is between-30 percent and +30 percent, the enhanced datasets are divided into a training set, a verification set and a test set, and the distribution of the images and the labels in each dataset is shown in Table 2; the characteristic point detection data set is possibly applied to the fields of fish body posture monitoring, health monitoring and the like, and the application provides a fish characteristic point annotation standard consisting of 6 key points, as shown in fig. 3.
Table 2. Distribution of images and labels in the target detection and segmentation dataset.
Fig. 3 shows six characteristic points a-F as markers of a general fish species, the distance between points a and D representing the fork length, and the total length being defined as the distance between points C and E, and furthermore, the body width being the distance between points B and F, the relative positions of the six characteristic points effectively reflecting the body shape of the fish, the creation process of the dataset comprising three main steps, initially, based on the target detection and annotation in the segmentation dataset, clipping the smallest rectangular box of all fish, then, using the open source tool imgca, manually labeling all fish characteristic points according to the criteria in fig. 3, whereby the resulting six characteristic points are then arranged in a specific order, finally, converting the XML format tag file into a TXT format tag file, each row representing one containing 17 elements separated by commas, the first element representing the file name, the next four elements representing the starting coordinates (x, y) and the width and height (w, h) of the rectangular box, and finally 12 elements representing 6 characteristic points of the building coordinates, the image being no more than half the image quality of the feature points, since the image is not visible in order that the image is not visible for the feature set of the image, the image is created for the image of the feature points of the feature set of the fish, the image is no more than half of the image quality: 1:1 into training, validation and test sets, similar to the target detection and segmentation dataset, 631 cropped fish images were obtained from the captured dataset based on the extracted data preview, however, the size of this dataset was relatively small for accurate feature point detection, and furthermore, by manual observation, some of the 631 images exhibited blurred, unclear, etc. features, in order to address these limitations and enhance the generalization ability of the model, various data enhancement techniques were applied, including random scale, random translation, random shearing, random masking, random blurring, random brightness, random rotation, and random center cropping, each of which was performed within 0.5 and specific parameters, as shown in fig. 4.
The first column of fig. 4 shows 5 image samples randomly selected from the feature point data set, each row in the figure corresponding to a preview obtained after application of a respective enhancement operation. The last column (RA) shows preview images generated by randomly combining all data enhancement methods, each with a probability of 0.5, with the sample size increasing to 6310 by the addition of data, this enhanced dataset being 8:1:1 is divided into training, verifying and testing sets, in order to examine the influence of data enhancement on training results, the enhanced data set is compared with the original data set, and a comparison experiment is carried out, the morphology of fish in the aquaculture pond is measured by a laser triangulation method, and the laser triangulation method is utilizedThe distance measuring method is widely applied to various fields of industry, military, geological exploration and the like, and the principle of laser triangulation is based on the geometric shape of a triangle, the measuring device emits a laser beam to the target object, the laser beam contacts with the surface of the target object and is reflected back to the measuring device, the two inner angles and the length of one side of the triangle can be obtained by controlling the emitting angle of the laser beam and the angle of the measuring device for receiving the reflected laser, the distance between the target object and the measuring device can be calculated according to the geometric shape of the triangle, as shown in a figure (5 a), when the laser light emitted from the laser is directed to the target object Obj1, it forms a spot P on the object surface, which is then reflected back to the camera and finally forms a spot P 'on the imaging surface, when the object Obj1 is moved to the position of Obj2, the imaging position of spot Q is also moved to Q', so that when the distance between the object and the laser light is changed from d1 to d2, the corresponding spot on the imaging surface is also subjected to displacement by Δd, in fact, there is an inherent relationship between these two variables, as shown in fig. 5b, the laser light emitted from the laser device forms a spot P on the object Obj and is mapped to the camera imaging surface (N) at an angle a between the laser light and the vertical, on the imaging surface, the spot Q is located parallel to the line AP with the corresponding edge Δ QNP- Δapn and the similar triangle, resulting in Q/s=f/x, because x is composed of x 1 and x2 And the focal length f of the camera is generally known, x1 can be calculated from the focal length and angles α and x 2 It should be determined according to the size of each pixel in the image and the position of P' relative to the center of the image, and thus the distance d between the laser and the object can be calculated by equation (1):
s is each square on the imaging surface in the final generated imageSide length of pixel in cm/pixel, and P Center of the machine Is the pixel distance from the mapping point of the target point on the imaging surface to the center of the image in a certain direction, f represents the focal length of the camera in pixels, s represents the distance between the laser emitter and the camera lens (in the experiments designed herein, the laser emitter and the camera lens remain on the same vertical line), q represents the distance from the target point P to the line where the laser emitter and the camera are located, f, s and q are all in centimeters for ease of calculation, equation (1) shows that the distance of the laser from a certain point on the object can be calculated from five variables of f, s, α, s Pixel arrangement and PCenter of the machine Where f is a camera parameter, which can be derived from hardware specifications or settings, and the other four variables can be measured.
Laser triangulation is a well-established traditional technique that has been widely used in many fields. However, there is little application in aquaculture and offshore fishery, one of the main reasons being that fishery is more concerned with information such as body length, fork length, body width, etc. than distance, and for aquaculture, fish body shape and health are valuable information, and for better use of laser triangulation of fish, two optimizations have been made, the first of which is to reposition the laser transmitter from the traditional "I" shape to the center of rotation of the system, thereby reducing the relative movement speed of the laser transmitter and water, and thus reducing turbulence effects. The second optimization is to extend the laser triangulation from distance measurement to length property measurement of the object, in which in fig. 5b, the distance between points P and N can be obtained from the relationship between Δapo and Δapn, as shown in equation (2), in addition to calculating the distance d of the laser transmitter to the target Obj according to equation (1):
the distance between the point P and the point N plays a vital role in measuring the morphology of fish, as shown in fig. 6a, the optimized line-type laser is fixed on a support and emits a laser beam on a plane, the point M and the point N in the figure represent the head and tail of one fish respectively, assuming that the laser beam hits the fish between the point M and the point N precisely and reflects onto the camera, two different light spots are formed on the imaging plane of the camera, using the laser triangulation method and formula (2), the lengths of AN and AM can be calculated, on the plane of Δamn, a point D can be introduced such that the line AD is perpendicular to the line NM, the relationship between the point D and the line MN affects the calculation of the length of the line NM (the length of the target fish), but since the laser emitter and the camera remain on the same perpendicular line, the point D is perpendicular to the NM line, the relationship between the point D and the line MN may be two cases: plot (6 b) when point D is not on MN, and plot (6 c) when point D is on MN, the calculation formula of the length in both cases is formula (3):
wherein , and d2 Representing the distance between the laser transmitter and points M and N, respectively, the other variables corresponding to figure 5b,
the position of the laser line in the captured image varies with the position of the target object relative to the camera, following a deterministic relationship, and therefore optical calibration is critical to establishing a relationship between the position of the laser line and the actual distance; the second step is focused on detecting the fish in the image and the laser emitted by the laser emitter, and the mature technology in the field of deep learning target detection can be used for completing the step, and in addition, the image segmentation can be used for improving the precision and refining; in a third step, key points (characteristic points) of the detected fish are extracted, the characteristic points being reference points for measuring morphological data of the fish, wherein pixel distances between different characteristic points represent pixel-based representations of the morphological data; finally, based on the results of the first three steps, an algorithm for accurately calculating the fish morphology data is provided.
After completing the processes of fish and laser line detection and fish characteristic point detection, basic data for measuring the posture and morphological characteristics of the fish are obtained, for each processed image, all existing fish are first identified using a target detection model, then characteristic points on each fish are detected using a characteristic point detection model, then, whether one laser line is present on each fish is determined, if no laser line is detected, the two-dimensional body posture of the fish is calculated from the relative positions of the characteristic points, however, if one laser line is detected, the positions of the fish head and the fish tail relative to the camera are determined, so that the position and measured values of the z-axis, such as the body length, fork length and body width, can be calculated, and finally, the two-dimensional body posture and three-dimensional morphological information are noted on the image, as shown in fig. 7.
Fig. 7 shows an automatic calculation map (7 a) of body posture and morphology data when the body of the fish intersects the laser line. In the case where the laser line is not projected onto the body of the fish, fig. 7b and 7c show the determination of the two-dimensional body posture.
Table 3 compares the morphological data of 8 edible fish observed in the experiment. The columns LT (laser triangulation), DL (deep learning), and tag correspond to data calculated using laser triangulation, data based on a deep learning method, and manually measured data, respectively.
TABLE 3 comparison of morphological data
The research results are shown in Table 3, and the morphological data of fish can be measured by both the underwater laser triangulation and the deep learning method. However, the accuracy of these measurements is different. By analyzing the data in the table, it was found that the average error rate of the underwater laser triangulation method was 14.70%, while the average error rate of the deep learning method was 7.75%. It is noted that neither method can calculate the morphological data of the particular fish when the body surface of the fish is free of laser lines. Thus, the tag lacks a calculated value for catfish.
The foregoing has shown and described the basic principles and main features of the present invention and the advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made without departing from the spirit and scope of the invention, which is defined in the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

Claims (10)

1. A fish body measuring method based on a laser camera system is characterized in that a laser triangulation distance is utilized to calculate a baseline distance between two points on a plane, the baseline distance is used as a baseline for subsequent comparison, image example segmentation of a fish body and laser lines is realized by combining detection and segmentation into a yolov7 model backbone, six characteristic points of a fish object are detected by designing full-connection regression and a DSNT-MobileFaceneT-based characteristic point detection network, the fish body object calculates a two-dimensional gesture according to the relative positions of the characteristic points, if a laser line exists on the fish body, distance information is deduced from the position of the fish, morphological information such as body length, fork length and body width is calculated by combining the characteristic point information, and the hardware comprises a camera and a laser emitter for data acquisition, and the method specifically comprises the following three operation steps:
(1) Defining six characteristic points, providing a six characteristic point definition scheme specially designed for fish bodies, and realizing a characteristic point detection network by using a MobileFaceNet module and a DSNT module in order to detect the characteristic points;
(2) Providing a fish body and laser line target detection data set, wherein the fish body and laser line target detection data set is a comprehensive data set, and the fish body and laser line target detection and segmentation are realized on a laser camera system;
(3) A laser camera system for measuring fish body is provided, which can measure the posture, length, width and fork length of fish body, and comprises target detection, target segmentation, feature point detection, posture calculation and morphological data calculation.
2. The fish body measuring method based on the laser camera system according to claim 1, wherein the two cameras are respectively an upper camera and a lower camera, the two cameras are arranged to double the collected data amount in the same time, the two cameras also increase the coverage rate of the data at different angles and positions, and the cameras use laser triangulation in combination with the cameras to obtain complete information including distance.
3. The method of claim 1, wherein the laser transmitter for data acquisition comprises a data acquisition device consisting of a polyvinyl chloride pipe, a t-junction and a cross-structure, two underwater Ha Kesi te HK90A cameras equipped with six high power white lights for night use, RJ45 network interfaces and supporting free network, a single factory customized straight waterproof laser transmitter fixed in a frame, creating a line of length 2 meters away from the target.
4. A method of measuring fish body based on a laser camera system according to claim 1, wherein the fish comprises eight edible fish species including snakehead, catfish and crucian, purchased from a local market and kept in a circular pool of 2 meters in diameter, and a data acquisition system is placed in the pool for monitoring the survival of the fish and collecting data, and morphological measurements of the 8 fish species are recorded manually and used as reference for subsequent experiments.
5. A fish body measuring method based on a laser camera system according to claim 1, wherein the data collection uses a computer vision method based on the traditional laser triangulation and laser triangulation principles for fish measurement and physical condition monitoring, including target extraction and laser line of fish and feature point extraction of fish, so that the quality of the data will significantly affect the whole experiment, since the wide-angle camera is used to capture the whole situation in the propagation pool, the collected image may have a certain degree of wide-angle distortion due to the existence of the camera, after a sufficient amount of representative data is collected, the target detection split data set and feature point extraction data set can be created after the correction is completed, in order to correct the distorted image, a checkerboard calibration method is used, one wide-angle camera captures the distorted image under laboratory conditions, and the internal parameter matrix and distortion coefficient of the camera are calculated by the imaging calibration plate, and all the images are corrected using the collected data to complete the data processing.
6. A fish body measurement method based on a laser camera system according to claim 1, wherein the data processing comprises a target detection segmentation dataset, a feature point detection dataset, the target detection segmentation dataset creating two datasets using corrected images: the method comprises the steps of marking an object segmentation dataset, extracting a minimum rectangular frame containing left and right points from the object segmentation dataset, manually marking fish and laser lines in a representative subset of 298 images, uniformly marking all fish as 'fish', marking the laser lines as 'light', enhancing the marked image by using a method of shearing, gray scale, tone, brightness and the like in order to improve the final generalization capability of the model from the angle of data, wherein the shearing range is 15 degrees in horizontal + -15 degrees, 15 degrees in vertical + -15 degrees, the gray scale of the image is applied to 25 degrees, the hue range is between-41 degrees and +41 degrees, the brightness range is between-30 percent and +30 percent, dividing the enhanced dataset into a training set, a verification set and a test set, and the characteristic point detection dataset, wherein the characteristic point detection dataset of fish is possibly applied to the fields of fish body posture monitoring, health monitoring and the like, and a fish characteristic point standard consisting of 6 key points is provided.
7. A method of measuring fish body based on a laser camera system according to claim 1, characterized in that six feature points a-F as markers of a general fish species, the distance between points a and D representing the fork length and the total length being defined as the distance between points C and E, in addition the body width being the distance between points B and F, the relative positions of the six feature points effectively reflecting the fish body shape, the creation of the dataset comprising three main steps, initially, the smallest rectangular frame of all fish being cut out according to the annotation in the target detection and segmentation dataset, then all fish feature points being manually labeled using an open source tool imgLab, whereby the resulting six feature points are then arranged in a specific order, finally, the XML format tag file is converted into a TXT format tag file, each row representing one containing 17 elements, separated by commas, the first element representing the file name, the next four elements representing the starting coordinates (x, y) and width and height (w, h) of the rectangular frame, the image coordinates of the image being no more than half of the feature points being created for the image of the image, since the feature points of the image of the dataset are not visible from 8, the feature points being the image quality of the feature points being created, the image being no more than half of the feature points being created: 1:1 into training, validation and test sets, similar to the target detection and segmentation dataset, 631 cropped fish images were obtained from the captured dataset based on the extracted data preview, however, the size of this dataset was relatively small for accurate feature point detection, and furthermore, by manual observation, some of the 631 images exhibited blurred, unclear, etc. features, in order to address these limitations and enhance the generalization ability of the model, various data enhancement techniques were applied, including random scale, random translation, random shearing, random masking, random blurring, random brightness, random rotation, and random center cropping, each of which was performed within 0.5 and a specific parameter range.
8. A fish body measuring method based on a laser camera system as claimed in claim 1, characterized in that in order to check the effect of data enhancement on training results, the enhanced data set is compared with the original data set and enteredThe comparative experiment is carried out, the morphology of fish in an aquaculture pond is measured by a laser triangulation method, the laser triangulation method is a common distance measurement method which utilizes the propagation characteristics of laser beams in space, the distance between a target object and a measuring device can be calculated by measuring laser signals reflected from the target object, the distance measurement method is widely applied to various fields of industry, military, geological exploration and the like, the principle of laser triangulation is based on the geometric shape of a triangle, the measuring device emits a laser beam to the target object, the laser beam contacts with the surface of the target object and is reflected back to the measuring device, the two inner angles and the length of one side of the triangle can be obtained by controlling the emission angle of the laser beam and the angle of the measuring device for receiving the reflected laser, according to the geometric shape of the triangle, it is possible to calculate the distance between the target object and the measuring device, when the laser emitted laser is directed towards the target object Obj1, it forms a spot P on the object surface, which spot P is then reflected back to the camera and finally forms a spot P ' on the imaging surface, when the object Obj1 is moved to the position of Obj2, the imaging position of spot Q is also moved to Q ', so that when the distance between the object and the laser is changed from d1 to d2, the corresponding spot on the imaging surface is also subjected to displacement of deltad, in fact, there is an inherent relation between these two variables, the laser emitted by the laser device forms a spot P on the object Obj and the angle of the laser to the vertical direction of the spot P ' mapped onto the imaging surface (N) of the camera is alpha, on the imaging surface the spot Q is located with the line QN parallel to the line AP, delta QNP-deltaapn and the vertical line of the similar triangle, the result is q/s=f/x, since x is composed of x 1 and x2 And the focal length f of the camera is generally known, x1 can be calculated from the focal length and angles α and x 2 It should be determined according to the size of each pixel in the image and the position of P' relative to the center of the image, and thus the distance d between the laser and the object can be calculated by equation (1):
s is the side length of each square pixel on the imaging surface in the final generated image, in cm/pixel, and P Center of the machine Is the pixel distance from the mapping point of the target point on the imaging surface to the center of the image in a certain direction, f represents the focal length of the camera in pixels, s represents the distance between the laser emitter and the camera lens (in the experiments designed herein, the laser emitter and the camera lens remain on the same vertical line), q represents the distance from the target point P to the line where the laser emitter and the camera are located, f, s and q are all in centimeters for ease of calculation, equation (1) shows that the distance of the laser from a certain point on the object can be calculated from five variables of f, s, α, s Pixel arrangement and PCenter of the machine Where f is a camera parameter, which can be derived from hardware specifications or settings, and the other four variables can be measured.
Laser triangulation is a well-established traditional technique that has been widely used in many fields. However, there is little application in aquaculture and offshore fishery, one of the main reasons being that fishery is more concerned with information such as body length, fork length, body width, etc. than distance, and for aquaculture, fish body shape and health are valuable information, and for better use of laser triangulation of fish, two optimizations have been made, the first of which is to reposition the laser transmitter from the traditional "I" shape to the center of rotation of the system, thereby reducing the relative movement speed of the laser transmitter and water, and thus reducing turbulence effects. The second optimization is to extend the laser triangulation from distance measurement to length property measurement of the object, in fig. 5 (b), the distance between points P and N can be obtained from the relationship between Δapo and Δapn, as shown in equation (2), in addition to calculating the distance d of the laser transmitter to the target Obj according to equation (1):
the distance between the point P and the point N plays a vital role in measuring the fish morphology, the optimized line-type laser is fixed on the bracket and emits the laser beam on the plane, the point M and the point N in the figure represent the head and tail of a fish respectively, the point D is the midpoint of the laser beam and the line of the camera is perpendicular to the NM line because the laser beam precisely hits the fish between the point M and the point N and reflects to the camera, two different light points are formed on the imaging plane of the camera, the lengths of AN and AM can be calculated by using the laser triangulation method and the formula (2), the point D can be introduced on the plane of the Δamn, the line AD is perpendicular to the line NM, the relationship between the point D and the line MN affects the calculation of the length of the line NM (the length of the target fish), but since the laser emitter and the camera are kept on the same perpendicular line, the midpoint of the laser beam and the line of the camera are perpendicular to the NM line, and the point D is the midpoint of the laser beam, the relationship between the point D and the line MN may be two cases: when the point D is not on the MN (fig. 6 (b)), and when the point D is on the MN (fig. 6 (c)), the calculation formula of the length in both cases is formula (3):
wherein , and d2 Representing the distance between the laser transmitter and points M and N, respectively.
9. A fish-body measuring method based on a laser camera system according to claim 1, characterized in that the method of measuring fish-morphology data by combining a deep learning method with laser detection comprises four sub-steps, the position of the laser line in the captured image varies with the position of the target object relative to the camera, following a deterministic relationship, so that the optical calibration is crucial for establishing the relationship between the position of the laser line and the actual distance; the second step is focused on detecting the fish in the image and the laser emitted by the laser emitter, and the mature technology in the field of deep learning target detection can be used for completing the step, and in addition, the image segmentation can be used for improving the precision and refining; in a third step, key points (characteristic points) of the detected fish are extracted, the characteristic points being reference points for measuring morphological data of the fish, wherein pixel distances between different characteristic points represent pixel-based representations of the morphological data; finally, based on the results of the first three steps, an algorithm for accurately calculating the fish morphology data is provided.
10. A fish body measuring method based on a laser camera system according to claim 1, characterized in that after completing the fish and laser line detection and fish characteristic point detection processes, basic data measuring the fish body pose and morphology features are obtained, for each processed image, all existing fish are first identified using a target detection model, then characteristic points on each fish are detected using a characteristic point detection model, then, whether one laser line is present on each fish is determined, and if no laser line is detected, the two-dimensional body pose of the fish is calculated from the relative position of the characteristic points, whereas if one laser line is detected, the positions of the fish head and fish tail relative to the camera are determined, so that the z-axis position and measured values, such as body length, fork length and body width, can be calculated, and finally, the two-dimensional body pose and three-dimensional morphology information are noted on the image.
CN202310958533.XA 2023-08-01 2023-08-01 Fish body measuring method based on laser camera system Pending CN116883483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310958533.XA CN116883483A (en) 2023-08-01 2023-08-01 Fish body measuring method based on laser camera system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310958533.XA CN116883483A (en) 2023-08-01 2023-08-01 Fish body measuring method based on laser camera system

Publications (1)

Publication Number Publication Date
CN116883483A true CN116883483A (en) 2023-10-13

Family

ID=88262119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310958533.XA Pending CN116883483A (en) 2023-08-01 2023-08-01 Fish body measuring method based on laser camera system

Country Status (1)

Country Link
CN (1) CN116883483A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117522951A (en) * 2023-12-29 2024-02-06 深圳市朗诚科技股份有限公司 Fish monitoring method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117522951A (en) * 2023-12-29 2024-02-06 深圳市朗诚科技股份有限公司 Fish monitoring method, device, equipment and storage medium
CN117522951B (en) * 2023-12-29 2024-04-09 深圳市朗诚科技股份有限公司 Fish monitoring method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111855664B (en) Adjustable three-dimensional tunnel defect detection system
CN109100741B (en) Target detection method based on 3D laser radar and image data
Biskup et al. A stereo imaging system for measuring structural parameters of plant canopies
CN107516077B (en) Traffic sign information extraction method based on fusion of laser point cloud and image data
Shortis et al. Design and calibration of an underwater stereo-video system for the monitoring of marine fauna populations
CN108764257A (en) A kind of pointer instrument recognition methods of various visual angles
CN114241031B (en) Fish body ruler measurement and weight prediction method and device based on double-view fusion
CN104482860A (en) Automatic measuring device and method for fish type morphological parameters
Lou et al. Accurate multi-view stereo 3D reconstruction for cost-effective plant phenotyping
CN112561983A (en) Device and method for measuring and calculating surface weak texture and irregular stacking volume
CN108133471B (en) Robot navigation path extraction method and device based on artificial bee colony algorithm
CN116883483A (en) Fish body measuring method based on laser camera system
CN109341668A (en) Polyphaser measurement method based on refraction projection model and beam ray tracing method
CN112884880B (en) Line laser-based honey pomelo three-dimensional modeling device and method
CN112595236A (en) Measuring device for underwater laser three-dimensional scanning and real-time distance measurement
CN113008158B (en) Multi-line laser tire pattern depth measuring method
CN112465778A (en) Underwater fish shoal observation device and method
CN115512215A (en) Underwater biological monitoring method and device and storage medium
CN116481429A (en) Log volume detection method based on target detection
CN115330684A (en) Underwater structure apparent defect detection method based on binocular vision and line structured light
CN116091494B (en) Method for measuring distance of hidden danger of external damage of power transmission machinery
CN112132884A (en) Sea cucumber length measuring method and system based on parallel laser and semantic segmentation
CN111161227B (en) Target positioning method and system based on deep neural network
CN117095038A (en) Point cloud filtering method and system for laser scanner
CN115880643B (en) Social distance monitoring method and device based on target detection algorithm

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