A positioning method based on image recognition
By setting multiple measurement reference points in the reference plane and using an image recognition device to establish a reference coordinate system, the problems of large measurement errors, long time and low efficiency in existing ranging and positioning methods are solved, and fast and accurate ranging and positioning are achieved.
Patent Information
- Application Number
- CN201910944436.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-08-24
- Filing Date
- 2019-09-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2039-09-30
AI Technical Summary
Existing ranging and positioning methods require multiple measurements, resulting in large measurement errors, long time, low efficiency and high labor costs.
An image recognition-based method is adopted. By setting multiple measurement reference points in the reference plane, the reference image information is obtained using an image recognition device to establish a reference coordinate system, and the position information of the points to be measured is mapped through a photosensitive element array to calculate the distance between the points to be measured.
It achieves fast and accurate distance measurement and positioning, reduces measurement errors, improves efficiency and reduces labor costs.
Smart Images

Figure CN112433225B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distance measurement and positioning, and in particular to a positioning method based on image recognition. Background Art
[0002] Existing rangefinders require single, point-to-point measurement or positioning. This involves first finding a reference point and a target point on the surface of the object being measured. Next, the measuring device is placed on the reference point and the target point is found by manual measurement or distance conversion using optical time, completing the measurement process. For measurement and positioning tasks requiring multiple measurements, this process must be repeated multiple times. With existing technology, repeated measurements can lead to large measurement errors, long measurement or positioning times, and low efficiency, and can also result in high labor costs. Summary of the Invention
[0003] In order to solve the defects of current ranging and positioning methods such as long measurement or positioning time, low efficiency and high labor cost, the present invention provides a method and device based on image recognition to achieve the goal of rapid ranging and positioning.
[0004] According to one aspect of the present invention, a measurement method based on image recognition is provided, the method comprising the following steps:
[0005] At least three measurement reference points are set in a reference plane, and reference image information of the reference plane is acquired using an image recognition device; wherein the at least three measurement reference points form a closed two-dimensional figure in the reference plane, and the reference image information includes position information of the three measurement reference points and size information of the two-dimensional figure;
[0006] Establishing a reference coordinate system in the image recognition device using the reference image information, wherein a mapping relationship exists between the reference coordinate system and a photosensitive element array in the image recognition device;
[0007] Marking a first point to be measured and a second point to be measured in the reference plane;
[0008] Using the image recognition device to obtain position information of the first point to be measured and the second point to be measured in the photosensitive element array;
[0009] The position information of the first point to be measured and the second point to be measured in the photosensitive element array is mapped to the reference coordinate system, and the distance between the first point to be measured and the second point to be measured is calculated.
[0010] Preferably, the reference plane includes: a wall, a ceiling, or the ground.
[0011] Preferably, the step of setting at least three measurement reference points in the reference plane includes: setting four measurement reference points in the reference plane.
[0012] Preferably, the step of setting four measurement reference points in the reference plane includes: setting four corners of a rectangular wall as the four measurement reference points.
[0013] Preferably, the step of acquiring the reference image information of the reference plane by using an image recognition device includes: the image recognition device acquiring the position information of the four measurement reference points by recognizing optical signals or pattern identifications at the positions of the four measurement reference points.
[0014] Preferably, the step of the image recognition device acquiring the position information of the four measurement reference points by identifying the optical signals at the positions of the four measurement reference points includes: the optical signals are emitted by an identification device, and the identification device can be moved arbitrarily within the reference plane.
[0015] Preferably, the step of the image recognition device obtaining the position information of the four measurement reference points by identifying the optical signals at the positions of the four measurement reference points includes: the optical signal is projected by a laser point into the reference plane through a projection device, and the projection device is integrated in the image recognition device or the projection device is independent of the image recognition device.
[0016] Preferably, the step of using an image recognition device to obtain the position information of the four measurement reference points in the reference image information of the reference plane includes: the image recognition device obtains the position information of the four measurement reference points by identifying the pattern identifier at the position of the four measurement reference points, wherein the pattern identifier cannot actively emit an optical signal.
[0017] Preferably, the step of marking the point to be measured in the plane to be measured includes: using the image recognition device to identify the location of the point to be measured with a pattern identifier of a specific color and / or a specific shape to mark the point to be measured, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0018] Preferably, the step of acquiring the reference image information of the reference plane by using an image recognition device includes: obtaining the size information of the two-dimensional graphic by using a measuring tool or an independent mobile terminal.
[0019] Preferably, the step of using an image recognition device to obtain the size information of the two-dimensional graphic in the reference image information of the reference plane includes: the image recognition device uses a laser ranging module, the visible angle of the photosensitive element and the laser emission direction emitted by the laser ranging module, and obtains the size information of the two-dimensional graphic by trigonometric function calculation, wherein the relative position of the laser ranging module and the image recognition device is fixed.
[0020] Preferably, the step of marking the first point to be measured and the second point to be measured in the reference plane includes: the first point to be measured or the second point to be measured is located on the boundary of the two-dimensional figure.
[0021] Preferably, the step of marking the first point to be measured and the second point to be measured in the reference plane includes: identifying optical signals of the positions of the first point to be measured and the second point to be measured by the image recognition device.
[0022] Preferably, the step of identifying the optical signals of the positions of the first and second points to be measured by the image recognition device includes: the optical signals are sent by an identification device, and the identification device can be moved arbitrarily within the reference plane.
[0023] Preferably, the step of identifying the optical signal of the positions of the first point to be measured and the second point to be measured by the image recognition device includes: the optical signal is projected by a laser point into the reference plane through a projection device, and the projection device is integrated in the image recognition device or the projection device is independent of the image recognition device.
[0024] Preferably, the step of marking the first point to be measured and the second point to be measured in the reference plane includes: using the image recognition device to identify the pattern identifier at the positions of the first point to be measured and the second point to be measured, and marking the first point to be measured and the second point to be measured, wherein the pattern identifier cannot actively emit an optical signal.
[0025] Preferably, the step of marking the first point to be measured and the second point to be measured in the reference plane includes: using the image recognition device to identify the positions of the first point to be measured and the second point to be measured with a pattern identifier of a specific color and / or a specific shape, and marking the first point to be measured and the second point to be measured, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0026] Preferably, the method further comprises: marking a third point to be measured, and calculating the distance between the third point to be measured and the first point to be measured and / or the second point to be measured.
[0027] According to another aspect of the present invention, a positioning method based on image recognition is provided, the method comprising the following steps:
[0028] At least three positioning reference points are set in a reference plane, and reference image information of the reference plane is obtained using an image recognition device; wherein the at least three positioning reference points form a closed two-dimensional figure in the plane to be measured, and the reference image information includes position information of the three positioning reference points and size information of the two-dimensional figure;
[0029] Establishing a reference coordinate system in the image recognition device using the reference image information, wherein a mapping relationship exists between the reference coordinate system and a photosensitive element array in the image recognition device;
[0030] Marking a first reference point in the reference plane;
[0031] Using the image recognition device to obtain position information of the first reference point in the photosensitive element array, and mapping the position information of the first reference point in the photosensitive element array to the reference coordinate system;
[0032] The coordinate information of the first comparison point is continuously corrected according to the known coordinate information of the point to be located until the coordinate information of the first comparison point is consistent with the coordinate information of the point to be located.
[0033] Preferably, the step of setting at least three positioning reference points in the reference plane includes: setting four positioning reference points in the reference plane.
[0034] Preferably, the reference plane includes: a wall, a ceiling, or the ground.
[0035] Preferably, the step of setting four positioning reference points in the reference plane includes: setting four corners of a rectangular wall as the four positioning reference points.
[0036] Preferably, the step of obtaining the reference image information of the reference plane by using an image recognition device includes: the image recognition device obtaining the position information of the four positioning reference points by identifying optical signals or pattern identifications at the positions of the four positioning reference points.
[0037] Preferably, the step of the image recognition device acquiring the position information of the four positioning reference points by identifying the optical signals at the positions of the four positioning reference points includes: the optical signals are emitted by an identification device, and the identification device can be moved arbitrarily within the reference plane.
[0038] Preferably, the image recognition device obtains the position information of the four positioning reference points by identifying the optical signals at the positions of the four positioning reference points, including: the optical signal projects a laser point into the reference plane through a projection device, and the projection device is integrated on the image recognition device or the projection device is independent of the image recognition device.
[0039] Preferably, the step of marking the first reference point in the reference plane includes: using the image recognition device to identify the position of the first reference point with a pattern identifier of a specific color and / or a specific shape to mark the first reference point, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0040] Preferably, the step of acquiring the size information of the two-dimensional graphic in the reference image information of the reference plane by using an image recognition device includes: acquiring the size information of the two-dimensional graphic by using a measuring tool or an independent mobile terminal.
[0041] Preferably, the step of using an image recognition device to obtain the size information of the two-dimensional graphic in the reference image information of the reference plane includes: the image recognition device uses a laser ranging module, the visible angle of the photosensitive element and the laser emission direction emitted by the laser ranging module, and obtains the size information of the two-dimensional graphic by trigonometric function calculation, wherein the relative position of the laser ranging module and the image recognition device is fixed.
[0042] Preferably, the step of marking the first reference point in the reference plane includes: using the image recognition device to identify an optical signal at the position of the first reference point to mark the first reference point.
[0043] Preferably, the step of marking the first reference point by using the optical signal generated by the image recognition device to identify the position of the first reference point comprises: the optical signal is emitted by a marking device, and the marking device can be moved arbitrarily within the reference plane.
[0044] Preferably, the step of marking the first reference point by using the optical signal of the image recognition device to identify the position of the first reference point includes: the optical signal projects a laser point into the reference plane through a projection device, and the projection device is integrated in the image recognition device or the projection device is independent of the image recognition device.
[0045] Preferably, the step of projecting a laser point of the optical signal into the reference plane via a projection device includes: the projection device can automatically correct the position of the projected laser point in the reference plane according to feedback from the image recognition device.
[0046] Preferably, the step of marking the first reference point in the reference plane includes: using the image recognition device to identify a pattern marker at the location of the first reference point to mark the first reference point, wherein the pattern marker cannot actively emit an optical signal.
[0047] Preferably, the step of marking the first reference point in the reference plane includes: using the image recognition device to identify the position of the first reference point with a pattern identifier of a specific color and / or a specific shape to mark the first reference point, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0048] Preferably, the method further comprises: marking a second reference point and a second point to be located, and correcting coordinate information of the second reference point until the coordinate information of the second reference point is consistent with the coordinate information of the second point to be located.
[0049] According to another aspect of the present invention, a measuring and positioning device based on image recognition is provided, wherein the measuring and positioning device includes an image recognition device, and the image recognition device includes a photosensitive element array, wherein the image recognition device recognizes signals corresponding to the points to be measured and / or the reference points in a reference plane and establishes a reference coordinate system, and converts the actual coordinate information of the points to be measured and / or the reference points according to the mapping relationship between the reference coordinate system and the photosensitive element array, and performs calculation and / or correction based on the coordinate information to achieve measurement and / or positioning.
[0050] Preferably, the photosensitive element is a CCD image sensor, a CMOS image sensor, a matrix APD, a matrix PIN transistor, or a matrix silicon photocell.
[0051] Preferably, the measuring and positioning device further comprises: an identification device, and the identification device is freely movable in the reference plane.
[0052] Preferably, the identification device includes an optical emission module, which may be an infrared light emitting diode, a far infrared light emitting diode, or a laser light emitting diode.
[0053] Preferably, the measuring and positioning device further comprises: a projection device, which projects a laser point to any position in the reference plane, and the projection device is integrated with the image recognition device or is independent of the image recognition device.
[0054] Preferably, the projection device automatically corrects the position of the projected laser point within the reference plane according to feedback from the image recognition device.
[0055] Preferably, the measuring and positioning device further comprises: a pattern identifier, which can be recognized by the image recognition device, wherein the pattern identifier does not have the function of actively emitting an optical signal.
[0056] Preferably, the measuring and positioning device further comprises: a pattern identifier of a specific color and / or a specific shape, which can be recognized by the image recognition device, wherein the pattern identifier comprises a yellow five-pointed star and a red cross line.
[0057] Preferably, the image recognition device further includes: a laser ranging module, the laser ranging module and the image recognition device are fixed in relative position, the image recognition device measures the vertical distance between the optical camera and the reference plane, as well as the viewing angle of the photosensitive element and the laser emission direction of the laser ranging module through the laser ranging module, and the size information of the reference plane can be obtained by calculating the trigonometric function relationship.
[0058] Preferably, it also includes: a target surface plate and a line projection module, wherein the target surface plate moves freely in the reference plane and is used to determine the positional relationship between the image recognition device and the reference plane; the line projection module continuously projects a laser cross line to determine the positional relationship between the image recognition device and the reference plane.
[0059] Preferably, the image recognition device is calibrated before leaving the factory. According to the calibration before leaving the factory, the image recognition device can convert the size information of the reference plane according to different distances between the optical camera and the reference plane.
[0060] Preferably, the measuring and positioning device is further provided with a display system capable of displaying the coordinate information of the point to be measured and / or the reference point in real time.
[0061] Preferably, the image recognition device further includes a communication module, and the coordinate information of the point to be measured and / or the reference point is displayed on a mobile terminal independent of the image recognition device, and the mobile terminal and the image recognition device are communicatively connected via the communication module.
[0062] Preferably, the measuring and positioning device further includes an input device and a communication module, the input device is a mobile terminal independent of the image recognition device, and the mobile terminal is communicatively connected to the image recognition device via the communication module.
[0063] According to another aspect of the present invention, a measurement method based on image recognition is provided, the method comprising the following steps:
[0064] The image recognition device obtains the distance between the image recognition device and the plane to be measured;
[0065] Establishing a reference coordinate system based on the distance between the image recognition device and the plane to be measured, in combination with a preset mapping relationship, wherein the mapping relationship is established based on the photosensitive element array in the image recognition device, the preset plane, and the preset distance between the image recognition device and the preset plane;
[0066] Marking a point to be measured in the plane to be measured;
[0067] The image recognition device is used to obtain the position information of the measured point mapped to the photosensitive element array, the position information of the measured point in the photosensitive element array is mapped to the reference coordinate system, and the distance between the measured point and any position point in the measured plane is calculated.
[0068] Preferably, the plane to be measured includes: a wall, a ceiling, or the ground.
[0069] Preferably, the step of marking the point to be measured in the plane to be measured comprises: identifying an optical signal at the position of the point to be measured by the image recognition device.
[0070] Preferably, the step of identifying the optical signal of the position of the to-be-measured point by the image recognition device comprises: the optical signal is sent by an identification device, and the identification device can be moved arbitrarily within the reference plane.
[0071] Preferably, the step of identifying the optical signal at the location of the point to be measured by the image recognition device includes: the optical signal is projected by a laser point into the plane to be measured through a projection device, and the projection device is integrated on the image recognition device or the projection device is independent of the image recognition device.
[0072] Preferably, the step of marking the point to be measured in the plane to be measured includes: using the image recognition device to identify the location of the point to be measured with a pattern identifier of a specific color and / or a specific shape to mark the point to be measured, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0073] Preferably, the calculating of the distance between the point to be measured and any position point in the plane to be measured includes: the arbitrary position point is a point on the boundary of the plane to be measured.
[0074] Preferably, the arbitrary position point is a point on the boundary of the plane to be measured, including: the point on the boundary of the plane to be measured is a vertical intersection point between the point to be measured and the plane to be measured.
[0075] Preferably, the method further comprises: marking a second point to be measured, and calculating the distance between the second point to be measured and any position in the plane to be measured.
[0076] According to another aspect of the present invention, a positioning method based on image recognition is provided, the method comprising the following steps:
[0077] The image recognition device obtains the distance between the image recognition device and the plane to be measured;
[0078] Establishing a reference coordinate system based on the distance between the image recognition device and the plane to be measured, in combination with a preset mapping relationship, wherein the mapping relationship is established based on the photosensitive element array in the image recognition device, the preset plane, and the preset distance between the image recognition device and the preset plane;
[0079] Marking a reference point in the plane to be measured;
[0080] Using the image recognition device to obtain position information of the reference point in the photosensitive element array, and mapping the position information of the reference point in the photosensitive element array to the reference coordinate system;
[0081] The coordinate information of the reference point is continuously corrected according to the known coordinate information of the point to be located until the coordinate information of the reference point is consistent with the known coordinate information of the point to be located.
[0082] Preferably, the reference plane includes: a wall, a ceiling, or the ground.
[0083] Preferably, the step of marking a reference point in the plane to be measured comprises: marking the reference point by using the image recognition device to identify an optical signal at the position of the reference point.
[0084] Preferably, the step of marking the reference point by using the optical signal generated by the image recognition device to identify the position of the reference point comprises: the optical signal is emitted by a marking device, and the marking device can be moved arbitrarily within the plane to be measured.
[0085] Preferably, the step of marking the reference point by using the optical signal of the image recognition device to identify the location of the reference point includes: the optical signal projects a laser point into the plane to be measured through a projection device, and the projection device is integrated in the image recognition device or the projection device is independent of the image recognition device.
[0086] Preferably, the step of projecting a laser point of the optical signal into the plane to be measured via a projection device includes: the projection device can automatically correct the position of the projected laser point in the plane to be measured according to feedback from the image recognition device.
[0087] Preferably, the step of marking the reference point in the plane to be measured includes: using the image recognition device to identify the location of the reference point with a pattern identifier of a specific color and / or a specific shape to mark the reference point, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
[0088] Preferably, the method further comprises: marking a second reference point and a second point to be located, and correcting coordinate information of the second reference point until the coordinate information of the second reference point is consistent with the coordinate information of the second point to be located.
[0089] The features of the invention disclosed in the above description may be important for the implementation of the invention both individually and in any desired combination. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 It is a flow chart of the measurement method through image recognition of the present invention.
[0091] Figure 2 It is a structural schematic diagram of the measuring device through image recognition of the present invention.
[0092] Figure 3 It is a flow chart of another measurement method through image recognition of the present invention.
[0093] Figure 4 It is a flow chart of another positioning method through image recognition of the present invention.
[0094] Figure 5 It is a flow chart of another measurement method through image recognition of the present invention.
[0095] Figure 6 It is a structural schematic diagram of another measuring device through image recognition of the present invention.
[0096] Figure 7 It is a flow chart of another positioning method through image recognition of the present invention.
[0097] Figure 8 It is a flow chart of another measurement method through image recognition of the present invention.
[0098] Figure 9 It is a flow chart of another positioning method through image recognition of the present invention.
[0099] Figure 10 It is a flow chart of another measurement method through image recognition of the present invention.
[0100] Figure 11 It is a flow chart of another positioning method through image recognition of the present invention. DETAILED DESCRIPTION
[0101] The present invention will be further described below in conjunction with exemplary embodiments of the present invention. It should be noted that the description of these exemplary embodiments is only for the purpose of helping to understand the present invention, but does not constitute a limitation on the scope of protection of the present invention.
[0102] Specific details are provided in the following description to provide a thorough understanding of the exemplary embodiments. However, it will be understood by one of ordinary skill in the art that the exemplary embodiments may be practiced without these specific details.
[0103] Combine Figure 1 and Figure 2 , which schematically illustrates an embodiment of a measuring method by image recognition according to the invention.
[0104] Step S101: Use a laser rangefinder, measuring wheel, ruler, tape measure, or other measuring tool to measure the dimensions of a rectangular wall 13, such as its height and width. When measuring the wall's dimensions, accurate information must be obtained close to the wall 13, while ensuring that the contours of the wall 13 form a closed measurement area. In special circumstances, such as when other objects are mounted on the wall, these interference factors must be avoided during measurement. The dimensional information of the wall 13 serves as the basic measurement data and will be used as the dimensional information for the baseline image information used for image recognition.
[0105] In some embodiments, the wall 13 may be other surfaces of an object to be measured, such as a surface of a vertical background board or a ceiling surface. The outline of the wall 13 may be other irregular shapes, such as a circle or a hexagon.
[0106] In some embodiments, if the information about the surface of the object to be measured is known, for example, if a design drawing has been obtained, this step can be omitted.
[0107] Step S102: Move the identification device 11 to a corner position of the wall 13, turn on the control switch of the identification device 11, and the infrared light emitting diode emits an optical signal, which is recognized by the optical camera 102. The corner position is used as the first measurement reference point. Similarly, the identification device is moved to the other three corner positions of the wall 13 to obtain the other three measurement reference points. The identification device 11 includes an infrared light emitting diode, a control switch, a display screen, a power module and a shell. The identification device 11 can move freely on the wall 13. The light emitting diode is controlled to start and stop by the control switch. The optical camera 102 can obtain the position information of the four corners by identifying the optical signals corresponding to the measurement reference points, and establish a reference coordinate system in combination with the size information of the wall 13 in step S101, and establish a mapping relationship between the reference coordinate system and the CCD image sensor. The mapping relationship is established by factory settings.
[0108] In some embodiments, the optical signal is invisible light in a specific frequency band, and the invisible light can be identified.
[0109] In some embodiments, the optical signal is visible light, which cannot be filtered by the image recognition device and is thus recognized.
[0110] In some embodiments, there may be six, eight or more measurement reference points, which are distributed around the perimeter of the wall.
[0111] In some embodiments, the identification device 11 can be a pattern identification that does not have the function of actively emitting optical signals. The pattern identification is a specific color and / or a specific shape, such as a red cross line or a yellow five-pointed star. The optical camera 102 can recognize the pattern identification to obtain the position information of the measurement reference point, and combine the size information of the wall 13 in step S101 to establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor.
[0112] In some embodiments, the marking device 11 can be a laser emitting device, such as a laser pen. The optical camera 102 can identify the laser point projected by the laser pen onto the wall 13, thereby obtaining the position information of the measurement reference point, and combining the size information of the wall 13 in step S101 to establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array.
[0113] In some embodiments, the infrared light emitting diode may be a far infrared light emitting diode or a laser light emitting diode, etc. The display screen may be a display device on other terminal devices, such as a display screen of a mobile phone, etc. The reference coordinate system may be a polar coordinate system, etc.
[0114] Step S103: The dimensional information of the wall 13 is input into the image recognition device 10 via the input device 101. The input device 101 is integrated with the image recognition device 10. The image recognition device 10 includes the input device 101, an optical camera 102, a main controller (not shown), a CCD image sensor array, a communication module, a power module, and a housing. The communication module, power module, and main controller are electrically connected.
[0115] In some embodiments, the input device 101 may be another independent input device, such as a mobile terminal. The mobile terminal may be used to obtain the dimension information of the wall 13, for example, by directly obtaining information from a design drawing of the wall 13. The mobile terminal and the image recognition device 10 communicate via wired or wireless communication, and the information is input into the image recognition device 10.
[0116] In some embodiments, the mobile terminal can obtain information about the wall 13 through an APP, and import the information into the image recognition device 10 through the APP.
[0117] In some embodiments, the CCD image sensor array may be other photosensitive element arrays, such as a CMOS image sensor array, a matrix APD array, a matrix PIN transistor array, or a matrix silicon photocell array.
[0118] Step S104: Move the marking device 11 to the first point to be measured on the wall. The control switch controls the infrared light-emitting diode to emit a first optical signal. Similarly, move the marking device 11 to the second point to be measured and emit a second optical signal. The first and second optical signals are recognized by the optical camera 102, and the position information in the CCD image sensor array is acquired. By mapping this position information to a reference coordinate system, the actual distance between the two points to be measured is obtained, thereby achieving the effect of measuring the distance between the two points to be measured.
[0119] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device 11 on the wall to three or more points to be measured.
[0120] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S104.
[0121] Combine Figure 3 , which schematically illustrates an embodiment of a measuring method by image recognition according to the invention.
[0122] Step S201: measuring the size of the wall, ie, the size information of the reference image information, refer to S101.
[0123] Step S202: The image recognition device obtains the size information of the wall through the input device, refer to S103.
[0124] Step S203: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0125] Step S204: Mark the first and second points to be measured, and then obtain their position information in the CCD image sensor array. By mapping the position information to the reference coordinate system, the actual distance between the two points to be measured can be obtained, refer to S104.
[0126] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device on the wall to three or more points to be measured.
[0127] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S204.
[0128] On the basis of the above implementation mode, Figure 4 , which schematically shows an embodiment of a positioning method through image recognition according to the present invention.
[0129] Step S301: measuring the size of the wall, ie, the size information of the reference image information, refer to S101.
[0130] Step S302: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0131] Step S303: The image recognition device obtains the size information of the wall through the input device, refer to S103.
[0132] In some embodiments, the contents of step S302 and step S303 are interchangeable, that is, there is no order between step S302 and step S303.
[0133] Step S304: input the coordinate information of the point to be located through the input device.
[0134] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0135] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0136] In some embodiments, the coordinate information of the point to be located can be directly read, and this step is not required.
[0137] Step S305: Move the identification device, and continuously correct the actual position information of the identification device through movement and feedback until the actual position information displayed at the current position is consistent with the coordinate information of the point to be located that is input or directly read. The actual position of the identification device on the wall is the actual position of the point to be located on the wall, thereby achieving the purpose of positioning.
[0138] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S304 and S305 multiple times.
[0139] On the basis of the above implementation mode, combined with Figure 5 and Figure 6 , which schematically illustrates an embodiment of a measuring method by image recognition according to the invention.
[0140] Step S401: Place laser ranging module 403 opposite wall 43 and rotate image recognition device 40 back and forth within a small range around a plane parallel to wall 43. As the device rotates, the value displayed on laser ranging module 403 fluctuates around a minimum value. This minimum value corresponds to the position where optical camera 402 is perpendicular to the wall. At this position, laser ranging module 403 measures the vertical distance between optical camera 402 and wall 43. Image recognition device 40 includes input device 401, optical camera 402, laser ranging module 403, main controller, CCD image sensor, communication module, power module, and housing. Laser ranging module 403 and optical camera 402 are fixed relative to each other and lie in the same plane. The communication module, power module, and main controller are electrically connected.
[0141] Step S402: Since the equipment has been set up before leaving the factory, that is, the calibration between the viewing angle of the CCD image sensor and the laser ranging emission direction has been done in advance, the recognizable range of the optical camera 402 can be calculated based on the vertical distance between the calibrated optical camera and the measured wall. By adjusting the distance between the image recognition device 40 and the wall 43 forward and backward, when the recognizable range covers the entire wall or completely overlaps, the size of the recognizable range or the accurate size of the wall 43 can be obtained.
[0142] The specific calculation process is as follows:
[0143] Before leaving the factory, ∠a and ∠b are tested and calibrated. Assuming that the vertical distance from the optical camera 302 to the wall 33 is D, the height H of the wall 43 can be calculated as follows. Figure 6 ,have:
[0144] H1=D·tan∠a,
[0145] H2=D·tan∠b,
[0146] H=H1+H2=D·(tan∠a+tan∠b).
[0147] Similarly, the width of the wall can be calculated. According to the height and width, the size of the wall 43 is obtained and automatically recorded in the image recognition device 40.
[0148] In some embodiments, in step S402 , when the identifiable range partially overlaps with a wall surface, the size of the area overlapping with the wall surface can be obtained.
[0149] Step S403: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0150] Step S404: Mark the first and second points to be measured, and then obtain their position information in the CCD image sensor array. By mapping the position information to the reference coordinate system, the actual distance between the two points to be measured can be obtained, refer to S104.
[0151] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device on the wall to three or more points to be measured.
[0152] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S404.
[0153] On the basis of the above implementation mode, Figure 7 , which schematically shows an embodiment of a positioning method through image recognition according to the present invention.
[0154] Step S501: Measure the vertical distance between the optical camera and the wall using a laser ranging module, refer to step S401.
[0155] Step S502: Automatically obtain the size information of the wall, refer to step S402.
[0156] Step S503: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0157] Step S504: input the coordinate information of the point to be located through the input device.
[0158] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0159] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0160] In some embodiments, the coordinate information of the point to be located can be directly read, and this step is not required.
[0161] Step S505: Move the identification device, and continuously correct the actual position information of the identification device through movement and feedback until the actual position information displayed at the current position is consistent with the coordinate information of the point to be located that is input or directly read. The actual position of the identification device on the wall is the actual position of the point to be located on the wall, thereby achieving the purpose of positioning.
[0162] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S504 and S505 multiple times.
[0163] On the basis of the above implementation mode, Figure 8 , which schematically illustrates an embodiment of a measuring method by image recognition according to the invention.
[0164] Step S601: Place a target plate on a wall, for example, 30 cm above the same horizontal line as the projection module. The target plate includes a mark, such as a crosshair mark, and can be freely moved on the wall.
[0165] Step S602: Place the line projection module opposite to the wall and continuously project laser cross lines. The line projection module can project a beam of laser cross lines at a fixed angle. In some embodiments, the line projection module can project laser marks of other shapes. The line projection module and the optical camera are fixed in position and are located on the same surface of the shell. Move the image recognition device back and forth until the laser cross line projected by the line projection module coincides with the cross line mark on the target disk. Based on the right-angle trigonometric function relationship and the fixed position relationship between the line projection module and the optical camera, the vertical distance between the optical camera and the wall can be known. The image recognition device includes an input device, an optical camera, a line projection module, a main controller, a CCD image sensor, a communication module, a power module and a shell.
[0166] Step S603: Automatically obtain the size information of the wall, refer to step S402.
[0167] Step S604: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0168] Step S605: Mark the first and second points to be measured, and then obtain their position information in the CCD image sensor array. By mapping the position information to the reference coordinate system, the actual distance between the two points to be measured can be obtained, refer to S104.
[0169] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device on the wall to three or more points to be measured.
[0170] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S605.
[0171] On the basis of the above implementation mode, Figure 9 , which schematically shows an embodiment of a positioning method through image recognition according to the present invention.
[0172] Step S701: Place the target plate on the wall, refer to step S601.
[0173] Step S702: Determine the position of the image recognition device relative to the wall, refer to step S602.
[0174] Step S703: Automatically obtain the size information of the wall, refer to step S603.
[0175] Step S704: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0176] Step S705: input the coordinate information of the point to be located through the input device.
[0177] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0178] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0179] In some embodiments, the coordinate information of the point to be located can be directly read, and this step is not required.
[0180] Step S706: Move the identification device, and continuously correct the actual position information of the identification device through movement and feedback until the actual position information displayed at the current position is consistent with the coordinate information of the point to be located that is input or directly read. The actual position of the identification device on the wall is the actual position of the point to be located on the wall, thereby achieving the purpose of positioning.
[0181] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S705 and S706 multiple times.
[0182] Based on the above-mentioned embodiments, the following embodiments are described according to the present invention.
[0183] Step S801: Measure the dimensions of the wall, i.e., the dimensions of the reference image information (see S101). Based on the proportional relationship between the dimensions of the wall and the dimensions of the sample wall used for the image recognition device before it leaves the factory, place the image recognition device at a proportional distance relative to 1 meter. The factory settings for the image recognition device are as follows:
[0184] A test sample wall with known dimensions is set up, with four measurement reference points at the four corners of the test sample wall, 1 meter vertically from the optical camera of the image recognition device. The image recognition device establishes a relationship between the test sample wall's dimensions, the positions of the four corners of the test sample wall, and 1 meter based on the positional information of the four measurement reference points.
[0185] In some embodiments, the four corners of the test sample wall have pattern markings, and the pattern markings can be recognized by an optical camera.
[0186] Step S802: Acquire the positional information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array (see S102). This mapping relationship is established based on factory settings: the vertical distance between the optical camera of the image recognition device and the wall is compared to 1 meter, and the dimensional information recognized by the optical camera is proportionally converted accordingly. Based on the positional information of the four corners, the image recognition device establishes a correspondence between the dimensional information recognized by the optical camera, the positional information of the four corners, and the vertical distance between the optical camera and the wall.
[0187] Step S803: Mark the first point to be measured and the second point to be measured, and then obtain the position information in the CCD image sensor array, and by mapping the position information to the reference coordinate system, according to the size information recognized by the optical camera, the position information of the four corners and the vertical distance between the optical camera and the wall, the actual distance between the two points to be measured can be obtained by the correspondence between the three, refer to S104.
[0188] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device on the wall to three or more points to be measured.
[0189] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S803.
[0190] Based on the above-mentioned embodiments, the following embodiments are described according to the present invention.
[0191] Step S901: Measure the size of the wall, that is, the size information of the reference image information, refer to S801.
[0192] Step S902: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S802.
[0193] Step S903: input the coordinate information of the point to be located through the input device.
[0194] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0195] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0196] In some embodiments, the coordinate information of the point to be located can be directly read, and this step is not required.
[0197] Step S904: Move the identification device, and continuously correct the actual position information of the identification device through movement and feedback until the actual position information displayed at the current position is consistent with the coordinate information of the point to be located that is input or directly read. The actual position of the identification device on the wall is the actual position of the point to be located on the wall, thereby achieving the purpose of positioning.
[0198] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S903 and S904 multiple times.
[0199] Based on the above-mentioned embodiments, the following embodiments are described according to the present invention.
[0200] Step S1001: Place the image recognition device so that the maximum boundary recognized by the optical camera completely covers the wall. The image recognition device is factory-set, and the setting method is as follows:
[0201] A test sample wall with known dimensions is positioned 1 meter vertically from the image recognition device's optical camera, completely covering the camera's recognition range. The image recognition device determines the maximum boundary recognized by the optical camera, and then obtains its location and dimensions. The image recognition device then establishes a correlation between the maximum boundary's location and dimensions and 1 meter.
[0202] Step S1002: A reference coordinate system is established based on the maximum boundary recognized by the optical camera, and a mapping relationship is established between the reference coordinate system and the CCD image sensor array (see S102). This mapping relationship is established based on factory settings: the vertical distance between the optical camera and the wall of the image recognition device is compared to 1 meter, and the size information recognized by the optical camera is proportionally converted accordingly. The image recognition device establishes a correspondence between the size information recognized by the optical camera and the vertical distance between the optical camera and the wall based on the position information of the maximum boundary.
[0203] In some embodiments, an identification device with a fixed length that can emit optical signals at both ends is placed inside the wall, and the optical signal is acquired by an image recognition device, thereby establishing a reference coordinate system based on the length of the identification device, and establishing a mapping relationship between the reference coordinate system and the CCD image sensor array.
[0204] In some embodiments, the fixed-length marking device may emit multiple optical signals;
[0205] In some embodiments, the length of the fixed-length marking device is retractable;
[0206] Step S1003: Mark the first point to be measured and the second point to be measured, and then obtain the position information in the CCD image sensor array. By mapping the position information to the reference coordinate system, the actual distance between the two points to be measured can be obtained according to the correspondence between the size information recognized by the optical camera and the vertical distance between the optical camera and the wall, refer to S104.
[0207] In some embodiments, the distance between multiple points to be measured can be measured by moving the marking device on the wall to three or more points to be measured.
[0208] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S1003.
[0209] Based on the above-mentioned embodiments, the following embodiments are described according to the present invention.
[0210] Step S1101: Place the image recognition device so that the maximum boundary recognized by the optical camera completely covers the wall surface. Refer to S1001.
[0211] Step S1102: input the coordinate information of the point to be located relative to the wall through the input device.
[0212] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0213] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0214] In some embodiments, the coordinate information of the point to be located relative to the wall can be directly read, and this step is not required.
[0215] Step S1103: Move the marking device to find the coordinates of the origin of the wall coordinate system and record the coordinate information of the origin.
[0216] Step S1104: Move the identification device, and continuously correct the position information of the identification device relative to the reference coordinate system through movement and feedback, until the actual position information displayed at the current position is consistent with the coordinate information of the point to be located relative to the wall input or directly read and the coordinate information of the origin after superposition. The actual position of the identification device on the wall is the actual position of the point to be located relative to the wall, thereby achieving the purpose of positioning.
[0217] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S1102, S1103 and S1104 multiple times.
[0218] On the basis of the above implementation mode, Figure 10 , which schematically illustrates an embodiment of a measuring method by image recognition according to the invention.
[0219] Step S1201: Measure the size of the wall, that is, the size information of the reference image information, refer to S101.
[0220] Step S1202: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0221] Step S1203: The image recognition device obtains the size information of the wall through the input device, refer to S103.
[0222] In some embodiments, the contents of step S1202 and step S1203 are interchanged.
[0223] Step S1204: A set of projection devices that can project laser points at any position on the wall is installed on the image recognition device. The projection devices can be manually controlled to project laser points, or can be controlled to project laser points according to instructions from the image recognition device.
[0224] The projection device manually projects the first laser point and the second laser point. The positions of the first laser point and the second laser point are the positions of the first point to be measured and the second point to be measured. Then, the position information in the CCD image sensor array is obtained, and by mapping the position information to the reference coordinate system, the actual distance between the two points to be measured can be obtained, refer to S104.
[0225] In some embodiments, the projection device is independent of the image recognition device.
[0226] In some embodiments, the distance between multiple points to be measured can be measured by projecting a third laser point or more laser points.
[0227] In some embodiments, the distances between multiple groups of special measurement points can be measured by repeating the above step S1204.
[0228] On the basis of the above implementation mode, Figure 11 , which schematically shows an embodiment of a positioning method through image recognition according to the present invention.
[0229] Step S1301: Measure the size of the wall, that is, the size information of the reference image information, refer to S101.
[0230] Step S1302: Acquire the position information of the four corners, establish a reference coordinate system, and establish a mapping relationship between the reference coordinate system and the CCD image sensor array, refer to S102.
[0231] Step S1303: The image recognition device obtains the size information of the wall through the input device, refer to S103.
[0232] In some embodiments, the contents of step S1302 and step S1303 are interchanged.
[0233] Step S1304: input the coordinate information of the point to be located through the input device.
[0234] In some embodiments, the input device may be another independent input device, such as a mobile terminal, through which the coordinate information of the point to be located is input.
[0235] In some embodiments, the mobile terminal can obtain the coordinate information of the point to be located through the APP.
[0236] In some embodiments, the coordinate information of the point to be located can be directly read, and this step is not required.
[0237] Step S1305: A set of projection devices is installed on the image recognition device to project a laser point at any position on the wall. The projection device can be manually controlled to project the laser point, or it can be controlled to project the laser point according to the instruction of the image recognition device.
[0238] The projection device projects a laser point onto the wall, and the laser point is identified by an optical camera. The image recognition device controls the laser point projected by the projection device according to the coordinate information of the laser point, and continuously approaches the coordinate information of the point to be positioned. The actual position information of the projected laser point is continuously fed back and corrected until the actual position information displayed at the position of the projected laser point is consistent with the coordinate information of the point to be positioned that is input or directly read. The actual position of the laser point on the wall is the actual position of the point to be positioned on the wall, thereby achieving the purpose of positioning.
[0239] In some embodiments, the projection device is independent of the image recognition device.
[0240] In some embodiments, the projection device projects a horizontal and a vertical intersecting laser line onto the wall, and the two laser lines can indicate the horizontal position and the vertical position.
[0241] In some embodiments, the projection device projects two intersecting laser lines onto the wall, and the angles of the two intersecting laser lines can be set according to needs.
[0242] In some embodiments, the positioning of multiple points to be positioned can be achieved by repeating the above steps S1304 and S1305 multiple times.
[0243] The above-described contents are only preferred embodiments of the present invention and do not limit the present invention in any way. Any modifications or equivalent changes made to the above embodiments according to the present invention shall fall within the scope of protection of the present invention.
Claims
1. A positioning method based on image recognition, the method comprising the following steps: Setting at least three positioning reference points in a reference plane, and acquiring reference image information of the reference plane using an image recognition device; The at least three positioning reference points form a closed two-dimensional figure in the plane to be measured, and the reference image information includes position information of the three positioning reference points and size information of the two-dimensional figure; Establishing a reference coordinate system in the image recognition device using the reference image information, wherein a mapping relationship exists between the reference coordinate system and a photosensitive element array in the image recognition device; Marking a first reference point in the reference plane; Using the image recognition device to obtain position information of the first reference point in the photosensitive element array, and mapping the position information of the first reference point in the photosensitive element array to the reference coordinate system; The coordinate information of the first comparison point is continuously corrected according to the known coordinate information of the point to be located until the coordinate information of the first comparison point is consistent with the coordinate information of the point to be located.
2. The positioning method according to claim 1, wherein: The step of setting at least three positioning reference points in the reference plane includes: setting four positioning reference points in the reference plane.
3. The positioning method according to claim 2, characterized in that: The step of obtaining the reference image information of the reference plane by using an image recognition device includes: the image recognition device obtaining the position information of the four positioning reference points by identifying the optical signals or pattern identifications at the positions of the four positioning reference points.
4. The positioning method according to claim 1, wherein: The step of obtaining the reference image information of the reference plane by using the image recognition device includes: obtaining the size information of the two-dimensional graphic by using a measuring tool or an independent mobile terminal.
5. The positioning method according to claim 1, wherein: The step of using an image recognition device to obtain reference image information of a reference plane includes: the image recognition device uses a laser ranging module, the viewing angle of the photosensitive element, and the direction of laser emission emitted by the laser ranging module to calculate and obtain the size information of the two-dimensional figure by using a trigonometric function relationship, wherein the relative position of the laser ranging module and the image recognition device is fixed.
6. The positioning method according to claim 1, characterized in that: The step of marking the first reference point in the reference plane includes: using the image recognition device to identify the optical signal at the position of the first reference point and marking the first reference point.
7. The positioning method according to claim 6, characterized in that: The step of identifying the first reference point by the image recognition device includes: the optical signal is sent by an identification device, and the identification device can be moved arbitrarily in the reference plane.
8. The positioning method according to claim 6, characterized in that: The step of identifying the first reference point by the image recognition device includes: the optical signal projects a laser point into the reference plane through a projection device, and the projection device is integrated on the image recognition device or the projection device is independent of the image recognition device.
9. The positioning method according to claim 8, characterized in that: The step of projecting the laser point of the optical signal into the reference plane through the projection device also includes: the projection device can automatically correct the position of the projected laser point in the reference plane according to the feedback of the image recognition device.
10. The positioning method according to claim 1, wherein: The step of marking the first reference point in the reference plane includes: using the image recognition device to identify a pattern identifier at the location of the first reference point and marking the first reference point, wherein the pattern identifier includes a yellow five-pointed star and a red cross line.
Citation Information
Patent Citations
Element marking method, system and device
CN105551033A
Camera-array-based measurement method and measurement system
CN107966100A