A narrow space picture imaging method and device based on binocular fisheye, electronic equipment and storage medium

By combining a binocular fisheye camera with an improved ControlNet model, the problems of image acquisition and incomplete images in confined spaces were solved, enabling effective image acquisition and complete image reconstruction within a closed control cabinet.

CN120852154BActive Publication Date: 2026-01-16STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511357283.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-01-16
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

Existing technologies are not suitable for identifying the status of circuit breakers in closed control cabinets, and conventional cameras capture incomplete images in confined spaces, affecting the recognition results.

Method used

A narrow-space image imaging method based on binocular fisheye is adopted. Images are acquired using a dual fisheye camera, and the images are corrected and unfolded through coordinate normalization, distortion coordinate calculation and ControlNet improved model. Combined with Hamming distance matching and fusion, a synthetic image is generated.

Benefits of technology

It enables effective image acquisition and complete image reconstruction within a closed control cabinet, improving image information restoration and field of view expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852154B_ABST
    Figure CN120852154B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of operation and maintenance inspection, and provides a narrow space picture imaging method and device based on binocular fish eyes, an electronic device and a storage medium, the method comprising: image acquisition, image correction, image unfolding, key point matching, distance mean calculation and image synthesis; the application improves the picture information restoration effect and the perspective unified switching effect by using ControlNet to improve the model for image unfolding; the application expands the field of view of the image and optimizes the display effect of the synthesized image by coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of operation and maintenance inspection, in particular to a narrow space picture imaging method and device based on binocular fisheye, electronic equipment and storage medium. BACKGROUND

[0002] The current mainstream air switch state recognition scheme is mainly applicable to open scenes, which relies on a conventional camera to directly collect target images in an open space. Although such a scheme can achieve effective recognition under ideal lighting and no obstacle conditions, it has significant limitations: it cannot adapt to the closed application environment of the control cabinet. Because the control cabinet door needs to be kept closed in daily operation, the ordinary camera cannot obtain the air switch image in the cabinet due to physical obstruction, resulting in the complete failure of such technology. This fundamental defect makes it difficult for existing schemes to meet the actual needs of intelligent inspection of the control cabinet in the substation. In addition, the existing technology does not use a super wide-angle lens to expand the field of view, and lacks hardware-level optimization, which may result in incomplete shooting pictures and affect the recognition effect. SUMMARY

[0003] In order to overcome the deficiencies of the prior art, the purpose of the present application is to provide a narrow space picture imaging method and device based on binocular fisheye, electronic equipment and storage medium, which solves the problems that the conventional method cannot be applied to closed control cabinets and the shooting picture is not complete.

[0004] To achieve the above-mentioned purpose, the present application provides the following solutions:

[0005] A narrow space picture imaging method based on binocular fisheye, comprising:

[0006] using a preset binocular fisheye camera to collect images of a target narrow space to obtain original collected images;

[0007] performing coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping on the original collected images in sequence to obtain a corrected image;

[0008] using a ControlNet improved model to perform conditional coding, input construction and perspective transformation on the corrected image in sequence to obtain an expanded image;

[0009] using Hamming distance to match key points of two expanded images to obtain a target number of nearest matching points, and respectively calculating the average distance of the nearest matching points in the X-axis and Y-axis directions of the two original collected images to obtain a horizontal distance average and a vertical distance average;

[0010] fusing two expanded images according to the horizontal distance average and the vertical distance average to obtain a synthesized image.

[0011] Preferably, a preset dual fisheye camera is used to collect images of a target narrow space, to obtain an original collected image, comprising:

[0012] An ideal incidence angle is set; the ideal incidence angle ranges from 0 to 220 degrees;

[0013] A projection function is set; the expression of the projection function is: ; wherein, is a distortion imaging radius; is the incidence angle; is the projection function; is a fisheye focal length parameter;

[0014] According to the projection function, a preset left fisheye camera and a preset right fisheye camera are used to collect images of the target narrow space, to obtain the original collected image; the original collected image comprises a left fisheye collected image and a right fisheye collected image.

[0015] Preferably, the original collected image is sequentially subjected to coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation, and coordinate remapping, to obtain a corrected image, comprising:

[0016] A distortion model is constructed; the expression of the distortion model is: ; wherein, , , , are a first radial distortion coefficient, a second radial distortion coefficient, a third radial distortion coefficient, and a fourth radial distortion coefficient, respectively;

[0017] The original collected image is subjected to normalization processing by using a pre-constructed normalization formula, to obtain a normalized image; the normalization formula comprises: , ; wherein, , are an abscissa and an ordinate of the normalized image, respectively; , are original coordinates in X-axis and Y-axis directions, respectively; is an offset in the X direction; is a focal length in the X direction; is an offset in the Y-axis direction; is a focal length in the Y-axis direction;

[0018] According to the distortion model, a radius of the normalized image is calculated, to obtain a distortion radius.

[0019] Preferably, the original acquisition image is sequentially subjected to coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping to obtain a corrected image, comprising:

[0020] According to the distortion radius, the normalized image is calculated by using a preset distortion coordinate formula to obtain horizontal distortion coordinate data and vertical distortion coordinate data; the distortion coordinate formula comprises: 、 ; wherein, is the horizontal distortion coordinate data; is the vertical distortion coordinate data;

[0021] The horizontal distortion coordinate data and the vertical distortion coordinate data are calculated by using a preset pixel coordinate formula to obtain horizontal pixel coordinate data and vertical pixel coordinate data; the pixel coordinate formula comprises: 、 ; wherein, is the horizontal pixel coordinate data; is the vertical pixel coordinate data;

[0022] According to the horizontal pixel coordinate data and the vertical pixel coordinate data, the coordinate of the original acquisition image is adjusted to obtain the corrected image.

[0023] Preferably, the corrected image is sequentially subjected to conditional encoding, input construction and view transformation by using a ControlNet improved model to obtain an unfolded image, comprising:

[0024] The bilinear interpolation layer in the original ControlNet model is replaced by a view consistency transformation layer to obtain the ControlNet improved model; the expression of the view consistency transformation layer comprises: 、 ; wherein, is the input feature map; is the distortion coefficient; is the rotation matrix; is the translation coefficient; represents a multi-layer perception machine; is the output of the multi-layer perception machine; represents a vector splicing operation; is the two-dimensional point coordinate of the plane; is the output of the view consistency transformation layer;

[0025] The ControlNet conditional input is constructed.

[0026] The ControlNet improved model is used to process the ControlNet conditional input, so as to obtain the unfolded image.

[0027] Preferably, the two unfolded images are fused according to the lateral distance mean and the longitudinal distance mean, so as to obtain a composite image, comprising:

[0028] The unfolded image corresponding to the left fisheye image is translated according to the lateral distance mean and the longitudinal distance mean corresponding to the left fisheye image, the unfolded image corresponding to the right fisheye image is translated according to the lateral distance mean and the longitudinal distance mean corresponding to the right fisheye image, and the left fisheye image and the right fisheye image after movement are combined, so as to obtain the composite image.

[0029] Preferably, a narrow space picture imaging device based on binocular fisheye comprises a card machine A surface, a card machine B surface, a first fisheye, a second fisheye, an expansion interface, a PoE separation module, a third fisheye, a switch and a client.

[0030] The expansion interface and the PoE separation module are arranged on the card machine A surface, the third fisheye is arranged on the card machine B surface, the first fisheye and the second fisheye are respectively located on the left side and the right side of the center line of the card machine A surface, the distance range of the first fisheye and the second fisheye deviating from the center line of the card machine A surface is 5cm to 10cm, the lens of the first fisheye is deviated to the left by 30°, the lens of the second fisheye is deviated to the right by 45°, the switch is connected with the first fisheye, the second fisheye and the third fisheye, and the switch is connected with the client.

[0031] Preferably, the first fisheye and the second fisheye are both 220° super wide-angle fisheye lenses with a focal length of 1.2mm.

[0032] Preferably, an electronic device comprises at least one processor and a memory connected with the processor in communication, wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to execute the foregoing narrow space picture imaging method based on binocular fisheye.

[0033] Preferably, a non-transient computer readable storage medium stores computer instructions for enabling a computer to execute the foregoing narrow space picture imaging method based on binocular fisheye.

[0034] The present application discloses the following technical effects:

[0035] The application provides a narrow space picture imaging method and device based on binocular fisheye, electronic equipment and storage medium, which solves the problem of poor picture edge distortion expansion effect of conventional methods by using ControlNet improved model for image expansion, realizes high restoration of picture information and perspective switching, solves the problem that conventional methods cannot be applied to closed control cabinets and incomplete shooting pictures by coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping, and realizes expansion of image field of view. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0037] Figure 1 A narrow space picture imaging flowchart based on binocular fisheye is provided for the embodiments of the present application.

[0038] Figure 2 A card machine A surface structure diagram is provided for the embodiments of the present application.

[0039] Figure 3 A card machine B surface structure diagram is provided for the embodiments of the present application.

[0040] Figure 4 A system schematic diagram is provided for the embodiments of the present application.

[0041] Figure 5 A synthesis effect schematic diagram is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0043] The purpose of the present application is to provide a narrow space picture imaging method and device based on binocular fisheye, electronic equipment and storage medium, which solves the problem that conventional methods cannot be applied to closed control cabinets and incomplete shooting pictures.

[0044] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0045] Figure 1 A schematic diagram of a narrow space picture imaging process based on binocular fisheye is provided for an embodiment of the present application, as shown in the figure, the present application provides a narrow space picture imaging method based on binocular fisheye, comprising: Figure 1

[0046] Step 100: image acquisition of the target narrow space by using a preset binocular fisheye camera to obtain an original acquisition image;

[0047] Step 200: coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping are sequentially performed on the original acquisition image to obtain a corrected image;

[0048] Step 300: using ControlNet improved model to sequentially perform conditional coding, input construction and view angle transformation on the corrected image to obtain an unfolded image;

[0049] Step 400: using Hamming distance to match key points of two unfolded images to obtain a target number of nearest matching points, and respectively counting the average value of the distance of the nearest matching points in X-axis and Y-axis directions of the two original acquisition images to obtain the average value of horizontal distance and vertical distance;

[0050] Step 500: according to the average value of horizontal distance and the average value of vertical distance, the two unfolded images are fused to obtain a synthetic image.

[0051] Further, image acquisition of the target narrow space by using a preset binocular fisheye camera to obtain an original acquisition image, comprising:

[0052] Setting an ideal incident angle; the range of the ideal incident angle is [0, 220°];

[0053] Setting a projection function; the expression of the projection function is: ; wherein, is the distortion imaging radius; is the incident angle; is the projection function; is the fisheye focal length parameter;

[0054] According to the projection function, the target narrow space is imaged by using a preset left fisheye camera and a right fisheye camera respectively to obtain the original acquisition image; the original acquisition image includes: left fisheye acquisition image and right fisheye acquisition image.

[0055] ​Specifically, the original acquisition image is sequentially subjected to coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping to obtain a corrected image, including:

[0056] a distortion model is constructed; an expression of the distortion model is: ; wherein, , , , are respectively a first radial distortion coefficient, a second radial distortion coefficient, a third radial distortion coefficient and a fourth radial distortion coefficient;

[0057] the original acquisition image is subjected to normalization processing by using a pre-constructed normalization formula to obtain a normalized image; the normalization formula includes: , ; wherein, , are respectively an abscissa and an ordinate of the normalized image; , are respectively original coordinates in X-axis and Y-axis directions; is an offset in the X direction; is a focal length in the X direction; is an offset in the Y-axis direction; is a focal length in the Y-axis direction;

[0058] the normalized image is subjected to radius calculation according to the distortion model to obtain a distortion radius.

[0059] Further, the original acquisition image is sequentially subjected to coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping to obtain a corrected image, including:

[0060] the normalized image is calculated according to the distortion radius by using a pre-set distortion coordinate formula to obtain horizontal distortion coordinate data and vertical distortion coordinate data; the distortion coordinate formula includes: , ; wherein, is the horizontal distortion coordinate data; is the vertical distortion coordinate data;

[0061] the horizontal distortion coordinate data and the vertical distortion coordinate data are calculated by using a pre-set pixel coordinate formula to obtain horizontal pixel coordinate data and vertical pixel coordinate data; the pixel coordinate formula includes: , ; wherein, is the horizontal pixel coordinate data; is the vertical pixel coordinate data;

[0062] According to the lateral pixel coordinate data and the longitudinal pixel coordinate data, the original acquisition image is adjusted in coordinates to obtain the corrected image.

[0063] Specifically, the corrected image is sequentially subjected to conditional coding, input construction and perspective transformation by using a ControlNet improved model to obtain an unfolded image, including:

[0064] The bilinear interpolation layer in the original ControlNet model is replaced by a perspective consistency transformation layer to obtain the ControlNet improved model; the expression of the perspective consistency transformation layer includes: 、 ; wherein, is an input feature map; is a distortion coefficient; is a rotation matrix; is a translation coefficient; represents a multi-layer perception machine; is the output of the multi-layer perception machine; represents a vector splicing operation; is a two-dimensional point coordinate on a plane; is the output of the perspective consistency transformation layer;

[0065] The ControlNet conditional input is constructed.

[0066] The ControlNet conditional input is processed by using the ControlNet improved model to obtain the unfolded image.

[0067] Further, the two unfolded images are fused according to the lateral distance mean and the longitudinal distance mean to obtain a composite image, including:

[0068] The unfolded image corresponding to the left fisheye acquisition image is translated according to the lateral distance mean and the longitudinal distance mean corresponding to the left fisheye acquisition image, and the unfolded image corresponding to the right fisheye acquisition image is translated according to the lateral distance mean and the longitudinal distance mean corresponding to the right fisheye acquisition image, and the left fisheye acquisition image and the right fisheye acquisition image after moving are merged to obtain the composite image.

[0069] Reference Figures 2 to 4 A narrow space picture imaging device based on binocular fisheye, comprising: card machine A surface, card machine B surface, first fisheye, second fisheye, expansion interface, PoE separation module, third fisheye, switch and client; the first fisheye and the second fisheye are both 220° super wide-angle fisheye lenses with a focal length of 1.2mm;

[0070] The first fisheye, the second fisheye, the expansion interface, and the PoE separation module are arranged on the card machine A face; the third fisheye is arranged on the card machine B face; the card machine A face and the card machine B face constitute a closed structure; the first fisheye and the second fisheye are respectively located on the left side and the right side of the middle line of the card machine A face; the distance of the first fisheye and the second fisheye from the middle line of the card machine A face ranges from 5 cm to 10 cm; the lens of the first fisheye is deviated to the left by 30°; the lens of the second fisheye is deviated to the right by 45°; the switch is connected with the first fisheye, the second fisheye, and the third fisheye; the switch is connected with the client;

[0071] The client is used for synthesizing the images collected by the first fisheye and the second fisheye.

[0072] Specifically, the card machine A face refers to Figure 2 : the first fisheye is used for shooting the picture on the right side of the equipment door; the second fisheye is used for shooting the picture on the left side of the equipment door; the expansion interface includes a network port, a power interface, and two programmable LED lights, which can adjust the light brightness in a weak light environment; the PoE separation module separates the PoE network cable into a network cable and an input power interface; each component is assembled together by a board similar to Raspberry Pi. The card machine B face refers to Figure 3 : the third fisheye is used for shooting the picture outside the equipment door. Two 220° super wide-angle fisheye lenses (focal length f=1.2 mm) are symmetrically arranged and embedded on the upper end of the inner side of the equipment door, which can observe the equipment inside and outside the door. The installation position is deviated from the middle line of the equipment door by 5 cm to 10 cm, and the two lenses are asymmetrically distributed towards the cabinet (fisheye 1 deviated to the left by 30°, fisheye 2 deviated to the right by 45°). The LED light strips are integrated on both sides, which can adjust the light brightness in a weak light environment (color temperature 5000K, illumination ≥800 lux); the signal interface supports the PoE network port of IEEE802.3at standard.

[0073] Further, the flow summary is as follows:

[0074] 1) Initiating a picture collection command through the client: the client sends a command to collect the picture of which fisheye through the TCP protocol, and waits for the return result

[0075] 2) Double fisheye camera imaging on the inner side of the door: the fisheye lens adopts a negative crescent-shaped perspective group, which realizes an ultra-wide-angle incident angle range of [0, 220°] through extreme light bending; the distortion figure radius ; wherein is a projection function, which can be adjusted according to the actual situation. By default, the projection function is , distance is proportional to angle, maximizing the field of view of the image, the edges will be stretched, since the devices are in the middle, just to make up for the edge stretching disadvantage. Binocular fish-eye concurrent acquisition, distortion correction and unwrapping.

[0076] 3) Distortion correction and unwrapping of multiple images: distortion model: , where is the ideal incident angle, to is the radial distortion coefficient, distorted image radius.

[0077] 31) Distortion correction:

[0078] Normalized coordinates: camera intrinsic matrix , point in the coordinate system with the camera center as the origin :

[0079]

[0080]

[0081] , where is the camera intrinsic matrix, represents the x-direction offset, represents the x-direction focal length, represents the y-direction offset, represents the y-direction focal length;

[0082] Normalized radius:

[0083]

[0084] and is the normalized coordinate;

[0085] Here the normalized radius approximates the distorted image radius according to 2) , the distorted incident angle is obtained by substituting the distortion model of 3);

[0086] Distorted coordinates:

[0087]

[0088]

[0089] Pixel coordinates:

[0090]

[0091]

[0092] point corrected coordinates are , get the corrected picture by coordinate remapping: .

[0093] 32) picture unfolding:

[0094] Conditional encoding and construction input: original image coordinates to spherical coordinate mapping:

[0095]

[0096] where is the azimuth angle, and the ControlNet conditional input is constructed:

[0097]

[0098]

[0099]

[0100]

[0101] Add a transformation layer to increase the consistency of the unified perspective:

[0102]

[0103]

[0104] where is the input feature map (intermediate layer), is the distortion coefficient, (rotation matrix) and (translation coefficient) are learnable spatial transformation matrices, instead of traditional bilinear interpolation, to realize pixel-level perspective alignment.

[0105] Generate unfolded pictures: input the pre-processing model input parameters into the ControlNet model (end-to-end learning, distortion self-adaptation, generate pictures with unified perspective), generate unfolded pictures .

[0106] 4) synthetic image:

[0107] Match the key points: use binary descriptors (such as ORB, BRIEF, BRISK, etc.), use Hamming distance for matching, and get the matching key points as soon as possible , This is the first point representing the first picture, for example => This represents the matching point between the first and second images, that is, the first image's... The coordinates of the second image are ; and Given a pair of matching points, n defaults to 5. The five closest matching points are selected, and the average distance between the two fisheye matching points along the X and Y axes is calculated. , , , :

[0108]

[0109]

[0110] in The width of the image is known from its physical structure properties. The error won't be significant; the two fisheyes are basically on the same horizontal line. Finally, here's the image of the unfolded first fisheye. Translation of X and Y coordinates , Distance and the second fisheye image unfolding Translation of X and Y coordinates , The distances are calculated and merged to obtain a composite image. Final rendering reference. Figure 5 .

[0111] As an optional implementation, this embodiment also provides a small-space image imaging system based on binocular fisheye, including:

[0112] The image acquisition module is used to acquire images of a target confined space using a preset dual fisheye camera to obtain the original acquired images; the original acquired images include: a left fisheye acquired image and a right fisheye acquired image;

[0113] The image correction module is used to perform coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping on the original acquired image in sequence to obtain the corrected image;

[0114] The image unfolding module is used to perform conditional encoding, input construction, and viewpoint transformation on the corrected image sequentially using the ControlNet improved model to obtain the unfolded image.

[0115] The key point matching module is used to perform key point matching on the two unfolded images using Hamming distance to obtain the nearest matching points of the target number;

[0116] A distance mean calculation module is configured to calculate the distance mean of the nearest matching points in the X-axis and Y-axis directions of the left fish-eye image and the right fish-eye image respectively, and obtain a horizontal distance mean and a vertical distance mean.

[0117] An image synthesis module is configured to translate the unwrapped image corresponding to the left fish-eye image according to the horizontal distance mean and the vertical distance mean corresponding to the left fish-eye image, translate the unwrapped image corresponding to the right fish-eye image according to the horizontal distance mean and the vertical distance mean corresponding to the right fish-eye image, and combine the left fish-eye image and the right fish-eye image after translation to obtain a synthesis image.

[0118] As an optional implementation, the embodiment further provides an electronic device, including at least one processor and a memory connected with the processor in communication; wherein the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to execute the aforementioned double-fish-eye-based narrow-space picture imaging method.

[0119] As an optional implementation, the embodiment further provides a non-transient computer-readable storage medium storing computer instructions, and the computer instructions are used to enable a computer to execute the aforementioned double-fish-eye-based narrow-space picture imaging method.

[0120] The beneficial effects of the present application are as follows:

[0121] The present application improves the picture information restoration effect and the perspective switching effect by using ControlNet to improve the model for image unwrapping, and expands the field of view of the image and optimizes the display effect of the synthesis image through coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping.

[0122] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts of each embodiment can be referred to each other.

[0123] The principles and implementation modes of the present application are described by applying specific examples herein, and the above embodiment description is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for imaging a narrow space picture based on a binocular fisheye, characterized in that, The method comprises the following steps: image acquisition of a target narrow space by using a preset dual fisheye camera to obtain an original acquisition image; coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping are sequentially performed on the original acquisition image to obtain a corrected image; the corrected image is sequentially subjected to conditional coding, input construction and perspective transformation by using a ControlNet improved model to obtain an unfolded image; key point matching is performed on two unfolded images by using Hamming distance to obtain a target number of nearest matching points, and the average distance of the nearest matching points in the X-axis and Y-axis directions of the two original acquisition images is respectively calculated to obtain the average horizontal distance and the average vertical distance; the two unfolded images are fused according to the average horizontal distance and the average vertical distance to obtain a synthetic image; the corrected image is sequentially subjected to conditional coding, input construction and perspective transformation by using a ControlNet improved model to obtain an unfolded image, which comprises: The bilinear interpolation layer in the original ControlNet model is replaced by a view consistency transformation layer to obtain the improved ControlNet model; an expression of the view consistency transformation layer comprises: , ; wherein, is an input feature map; is a distortion coefficient; is a rotation matrix; is a translation coefficient; represents a multi-layer perception machine; is an output of the multi-layer perception machine; represents a vector splicing operation; is a two-dimensional point coordinate on a plane; is an output of the view consistency transformation layer; constructing a ControlNet conditional input; processing the ControlNet conditional input by using the ControlNet improved model to obtain the unfolded image.

2. The method according to claim 1, wherein, image acquisition of a target narrow space by using a preset dual fisheye camera to obtain an original acquisition image, which comprises: setting an ideal incident angle; the range of the ideal incident angle is [0, 220°]; A projection function is set; an expression of the projection function is: ; wherein, is a distortion imaging radius; is the incident angle; is the projection function; is a fisheye focal length parameter; image acquisition of the target narrow space by using a preset left fisheye camera and a right fisheye camera according to the projection function to obtain the original acquisition image; the original acquisition image comprises a left fisheye acquisition image and a right fisheye acquisition image.

3. The method according to claim 2, wherein, coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping are sequentially performed on the original acquisition image to obtain a corrected image, which comprises: constructing a distortion model; an expression of the distortion model is: ; wherein, , , , are respectively a first radial distortion coefficient, a second radial distortion coefficient, a third radial distortion coefficient, and a fourth radial distortion coefficient. The original acquisition image is normalized by using a pre-constructed normalization formula to obtain a normalized image; the normalization formula comprises: , ; wherein, , are the abscissa and ordinate of the normalized image respectively; , are the original coordinates in the X-axis and Y-axis directions respectively; is the offset in the X direction; is the focal length in the X direction; is the offset in the Y-axis direction; is the focal length in the Y-axis direction; radius calculation of the normalized image according to the distortion model to obtain a distortion radius.

4. The method according to claim 3, wherein, coordinate normalization, radius and angle calculation, distortion coordinate calculation, pixel coordinate calculation and coordinate remapping are sequentially performed on the original acquisition image to obtain a corrected image, which comprises: According to the distortion radius, a preset distortion coordinate formula is used to calculate the normalized image to obtain transverse distortion coordinate data and longitudinal distortion coordinate data; the distortion coordinate formula includes: , ; wherein, is the transverse distortion coordinate data; is the longitudinal distortion coordinate data; The transverse pixel coordinate data and the longitudinal pixel coordinate data are calculated by using a preset pixel coordinate formula on the transverse distortion coordinate data and the longitudinal distortion coordinate data; the pixel coordinate formula comprises: , ; wherein, is the transverse pixel coordinate data; is the longitudinal pixel coordinate data; coordinate adjustment of the original acquisition image according to the horizontal pixel coordinate data and the vertical pixel coordinate data to obtain the corrected image.

5. The method according to claim 4, wherein, fusing two unfolded images according to the average horizontal distance and the average vertical distance to obtain a synthetic image, which comprises: translation of the unfolded image corresponding to the left fisheye acquisition image according to the average horizontal distance and the average vertical distance corresponding to the left fisheye acquisition image, translation of the unfolded image corresponding to the right fisheye acquisition image according to the average horizontal distance and the average vertical distance corresponding to the right fisheye acquisition image, and merging of the moved left fisheye acquisition image and the right fisheye acquisition image to obtain the synthetic image.

6. A narrow space picture imaging device based on binocular fisheye, characterized in that, A narrow space picture imaging method based on binocular fisheye for realizing the method of claim 1, the device comprises: card machine A surface, card machine B surface, first fisheye, second fisheye, expansion interface, PoE separation module, third fisheye, switch and client; The expansion interface and the PoE separation module are arranged on the card machine A surface; the third fisheye is arranged on the card machine B surface; the first fisheye and the second fisheye are respectively located on the left side and the right side of the middle line of the card machine A surface; the distance of the first fisheye and the second fisheye deviating from the middle line of the card machine A surface ranges from 5cm to 10cm; the lens of the first fisheye is deviated to the left by 30°; the lens of the second fisheye is deviated to the right by 45°; the switch is connected with the first fisheye, the second fisheye and the third fisheye; the switch is connected with the client.

7. The narrow space imaging device based on binocular fisheye according to claim 6, characterized in that, The first fisheye and the second fisheye are both 220° super wide angle fisheye lenses with a focal length of 1.2mm.

8. An electronic device, comprising: Comprise: At least one processor, and a memory connected with the processor in communication; wherein the memory stores instructions executable by the processor, the instructions are executed by the processor to enable the processor to execute the method of any one of claims 1 to 5.

9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to make the computer execute the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Equidistant cylindrical fisheye image expansion method based on linear transformation

    CN119741192A

  • Virtual human asset generation method and device based on 3D supervision, equipment and medium

    CN120599147A