Displacement detection method and device for photoelectric navigation equipment

By calculating the movement acceleration of the current frame image of the optoelectronic navigation equipment and adjusting the prediction vector to improve the accuracy, the problem of reduced matching displacement detection accuracy of the navigation equipment when the acceleration is large is solved, and higher actual displacement detection accuracy is achieved.

CN118583152APending Publication Date: 2024-09-03WUXI INSTER MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410326184.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In existing photoelectric navigation equipment, when the acceleration of the navigation equipment is large, the matching displacement detection accuracy is reduced, resulting in a decrease in the actual displacement detection accuracy.

Method used

By calculating the movement acceleration of the current frame image, determine the prediction vector of the next frame image, adjust the size of the prediction vector to improve accuracy, and calculate the actual displacement of the next frame image based on the prediction vector.

Benefits of technology

The accuracy of predicted vectors is improved, thereby improving the accuracy of image matching and the accuracy of actual displacement detection of navigation equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118583152A
    Figure CN118583152A
Patent Text Reader

Abstract

The invention provides a displacement detection method and device for photoelectric navigation equipment, and the method comprises the steps: determining the movement acceleration of a current frame image when a displacement detection instruction of the current frame image is received; determining a prediction vector of a next frame of image based on the moving acceleration of the current frame of image; and when a displacement detection instruction of the next frame of image is received, calculating the actual displacement of the next frame of image based on the prediction vector of the next frame of image, and determining the actual displacement of the next frame of image as the displacement of the photoelectric navigation equipment within a first preset duration, the first preset duration is a time interval between the time when the photoelectric navigation equipment shoots the current frame image and the time when the photoelectric navigation equipment shoots the next frame image. The accuracy and precision of displacement detection of the photoelectric navigation equipment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of photoelectric navigation equipment, and in particular to a displacement detection method and device for photoelectric navigation equipment. Background Art

[0002] Photoelectric navigation equipment refers to equipment that forms an image by reflecting light from an interface and then uses the image to perform motion positioning. Common photoelectric navigation equipment includes optical mouse, optical crown axis, sweeping robot, etc. Photoelectric navigation equipment usually includes a light source, lens, image sensor, digital signal processor, etc. The light emitted by the light source passes through the lens or directly shines on the target plane, and the target plane reflects the light; the reflected light forms an image through the lens or directly on the image sensor, and the image sensor sends the image to the digital signal processor; the digital signal processor performs matching operations on continuous images, such as the commonly used sum of absolute errors (Sum of absolute differences, SAD) algorithm, and performs correlation operations through matching operations, so that the matching displacement of the image can be detected.

[0003] In the above matching displacement detection process, it is first necessary to estimate the prediction vector Pn+1 used to calculate the matching displacement of image Fn+1 according to the actual displacement of image Fn-1, the actual displacement of image Fn and the frame rate; determine a reference block of a specific size in image Fn+1, and the reference block is a block in the overlapping area of ​​image Fn+1 and image Fn; determine multiple search blocks in image Fn, the size of each search block is the same as the size of the reference block, and the starting point of the search block is centered on the prediction vector Pn+1 and includes a point in the surrounding 3x3 or 5x5 or 13 pixel areas. Of course, since the matching algorithm is not limited to the current description method, the starting point of the search block changes according to the selected matching algorithm and is not limited to the above-mentioned ones; then compare the reference block with each search block one by one to determine a best matching search block, and the displacement between the position of the prediction vector Pn+1 and the starting position of the best matching search block is determined as the matching displacement of image Fn+1.

[0004] Therefore, when performing matching displacement detection, it is particularly important to determine the predetermined vector. An accurate prediction vector can allow the navigation device to detect the matching displacement more accurately, thereby improving the accuracy of the final actual displacement detection of the navigation device. Once the prediction vector is wrong or the error is too large, it will cause matching errors, reduce the accuracy of matching displacement, and thus reduce the actual displacement detection accuracy of the navigation device.

[0005] At present, the actual displacement of the current frame image is generally used as a prediction vector when detecting the actual displacement of the next frame image, or the average value of the actual displacements of the previous frames of images is used as the prediction vector of the next frame image.

[0006] However, these solutions are all based on the premise that the navigation device moves at a constant speed or its movement acceleration is small. If the absolute value of the movement acceleration of the navigation device is large, the displacement difference between two consecutive frame images will become larger, which will cause matching errors and reduce the accuracy of matching displacement, thereby reducing the actual displacement detection accuracy of the navigation device. Summary of the invention

[0007] The present application provides a displacement detection method and device for an optoelectronic navigation device, so as to solve the problems in the above-mentioned background technology.

[0008] In a first aspect, the present application provides a displacement detection method of an optoelectronic navigation device, comprising:

[0009] When receiving a displacement detection instruction of a current frame image, determining the movement acceleration of the current frame image; and determining a prediction vector of a next frame image based on the movement acceleration of the current frame image;

[0010] When a displacement detection instruction for the next frame image is received, the actual displacement of the next frame image is calculated based on the prediction vector of the next frame image, and the actual displacement of the next frame image is determined as the displacement of the photoelectric navigation device within a first predetermined time length, wherein the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

[0011] Optionally, determining the movement acceleration of the current frame image includes: determining the movement acceleration of the current frame image based on an actual displacement of a previous frame image, an actual displacement of the current frame image, and a frame rate.

[0012] Optionally, determining the prediction vector of the next frame image based on the movement acceleration of the current frame image includes: determining the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image.

[0013] Optionally, the determining the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image includes:

[0014] When the absolute value of the movement acceleration of the current frame image is less than or equal to a first preset threshold, determining the actual displacement of the current frame image as the prediction vector of the next frame image, and the first preset threshold is greater than or equal to 0;

[0015] When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is greater than or equal to 0, the sum of the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value;

[0016] When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value;

[0017] When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is greater than 0, the displacement sum of the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector, the second preset threshold is greater than the first preset threshold, and the second preset displacement is greater than the first preset displacement;

[0018] When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector.

[0019] Optionally, the calculating the actual displacement of the next frame image based on the prediction vector of the next frame image includes:

[0020] Based on a predetermined matching algorithm, determining a matching displacement of the next frame image compared to the current frame image;

[0021] The sum of the predicted vector and the matching displacement is calculated to obtain the actual displacement of the next frame image.

[0022] Optionally, after determining the actual displacement of the next frame of image as the displacement of the optoelectronic navigation device within the first predetermined time period, the method further includes:

[0023] Within a second predetermined time period, the method described in claim 1 is executed in a loop to obtain actual displacements of multiple next frame images, and the sum of the actual displacements of multiple next frame images is calculated to obtain the displacement of the optoelectronic navigation device within the second predetermined time period, and the second predetermined time period is greater than the first predetermined time period.

[0024] In a second aspect, the present application provides a displacement detection device for an optoelectronic navigation device, comprising:

[0025] A determination module, configured to determine the movement acceleration of the current frame image when receiving a displacement detection instruction of the current frame image; and determine a prediction vector of the next frame image based on the movement acceleration of the current frame image;

[0026] A calculation and determination module is used to calculate the actual displacement of the next frame image based on the prediction vector of the next frame image when a displacement detection instruction of the next frame image is received, and determine the actual displacement of the next frame image as the displacement of the photoelectric navigation device within a first predetermined time length, and the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

[0027] In a third aspect, an embodiment of the present application provides an optoelectronic navigation device, including:

[0028] Image sensor, memory, one or more processors;

[0029] The image sensor is used to collect images and send them to the processor;

[0030] The memory is used to store one or more programs;

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of the first aspect based on the received image.

[0032] In a fourth aspect, an embodiment of the present application provides a readable storage medium of an optoelectronic navigation device, on which an application is stored, and the application is used to implement the method of the first aspect above.

[0033] In a fifth aspect, an embodiment of the present application provides a program product for an optoelectronic navigation device, including an application program, which implements the method of the first aspect when executed by a processor.

[0034] The displacement detection method of the optoelectronic navigation device provided in the embodiment of the present application first calculates the movement acceleration of the current frame image, and then determines the prediction vector based on the movement acceleration and the actual displacement of the current frame, that is, the size of the movement acceleration will affect the size of the prediction vector, so as to obtain a more accurate prediction vector, and then calculate the actual displacement of the next frame image of the optoelectronic navigation device based on the prediction vector. With respect to the prior art, directly determining the actual displacement of the current frame as the prediction vector, when the acceleration becomes larger, it is easy to cause matching errors, thereby causing matching displacement calculation errors, and further causing actual displacement calculation errors of the optoelectronic navigation device. Therefore, compared with the prior art, the technical solution of the present application improves the accuracy of the prediction vector, thereby improving the accuracy of image matching, and further improving the actual displacement detection accuracy of the navigation device. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0036] Figure 1 A diagram of the implementation environment of a displacement detection method for an optoelectronic navigation device provided in an embodiment of the present application;

[0037] Figure 2 A matching operation schematic diagram provided by the prior art;

[0038] Figure 3 Another matching operation schematic diagram provided by the prior art;

[0039] Figure 4 A flow chart of a displacement detection method for an optoelectronic navigation device provided in an embodiment of the present application;

[0040] Figure 5 A flow chart of a displacement detection method for another optoelectronic navigation device provided in an embodiment of the present application;

[0041] Figure 6 A flow chart of a method for calculating the actual displacement of an optoelectronic navigation device provided in an embodiment of the present application;

[0042] Figure 7 A flow chart of a displacement detection method for a photoelectric navigation device provided in an embodiment of the present application;

[0043] Figure 8 A flow chart of a method for detecting displacement of an optoelectronic navigation device in the X-axis direction provided in an embodiment of the present application;

[0044] Fig. 9 A flow chart of a method for detecting displacement of an optoelectronic navigation device in the Y-axis direction provided in an embodiment of the present application;

[0045] Fig.10 The prediction vector method provided by the embodiment of the present application is Figure 3 The schematic diagram of the matching operation shown is modified;

[0046] Fig.11 A schematic structural diagram of a displacement detection device of an optoelectronic navigation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application is clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work also belong to the scope of protection of the present application. In addition, it should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other in the absence of conflict. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.

[0048] Figure 1 FIG. 1 is a diagram of an implementation environment of a displacement detection method for an optoelectronic navigation device according to an embodiment of the present application. Figure 1 As shown, the implementation environment architecture includes: an image sensor and a digital signal processor.

[0049] The image sensor and the digital signal processor are both internal components of the optoelectronic navigation device, and the signals of the two are connected.

[0050] The image sensor may be a photoelectric image sensor, which is used to capture images at a predetermined frame rate f and send the captured images to a digital signal processor.

[0051] Among them, the digital signal processor is used to receive the image sent by the image sensor, and detect the matching displacement of each frame of the image based on the image, and then calculate the sum of the matching displacement and the predicted vector, and determine the sum value as the actual displacement of the optoelectronic navigation device.

[0052] Furthermore, the implementation environment architecture may also include a computer or other terminal device. For example, for a mouse, it is generally connected to a computer signal, and the digital signal processor needs to send the detected actual displacement to the computer. However, since the frame rate of the image sensor is generally large, the digital signal processor will calculate the displacement of each frame of the image at a high speed. Therefore, in order to save resources, the displacement of each frame of the image will not be sent directly to the computer or other terminal device after the displacement is calculated, but the accumulated displacement will be sent to the computer after accumulating the displacement of more frames of the image.

[0053] Before introducing the present application, the image matching algorithm involved in the present application is briefly introduced. The matching algorithm is used to calculate the matching displacement.

[0054] The image sensor continuously acquires images F at a specific frame rate f, the N-1th frame image is marked as Fn-1, the Nth frame image is marked as Fn, the N+1th frame image is marked as Fn+1, and so on.

[0055] Taking the calculation of the matching displacement of image Fn+1 as an example, first, it is necessary to estimate the prediction vector Pn+1 used to calculate the matching displacement of image Fn+1 according to the actual displacement of image Fn-1, the actual displacement of image Fn and the frame rate. Pn+1 can generally be calculated when calculating the actual displacement of the Nth frame image; determine a reference block of a specific size in image Fn+1, and the reference block is a block in the overlapping area of ​​image Fn+1 and image Fn; determine multiple search blocks in image Fn, and the size of each search block is the same as that of the reference block. The starting point of the search block is a point included in the surrounding 3x3 or 5x5 or 13 pixel areas with the prediction vector Pn+1 as the center. Of course, since the matching algorithm is not limited to the current description method, the starting point of the search block changes according to the selected matching algorithm and is not limited to the above-mentioned ones; then compare the reference block with each search block one by one to determine a best matching search block, and the displacement between the position of the prediction vector Pn+1 and the best matching search block is determined as the matching displacement of image Fn+1.

[0056] For more specific information about the image matching algorithm, please refer to the relevant prior art, and this application will not elaborate on it here.

[0057] Furthermore, after the matching displacement is obtained, the sum of the matching displacement and the prediction vector Pn+1 may be calculated, and the sum is determined as the final displacement of the image Fn+1, that is, the actual displacement of the image Fn+1.

[0058] For the convenience of description, a search block with a size of 3x3 as the starting point range in the X-axis direction is used as an example for explanation. The method for searching a block with a size of 5x5 and 13 points in the Y-axis direction is similar.

[0059] See also Figure 2 , in the x-axis direction, Pn+1 is the prediction vector used to calculate the matching displacement and actual displacement of the image Fn+1. With the position of Pn+1 (3, 3) as the center, the search blocks in the x-axis direction are the search blocks starting from (2, 3), (3, 3), and (4, 3). When the motion of the optoelectronic device is uniform, the movement from Fn-1 to Fn-2 is DXn-1, and the movement from Fn to Fn-1 is DXn. Then DXn-1 is the same as DXn. If DXn is used as the prediction vector Pn+1, the best matching search block is the search block starting from the prediction vector Pn+1.

[0060] See also Figure 3In the x-axis direction, if the movement is carried out with an acceleration of a1, the movement from Fn-1 to Fn-2 is DXn-1, and the movement from Fn to Fn-1 is DXn. If the absolute value of the difference between the two displacements |DXn-DXn-1| is less than 1, DXn is used as the prediction vector Pn+1, and the best matching search block falls within the range of (2, 3), (3, 3), and (4, 3). If the absolute value of the difference between the two displacements |DXn-DXn-1| is greater than 1, DXn is used as the prediction vector Pn+1, and the best matching point falls outside the range of (2, 3), (3, 3), and (4, 3), and the matching may be wrong.

[0061] Figure 4 It is a flow chart of a displacement detection method of an optoelectronic navigation device according to an embodiment of the present application. Figure 4 The method shown can be Figure 1 The digital signal processor in the optical device is executed as Figure 4 As shown, combined with Figure 8 The method comprises the following steps 201 to 203:

[0062] Step 201: when receiving a displacement detection instruction of a current frame image, determining the movement acceleration of the current frame image.

[0063] The image sensor continuously captures images and sends the captured images to the digital signal processor. Every time the digital signal processor receives a frame of image, it can generate a displacement detection instruction to trigger the digital signal processor to detect the actual displacement of the frame of image compared to the previous frame of image, that is, to trigger the digital signal processor to detect the displacement of the optoelectronic navigation device once.

[0064] Each time during the process of detecting the actual displacement of a frame of image, the moving acceleration of the frame of image is determined and stored, so that it can be directly obtained when detecting the actual displacement of the next frame of image.

[0065] Optionally, the determination of the movement acceleration of the current frame image in step 201 may be implemented by the following method: determining the movement acceleration of the current frame image based on the actual displacement of the previous frame image, the actual displacement of the current frame image, and the frame rate.

[0066] The frame rate is the frame rate of the image sensor.

[0067] It should be noted that, in the present application, the previous frame image, the current frame image, and the next frame image are all images that have been taken by the image sensor, and are three consecutive frames. The previous frame image is the previous frame image of the current frame image. The next frame image is the next frame image of the current frame image, and is the most recent frame image formed by the image sensor. Alternatively, for ease of understanding, the previous frame image, the current frame image, and the next frame image can be recorded as the first frame image, the second frame image, and the third frame image in the order in which they are taken by the image sensor.

[0068] The moving acceleration of the current frame image can be obtained by the actual displacement of the current frame image, the actual displacement of the previous frame image and the frame rate. Since the displacement detection in this application is to detect the actual displacement of the next frame image, when performing the displacement detection of the next frame image, the actual displacement of the current frame image and the actual displacement of the previous frame image have been detected, so they can be regarded as known quantities.

[0069] Furthermore, the frame rate of the image captured by the image sensor can be considered as a known quantity, so the movement acceleration of the current frame image can be calculated through the actual displacement of the current frame image, the actual displacement of the previous frame image and the frame rate.

[0070] Furthermore, for the X-axis direction of the image, the actual displacement of the current frame image, the actual displacement of the previous frame image and the frame rate have a relationship as shown in the following formula (1), so the movement acceleration of the current frame image can be calculated by the following formula (2).

[0071] |DXn-DXn-1|=|a1 / (f*f)|(1)

[0072] a1=(f*f)*(DXn-DXn-1)(2)

[0073] Among them, DXn is the actual displacement of the current frame image on the X-axis, DXn-1 is the actual displacement of the previous frame image on the X-axis, a1 is the movement acceleration of the current frame image on the X-axis, and f is the frame rate of the image sensor.

[0074] The calculation method of the moving acceleration in the Y-axis direction of the image is similar to that of the moving acceleration in the X-axis direction, which will not be described in detail in this application. It can be expressed by the following formula (3):

[0075] a2=(f*f)*(DYn-DYn-1)(3)

[0076] Wherein, DYn is the actual displacement of the current frame image on the Y axis, DYn-1 is the actual displacement of the previous frame image on the Y axis, a2 is the moving acceleration of the current frame image on the Y axis, and f is the frame rate of the image sensor.

[0077] In addition, it should be noted that the displacement of an image in the present application refers to the displacement of the image compared to its previous frame image.

[0078] Step 202: determining a prediction vector of a next frame image based on the movement acceleration of the current frame image.

[0079] The prediction vector of the next frame image may be understood as a prediction vector corresponding to the actual displacement used to calculate the next frame image, which is recorded as Pn+1.

[0080] Optionally, step 202 may be implemented by the following method: determining the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image.

[0081] Alternatively, see Figure 5 , and combined with Figure 8 and Fig. 9 , the implementation method of the above step 202 can be implemented through steps 2021 to 2025:

[0082] Step 2021: when the absolute value of the movement acceleration of the current frame image is less than or equal to a first preset threshold, the actual displacement of the current frame image is determined as the prediction vector of the next frame image, and the first preset threshold is greater than or equal to 0.

[0083] Step 2022, when the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is greater than or equal to 0, the sum of the actual displacement of the current frame image and the first preset displacement is determined as the predicted vector, and the first preset displacement is a positive value.

[0084] Exemplarily, when a1>0, and TH1b>a1>TH1a, the prediction vector may be set to m1a+DXn, where m is the first preset displacement, so that normal matching can be achieved within the range.

[0085] Step 2023, when the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the first preset displacement is determined as the predicted vector, and the first preset displacement is a positive value.

[0086] For example, when a1<0 and TH1b>|a1|>TH1a, the first prediction vector can be set to -m1a+DXn, which can also be matched normally within the range.

[0087] Step 2024, when the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is greater than 0, the sum of the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector, the second preset threshold is greater than the first preset threshold, and the second preset displacement is greater than the first preset displacement.

[0088] Step 2025: When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold value, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector.

[0089] In this embodiment, two preset thresholds are used as an example for explanation, that is, a first preset threshold and a second preset threshold are set in this embodiment. Of course, the number of preset thresholds can be set in grades according to the maximum acceleration of the photoelectric navigation device. If the maximum acceleration is large, more preset thresholds can be set.

[0090] Exemplarily, taking the X axis as an example, the preset threshold can be divided into two levels (that is, a first preset threshold and a second preset threshold are set) and determined according to |DXn-DXn-1| which is closely related to the current acceleration of the photoelectric navigation device; when 2>|DXn-DXn-1|>1, it corresponds to the first preset threshold TH1a (that is, the current acceleration corresponding to |DXn-DXn-1|=1); when 3>|DXn-DXn-1|>2, it corresponds to the second preset threshold TH1b (that is, the current acceleration corresponding to |DXn-DXn-1|=2), and so on. For example, the greater the maximum acceleration required by the product, the more preset thresholds are divided into levels.

[0091] Further, taking the X-axis as an example, combined with Figure 8 , when 2>|DXn-DXn-1|>1, the first preset threshold is TH1a, and when |a1|<=TH1a, the prediction vector can be set to DXn-1, and the matching will not go wrong.

[0092] The number and size of the preset displacements may be determined according to the number and size of the preset thresholds, and different preset displacements may correspond to different preset thresholds. For example, in this embodiment, when the preset threshold is TH1a, the preset displacement is 1; when the preset threshold is TH1b, the preset displacement is 2; and so on.

[0093] Furthermore, a correspondence between a preset threshold and a preset displacement is established in advance so that it can be obtained in time when used. For example, the X-axis direction can be seen in the following Table 1.

[0094] Table 1

[0095]

[0096]

[0097] The above steps 2021 to 2025 are described by taking the X axis as an example. For the Y axis, it is similar to the X axis. Fig. 9 The relevant description of Fig. 9 In the above equation, DYn is the actual displacement of the current frame image on the Y axis, DYn-1 is the actual displacement of the previous frame image on the Y axis, a2 is the moving acceleration of the current frame image on the Y axis, TH2 is the preset threshold in the Y direction, and Δy is the matching displacement in the Y axis direction. DYn+1 is the actual displacement of image Fn+1 in the Y direction.

[0098] Further, see Fig.10 , is a schematic diagram of the prediction vector after being corrected by the present application. The correction of the prediction vector enables the reference block to be accurately captured in the search area.

[0099] Step 203, when receiving the displacement detection instruction for the next frame image, calculate the actual displacement of the next frame image based on the prediction vector of the next frame image, and determine the actual displacement of the next frame image as the displacement of the optoelectronic navigation device within a first predetermined time length, and the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

[0100] The displacement of the next frame image is the actual displacement of the next frame image compared to the current frame image.

[0101] The actual displacement can be represented by coordinates, for example, (DXn+1, DYn+1).

[0102] Alternatively, see Figure 6 , step 203 may be completed by steps 2031 and 2032 as follows:

[0103] Step 2031: Determine the matching displacement of the next frame image compared to the current frame image based on a predetermined matching algorithm.

[0104] Among them, the predetermined matching algorithm is a related algorithm in the prior art for calculating the matching displacement between the next frame image and the current frame image. Please refer to the relevant description in the above text, or refer to the relevant content of the SAD algorithm in the prior art. This application will not be described in detail here.

[0105] Step 2032: Calculate the sum of the predicted vector and the matching displacement to obtain the actual displacement of the next frame image.

[0106] Since the frame rate of the image sensor is generally high, the digital signal processor will calculate the displacement of each frame of the image at a high speed. However, in order to save resources, the displacement of each frame of the image will not be sent directly to the computer or other terminal device after the displacement is calculated. Instead, the accumulated displacement will be sent to the computer after the displacement of multiple frames of the image is accumulated. Therefore, optionally, see Figure 7 After step 203, the displacement detection method of the photoelectric navigation device further includes the following step 204:

[0107] Step 204, repeat the above steps 201-203 within a second predetermined time period, obtain the actual displacement of multiple next frame images, and calculate the sum of the actual displacements of multiple next frame images to obtain the displacement of the optoelectronic navigation device within the second predetermined time period, and the second predetermined time period is greater than the first predetermined time period.

[0108] Furthermore, the displacement of the optoelectronic navigation device within the second predetermined time period may be sent to the computer.

[0109] The repetition of the above steps 201 to 203 can be understood as: within the second predetermined time period, the image sensor continuously captures images and calculates the actual displacement of each frame of image. That is, within the second predetermined time period, each frame of image will be used as the above next frame of image, and its actual displacement will be calculated.

[0110] The displacement detection method of the optoelectronic navigation device provided in the embodiment of the present application first calculates the movement acceleration of the current frame image, and then determines the prediction vector based on the movement acceleration and the actual displacement of the current frame, that is, the size of the predicted vector movement acceleration will affect the size of the predicted vector, so as to obtain a more accurate prediction vector, and then calculate the actual displacement of the next frame image of the optoelectronic navigation device based on the prediction vector. With the prior art, the actual displacement of the current frame is directly determined as the prediction vector. When the acceleration becomes larger, it is easy to cause matching errors, thereby causing matching displacement calculation errors, and further causing actual displacement calculation errors of the optoelectronic navigation device. Therefore, compared with the prior art, the technical solution of the present application improves the accuracy of the prediction vector, thereby improving the accuracy of image matching, and further improving the actual displacement detection accuracy of the navigation device.

[0111] Fig.11 FIG. 1 is a block diagram of a displacement detection device of an optoelectronic navigation device according to an embodiment of the present application. The device can be configured in an optoelectronic navigation device, such as Fig.11 As shown, the device comprises:

[0112] The determination module 301 is used to determine the movement acceleration of the current frame image when receiving the displacement detection instruction of the current frame image; and determine the prediction vector of the next frame image based on the movement acceleration of the current frame image;

[0113] The calculation and determination module 302 is used to calculate the actual displacement of the next frame image based on the prediction vector of the next frame image when receiving the displacement detection instruction of the next frame image, and determine the actual displacement of the next frame image as the displacement of the photoelectric navigation device within a first predetermined time length, and the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

[0114] Optionally, the determination module 301 is further configured to determine the movement acceleration of the current frame image based on the actual displacement of the previous frame image, the actual displacement of the current frame image, and the frame rate.

[0115] Optionally, the determination module 301 is further used to determine the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image.

[0116] Optionally, the determination module 301 is further configured to:

[0117] When the absolute value of the movement acceleration of the current frame image is less than or equal to a first preset threshold, determining the actual displacement of the current frame image as the prediction vector of the next frame image, and the first preset threshold is greater than or equal to 0;

[0118] When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is greater than or equal to 0, the sum of the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value;

[0119] When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value;

[0120] When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is greater than 0, the displacement sum of the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector, the second preset threshold is greater than the first preset threshold, and the second preset displacement is greater than the first preset displacement;

[0121] When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector.

[0122] Optionally, the calculation and determination module 302 is further used to:

[0123] Based on a predetermined matching algorithm, determining a matching displacement of the next frame image compared to the current frame image;

[0124] The sum of the predicted vector and the matching displacement is calculated to obtain the actual displacement of the next frame image.

[0125] Optionally, the device also includes a calculation module 303, which is used to cyclically execute the method described in claim 1 within a second predetermined time length, obtain actual displacements of multiple next frame images, and calculate the sum of the actual displacements of multiple next frame images to obtain the displacement of the optoelectronic navigation device within the second predetermined time length, and the second predetermined time length is greater than the first predetermined time length.

[0126] In addition, it should be noted that for the relevant contents in the device embodiment, please refer to the method embodiment and will not be repeated here.

[0127] The present application provides an optoelectronic navigation device, including:

[0128] Image sensor, memory, one or more processors;

[0129] The image sensor is used to collect images and send them to the processor;

[0130] The memory is used to store one or more programs;

[0131] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of the first aspect based on the received image.

[0132] An embodiment of the present application provides a readable storage medium of an optoelectronic navigation device, on which an application is stored, and the application is used to implement the method of the first aspect above.

[0133] An embodiment of the present application provides a program product for an optoelectronic navigation device, including an application program, which implements the method of the first aspect when executed by a processor.

[0134] The units involved in the embodiments described in the present application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases. The units or modules described may also be set in a processor. The names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0135] In addition, it should be noted that the scope of this application includes feasible technical solutions formed by specific combinations of the above-mentioned technical features, and should also cover other feasible technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned application concept.

[0136] Finally, it should be noted that all contents not described in the technical solution of this application can be implemented using existing technologies. In addition, the above embodiments are only used to illustrate the technical solution of this application, rather than to limit it; although the application is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some or all of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A displacement detection method for an optoelectronic navigation device, characterized in that: include: When receiving a displacement detection instruction of a current frame image, determining a moving acceleration of the current frame image; and determining a prediction vector of a next frame image based on the movement acceleration of the current frame image; When a displacement detection instruction for the next frame image is received, the actual displacement of the next frame image is calculated based on the prediction vector of the next frame image, and the actual displacement of the next frame image is determined as the displacement of the photoelectric navigation device within a first predetermined time length, wherein the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

2. The displacement detection method of the optoelectronic navigation device according to claim 1, characterized in that: Determining the movement acceleration of the current frame image includes: determining the movement acceleration of the current frame image based on the actual displacement of the previous frame image, the actual displacement of the current frame image, and the frame rate.

3. The displacement detection method of the optoelectronic navigation device according to claim 1, characterized in that: The determining of the prediction vector of the next frame image based on the movement acceleration of the current frame image includes: determining the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image.

4. The displacement detection method of the optoelectronic navigation device according to claim 3, characterized in that: The step of determining the prediction vector of the next frame image based on the movement acceleration of the current frame image and the actual displacement of the current frame image comprises: When the absolute value of the movement acceleration of the current frame image is less than or equal to a first preset threshold, determining the actual displacement of the current frame image as the prediction vector of the next frame image, and the first preset threshold is greater than or equal to 0; When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is greater than or equal to 0, the sum of the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value; When the absolute value of the movement acceleration of the current frame image is greater than the first preset threshold and less than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the first preset displacement is determined as the prediction vector, and the first preset displacement is a positive value; When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is greater than 0, the displacement sum of the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector, the second preset threshold is greater than the first preset threshold, and the second preset displacement is greater than the first preset displacement; When the absolute value of the movement acceleration of the current frame image is greater than the second preset threshold, and the movement acceleration is less than 0, the displacement difference between the actual displacement of the current frame image and the second preset displacement is determined as the prediction vector.

5. The displacement detection method of the optoelectronic navigation device according to claim 1, characterized in that: The calculating the actual displacement of the next frame image based on the prediction vector of the next frame image includes: Based on a predetermined matching algorithm, determining a matching displacement of the next frame image compared to the current frame image; The sum of the predicted vector and the matching displacement is calculated to obtain the actual displacement of the next frame image.

6. The displacement detection method of the optoelectronic navigation device according to any one of claims 1 to 5, characterized in that: After determining the actual displacement of the next frame of image as the displacement of the optoelectronic navigation device within the first predetermined time period, the method further includes: Within a second predetermined time period, the method described in claim 1 is executed in a loop to obtain actual displacements of multiple next frame images, and the sum of the actual displacements of multiple next frame images is calculated to obtain the displacement of the optoelectronic navigation device within the second predetermined time period, and the second predetermined time period is greater than the first predetermined time period.

7. A displacement detection device for an optoelectronic navigation device, characterized in that: include: A determination module, configured to determine the movement acceleration of the current frame image when receiving a displacement detection instruction of the current frame image; and determining a prediction vector of a next frame image based on the movement acceleration of the current frame image; A calculation and determination module is used to calculate the actual displacement of the next frame image based on the prediction vector of the next frame image when a displacement detection instruction of the next frame image is received, and determine the actual displacement of the next frame image as the displacement of the photoelectric navigation device within a first predetermined time length, and the first predetermined time length is the time interval between the photoelectric navigation device taking the current frame image and the next frame image.

8. An optoelectronic navigation device, characterized in that: The device comprises: Image sensor, memory, one or more processors; The image sensor is used to collect images and send them to the processor; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6 based on the received image.

9. A readable storage medium of an optoelectronic navigation device, characterized in that: An application is stored thereon, and the application is used to: When the application is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A program product for an optoelectronic navigation device, characterized in that: The invention comprises an application program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.