Pixel matching method and device, storage medium and electronic device
By acquiring and matching pixels in the image in the gunball positioning system, and using parallax and rotation matrix technology, the problem of low positioning accuracy caused by the different optical centers of the gunball is solved and higher positioning accuracy is achieved.
Patent Information
- Application Number
- CN202010574890.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2040-06-22
AI Technical Summary
Since the gun ball does not have the same optical center, the positioning accuracy of the gun ball is low, and there is no effective solution in the existing technology.
By obtaining the first pixel point in the first image and the second pixel point in the second image, according to the target disparity and the rotation matrix, determine the second pixel point matching the first pixel point in the second image, using the features Point matching and singular value decomposition methods calculate the rotation matrix and adjust the pixel position to improve positioning accuracy.
It improves the accuracy of the gun ball positioning and solves the problem of positioning deviation caused by the different optical centers of the gun ball.
Smart Images

Figure CN111739072B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a pixel matching method and device, a storage medium and an electronic device. Background Art
[0002] The gun camera has a wide monitoring field of view, but it cannot focus on the details of images far away; the ball camera can see more details through the lens zoom. The gun-ball positioning system allows users to see two preview screens of the gun camera and the ball camera. Users can select any area of interest on the gun camera screen, and the ball camera will automatically close up the area. The gun-ball linkage system combines the advantages of both gun cameras and ball cameras, which can not only see a wider field of view, but also capture details from a distance.
[0003] The existing technical solutions assume that the gun and ball share the same optical center. However, in reality, there is a certain distance between the optical centers of the gun and ball. If this distance is not taken into account, the positioning of the gun and ball will be biased, especially at the edge of the gun. The existing technical solutions all use fixed-focus cameras, and it is impossible to position zoom guns.
[0004] There is currently no effective solution to the problem of low gun-ball positioning accuracy due to the fact that the gun and the ball do not share a common optical center in the related technology. Summary of the invention
[0005] The embodiments of the present invention provide a pixel matching method and device, a storage medium and an electronic device to at least solve the problem of low gun-ball positioning accuracy due to the gun-ball not sharing the same optical center in the related art.
[0006] According to one embodiment of the present invention, a pixel matching method is provided, comprising: acquiring a first pixel in a first image, wherein the first image is an image captured by a first image acquisition device; and determining a second pixel in a second image that matches the first pixel based on a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image captured by the second image acquisition device.
[0007] Optionally, the method further includes: determining a second position of the first pixel at a preset magnification based on a first position of the first pixel in the first image, wherein the first image is an image captured at a first magnification.
[0008] Optionally, after determining the second position of the first pixel at a preset magnification, the method further includes: determining a rotation matrix between the first image acquisition device and the second image acquisition device; and using the rotation matrix to adjust the second position to a third position.
[0009] Optionally, determining the rotation matrix between the first image acquisition device and the second image acquisition device includes: extracting a first feature point set and a second feature point set from a first preset image and a second preset image, respectively, wherein the first preset image is an image acquired by the first image acquisition device, and the second preset image is an image acquired by the second image acquisition device, and the first feature point in the first feature point set matches the second feature point in the second feature point set; using the eight-point method to determine the essential matrix between the first feature point set and the first feature point set; and using the singular value decomposition method to obtain the rotation matrix through the essential matrix.
[0010] Optionally, determining a second pixel point in the second image that matches the first pixel point based on a target parallax between the first image acquisition device and the second image acquisition device includes: adjusting the third position according to the target parallax to obtain a target position of the second pixel point in the second image, wherein the target parallax includes: a horizontal and / or vertical parallax between the first image acquisition device and the second image acquisition device; and determining a pixel point at the target position in the second image as the second pixel point.
[0011] Optionally, before determining the second pixel point matching the first pixel point in the second image according to the target disparity between the first image acquisition device and the second image acquisition device, the method further comprises: determining the target disparity according to the following formula:
[0012] d=b*f*cosθ / h
[0013] Among them, d is the target parallax, f is the preset focal length of the first image acquisition device at a preset magnification, b is the distance between the first image acquisition device and the second image acquisition device in the horizontal or vertical direction, θ is the angle between the second image acquisition device and the horizontal direction, and h is the height of the first image acquisition device from the ground.
[0014] According to another embodiment of the present invention, a pixel matching device is provided, including: an acquisition module, used to acquire a first pixel in a first image, wherein the first image is an image acquired by a first image acquisition device; a first determination module, used to determine a second pixel in a second image that matches the first pixel based on a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image acquired by the second image acquisition device.
[0015] Optionally, the device also includes: a second determination module, used to determine a second position of the first pixel point at a preset magnification based on a first position of the first pixel point in the first image, wherein the first image is an image captured at a first magnification.
[0016] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0017] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0018] Through the present invention, by acquiring a first pixel point in a first image captured by a first image acquisition device, and determining a second pixel point in a second image that matches the first pixel point according to the target parallax between the first image acquisition device and the second image acquisition device, wherein the second image is an image captured by the second image acquisition device. Therefore, the problem of low accuracy of gun-ball positioning due to the non-co-optical center of the gun-ball can be solved, thereby achieving the effect of improving the accuracy of gun-ball positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of a pixel matching method according to an embodiment of the present invention;
[0021] Figure 2 is a flowchart of a pixel matching method according to an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a pixel matching method according to an embodiment of the present invention. Figure 1 ;
[0023] Figure 4 4 is a structural block diagram of a pixel matching device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0026] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a pixel matching method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal 10 may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the pixel matching method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0028] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a pixel matching method running on the mobile terminal is provided. Figure 2 is a flowchart of pixel matching according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0030] Step S202, obtaining a first pixel point in a first image, where the first image is an image captured by a first image capture device;
[0031] Step S204: determining a second pixel point in a second image that matches the first pixel point based on the target parallax between the first image acquisition device and the second image acquisition device, wherein the second image is an image acquired by the second image acquisition device.
[0032] As an optional implementation, the first image acquisition device may be a gun camera, and the second image acquisition device may be a ball camera.
[0033] Through the above steps, since the first pixel point in the first image captured by the first image acquisition device is obtained; according to the target parallax between the first image acquisition device and the second image acquisition device, the second pixel point matching the first pixel point in the second image is determined, wherein the second image is the image captured by the second image acquisition device. Therefore, the problem of low gun-ball positioning accuracy caused by the gun-ball not having a common optical center can be solved, thereby achieving the effect of improving the gun-ball positioning accuracy.
[0034] Optionally, the execution subject of the above steps may be a terminal, etc., but is not limited thereto.
[0035] Optionally, the method further includes: determining a second position of the first pixel at a preset magnification based on a first position of the first pixel in the first image, wherein the first image is an image captured at a first magnification.
[0036] As an optional implementation, the magnification refers to the zoom magnification of the image acquisition device. The preset magnification may be the minimum magnification of the gun. The shooting in this embodiment may be zoomed, and the first magnification may be any magnification of the gun. In this embodiment, the position of the pixel point in the image taken at any magnification may be mapped to the position at the minimum magnification. The specific mapping method may include the following steps:
[0037] Step S1, take n pictures with gun magnifications from small to large, in order of m 1 ,m 2 , m 3 ...m n , respectively for m i mi+1 (i is 1 to n) perform feature point extraction and matching;
[0038] Step S2, such as Figure 3 As shown, the solid line part is the bolt ratio m i The image is taken at this moment. The dotted line is the camera magnification m. i+1 Moment imaging diagram. The magnification is m i , the focal length is The magnification is m i+1 When the focal length is Assume that m i 、m i+1 The camera has a common optical center under magnification, and the optical center is x 0 ,D is the ratio m i At a point in time, C is the magnification m i+1 At a certain time, the distance between AD and the i , BC distance is x i+1 . From similar triangles, we can get
[0039]
[0040] make
[0041] make x i =k xi *(x i+1 -x 0 )+x 0 , assuming m i , m i+1 The image under magnification has a total of n matching points, then:
[0042] By optimizing the Gauss-Newton method, we can get x 0 , Similarly, the optical axis y in the y-axis direction can be calculated 0 . Focal length ratio Assuming the minimum magnification, the focal length of the bolt The focal length can be obtained through chessboard calibration. Based on the above, the focal length of the bolt at different magnifications can be obtained.
[0043] Step S3, the focal length and principal point position corresponding to different magnifications are obtained from step S2, and the relationship between magnification and focal length is fitted by a polynomial. Given a point on the bolt screen at any magnification, the position of the point at the minimum magnification can be obtained by the following formula.
[0044] f=Am 2 +Bm+C Formula 2
[0045] Among them, m is the bolt magnification, f is the focal length, and A, B, and C are constants.
[0046] Optionally, after determining the second position of the first pixel at a preset magnification, the method further includes: determining a rotation matrix between the first image acquisition device and the second image acquisition device; and using the rotation matrix to adjust the second position to a third position.
[0047] As an optional implementation, since the gun and the ball camera may not be parallel, the gun and the ball can be made parallel through the rotation matrix. In this embodiment, the position of the pixel point can be adjusted through the rotation matrix.
[0048] Optionally, determining the rotation matrix between the first image acquisition device and the second image acquisition device includes: extracting a first feature point set and a second feature point set from a first preset image and a second preset image, respectively, wherein the first preset image is an image acquired by the first image acquisition device, and the second preset image is an image acquired by the second image acquisition device, and the first feature point in the first feature point set matches the second feature point in the second feature point set; using the eight-point method to determine the essential matrix between the first feature point set and the first feature point set; and using the singular value decomposition method to obtain the rotation matrix through the essential matrix.
[0049] As an optional implementation, the rotation matrix between the gun camera and the ball camera can be determined by the following steps:
[0050] Step S1, obtain a first preset image and a second preset image by shooting with a gun camera and a ball camera respectively. Extract feature points from the first preset image and the second preset image by a feature point extraction operator. The specific feature point extraction operator may be Oriented FAST and Rotated BRIEF (ORB), Scale Invariant Feature Transform (SIFT), Speeded Up Robust Features (SURF), etc.;
[0051] Step S2, uniformly selecting N matching points on the gun camera screen, where N is greater than 8;
[0052] Step S3, using the eight-point method to calculate the essential matrix of the gun and ball, and restore the camera rotation matrix R and translation matrix T through the essential matrix. The specific restoration method can be the singular value decomposition method;
[0053] Step S4, using the triangulation principle to find the spatial positions of N matching points.
[0054] Step S5, taking R, T and the spatial point position as initial values, optimizing R, T and the spatial point position through bundle adjustment.
[0055] Optionally, determining a second pixel point in the second image that matches the first pixel point based on a target parallax between the first image acquisition device and the second image acquisition device includes: adjusting the third position according to the target parallax to obtain a target position of the second pixel point in the second image, wherein the target parallax includes: a horizontal and / or vertical parallax between the first image acquisition device and the second image acquisition device; and determining a pixel point at the target position in the second image as the second pixel point.
[0056] As an optional embodiment, the target parallax may be the parallax caused by the distance between the gun camera and the ball camera. Specifically, it may include: horizontal parallax and vertical parallax. If the gun camera and the ball camera are installed on different horizontal lines, there is a vertical parallax. If the gun camera and the ball camera are installed on different vertical lines, there is a horizontal parallax. By adjusting the parallax, a second pixel point matching the first pixel point can be determined in the second image taken by the ball camera. Then, the second image taken by the ball camera can capture the details in the first image taken by the gun camera.
[0057] Optionally, before determining a second pixel point matching the first pixel point in the second image according to the target disparity between the first image acquisition device and the second image acquisition device, the method further includes:
[0058] The target disparity is determined according to the following formula:
[0059] d=b*f*cosθ / h
[0060] Among them, d is the target parallax, f is the preset focal length of the first image acquisition device at a preset magnification, b is the distance between the first image acquisition device and the second image acquisition device in the horizontal or vertical direction, θ is the angle between the second image acquisition device and the horizontal direction, and h is the height of the first image acquisition device from the ground.
[0061] The present application is described below by a specific embodiment:
[0062] Step S1, the position of the first pixel point in the first image taken when the gun magnification is given to be m is (x, y);
[0063] Step S2, calculate the focal length f of the bolt by combining the above formula 2 xm , f ym , the focal length of the first pixel at the lowest magnification is determined by the above formula 1 (x 1 ,y1 ),in,
[0064] Similarly, we can get y 1 .
[0065] Step S3, convert (x1, y1) into spatial point coordinates with a depth of 1 Through the rotation matrix between the gun and the ball, we can get β'=R*γ'. Assuming β'=(X,Y,Z), convert β' into image coordinates
[0066] Assume that the position of the point on the ball camera is (x 3 ,y 3 ), since the gun camera is parallel to the ball camera through the rotation matrix R. Generally, the gun and ball are installed with the ball camera at the bottom and the gun camera at the top. There is a gap between the optical axes of the two in the vertical direction, and the gap in the horizontal direction can be ignored. Therefore, there is only parallax between the gun and ball in the vertical direction. That is, x 3 =x 2 ,y 3 =y 2 +d, where d is the parallax of the unknown quantity.
[0067] Step S4, search for the ball machine (x 3 ,y 3 ) point coordinates, the gun ball positioning function can be completed, y 3 is an unknown quantity. By calculating the parallax d, y can be determined 3 .
[0068] d = b*f / z
[0069] f is the focal length of the gun camera at the lowest magnification, which is a known quantity. b is the vertical baseline distance of the gun and ball camera, and z is the distance from the photographed object to the gun camera, which can be obtained by the formula z=h / cosθ, where h is the installation height of the gun camera and θ is the pitch angle of the ball camera installation. f, b, h, and θ are known quantities. So far, the parallax d between the gun camera and the ball camera can be estimated. Through the parallax d, the second pixel point that matches the first pixel point can be determined in the second image taken by the ball camera, and the gun and ball positioning is completed.
[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0071] In this embodiment, a pixel matching device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0072] Figure 4 is a structural block diagram of a pixel matching device according to an embodiment of the present invention. Figure 4 As shown, the device includes: an acquisition module 42, used to acquire a first pixel point in a first image, wherein the first image is an image acquired by a first image acquisition device; a first determination module 44, used to determine a second pixel point in the second image that matches the first pixel point based on a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image acquired by the second image acquisition device.
[0073] Optionally, the device also includes: a second determination module, used to determine a second position of the first pixel point at a preset magnification based on a first position of the first pixel point in the first image, wherein the first image is an image captured at a first magnification.
[0074] Optionally, the above-mentioned device is also used to determine the rotation matrix between the first image acquisition device and the second image acquisition device after determining the second position of the first pixel point at a preset magnification; and use the rotation matrix to adjust the second position to a third position.
[0075] Optionally, the above-mentioned device is also used to determine the rotation matrix between the first image acquisition device and the second image acquisition device in the following manner: extracting a first feature point set and a second feature point set from a first preset image and a second preset image respectively, wherein the first preset image is an image acquired by the first image acquisition device, and the second preset image is an image acquired by the second image acquisition device, and the first feature point in the first feature point set matches the second feature point in the second feature point set; using the eight-point method to determine the essential matrix between the first feature point set and the first feature point set; using the singular value decomposition method to obtain the rotation matrix through the essential matrix.
[0076] Optionally, the above-mentioned device is also used to adjust the third position according to the target parallax to obtain the target position of the second pixel point in the second image, wherein the target parallax includes: the horizontal and / or vertical parallax between the first image acquisition device and the second image acquisition device; determine the pixel point at the target position in the second image as the second pixel point.
[0077] Optionally, the apparatus is further configured to determine the target disparity according to the following formula before determining the second pixel point matching the first pixel point in the second image according to the target disparity between the first image acquisition device and the second image acquisition device:
[0078] d=b*f*cosθ / h
[0079] Among them, d is the target parallax, f is the preset focal length of the first image acquisition device at a preset magnification, b is the distance between the first image acquisition device and the second image acquisition device in the horizontal or vertical direction, θ is the angle between the second image acquisition device and the horizontal direction, and h is the height of the first image acquisition device from the ground.
[0080] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0081] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0082] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0083] S1, acquiring a first pixel point in a first image, where the first image is an image captured by a first image acquisition device;
[0084] S2. Determine a second pixel point in a second image that matches the first pixel point according to a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image acquired by the second image acquisition device.
[0085] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0086] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0087] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0088] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0089] S1, acquiring a first pixel point in a first image, where the first image is an image captured by a first image acquisition device;
[0090] S2. Determine a second pixel point in a second image that matches the first pixel point according to a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image acquired by the second image acquisition device.
[0091] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0092] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A pixel matching method, It is characterized in that include: Acquire a first pixel point in a first image, where the first image is an image acquired by a first image acquisition device at a first magnification; Determine, according to the target parallax between the first image acquisition device and the second image acquisition device, a second pixel point that matches the first pixel point in the second image, wherein the second image is an image acquired by the second image acquisition device; Wherein, the method further comprises: The focal length of the first image acquisition device at the first magnification is obtained by the following formula: f=Am 2 +Bm+C Wherein, m is the first magnification, f is the focal length of the first image acquisition device at the first magnification, and A, B, and C are constants; In the case where the first image acquisition device shares a common optical center at the first magnification and the lowest magnification, the second position of the first pixel point at a preset magnification is determined based on the first position of the first pixel point in the first image, the focal length of the first image acquisition device at the first magnification, and the position of the optical center, wherein the preset magnification is the lowest magnification.
2. The method according to claim 1, It is characterized in that After determining the second position of the first pixel at a preset magnification, the method further includes: determining a rotation matrix between the first image acquisition device and the second image acquisition device; The second position is adjusted to a third position using the rotation matrix.
3. The method according to claim 2, It is characterized in that Determining a rotation matrix between the first image acquisition device and the second image acquisition device includes: Extracting a first feature point set and a second feature point set from a first preset image and a second preset image, respectively, wherein the first preset image is an image captured by the first image acquisition device, the second preset image is an image captured by the second image acquisition device, and a first feature point in the first feature point set matches a second feature point in the second feature point set; Determine the essential matrix between the first feature point set and the first feature point set using the eight-point method; The rotation matrix is obtained through the essential matrix using a singular value decomposition method.
4. The method according to claim 2, It is characterized in that The step of determining a second pixel point in the second image that matches the first pixel point according to the target parallax between the first image acquisition device and the second image acquisition device includes: Adjusting the third position according to the target disparity to obtain a target position of the second pixel in the second image, wherein the target disparity includes: a horizontal and / or vertical disparity between the first image acquisition device and the second image acquisition device; A pixel point at the target position in the second image is determined as the second pixel point.
5. The method according to claim 1, It is characterized in that Before determining a second pixel point matching the first pixel point in the second image according to the target disparity between the first image acquisition device and the second image acquisition device, the method further includes: The target disparity is determined according to the following formula: d=b*f*cosθh Among them, d is the target parallax, f is the preset focal length of the first image acquisition device at a preset magnification, b is the distance between the first image acquisition device and the second image acquisition device in the horizontal or vertical direction, θ is the angle between the second image acquisition device and the horizontal direction, and h is the height of the first image acquisition device from the ground.
6. A pixel matching device, It is characterized in that include: An acquisition module, configured to acquire a first pixel point in a first image, wherein the first image is an image acquired by a first image acquisition device at a first magnification; A first determination module, configured to determine a second pixel point matching the first pixel point in a second image according to a target parallax between the first image acquisition device and a second image acquisition device, wherein the second image is an image acquired by the second image acquisition device; The apparatus further includes: a second determination module, configured to obtain the focal length of the first image acquisition device at the first magnification by using the following formula: f=Am 2 +Bm+C Wherein, m is the first magnification, f is the focal length of the first image acquisition device at the first magnification, and A, B, and C are constants; In the case where the first image acquisition device shares a common optical center at the first magnification and the lowest magnification, the second position of the first pixel point at a preset magnification is determined based on the first position of the first pixel point in the first image, the focal length of the first image acquisition device at the first magnification, and the position of the optical center, wherein the preset magnification is the lowest magnification.
7. A storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Monitoring device controlling method and device
CN106408551A
Rapid monocular VO (visual odometer) pose estimation method
CN108151713A
