A dual-lens-based coordinate system conversion method, device and medium

By acquiring video images in a dual-lens monitoring device, selecting registration points for normalization processing and performing a linear transformation, the problem of strong dependence on device parameters and poor adaptability of coordinate system transformation methods in the prior art is solved, and rapid linkage of dual-lens field of view is realized.

CN116546288BActive Publication Date: 2026-03-03SHANDONG SENTER ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing coordinate system transformation methods for dual-lens monitoring equipment are highly dependent on equipment parameters, have poor adaptability to different equipment models, and have high algorithm complexity and are difficult to register.

Method used

Video images are acquired using wide-angle and zoom lenses, registration points are selected and normalized to construct a registration coordinate system, and a linear transformation is performed according to the coordinate system transformation command to achieve the coordinate system transformation.

Benefits of technology

It provides a simple and fast method that reduces the complexity of registration and computation, enabling rapid and effective linkage of the field of view of dual lenses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116546288B_ABST
    Figure CN116546288B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on double lens coordinate system conversion method, equipment and medium, method includes: through wide-angle lens acquisition first video image, and through zoom lens acquisition second video image, in first video image select first group of registration points meeting preset condition, and in second video image select second group of registration points corresponding to the first group of registration points, first group of registration points is normalized, and constructs wide-angle registration coordinate system, second group of registration points is normalized, and constructs zoom registration coordinate system;Determine that zoom lens exists zoom, and obtain coordinate system conversion instruction, according to coordinate system conversion instruction and wide-angle registration coordinate system and zoom registration coordinate system, carry out coordinate system conversion processing.Through two-point registration method, for security equipment wide-angle and zoom two lens cooperative positioning provides the method of fast registration.Reduces the complexity of registration and calculation.Provides effective method for the linkage between two lenses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image conversion and processing technology, specifically to a coordinate system conversion method, device, and medium based on dual lenses. Background Technology

[0002] In certain scenarios requiring monitoring, dual-lens monitoring equipment is typically installed to achieve multi-directional, blind-spot-free surveillance. This equipment consists of a wide-angle lens and a zoom lens. The wide-angle lens is a photographic lens with a shorter focal length than a standard lens, a longer focal length than a fisheye lens, and a smaller angle of view. Due to its short focal length and wide angle of view, the wide-angle lens can capture a large area of ​​scenery within a relatively short shooting distance. The zoom lens uses an electric motor, integrated control chip, and control software to adjust the magnification, allowing for corresponding adjustments based on different shooting distances.

[0003] To achieve synchronized field of view between two cameras, fully explore the potential of surveillance equipment, and improve the customer experience, it is necessary to convert the field of view areas of the two cameras. This involves the conversion of the coordinate systems corresponding to the two cameras. Existing conversion methods are highly dependent on device parameters and video parameters, have poor adaptability to different equipment models, and suffer from problems such as high registration difficulty and high algorithm complexity. Summary of the Invention

[0004] To address the aforementioned problems—namely, the strong dependence of existing conversion methods on device and video parameters, poor adaptability to different device models, and high registration difficulty and algorithm complexity—this application proposes a coordinate system transformation method, device, and medium based on dual lenses, including...

[0005] On one hand, this application proposes a coordinate system transformation method based on dual lenses, including: acquiring a first video image through a wide-angle lens and acquiring a second video image through a zoom lens, wherein the current magnification of the zoom lens is 1x; selecting a first set of registration points in the first video image that meets preset conditions, and selecting a second set of registration points in the second video image that corresponds to the first set of registration points, wherein the relative position of the second set of registration points in the second video image is consistent with the relative position of the first set of registration points in the first video image; and converting the first set of registration points into a second set of registration points. A set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result. The second set of registration points is also normalized, and a zoom registration coordinate system is constructed based on the processing result. Based on the second video image, it is determined that the zoom lens has a zoom capability, and a coordinate system transformation instruction is obtained. This instruction includes converting the wide-angle standard coordinate system to a zoom standard coordinate system and converting the zoom standard coordinate system to a wide-angle standard coordinate system. Based on the coordinate system transformation instruction, the wide-angle registration coordinate system, and the zoom registration coordinate system, a coordinate system transformation is performed.

[0006] In one example, selecting a first set of registration points that meet preset conditions in the first video image and selecting a second set of registration points corresponding to the first set of registration points in the second video image specifically includes: determining a first registration point and a second registration point in the first video image based on two reference objects selected by the user, and determining that the distance between the first registration point and the second registration point is greater than a preset threshold and that they are not on the same horizontal line and the same vertical line; determining a third registration point corresponding to the first registration point and a fourth registration point corresponding to the second registration point in the second video image based on the two reference objects; using the first registration point and the second registration point as the first set of registration points, and using the third registration point and the fourth registration point as the second set of registration points.

[0007] In one example, coordinate system transformation processing is performed according to the coordinate system transformation instruction, the wide-angle registration coordinate system, and the zoom registration coordinate system. Specifically, this includes: determining that the coordinate system transformation instruction is to convert the wide-angle standard coordinate system to the zoom standard coordinate system; converting the wide-angle standard coordinate system corresponding to the current viewpoint of the first video image into the corresponding wide-angle registration coordinate system using a linear proportional transformation algorithm; converting the corresponding wide-angle registration coordinate system into the corresponding zoom registration coordinate system according to the zoom lens's magnification; and converting the corresponding zoom registration coordinate system into the zoom standard coordinate system corresponding to the second video image at the zoom level using the linear proportional transformation algorithm.

[0008] In one example, based on the zoom level of the zoom lens, the corresponding wide-angle registration coordinate system is converted into a corresponding zoom registration coordinate system. This specifically includes: obtaining the known abscissa and ordinate of each point in the corresponding wide-angle registration coordinate system; calculating the solved abscissa and the solved ordinate corresponding to the known abscissa based on the zoom level of the zoom lens and a pre-stored conversion algorithm; and generating a zoom registration coordinate system corresponding to the corresponding wide-angle registration coordinate system based on the solved abscissa and the solved ordinate.

[0009] In one example, based on the zoom level of the zoom lens and a pre-stored conversion algorithm, the solved abscissa corresponding to the known abscissa and the solved ordinate corresponding to the known ordinate are calculated. Specifically, this includes: calculating the solved abscissa corresponding to the known abscissa using a pre-stored conversion algorithm, including: And, calculating the solution ordinate corresponding to the known ordinate using the pre-stored conversion algorithm includes: Wherein, X is the solved abscissa, x is the known abscissa, X1 is the abscissa of the third registration point, X2 is the abscissa of the fourth registration point, x1 is the abscissa of the first registration point, x2 is the abscissa of the second registration point, Y is the solved ordinate, y is the known ordinate, Y1 is the ordinate of the third registration point, Y2 is the ordinate of the fourth registration point, y1 is the ordinate of the first registration point, y2 is the ordinate of the second registration point, and n is the change factor.

[0010] In one example, coordinate system transformation processing is performed according to the coordinate system transformation instruction, the wide-angle registration coordinate system, and the zoom registration coordinate system. Specifically, this includes: determining that the coordinate system transformation instruction is to convert the zoom standard coordinate system to the wide-angle standard coordinate system; based on the zoom ratio of the zoom lens, converting the zoom standard coordinate system of the second video image at the zoom ratio to the corresponding zoom registration coordinate system using a geometric linear transformation algorithm; based on the zoom ratio, converting the corresponding zoom registration coordinate system to the corresponding wide-angle registration coordinate system; and converting the corresponding wide-angle registration coordinate system to the wide-angle standard coordinate system corresponding to the current viewpoint of the first video image using the geometric linear transformation algorithm.

[0011] In one example, based on the change factor, the corresponding zoom registration coordinate system is converted into a corresponding wide-angle registration coordinate system, specifically including: obtaining the known abscissa and ordinate of each point in the corresponding zoom registration coordinate system; calculating the solved abscissa and the solved ordinate corresponding to the known abscissa based on the change factor and a pre-stored conversion algorithm; and generating a wide-angle registration coordinate system corresponding to the corresponding zoom registration coordinate system based on the solved abscissa and the solved ordinate.

[0012] In one example, based on the change factor and a pre-stored conversion algorithm, the solved abscissa corresponding to the known abscissa and the solved ordinate corresponding to the known ordinate are calculated. Specifically, this includes: calculating the solved abscissa corresponding to the known abscissa using a pre-stored conversion algorithm, including: And, calculating the solution ordinate corresponding to the known ordinate using the pre-stored conversion algorithm includes: Wherein, x is the solved abscissa, X is the known abscissa, x1 is the abscissa of the first registration point, x2 is the abscissa of the second registration point, X1 is the abscissa of the third registration point, X2 is the abscissa of the fourth registration point, y is the solved ordinate, Y is the known ordinate, y1 is the ordinate of the first registration point, y2 is the ordinate of the second registration point, Y1 is the ordinate of the third registration point, Y2 is the ordinate of the fourth registration point, and n is the change factor.

[0013] On the other hand, this application also proposes a coordinate system transformation device based on dual lenses, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the following instructions: acquiring a first video image through a wide-angle lens and acquiring a second video image through a zoom lens, wherein the current magnification of the zoom lens is 1x; selecting a first set of registration points in the first video image that meets preset conditions, and selecting a second set of registration points in the second video image corresponding to the first set of registration points, wherein the second set... The relative positions of the registration points in the second video image are consistent with the relative positions of the first set of registration points in the first video image; the first set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result; the second set of registration points is normalized, and a zoom registration coordinate system is constructed based on the processing result; based on the second video image, it is determined that the zoom lens has zoom capability, and a coordinate system transformation instruction is obtained, wherein the coordinate system transformation instruction includes: converting the wide-angle standard coordinate system to the zoom standard coordinate system, and converting the zoom standard coordinate system to the wide-angle standard coordinate system; based on the coordinate system transformation instruction and the wide-angle registration coordinate system and the zoom registration coordinate system, coordinate system transformation processing is performed.

[0014] On the other hand, this application also proposes a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to: acquire a first video image through a wide-angle lens and acquire a second video image through a zoom lens, wherein the current magnification of the zoom lens is 1x; select a first set of registration points in the first video image that meets preset conditions, and select a second set of registration points in the second video image that corresponds to the first set of registration points, wherein the relative position of the second set of registration points in the second video image is the same as that of the first set of registration points in the first video image. The relative positions are consistent; the first set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result; the second set of registration points is normalized, and a variable-magnification registration coordinate system is constructed based on the processing result; based on the second video image, it is determined that the zoom lens has a zoom function, and a coordinate system transformation instruction is obtained, wherein the coordinate system transformation instruction includes: converting the wide-angle standard coordinate system to the variable-magnification standard coordinate system, and converting the variable-magnification standard coordinate system to the wide-angle standard coordinate system; based on the coordinate system transformation instruction and the wide-angle registration coordinate system and the variable-magnification registration coordinate system, coordinate system transformation processing is performed.

[0015] The coordinate system transformation method, device, and medium based on dual lenses proposed in this application offer the following advantages: It provides a rapid registration method for the collaborative positioning of wide-angle and zoom lenses in security equipment using a two-point registration approach. It is simple, fast, and effective, reducing the complexity of registration and calculation. It also provides an effective method for the linkage between the two lenses. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 This is a flowchart illustrating a coordinate system transformation method based on dual lenses in an embodiment of this application.

[0018] Figure 2 This is a schematic diagram of a coordinate system transformation device based on dual lenses in an embodiment of this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] First, it should be noted that the coordinate system transformation method based on dual cameras described in this application can be stored in a system or server as a program or algorithm, and can be supported by corresponding components in the hardware terminal where the system or server resides, such as processors, memory, and communication modules. In this application embodiment, a system is used as an example for explanation. This system can support the program or algorithm through its own hardware terminal, or it can support the program or algorithm through information exchange with a remote server. Furthermore, the system can be stored in a corresponding hardware terminal, including but not limited to: mobile phones, tablets, personal computers, and other hardware devices with corresponding computing power. Users can log in to the system through the system itself, an APP, or a webpage to adjust, reference, and monitor its functions or parameters, thereby achieving the coordinate system transformation of the dual cameras.

[0021] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0022] like Figure 1 As shown in the figure, an embodiment of this application provides a coordinate system transformation method based on dual lenses, including:

[0023] S101: Acquire a first video image using a wide-angle lens and a second video image using a zoom lens, wherein the current magnification of the zoom lens is 1x.

[0024] Specifically, the dual lenses in this application involve a wide-angle lens and a zoom lens. The shooting direction of the two lenses should be consistent and they should also be kept on. In addition, the current magnification of the zoom lens should be 1x, that is, the captured image has not been enlarged or reduced.

[0025] The aspect ratios of the first video image captured by the wide-angle lens and the second video image captured by the zoom lens can be the same or different. It should be noted that the first and second video images can be displayed in the form of a video window on a display device. The aspect ratio can be flexibly set according to the lens model and system settings, and is not specifically limited here.

[0026] S102: Select a first set of registration points that meet preset conditions in the first video image, and select a second set of registration points that correspond to the first set of registration points in the second video image, wherein the relative position of the second set of registration points in the second video image is consistent with the relative position of the first set of registration points in the first video image.

[0027] Specifically, the system determines a first registration point and a second registration point in the first video image based on two reference objects selected by the user, and determines that the distance between the first registration point and the second registration point is greater than a preset threshold and that they are not on the same horizontal line and the same vertical line.

[0028] That is, the first registration point corresponds to one of the two reference objects, and the second registration point corresponds to the other of the two reference objects. It should also be noted that the registration point should be at a specific location on the reference object, rather than being randomly selected from the reference objects.

[0029] Then, the system determines a third registration point corresponding to the first registration point and a fourth registration point corresponding to the second registration point in the second video image based on two reference objects.

[0030] That is, the reference object corresponding to the third registration point is consistent with that of the first registration point, and is also consistent at a specific position of the reference object. The reference object corresponding to the fourth registration point is consistent with that of the second registration point, and is also consistent at a specific position of the reference object.

[0031] Then, the system uses the first registration point and the second registration point as the first set of registration points, and the third registration point and the fourth registration point as the second set of registration points.

[0032] S103: Normalize the first set of registration points and construct a wide-angle registration coordinate system based on the processing result; normalize the second set of registration points and construct a variable-magnification registration coordinate system based on the processing result.

[0033] Specifically, the system normalizes the first set of registration points, for example, by normalizing the registration coordinate system to rectReg(0, 0, VideoWndWH, VideoWndWH), and then constructs a wide-angle registration coordinate system based on the processing result.

[0034] In the wide-angle registration coordinate system, the first registration point can be set as Pg1(x1, y1), and the second registration point can be set as Pg2(x2, y2).

[0035] Meanwhile, the system normalizes the second set of registration points, for example, by normalizing the registration coordinate system to rectReg(0, 0, VideoWndWH, VideoWndWH), and then constructs a variable-magnification registration coordinate system based on the processing results.

[0036] In the variable zoom registration coordinate system, the third registration point can be set as Pb1(X1, Y1), and the fourth registration point can be set as Pb2(X2, Y2).

[0037] S104: Based on the second video image, determine that the zoom lens has zoom capability, and obtain coordinate system transformation instructions, wherein the coordinate system transformation instructions include: converting the wide-angle standard coordinate system to the zoom standard coordinate system, and converting the zoom standard coordinate system to the wide-angle standard coordinate system.

[0038] Specifically, in the first video image, there is a pre-existing wide-angle standard coordinate system corresponding to the first video image, that is, the standard coordinate system of the wide-angle lens. At the same time, in the second video image, there is a pre-existing zoom standard coordinate system corresponding to the second video image, that is, the standard coordinate system of the zoom lens.

[0039] When a zoom lens is used, in order to improve the linkage of the field of view of the two lenses and switch the field of view of the two lenses, it is necessary to convert the wide-angle standard coordinate system to the zoom standard coordinate system to realize the conversion of the field of view of the wide-angle lens to the field of view of the zoom lens, or convert the zoom standard coordinate system to the wide-angle standard coordinate system to realize the conversion of the field of view of the zoom lens to the field of view of the wide-angle lens.

[0040] S105: Perform coordinate system transformation processing according to the coordinate system transformation command, the wide-angle registration coordinate system, and the variable-magnification registration coordinate system.

[0041] Specifically, depending on the coordinate system transformation command, there are two sets of transformation methods.

[0042] 1. Convert the wide-angle standard coordinate system to a variable-magnification standard coordinate system:

[0043] The system determines the coordinate system transformation command as converting the wide-angle standard coordinate system to the variable-magnification standard coordinate system.

[0044] Then, the system converts the wide-angle standard coordinate system corresponding to the current viewpoint of the first video image into the corresponding wide-angle registration coordinate system through a linear transformation algorithm.

[0045] For example, in the wide-angle standard coordinate system, the upper left corner of the first video image is (x1, y1) and the lower right corner is (x2, y2). In the corresponding wide-angle registration coordinate system, the upper left corner of the first video image is (X1, Y1) and the lower right corner is (X2, Y2).

[0046] Meanwhile, let the known point in the wide-angle standard coordinate system be (x, y), and the target transformation point in the wide-angle registration coordinate system be (X, Y);

[0047] Then, according to the geometric relationship, the x-direction is: (X-X1) / (X2-X1)=(x-x1) / (x2-x1);

[0048] have to:

[0049] X=X1+Kx*(x-x1); Kx=(X2-X1) / (x2-x1);

[0050] Similarly:

[0051] Y=Y1+Ky*(y-y1); Ky=(Y2-Y1) / (y2-y1).

[0052] In other words, the wide-angle standard coordinate system can be converted into a wide-angle registration coordinate system using the above method.

[0053] Furthermore, the system converts the corresponding wide-angle registration coordinate system into a corresponding zoom registration coordinate system based on the zoom lens's magnification. Specifically, the system obtains the known x-coordinate and y-coordinate of each point in the corresponding wide-angle registration coordinate system. Then, based on the zoom lens's magnification and a pre-stored conversion algorithm, the system calculates the solved y-coordinates corresponding to the known x-coordinates and y-coordinates. Finally, based on the solved x-coordinates and y-coordinates, the system generates a zoom registration coordinate system corresponding to the corresponding wide-angle registration coordinate system.

[0054] The solution process includes:

[0055] The process involves calculating the x-coordinate corresponding to the known x-coordinate using a pre-stored conversion algorithm, including:

[0056]

[0057] In addition, the solution ordinates corresponding to the known ordinates are calculated using a pre-stored transformation algorithm, including:

[0058]

[0059] Where X is the x-coordinate to be solved, x is the known x-coordinate, X1 is the x-coordinate of the third registration point, X2 is the x-coordinate of the fourth registration point, x1 is the x-coordinate of the first registration point, x2 is the x-coordinate of the second registration point, Y is the y-coordinate to be solved, y is the known y-coordinate, Y1 is the y-coordinate of the third registration point, Y2 is the y-coordinate of the fourth registration point, y1 is the y-coordinate of the first registration point, y2 is the y-coordinate of the second registration point, and n is the change factor.

[0060] Furthermore, Fz, or the Fz transformation algorithm, enlarges the x and y coordinates by a factor of n, keeping the coordinates of the center point of the rectangular region they encompass unchanged. Taking the x-coordinate as an example, the Fz transformation is described as follows:

[0061] Fz(X) = cp.x + (X - cp.x) * n

[0062] Where n is the magnification factor, and cp is the center point of the region where the conversion point is located. For example, the center point of the registration region is the center point of the rectangular region rectReg.

[0063] Finally, the system converts the corresponding zoom registration coordinate system into the zoom standard coordinate system corresponding to the second video image at the zoom level using a linear transformation algorithm. This process is consistent with the calculation idea of ​​converting the wide-angle standard coordinate system to the wide-angle zoom coordinate system, and will not be repeated here.

[0064] 2. Convert the zoom standard coordinate system to the wide-angle standard coordinate system:

[0065] Specifically, the system determines the coordinate system transformation command as converting the variable-size standard coordinate system to the wide-angle standard coordinate system.

[0066] Then, based on the zoom level of the zoom lens, the system converts the zoom standard coordinate system of the second video image at the zoom level into the corresponding zoom registration coordinate system through a linear transformation algorithm.

[0067] For example:

[0068] Let the upper left corner of the second video image be (x1, y2) and the lower right corner be (x2, y2) in the variable zoom standard coordinate system, and the upper left corner of the second video image corresponding to the 1x variable zoom registration coordinate system be (X1, Y1) and the lower right corner be (X2, Y2).

[0069] Then, after magnification n times

[0070] The top-left corner of the second video image in the zoom standard coordinate system is (xn1, yn2), and the bottom-right corner is (xn2, yn2).

[0071] In the variable zoom registration coordinate system, the upper left corner of the corresponding second video image is (Xn1, Yn1) and the lower right corner is (Xn2, Yn2).

[0072] in:

[0073] xn1=Fz(x1,n)xn2=Fz(x2,n)

[0074] yn1=Fz(y1,n)yn2=Fz(y2,n)

[0075] Xn1=Fz(X1,n)Xn2=Fz(X2,n)

[0076] Yn1=Fz(Y1,n)Yn2=Fz(Y2,n)

[0077] The conversion of Fz has been fully explained above and will not be repeated here.

[0078] Furthermore, let the known point of the second video image in the zoom standard coordinate system be (x, y), and let the target transformation point of the second video image in the zoom registration coordinate system be (X, Y).

[0079] Then, according to the geometric relationship, the x-direction is:

[0080] (X-Xn1) / (Xn2-Xn1)=(x-xn1) / (xn2-xn1)

[0081] have to:

[0082] X=Xn1+Kx*(x-xn1); Kx=(Xn2-Xn1) / (xn2-xn1);

[0083] Similarly;

[0084] Y=Yn1+Ky*(y-yn1); Ky=(Yn2-Yn1) / (yn2-yn1).

[0085] Furthermore, the system converts the corresponding zoom registration coordinate system into the corresponding wide-angle registration coordinate system based on the zoom factor. Specifically, the system obtains the known abscissa and ordinate of each point in the corresponding zoom registration coordinate system. Then, based on the zoom factor and a pre-stored conversion algorithm, the system calculates the solved abscissa and ordinate corresponding to the known abscissa and ordinate. Finally, based on the solved abscissa and ordinate, the system generates the wide-angle registration coordinate system corresponding to the corresponding zoom registration coordinate system.

[0086] The solution process includes:

[0087] The process involves calculating the x-coordinate corresponding to the known x-coordinate using a pre-stored conversion algorithm, including:

[0088]

[0089] And, calculating the solution ordinate corresponding to the known ordinate using the pre-stored conversion algorithm includes:

[0090]

[0091] Where x is the x-coordinate to be solved, X is the known x-coordinate, x1 is the x-coordinate of the first registration point, x2 is the x-coordinate of the second registration point, X1 is the x-coordinate of the third registration point, X2 is the x-coordinate of the fourth registration point, y is the y-coordinate to be solved, Y is the known y-coordinate, y1 is the y-coordinate of the first registration point, y2 is the y-coordinate of the second registration point, Y1 is the y-coordinate of the third registration point, Y2 is the y-coordinate of the fourth registration point, and n is the change factor.

[0092] The conversion of Fz has been fully explained above and will not be repeated here.

[0093] In one embodiment, such as Figure 2 As shown, this application also provides a coordinate system transformation device based on dual lenses, including:

[0094] At least one processor; and,

[0095] A memory communicatively connected to the at least one processor; wherein,

[0096] The memory stores instructions that can be executed by the at least one processor, and the instructions, when executed by the at least one processor, enable the at least one processor to execute the following instructions:

[0097] The first video image is captured by a wide-angle lens, and the second video image is captured by a zoom lens, wherein the current magnification of the zoom lens is 1x.

[0098] In the first video image, a first set of registration points that meet preset conditions is selected, and in the second video image, a second set of registration points corresponding to the first set of registration points is selected, wherein the relative position of the second set of registration points in the second video image is the same as the relative position of the first set of registration points in the first video image;

[0099] The first set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result. The second set of registration points is also normalized, and a variable-magnification registration coordinate system is constructed based on the processing result.

[0100] Based on the second video image, it is determined that the zoom lens has zoom capability, and a coordinate system transformation instruction is obtained, wherein the coordinate system transformation instruction includes: converting the wide-angle standard coordinate system to the zoom standard coordinate system, and converting the zoom standard coordinate system to the wide-angle standard coordinate system;

[0101] The coordinate system transformation process is performed according to the coordinate system transformation command, the wide-angle registration coordinate system, and the variable-magnification registration coordinate system.

[0102] In one embodiment, this application also provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0103] The first video image is captured by a wide-angle lens, and the second video image is captured by a zoom lens, wherein the current magnification of the zoom lens is 1x.

[0104] In the first video image, a first set of registration points that meet preset conditions is selected, and in the second video image, a second set of registration points corresponding to the first set of registration points is selected, wherein the relative position of the second set of registration points in the second video image is the same as the relative position of the first set of registration points in the first video image;

[0105] The first set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result. The second set of registration points is also normalized, and a variable-magnification registration coordinate system is constructed based on the processing result.

[0106] Based on the second video image, it is determined that the zoom lens has zoom capability, and a coordinate system transformation instruction is obtained, wherein the coordinate system transformation instruction includes: converting the wide-angle standard coordinate system to the zoom standard coordinate system, and converting the zoom standard coordinate system to the wide-angle standard coordinate system;

[0107] The coordinate system transformation process is performed according to the coordinate system transformation command, the wide-angle registration coordinate system, and the variable-magnification registration coordinate system.

[0108] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0109] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0110] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0111] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0114] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0115] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0116] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0117] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0118] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A coordinate system transformation method based on dual lenses, characterized in that, include: The first video image is captured by a wide-angle lens, and the second video image is captured by a zoom lens, wherein the current magnification of the zoom lens is 1x. In the first video image, a first set of registration points that meet preset conditions is selected, and in the second video image, a second set of registration points corresponding to the first set of registration points is selected, wherein the relative position of the second set of registration points in the second video image is the same as the relative position of the first set of registration points in the first video image; The first set of registration points is normalized, and a wide-angle registration coordinate system is constructed based on the processing result. The second set of registration points is also normalized, and a variable-magnification registration coordinate system is constructed based on the processing result. Based on the second video image, it is determined that the zoom lens has zoom capability, and a coordinate system transformation instruction is obtained, wherein the coordinate system transformation instruction includes: converting the wide-angle standard coordinate system to the zoom standard coordinate system, and converting the zoom standard coordinate system to the wide-angle standard coordinate system; According to the coordinate system transformation instruction, the wide-angle registration coordinate system, and the zoom registration coordinate system, a coordinate system transformation process is performed, including: determining that the coordinate system transformation instruction is to convert the wide-angle standard coordinate system to the zoom standard coordinate system; converting the wide-angle standard coordinate system corresponding to the current viewpoint of the first video image to the corresponding wide-angle registration coordinate system using a linear proportional transformation algorithm; converting the corresponding wide-angle registration coordinate system to the corresponding zoom registration coordinate system according to the zoom lens's magnification; and converting the corresponding zoom registration coordinate system to the second video image using the linear proportional transformation algorithm. The zoom standard coordinate system corresponding to the zoom factor; or, the coordinate system transformation instruction is determined to be the conversion of the zoom standard coordinate system to the wide-angle standard coordinate system. According to the zoom factor of the zoom lens, the zoom standard coordinate system of the second video image at the zoom factor is converted to the corresponding zoom registration coordinate system through a geometric linear transformation algorithm. According to the zoom factor, the corresponding zoom registration coordinate system is converted to the corresponding wide-angle registration coordinate system. The corresponding wide-angle registration coordinate system is then converted to the wide-angle standard coordinate system corresponding to the current viewpoint of the first video image through the geometric linear transformation algorithm.

2. The coordinate system transformation method based on dual lenses according to claim 1, characterized in that, Selecting a first set of registration points that meet preset conditions in the first video image, and selecting a second set of registration points corresponding to the first set of registration points in the second video image, specifically includes: In the first video image, a first registration point and a second registration point are determined based on two reference objects selected by the user, and it is determined that the distance between the first registration point and the second registration point is greater than a preset threshold and they are not on the same horizontal line and the same vertical line. In the second video image, a third registration point corresponding to the first registration point and a fourth registration point corresponding to the second registration point are determined based on the two reference objects; The first registration point and the second registration point are used as the first set of registration points, and the third registration point and the fourth registration point are used as the second set of registration points.

3. The coordinate system transformation method based on dual lenses according to claim 2, characterized in that, Based on the zoom level of the zoom lens, the corresponding wide-angle registration coordinate system is converted into a corresponding zoom registration coordinate system, specifically including: Obtain the known abscissa and ordinate of each point in the corresponding wide-angle registration coordinate system; Based on the zoom ratio of the zoom lens and the pre-stored conversion algorithm, calculate the solved horizontal coordinate corresponding to the known horizontal coordinate and the solved vertical coordinate corresponding to the known vertical coordinate; Based on the solved abscissa and the solved ordinate, a variable-magnification registration coordinate system is generated that corresponds to the wide-angle registration coordinate system.

4. The coordinate system transformation method based on dual lenses according to claim 3, characterized in that, Based on the zoom level of the zoom lens and the pre-stored conversion algorithm, calculate the solved x-coordinate corresponding to the known x-coordinate and the solved y-coordinate corresponding to the known y-coordinate, specifically including: The process involves calculating the x-coordinate corresponding to the known x-coordinate using a pre-stored conversion algorithm, including: And, calculating the solution ordinate corresponding to the known ordinate using the pre-stored conversion algorithm includes: Wherein, X is the solved abscissa, x is the known abscissa, X1 is the abscissa of the third registration point, X2 is the abscissa of the fourth registration point, x1 is the abscissa of the first registration point, x2 is the abscissa of the second registration point, Y is the solved ordinate, y is the known ordinate, Y1 is the ordinate of the third registration point, Y2 is the ordinate of the fourth registration point, y1 is the ordinate of the first registration point, y2 is the ordinate of the second registration point, n is the transformation factor; Fz is the pre-stored conversion algorithm used to convert the abscissa and ordinate, with the coordinates of the center point of the rectangular area where they are located, into abscissa and ordinate magnified by n times.

5. The coordinate system transformation method based on dual lenses according to claim 2, characterized in that, Based on the stated scaling factor, the corresponding scaling registration coordinate system is converted into the corresponding wide-angle registration coordinate system, specifically including: Obtain the known abscissa and ordinate of each point in the corresponding variable magnification registration coordinate system; Based on the change factor and the pre-stored conversion algorithm, calculate the solved abscissa corresponding to the known abscissa and the solved ordinate corresponding to the known ordinate; Based on the solved abscissa and the solved ordinate, a wide-angle registration coordinate system corresponding to the corresponding variable-magnification registration coordinate system is generated.

6. The coordinate system transformation method based on dual lenses according to claim 5, characterized in that, Based on the change factor and the pre-stored conversion algorithm, calculate the solved abscissa corresponding to the known abscissa and the solved ordinate corresponding to the known ordinate, specifically including: The process involves calculating the x-coordinate corresponding to the known x-coordinate using a pre-stored conversion algorithm, including: And, calculating the solution ordinate corresponding to the known ordinate using the pre-stored conversion algorithm includes: Where x is the solved abscissa, X is the known abscissa, x1 is the abscissa of the first registration point, x2 is the abscissa of the second registration point, X1 is the abscissa of the third registration point, X2 is the abscissa of the fourth registration point, y is the solved ordinate, Y is the known ordinate, y1 is the ordinate of the first registration point, y2 is the ordinate of the second registration point, Y1 is the ordinate of the third registration point, Y2 is the ordinate of the fourth registration point, n is the transformation factor; Fz is the pre-stored conversion algorithm used to convert the abscissa and ordinate, with the coordinates of the center point of the rectangular area where they are located, into abscissa and ordinate magnified by n times.

7. A coordinate system transformation device based on dual lenses, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform a coordinate system transformation method based on a dual-lens camera as described in any one of claims 1-6.

8. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed, the processor implements a coordinate system transformation method based on a dual-lens camera as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Image coordinate system conversion method and device, equipment and storage medium

    CN110458895A

  • Shooting method, shooting device, storage medium and mobile terminal

    CN111835973A