Method, system and equipment for correcting preset position of transformer substation camera
By automatically calculating the pixel offset parameters of the target image captured by the camera relative to the reference image, and adjusting the preset parameters in combination with the field of view angle, the cumbersome manual adjustment caused by the preset position deviation of the substation camera is solved, and automatic deviation correction is achieved and labor costs are reduced.
Patent Information
- Application Number
- CN202411893981.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, the preset position of the substation camera is easily deviated due to factors such as mechanical wear, which requires manual adjustment, which is cumbersome and time-consuming, and increases labor costs.
By acquiring the target image to be corrected by the camera, determining its pixel offset parameters with respect to the reference image, and automatically compute the offset of the preset parameter in combination with the camera's field of view angle, and then automatically adjusting the preset parameter after deviation correction.
It realizes automatic deviation correction of preset position of the substation camera, simplifies the operation process, and reduces labor cost consumption.
Smart Images

Figure CN119815179A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of monitoring technology, and in particular to a method, system and device for correcting the pre-position of a camera in a substation. Background Art
[0002] The intelligent patrol system uses cameras to capture pictures or record videos to monitor the status of equipment in the substation. In order to facilitate monitoring of specific locations in the substation, it is necessary to set the preset position of the camera; during the operation of the system, due to mechanical wear or other factors, the camera's image deviates from the preset position image. In related technologies, the camera is manually adjusted to align the current image of the camera with the preset position image, but the manual adjustment of the preset position is cumbersome and requires a lot of manpower costs. Summary of the invention
[0003] In view of this, the purpose of the present disclosure is to provide a method, system and device for correcting the preset position of a substation camera, so as to simplify the operation of adjusting the preset position, automatically correct the preset position and reduce labor cost consumption.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for correcting a pre-position of a substation camera, the method comprising: obtaining a target image to be corrected taken by a camera; determining pixel offset parameters of the target image relative to a reference image; wherein the reference image is an image taken by the camera under preset pre-position parameters; the pixel offset parameters comprise: at least one of a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the pre-position parameters comprise: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; based on the field of view angle and the pixel offset parameters of the camera, determining an offset of the pre-position parameters of the camera; based on the offset and the pre-position parameters, determining the pre-position parameters after correction.
[0005] The above step of determining the pixel offset parameters of the target image relative to the reference image includes: determining the offset matrix of the target image relative to the reference image based on preset image feature points; and determining the pixel offset parameters of the target image relative to the reference image based on the offset matrix.
[0006] The above-mentioned step of determining the offset matrix of the target image relative to the reference image based on preset image feature points includes: extracting first image feature points from the target image and extracting second image feature points from the reference image; performing feature matching on the first image feature points and the second image feature points to obtain matching results; and performing affine transformation on the mutually matching feature points to obtain the offset matrix of the target image relative to the reference image.
[0007] The above-mentioned step of determining the pixel offset parameters of the target image relative to the reference image based on the offset matrix includes: acquiring the first image position and the second image position from the reference image; determining the first mapping position of the first image position on the target image and the second mapping position of the second image position on the target image based on the offset matrix; and determining the pixel offset parameters of the target image relative to the reference image based on the first image position, the second image position, the first mapping position and the second mapping position.
[0008] The above-mentioned step of determining the pixel offset parameter of the target image relative to the reference image based on the first image position, the second image position, the first mapping position and the second mapping position includes: determining the horizontal pixel offset parameter based on the horizontal coordinate difference between the first image position and the first mapping position; determining the vertical pixel offset parameter based on the vertical coordinate difference between the first image position and the first mapping position; determining the pixel scaling ratio based on the first distance between the first image position and the second image position, and the second distance between the first mapping position and the second mapping position.
[0009] The above-mentioned step of determining the offset of the preset position parameters of the camera based on the field of view angle and pixel offset parameters of the camera includes: determining the offset of the horizontal rotation angle based on the horizontal dimension component of the field of view angle and the horizontal pixel offset parameters in the pixel offset parameters; determining the offset of the vertical rotation angle based on the vertical dimension component of the field of view angle and the vertical pixel offset parameters in the pixel offset parameters; and determining the pixel scaling ratio as the focal length magnification of the focal length multiple.
[0010] The above-mentioned step of determining the preset position parameters after correction based on the offset and the preset position parameters includes: adding the horizontal rotation angle and the offset of the horizontal rotation angle to obtain the horizontal rotation angle after correction; adding the vertical rotation angle and the offset of the vertical rotation angle to obtain the vertical rotation angle after correction; multiplying the focal length multiple by the focal length magnification to obtain the focal length multiple after correction.
[0011] Before the step of acquiring the target image to be corrected captured by the camera, the method further comprises: acquiring from a database a reference image pre-saved by the camera, and preset position parameters and field of view angle associated with the reference image.
[0012] In a second aspect, an embodiment of the present disclosure provides a correction system for a substation camera pre-position, the system comprising: a target image acquisition module, used to acquire a target image to be corrected taken by a camera; a pixel offset parameter determination module, used to determine the pixel offset parameters of the target image relative to a reference image; wherein the reference image is an image taken by the camera under preset pre-position parameters; the pixel offset parameters include: at least one of a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom rate; wherein the pre-position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; an offset determination module, used to determine the offset of the pre-position parameters of the camera based on the field of view angle of the camera and the pixel offset parameters; a correction module, used to determine the pre-position parameters after correction based on the offset and the pre-position parameters.
[0013] In a third aspect, an embodiment of the present invention provides a correction device for a preset position of a substation camera, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the above-mentioned correction method for a preset position of a substation camera.
[0014] The embodiments of the present disclosure bring the following beneficial effects:
[0015] The above provides a method, system and device for correcting the pre-position of a substation camera, wherein the method includes: obtaining a target image to be corrected taken by a camera; determining the pixel offset parameter of the target image relative to the reference image; wherein the reference image is an image taken by the camera under preset pre-position parameters; the pixel offset parameter includes: at least one of a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the pre-position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; based on the field of view angle and the pixel offset parameter of the camera, determining the offset of the pre-position parameter of the camera; based on the offset and the pre-position parameter, determining the pre-position parameter after correction. In this method, the pixel offset parameter of the target image relative to the reference image is automatically calculated, and then the offset of the pre-position parameter of the camera is automatically calculated based on the field of view angle and the pixel offset parameter of the camera, thereby obtaining the pre-position parameter after correction. This method simplifies the operation of adjusting the pre-position, automatically corrects the pre-position, and reduces labor cost consumption.
[0016] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0017] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A flow chart of a method for correcting the pre-position of a substation camera provided by an embodiment of the present disclosure;
[0020] Figure 2 A logic flow chart of deviation correction of a substation camera preset position provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of the structure of a correction system for presetting a substation camera provided by an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of a deviation correction device for pre-positioning a camera in a substation provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0024] At present, the intelligent patrol system uses cameras to capture pictures or record videos to monitor the equipment status and environmental safety in the substation. In order to facilitate the monitoring of specific locations in the substation, it is necessary to set the preset position of the camera; during the operation of the system, after using the preset position for a long time, due to mechanical wear or other factors, the camera image often deviates from the preset position image.
[0025] In the related art, the camera is manually adjusted so that the current image of the camera is aligned with the preset image. However, the manual adjustment of the preset position is cumbersome and requires a lot of manpower costs.
[0026] Based on the above, the embodiments of the present disclosure provide a method, system and device for correcting the preset position of a substation camera. The technology can also be applied to automatically correct the preset position of a camera in scenes such as petrochemicals and coal mines.
[0027] To facilitate understanding of this embodiment, a specific process of the embodiment of the present disclosure is described below. Figure 1 , an embodiment of a method for correcting the pre-position of a substation camera in an embodiment of the present disclosure includes:
[0028] Step S101, obtaining a target image to be corrected captured by a camera;
[0029] The execution subject of the present disclosure may be a terminal or a server, in which an intelligent patrol system is running. The following execution subject is described by taking a terminal as an example, and the terminal is usually an intelligent management terminal.
[0030] Specifically, the target image to be corrected is captured by a camera and stored in a patrol system or a local terminal device; when correcting the preset position of the camera, the terminal obtains the target image from the system or locally.
[0031] Step S102, determining pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image captured by the camera under preset preset position parameters; the pixel offset parameters include: at least one of: a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the preset position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple;
[0032] The reference image is usually stored in a database in advance and associated and bound with the preset position parameters and field of view of the camera, wherein the preset position parameters include the horizontal rotation angle p, the vertical rotation angle t and the focal length multiple z.
[0033] Specifically, there are pre-set image feature points in the target image; the terminal performs feature matching on the first image feature points extracted from the target image and the second image feature points extracted from the reference image according to the algorithm, screens out mutually matching feature points, and performs affine transformation on the mutually matching feature points to obtain an offset matrix of the target image relative to the reference image.
[0034] Next, the terminal can obtain the image position from the reference image, and then calculate the mapping position of the image position on the target image according to the offset matrix, and then calculate the pixel offset parameter of the target image relative to the reference image. The pixel offset parameter includes the horizontal pixel offset parameter d x , vertical pixel offset parameter d y and pixel scaling ratio d s At least one of .
[0035] Step S103, determining the offset of the preset position parameter of the camera based on the field of view angle and the pixel offset parameter of the camera;
[0036] The field of view of a camera usually includes a horizontal dimension component and a vertical dimension component; the offset of the preset position parameter usually includes an offset of a horizontal rotation angle, an offset of a vertical rotation angle, and a focal length magnification of a focal length multiple.
[0037] Specifically, the terminal calculates the offset d of the horizontal rotation angle of the camera according to the horizontal dimension component of the field of view angle and the horizontal pixel offset parameter in the pixel offset parameter. p ; According to the vertical dimension component of the field of view angle and the vertical pixel offset parameter in the pixel offset parameter, the offset d of the vertical rotation angle of the camera is calculated t ; and, the pixel scaling ratio is taken as the focal length ratio d of the camera's focal length multiple z .
[0038] Step S104, determining the preset position parameters after correction based on the offset and the preset position parameters.
[0039] Specifically, the terminal adds the offset of the horizontal rotation angle and the horizontal rotation angle in the preset position parameters to obtain the horizontal rotation angle p′ after correction; adds the offset of the vertical rotation angle and the vertical rotation angle in the preset position parameters to obtain the vertical rotation angle t′ after correction; multiplies the focal length magnification of the focal length multiple and the focal length multiple in the preset position parameters to obtain the focal length multiple z′ after correction.
[0040] The above-mentioned correction method for the preset position of the substation camera obtains the target image to be corrected taken by the camera; determines the pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image taken by the camera under preset preset position parameters; the pixel offset parameters include: at least one of: a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom rate; wherein the preset position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; based on the field of view angle and the pixel offset parameters of the camera, determines the offset of the preset position parameters of the camera; based on the offset and the preset position parameters, determines the preset position parameters after correction.
[0041] In this method, the pixel offset parameters of the target image relative to the reference image are automatically calculated, and then the offset of the preset position parameters of the camera is automatically calculated based on the field of view angle of the camera and the pixel offset parameters, thereby obtaining the preset position parameters after correction. This method simplifies the operation of adjusting the preset position, automatically corrects the preset position, and reduces labor cost consumption.
[0042] The following embodiments provide specific implementation methods for determining pixel offset parameters of a target image relative to a reference image.
[0043] In one approach, based on preset image feature points, an offset matrix of a target image relative to a reference image is determined; based on the offset matrix, a pixel offset parameter of the target image relative to the reference image is determined.
[0044] Specifically, there are pre-set image feature points in the target image; the terminal performs feature matching on the first image feature points extracted from the target image and the second image feature points extracted from the reference image according to the algorithm, screens out mutually matching feature points, and performs affine transformation on the mutually matching feature points to obtain an offset matrix M of the target image relative to the reference image.
[0045] Next, the terminal can obtain the image position (x, y) from the reference image, such as the first image position and the second image position; then calculate the mapping position (x', y') of the image position on the target image according to the offset matrix, such as the first mapping position and the second mapping position, and then calculate the pixel offset parameter of the target image relative to the reference image.
[0046] In one implementation, first image feature points are extracted from a target image, and second image feature points are extracted from a reference image; feature matching is performed on the first image feature points and the second image feature points to obtain a matching result; and affine transformation is performed on the mutually matching feature points to obtain an offset matrix of the target image relative to the reference image.
[0047] For example, the terminal extracts a preset first image feature point from the target image and a second image feature point from the reference image, and uses the FLANN (Fast Library for Approximate Nearest Neighbors) algorithm to perform homography matching to obtain a matching result; here, homography is a condition under which the two images can still match when one of the two images has projection distortion.
[0048] According to the matching results, the RANSAC (Random Sample Consensus) algorithm is used to solve the affine transformation relationship between the two images to eliminate image mismatching. After obtaining the mutually matching feature points, an affine transformation is performed according to the feature matching relationship between the two images to obtain the offset matrix M of the target image relative to the reference image.
[0049] In one implementation, a first image position and a second image position are obtained from a reference image; based on an offset matrix, a first mapping position of the first image position on a target image and a second mapping position of the second image position on the target image are determined; based on the first image position, the second image position, the first mapping position, and the second mapping position, a pixel offset parameter of the target image relative to the reference image is determined.
[0050] Specifically, the terminal obtains the first image position (x1, y1) and the second image position (x2, y2) from the reference image, and then calculates according to the offset matrix M and the first image position to obtain the first mapping position (x′1, y′1) of the first image position on the target image, such as the calculation formula is: And the second mapping position (x′2, y′2) of the second image position on the target image is obtained by calculation according to the offset matrix M and the second image position, such as the calculation formula is: Then, calculation is performed according to the first image position, the second image position, the first mapping position and the second mapping position to obtain a pixel offset parameter of the target image relative to the reference image.
[0051] Furthermore, based on the horizontal coordinate difference between the first image position and the first mapping position, a horizontal pixel offset parameter is determined; based on the vertical coordinate difference between the first image position and the first mapping position, a vertical pixel offset parameter is determined; based on the first distance between the first image position and the second image position, and the second distance between the first mapping position and the second mapping position, a pixel scaling ratio is determined.
[0052] For example, the terminal calculates the absolute value of the horizontal coordinate difference between the first image position and the first mapping position to obtain a horizontal pixel offset parameter, such as the calculation formula: d x = abs(x1-x′1), where the abs function is used to calculate the absolute value of a value; the absolute value of the vertical coordinate difference between the first image position and the first mapping position is calculated to obtain a vertical pixel offset parameter, such as the calculation formula: d y = abs(y1-y′1); and, a first distance between the first image position and the second image position, and a second distance between the first mapping position and the second mapping position are divided to obtain a pixel scaling ratio, such as a calculation formula:
[0053] In one method, the offset of the horizontal rotation angle is determined based on the horizontal dimension component of the field of view angle and the horizontal pixel offset parameter in the pixel offset parameter; the offset of the vertical rotation angle is determined based on the vertical dimension component of the field of view angle and the vertical pixel offset parameter in the pixel offset parameter; and the pixel scaling ratio is determined as the focal length magnification of the focal length multiple.
[0054] Specifically, the horizontal dimension component f of the terminal's field of view x Calculate the first tangent value and adjust the horizontal pixel offset parameter d in the pixel offset parameter xCalculate the first inverse tangent value, and then multiply the first tangent value by the first inverse tangent value to obtain the offset of the horizontal rotation angle, such as the calculation formula: d p =arctan(d x )×tan(f x ); the vertical dimension component f of the field of view y Calculate the second tangent value and adjust the vertical pixel offset parameter d in the pixel offset parameter y Calculate the second inverse tangent value, and then multiply the second tangent value by the second inverse tangent value to obtain the offset of the horizontal rotation angle, such as the calculation formula: d t =arctan(d y )×tan(f y ), and the pixel scaling ratio is used as the focal length magnification ratio of the focal length multiple, that is, d z =d s .
[0055] In one method, the horizontal rotation angle and the offset of the horizontal rotation angle are added to obtain the horizontal rotation angle after correction; the vertical rotation angle and the offset of the vertical rotation angle are added to obtain the vertical rotation angle after correction; the focal length multiple is multiplied by the focal length magnification to obtain the focal length multiple after correction.
[0056] Here, the horizontal rotation angle and the offset of the horizontal rotation angle are added to obtain the horizontal rotation angle after correction, such as the calculation formula: p ′ =p+d p ; Add the vertical rotation angle and the offset of the vertical rotation angle to obtain the vertical rotation angle after correction, such as the calculation formula: t ′ =t+d t ; And, the focal length multiple is multiplied by the focal length magnification ratio to obtain the focal length multiple after correction, such as the calculation formula: ′ =z×d z .
[0057] In one method, a reference image pre-saved by a camera, as well as preset position parameters and field of view angles associated with the reference image, are obtained from a database.
[0058] Specifically, when the camera is put into operation, it is configured with preset position parameters. The camera captures an image under the preset position parameters to obtain a reference image. The reference image, preset position parameters, field of view angle and reference preset position are bound and saved to a database. Before the terminal obtains the target image to be corrected taken by the camera, the pre-saved reference image and the preset position and field of view angle associated with the reference image are obtained from the database.
[0059] In one embodiment, if Figure 2As shown, the specific implementation method of the correction of the preset position of the substation camera is introduced.
[0060] Step S201, acquiring a target image, a reference image, and preset position parameters and a field of view angle associated with the reference image;
[0061] Specifically, a reference image, and preset position parameters and field of view angles associated with the reference image are obtained from a database; and a target image to be corrected, which is taken by a camera, is obtained from a system or locally.
[0062] Step S202, the image matching algorithm solves the offset matrix M;
[0063] Specifically, feature points in the target image and the reference image are extracted, and then the FLANND algorithm is used to perform feature matching, and the RANSAC algorithm is used to perform affine transformation on the mutually matched feature points to obtain the offset matrix M.
[0064] Step S203, calculating pixel shift parameters;
[0065] Specifically, according to the offset matrix and the two coordinate positions in the reference image, the mapping positions of the two coordinate positions in the target image are calculated; according to the two coordinate positions and the mapping positions, the pixel offset parameter (d x ,d y ,d s ).
[0066] Step S204, calculating the offset of the preset position parameters of the camera;
[0067] Specifically, according to the field of view angle and pixel offset parameter, the offset of the camera preset position parameter (d p ,d t ,d z ).
[0068] Step S205, calculating the preset position parameters after deviation correction;
[0069] Specifically, according to the offset and the preset position parameter, the preset position parameter after correction (p ′ ,t ′ ,z′).
[0070] Step S206, completing the correction of the camera preset position.
[0071] The above-mentioned embodiment of the present disclosure uses an image matching method to automatically calculate the pixel offset parameters of the picture, and then converts the pixel offset parameters into the camera preset position parameter offset according to the field of view angle, thereby realizing a purely automatic preset position correction method, which can largely replace the work of manually adjusting the preset position and greatly reduce labor costs.
[0072] Corresponding to the above method embodiment, see Figure 3 A schematic diagram of a correction system for presetting a substation camera is shown, the system comprising:
[0073] The target image acquisition module 301 is used to acquire the target image to be corrected taken by the camera;
[0074] The pixel offset parameter determination module 302 is used to determine the pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image captured by the camera under preset preset position parameters; the pixel offset parameters include: at least one of: a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the preset position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple;
[0075] An offset determination module 303 is used to determine an offset of a preset position parameter of a camera based on a field of view angle and a pixel offset parameter of the camera;
[0076] The correction module 304 is used to determine the preset position parameters after correction based on the offset and the preset position parameters.
[0077] The above-mentioned correction system for the pre-position of the substation camera obtains the target image to be corrected taken by the camera; determines the pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image taken by the camera under preset pre-position parameters; the pixel offset parameters include: at least one of: a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom rate; wherein the pre-position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; based on the field of view angle and the pixel offset parameters of the camera, determines the offset of the pre-position parameters of the camera; based on the offset and the pre-position parameters, determines the pre-position parameters after correction.
[0078] In this method, the pixel offset parameters of the target image relative to the reference image are automatically calculated, and then the offset of the preset position parameters of the camera is automatically calculated based on the field of view angle of the camera and the pixel offset parameters, thereby obtaining the preset position parameters after correction. This method simplifies the operation of adjusting the preset position, automatically corrects the preset position, and reduces labor cost consumption.
[0079] The above-mentioned pixel offset parameter determination module is also used to determine the offset matrix of the target image relative to the reference image based on preset image feature points; and determine the pixel offset parameters of the target image relative to the reference image based on the offset matrix.
[0080] The above-mentioned pixel offset parameter determination module is also used to extract the first image feature points from the target image and the second image feature points from the reference image; perform feature matching on the first image feature points and the second image feature points to obtain matching results; perform affine transformation on the mutually matching feature points to obtain the offset matrix of the target image relative to the reference image.
[0081] The above-mentioned pixel offset parameter determination module is also used to obtain the first image position and the second image position from the reference image; based on the offset matrix, determine the first mapping position of the first image position on the target image, and the second mapping position of the second image position on the target image; based on the first image position, the second image position, the first mapping position and the second mapping position, determine the pixel offset parameter of the target image relative to the reference image.
[0082] The above-mentioned pixel offset parameter determination module is also used to determine the horizontal pixel offset parameter based on the horizontal coordinate difference between the first image position and the first mapping position; determine the vertical pixel offset parameter based on the vertical coordinate difference between the first image position and the first mapping position; and determine the pixel scaling rate based on the first distance between the first image position and the second image position, and the second distance between the first mapping position and the second mapping position.
[0083] The above-mentioned offset determination module is also used to determine the offset of the horizontal rotation angle based on the horizontal dimension component of the field of view angle and the horizontal pixel offset parameter in the pixel offset parameters; determine the offset of the vertical rotation angle based on the vertical dimension component of the field of view angle and the vertical pixel offset parameter in the pixel offset parameters; and determine the pixel scaling rate as the focal length magnification of the focal length multiple.
[0084] The above-mentioned correction module is also used to add the horizontal rotation angle and the offset of the horizontal rotation angle to obtain the horizontal rotation angle after correction; add the vertical rotation angle and the offset of the vertical rotation angle to obtain the vertical rotation angle after correction; multiply the focal length multiple by the focal length magnification to obtain the focal length multiple after correction.
[0085] The above device also includes a reference image acquisition module, which is used to acquire from a database a reference image pre-stored by the camera, as well as preset position parameters and field of view angles associated with the reference image.
[0086] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the above-mentioned substation camera preset position correction method. The electronic device can be a server or a terminal device.
[0087] See also Figure 4As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores computer executable instructions that can be executed by the processor 100, and the processor 100 executes the computer executable instructions to implement the above-mentioned correction method for the preset position of the substation camera.
[0088] Further, Figure 4 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0089] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0090] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.
[0091] The computer program product of the method, system and device for correcting the pre-position of a substation camera provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0093] In addition, in the description of the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.
[0094] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0095] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0096] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for correcting the preset position of a substation camera, characterized in that: The method comprises: Acquire the target image to be corrected captured by the camera; Determine the pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image captured by the camera under preset preset position parameters; the pixel offset parameters include: at least one of: a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the preset position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; Determining an offset of a preset position parameter of the camera based on the field of view angle of the camera and the pixel offset parameter; Based on the offset and the preset position parameter, the preset position parameter after correction is determined.
2. The method according to claim 1, characterized in that The step of determining the pixel offset parameter of the target image relative to the reference image comprises: Based on preset image feature points, determining an offset matrix of the target image relative to a reference image; Based on the offset matrix, a pixel offset parameter of the target image relative to the reference image is determined.
3. The method according to claim 2, characterized in that The step of determining an offset matrix of the target image relative to the reference image based on preset image feature points comprises: Extracting first image feature points from the target image and extracting second image feature points from the reference image; Performing feature matching on the first image feature points and the second image feature points to obtain a matching result; Affine transformation is performed on the mutually matching feature points to obtain an offset matrix of the target image relative to the reference image.
4. The method according to claim 2, characterized in that: The step of determining the pixel offset parameters of the target image relative to the reference image based on the offset matrix comprises: Acquire a first image position and a second image position from the reference image; Determining, based on the offset matrix, a first mapping position of the first image position on the target image, and a second mapping position of the second image position on the target image; A pixel shift parameter of the target image relative to a reference image is determined based on the first image position, the second image position, the first mapping position, and the second mapping position.
5. The method according to claim 4, characterized in that The step of determining a pixel offset parameter of the target image relative to a reference image based on the first image position, the second image position, the first mapping position, and the second mapping position comprises: determining a horizontal pixel offset parameter based on a difference in abscissa between the first image position and the first mapping position; determining a vertical pixel offset parameter based on a difference in ordinate between the first image position and the first mapped position; A pixel scaling ratio is determined based on a first distance between the first image position and the second image position, and a second distance between the first mapped position and the second mapped position.
6. The method according to claim 1, characterized in that The step of determining the offset of the preset position parameter of the camera based on the field of view angle of the camera and the pixel offset parameter comprises: Determine the offset of the horizontal rotation angle based on the horizontal dimension component of the field of view angle and the horizontal pixel offset parameter in the pixel offset parameter; Determine the offset of the vertical rotation angle based on the vertical dimension component of the field of view angle and the vertical pixel offset parameter in the pixel offset parameters; The pixel scaling ratio is determined as a focal length magnification ratio of the focal length multiple.
7. The method according to claim 1, characterized in that The step of determining the preset position parameters after correction based on the offset and the preset position parameters comprises: Adding the horizontal rotation angle and the offset of the horizontal rotation angle to obtain a corrected horizontal rotation angle; Adding the vertical rotation angle and the offset of the vertical rotation angle to obtain a corrected vertical rotation angle; The focal length multiple is multiplied by the focal length variation ratio to obtain the focal length multiple after correction.
8. The method according to claim 1, characterized in that Before the step of acquiring the target image to be corrected captured by the camera, the method further includes: A reference image pre-saved by the camera, as well as preset position parameters and a field of view angle associated with the reference image are acquired from a database.
9. The deviation correction system for the preset position of the substation camera is characterized by: The system comprises: A target image acquisition module, used to acquire the target image to be corrected taken by the camera; A pixel offset parameter determination module, used to determine the pixel offset parameters of the target image relative to the reference image; wherein the reference image is an image captured by the camera under preset preset position parameters; the pixel offset parameters include: at least one of a horizontal pixel offset parameter, a vertical pixel offset parameter and a pixel zoom ratio; wherein the preset position parameters include: a horizontal rotation angle, a vertical rotation angle and a focal length multiple; An offset determination module, used to determine the offset of the preset position parameter of the camera based on the field of view angle of the camera and the pixel offset parameter; The correction module is used to determine the preset position parameters after correction based on the offset and the preset position parameters.
10. The deviation correction device for the pre-positioning of the substation camera is characterized by: It comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method for correcting the preset position of a substation camera as described in any one of claims 1-8.