CN-121982096-A - Shoal detection preview method, device and equipment of underwater binocular camera based on cube calibration
Abstract
The application relates to a shoal detection preview method, device and equipment of an underwater binocular camera based on cube calibration, which comprise the steps of obtaining underwater images respectively collected by two lenses of the underwater binocular camera at a plurality of discrete collection moments, calibrating the underwater images through target calibration parameters calibrated in advance to obtain corresponding target underwater images, wherein the target calibration parameters are obtained by sequentially calibrating multiple types of core parameters based on multiple groups of auxiliary lines drawn on the inner wall of the cube calibration device as geometric references, carrying out mirror image linear splicing fusion on the target underwater images of the two lenses at the same collection moment through gradual change weights according to preset fusion percentages and preset reference radiuses, obtaining panoramic underwater images, carrying out shoal recognition on the corresponding underwater images at a plurality of discrete collection moments, and carrying out shoal detection image preview display according to the shoal detection results and a preview mode selected by a user.
Inventors
- RUAN SHUAI
- SUN BO
Assignees
- 深圳市影智未来科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260127
Claims (10)
- 1. The fish shoal detection preview method of the underwater binocular camera based on cube calibration is characterized by comprising the following steps of: acquiring underwater images respectively acquired by two lenses of an underwater binocular camera at a plurality of discrete acquisition moments; calibrating the underwater image through target calibration parameters calibrated in advance to obtain a target underwater image corresponding to the acquisition time, wherein the target calibration parameters are obtained by sequentially calibrating multiple types of core parameters based on multiple groups of auxiliary lines drawn on the inner wall of a cube calibration device as geometric references; Performing mirror image linear splicing fusion on target underwater images of the two lenses at the same acquisition time through gradual change weights according to a preset fusion percentage and a preset reference radius to obtain a panoramic underwater image at the acquisition time, wherein the preset fusion percentage is determined according to the field angle of the lenses; and previewing and displaying the fish detection image according to the panoramic underwater image and the preview mode selected by the user and corresponding to the plurality of discrete acquisition moments.
- 2. The method of claim 1, wherein the target calibration parameters are calibrated by: Determining the geometric center of the lens by drawing transverse and longitudinal cross auxiliary lines on an original imaging image acquired by the lens; adjusting the coordinates of the original image acquired by the lens by taking a reference calibration center formed by intersecting auxiliary lines on the inner wall of the cube calibration device as a benchmark until the positions of the geometric center and the reference calibration center meet the preset position requirement, and taking the translation quantity of the coordinates as a center offset parameter value corresponding to the lens; Under the condition that the center offset parameter value is determined, performing size scaling on the original image, and determining the effective radius of the visual field of the lens; and under the condition that the effective radius of the visual field is determined, rendering the original images acquired by the two lenses into a spherical perfect circle model for Euler angle calibration to obtain Euler angle parameter values of the lenses, wherein the target calibration parameters comprise the center offset parameter values, the effective radius of the visual field and the Euler angle parameter values.
- 3. The method of claim 2, wherein said scaling the original image to determine the effective radius of the field of view of the lens comprises: taking any one lens of the two lenses as a reference lens and the other lens as an adjusting lens; Scaling a second image acquired by the adjusting lens by taking the size of a marking auxiliary object in a first image acquired by the reference lens as a reference until a size difference between the size of the marking auxiliary object in the second image and the size of the marking auxiliary object in the first image meets a preset requirement, wherein the marking auxiliary object is an object in a lens visual field overlapping area of the two lenses; and determining the effective radius of the visual field of the adjusting lens according to the original picture size of the second image and the scaling of the second image.
- 4. The method according to claim 2, wherein the rendering the original images acquired by the two lenses into a spherical perfect circle model for euler angle calibration to obtain euler angle parameter values of the lenses comprises: rendering the original images acquired by the two lenses into a spherical perfect circle model to obtain a spherical projection image; Drawing a cross auxiliary line through the spherical center of the spherical projection image to obtain a drawn cross auxiliary line; and adjusting Euler angles of the original images by taking reference auxiliary lines in the plurality of groups of auxiliary lines as references, so that the drawn cross auxiliary lines meet preset requirements compared with the reference auxiliary lines, and obtaining Euler angle parameter values.
- 5. The method of claim 4, wherein adjusting euler angles of the original image based on reference auxiliary lines of the plurality of sets of auxiliary lines so that the drawn cross auxiliary lines satisfy a predetermined requirement as compared to the reference auxiliary lines, comprises: Adjusting a roll angle in the Euler angle by taking a cross auxiliary line in the reference auxiliary line as a reference until the drawn cross auxiliary line is aligned with the cross auxiliary line in parallel, wherein the roll angle is a rotation angle of the lens around an optical axis; Under the condition that the drawn cross auxiliary line is aligned with the cross auxiliary line in parallel, the adjusted angle of the corresponding roll angle is used as a roll angle parameter value of the lens; in the case of the roll angle parameter determination, adjusting yaw and pitch angles in the euler angles until a horizontal auxiliary line in the reference cross auxiliary line is aligned with a horizontal auxiliary line in the reference auxiliary line and a vertical auxiliary line in the reference cross auxiliary line is aligned with a vertical auxiliary line in the reference auxiliary line; And taking the angle of the corresponding yaw angle adjusted when the horizontal auxiliary line in the reference cross auxiliary line is aligned with the horizontal auxiliary line in the reference auxiliary line as a yaw angle parameter value of the lens, and taking the angle of the corresponding pitch angle adjusted when the vertical auxiliary line in the reference cross auxiliary line is aligned with the vertical auxiliary line in the reference auxiliary line as a pitch angle parameter value of the lens.
- 6. The method according to claim 2, wherein the calibrating the underwater image by the target calibration parameters calibrated in advance to obtain the target underwater image corresponding to the acquisition time comprises: Respectively translating the underwater images corresponding to the two lenses according to the center offset parameter value so as to align the geometric center of the lenses with the center of a preset canvas; Scaling the translated underwater image according to the visual field effective alarm, and cutting out an ineffective image of the underwater image exceeding the preset canvas to obtain an effective area image; And mapping the effective area images onto 3D semicircular model textures corresponding to the two lenses respectively, and adjusting the posture of the 3D semicircular model according to the Euler angle parameter value to obtain a target underwater image corresponding to the acquisition time.
- 7. The method according to any one of claims 1-6, wherein the performing mirror image linear stitching fusion on the target underwater images of the two lenses at the same acquisition time by gradual change weights according to a preset fusion percentage and a preset reference radius to obtain a panoramic underwater image at the acquisition time comprises: pixels, located between the preset fusion percentage and the preset reference radius, in the target underwater image corresponding to any one of the two lenses are subjected to mirror image linear splicing fusion with pixels, located in an overlapping area, in the target underwater image corresponding to the other lens, and panoramic underwater images at the acquisition moment are obtained through gradual change weights; The weight of the pixel corresponding to the any lens gradually decreases from the side, close to the any lens, of the overlapping area to the side, far from the any lens, and the weight of the pixel corresponding to the other lens gradually increases as the weight of the pixel in the any lens gradually decreases.
- 8. Shoal detection preview device of binocular camera under water based on square is markd, its characterized in that, the device includes: the acquisition module is configured to acquire underwater images acquired by two lenses of the underwater binocular camera at a plurality of discrete acquisition moments respectively; The calibration module is configured to calibrate the underwater image through target calibration parameters calibrated in advance to obtain a target underwater image corresponding to the acquisition time, wherein the target calibration parameters are obtained by sequentially calibrating multiple types of core parameters based on multiple groups of auxiliary lines drawn on the inner wall of the cube calibration device as geometric references; the splicing and fusion module is configured to carry out mirror image linear splicing and fusion on the target underwater images of the two lenses at the same acquisition time through gradual change weights according to fusion percentages and reference radiuses to obtain panoramic underwater images at the acquisition time, wherein the fusion percentages are determined according to the field angles of the lenses; And the preview module is configured to preview and display the fish detection image according to the panoramic underwater image corresponding to the plurality of discrete acquisition moments and the preview mode selected by the user.
- 9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-7.
- 10. A binocular camera, which comprises a camera body and a lens, characterized by comprising the following steps: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-7.
Description
Shoal detection preview method, device and equipment of underwater binocular camera based on cube calibration Technical Field The application relates to the technical field of image processing, in particular to a shoal detection preview method, device and equipment of an underwater binocular camera based on cube calibration. Background At present, the shoal detection can acquire underwater images through a binocular camera, and then the azimuth and the swimming direction of the shoal are judged according to the images, so that the fishing success rate is increased. However, in a binocular panoramic imaging system of an underwater binocular camera, physical errors are inevitably introduced by both the lens and image sensor in the assembly link, and the mounting link of the two lenses back-to-back. The method is characterized in that the problems of assembly precision such as misalignment of the optical axes of the lenses and the center of the target surface of the image sensor, deviation of the installation inclination angle of the lenses and the like are solved, and the errors of installation positions such as non-collineation of the optical axes of the two lenses, non-parallel installation reference surfaces, deviation of relative spacing and design values and the like can exist. Errors caused by assembly precision and installation position errors are not independent, the errors are mutually overlapped in the imaging process, and the relative spatial position relationship between imaging pictures acquired by two lenses is directly caused to be in an unknown state, so that errors exist in panoramic image splicing and three-dimensional information reconstruction, if the relative posture and position parameters between pictures cannot be clearly determined, images with different visual angles cannot be accurately aligned, accurate geometric quantity calculation is more difficult to achieve through a binocular vision principle, and therefore errors exist in fish-school images acquired by a binocular camera, and the positions and the swimming directions of fish-school images cannot be accurately determined. Disclosure of Invention The invention aims to provide a shoal detection preview method, device and equipment of an underwater binocular camera based on cube calibration, which aim to perform targeted geometric transformation calibration on an acquired original image based on a relative spatial position relation between the binocular cameras calibrated in advance, eliminate image distortion and position deviation caused by errors, reduce errors of the shoal image acquired by the binocular camera and replace the accuracy of determining the position and swimming direction of the shoal. To achieve the above object, according to a first aspect of the embodiments of the present disclosure, there is provided a fish-shoal detection preview method of an underwater binocular camera based on cube calibration, the method including: acquiring underwater images respectively acquired by two lenses of an underwater binocular camera at a plurality of discrete acquisition moments; calibrating the underwater image through target calibration parameters calibrated in advance to obtain a target underwater image corresponding to the acquisition time, wherein the target calibration parameters are obtained by sequentially calibrating multiple types of core parameters based on multiple groups of auxiliary lines drawn on the inner wall of a cube calibration device as geometric references; Performing mirror image linear splicing fusion on target underwater images of the two lenses at the same acquisition time through gradual change weights according to a preset fusion percentage and a preset reference radius to obtain a panoramic underwater image at the acquisition time, wherein the preset fusion percentage is determined according to the field angle of the lenses; and previewing and displaying the fish detection image according to the panoramic underwater image and the preview mode selected by the user and corresponding to the plurality of discrete acquisition moments. Optionally, the target calibration parameter is calibrated by: Determining the geometric center of the lens by drawing transverse and longitudinal cross auxiliary lines on an original imaging image acquired by the lens; adjusting the coordinates of the original image acquired by the lens by taking a reference calibration center formed by intersecting auxiliary lines on the inner wall of the cube calibration device as a benchmark until the positions of the geometric center and the reference calibration center meet the preset position requirement, and taking the translation quantity of the coordinates as a center offset parameter value corresponding to the lens; Under the condition that the center offset parameter value is determined, performing size scaling on the original image, and determining the effective radius of the visual field of the lens; and under the condition