CN115854910A - Method, system, electronic device and storage medium for calibrating position of target object - Google Patents

Method, system, electronic device and storage medium for calibrating position of target object Download PDF

Info

Publication number
CN115854910A
CN115854910A CN202211484256.5A CN202211484256A CN115854910A CN 115854910 A CN115854910 A CN 115854910A CN 202211484256 A CN202211484256 A CN 202211484256A CN 115854910 A CN115854910 A CN 115854910A
Authority
CN
China
Prior art keywords
target
target object
calibrating
structured light
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211484256.5A
Other languages
Chinese (zh)
Inventor
周泽海
王晓南
成剑华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Zhongguan Automation Technology Co ltd
Original Assignee
Wuhan Zhongguan Automation Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Zhongguan Automation Technology Co ltd filed Critical Wuhan Zhongguan Automation Technology Co ltd
Priority to CN202211484256.5A priority Critical patent/CN115854910A/en
Publication of CN115854910A publication Critical patent/CN115854910A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application discloses a method, a system, electronic equipment and a storage medium for calibrating the position of a target object, wherein the method comprises the following steps: setting a target visual field range of the measuring equipment; acquiring structured light measurement image data of a target object based on structured light generating equipment; and calibrating the position of the target object according to the target visual field range and the structured light measurement image data. The method comprises the steps of firstly setting a target view field range of measuring equipment, then measuring image data of a target object by using structured light, carrying out data processing on the obtained structured light measurement image data, determining an actual distance between the target object and the measuring equipment, and finally judging whether the measured actual distance is in the target view field range, so that the position of the target object is calibrated, namely, the target object is arranged in the target view field range, and the measuring equipment can shoot an image with higher target object precision in the shooting process.

Description

Method, system, electronic device and storage medium for calibrating position of target object
Technical Field
The present invention relates to the field of photogrammetry technologies, and in particular, to a method and a system for calibrating a position of a target, an electronic device, and a storage medium.
Background
In the field of photogrammetry, in order to acquire an image with high accuracy, it is necessary to set the shooting distance and position of a target object or regulate and control a measuring device. There are a number of camera calibration methods, including the conventional camera calibration method of finding camera model parameters based on calibration references with known specific experimental conditions, such as shape and size.
However, when the measuring device is difficult to move or the position of the measuring device is inconvenient to adjust, the position of the target object needs to be accurately controlled, and image data with high precision can be obtained. Currently, in order to determine whether a measured object is within a relatively good distance of a visual field range, the measurement is mainly determined by visual estimation, a certain error exists, and whether a target object is within the distance of the visual field range cannot be guaranteed, so that the accuracy of a shot image is low.
Therefore, when the photography measurement is carried out, the prior art has the problem that the accuracy of the shot image is low because the target object is not in the target visual field range of the measuring equipment.
Disclosure of Invention
In view of the above, it is necessary to provide a method, a system, an electronic device and a storage medium for calibrating a position of a target object, so as to solve the technical problem in the prior art that when performing photogrammetry, the accuracy of a captured image is low because the target object is not within a target view field of the measuring device.
In order to solve the above problem, the present invention provides a method for calibrating a position of a target, comprising:
setting a target visual field range of the measuring equipment;
acquiring structured light measurement image data of a target based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector;
and calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
Further, setting a target view range of the measuring device, comprising:
acquiring a measurement reference line, a first boundary line and a second boundary line of a target object, wherein the first boundary line is the boundary line and the extension line of the first camera far away from the second camera, and the second boundary line is the boundary line and the extension line of the second camera far away from the first camera;
setting the width of a visual field;
and determining the target view range according to the measurement reference line, the view width, the first boundary line and the second boundary line.
Further, the projection of the target field of view is trapezoidal.
Further, acquiring structured light measurement image data of the object based on the structured light generating device includes:
acquiring picture group data of a target object based on at least two cameras and a projector;
and determining the contour three-dimensional data of the target object according to the picture group data.
Further, determining the contour three-dimensional data of the target object according to the picture group data comprises the following steps:
down-sampling the picture group data to obtain a contour image of the picture group data;
and determining the three-dimensional data of the outline of the target object according to the outline image.
Further, calibrating the position of the target object according to the target visual field range and the structured light measurement image data, comprising:
determining the measuring distance between the target object and the measuring equipment according to the structured light measuring image data;
judging whether the measured distance is within the target visual field range, if so, completing position calibration; if not, the position of the target object is adjusted until the measuring distance is adjusted to be within the target visual field range.
Further, determining a measurement distance between the target object and the measurement device based on the structured light measurement image data includes:
carrying out distance averaging operation on a partial region in the center of the visual field of the structured light measurement image data to obtain a partial distance average value between a target object and the measurement equipment;
and determining the partial distance average value as the measuring distance between the target object and the measuring equipment.
In order to solve the above problem, the present invention further provides a system for calibrating a position of a target, including:
the target visual field range setting module is used for setting a target visual field range of the measuring equipment;
the image data acquisition module is used for acquiring structured light measurement image data of a target based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector;
and the position calibration module is used for calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
In order to solve the above problem, the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and when the computer program is executed by the processor, the electronic device implements the method for calibrating the position of the target object as described above.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, which stores computer program instructions, and when the computer program instructions are executed by a computer, the computer executes the method for calibrating the position of the target object as described above.
The beneficial effect of adopting above-mentioned technical scheme is: the invention provides a method, a system, electronic equipment and a storage medium for calibrating the position of a target object, wherein the method comprises the following steps: setting a target visual field range of the measuring equipment; acquiring structured light measurement image data of a target object based on structured light generating equipment; and calibrating the position of the target object according to the target visual field range and the structured light measurement image data. The method comprises the steps of firstly setting a target visual field range of measuring equipment, then measuring image data of a target object by using structured light, carrying out data processing on the obtained structured light measurement image data, determining an actual distance between the target object and the measuring equipment, and finally judging whether the measured actual distance is within the target visual field range, so that the position of the target object is calibrated, namely, the target object is set within the target visual field range, and the measuring equipment can shoot an image with high target object precision in the shooting process.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for calibrating a position of a target according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating an embodiment of setting a target view range of a measurement device according to the present invention;
FIG. 3 is a diagram illustrating the results of one embodiment of the measurement device and the target field of view provided by the present invention;
FIG. 4 is a schematic structural diagram of an embodiment of a system for calibrating a position of a target according to the present invention;
fig. 5 is a block diagram of an embodiment of an electronic device provided in the present invention.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
Before the embodiments are set forth, the structured light is described:
the structured light is a set of system structures consisting of a projector and a camera. The projector is used for projecting specific light information to the surface of an object and the background, and the specific light information is collected by the camera. Information such as the position and depth of the object is calculated from the change of the optical signal caused by the object, and the entire three-dimensional space is restored.
At present, because the measuring equipment is difficult to move, in order to acquire an image with higher precision, the position of a target object needs to be regulated. However, currently, the distance between the target object and the measuring device is mainly determined through visual estimation, and a certain error exists, so that whether the target object is within the distance of the visual field or not cannot be guaranteed, and the accuracy of the shot image is low.
Therefore, when the photography measurement is carried out, the prior art has the problem that the accuracy of the shot image is low because the target object is not in the target visual field range of the measuring equipment.
In order to solve the above problems, the present invention provides a method, a system, an electronic device and a storage medium for calibrating a position of a target object, which are described in detail below.
As shown in fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for calibrating a position of a target provided by the present invention, including:
step S101: the target field of view of the measuring device is set.
Step S102: structured light measurement image data of an object is acquired based on a structured light generating device, wherein the structured light generating device comprises at least two cameras and a projector.
Step S103: and calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
In this embodiment, first, a target view range is set according to the attribute of the measurement device; then, acquiring structured light measurement image data of the target based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector; and finally, calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
In this embodiment, a target view range of the measurement device is set, then the structured light generation device is used to measure image data of the target, and the obtained structured light measurement image data is subjected to data processing to determine an actual distance between the target and the measurement device, and finally, whether the measured actual distance is within the target view range is determined, so that the position of the target is calibrated, that is, the target is set within the target view range, so that the measurement device can shoot an image with high target precision during shooting.
As a preferred embodiment, in step S101, in order to set the target view range of the measurement device, as shown in fig. 2, fig. 2 is a schematic flowchart of an embodiment of setting the target view range of the measurement device provided by the present invention, and includes:
step S111: a measurement reference line, a first boundary line and a second boundary line of the target object are obtained, wherein the first boundary line is a boundary line and an extension line of the first camera far away from the second camera, and the second boundary line is a boundary line and an extension line of the second camera far away from the first camera.
Step S112: the viewing field width is set.
Step S113: and determining the target view range according to the measurement reference line, the view width, the first boundary line and the second boundary line.
In this embodiment, first, according to the attribute of the measurement device itself, an optimal distance between the target object and the measurement device, that is, a measurement reference line of the target object, is determined, and in addition, width boundary lines that can be shot by the measurement device are also determined according to boundary lines of the two cameras, that is, a straight line where the boundary line where the first camera is far away from the second camera is located is taken as a first boundary line, and a straight line where the boundary line where the second camera is far away from the first camera is taken as a second boundary line; then, determining the view field width according to factors such as the attribute of the measuring equipment, the size of the target object and the like; and finally, determining the target view range according to the measurement reference line, the view width, the first boundary line and the second boundary line.
As a preferred embodiment, as shown in fig. 3, fig. 3 is a schematic diagram of a result of an embodiment of the measuring apparatus and the target view range provided by the present invention, wherein the measuring apparatus 300 includes a first camera 301, a second camera 302, and a projector 303, and a target view range 310 is correspondingly set.
The first camera 301 and the second camera 302 are oppositely arranged at a certain angle, and the projector 303 is arranged between the first camera 301 and the second camera 302; a straight line where a first boundary line 311 of the first camera 301, which is far away from the second camera 302, is located is connected with one vertex of the target view range 310, and a straight line where a second boundary line 312 of the second camera 302, which is far away from the first camera 301, is located is connected with the other vertex of the target view range 310; the measurement reference line 313 is an optimal distance for focusing by the projector 303, and not only can better capture information of a target object, but also does not influence the work of other equipment.
In a specific embodiment, the included angle between the straight lines of the first camera 301 and the second camera 302 is 34 degrees, the optimal distance of the measuring apparatus 300 is 210 meters, and the view width is 110 mm, so that the target view range distributed in a trapezoid shape is determined.
When the target object is in the target view range, the measuring device 300 can capture the characteristics of the target object better to obtain image data with higher precision; when the target object is out of the target view range, the measuring device 300 cannot well acquire image data with high target object precision.
As a preferred embodiment, in step S102, since the cameras in the structured light generation apparatus are arranged in pairs, the images of the target object acquired directly are paired, that is, the group of pictures data of the target object is obtained directly; data processing is also required to be performed on the picture group data so as to determine the three-dimensional data of the outline of the target object.
As a preferred embodiment, in order to simplify the complexity of data processing and simultaneously retain the required data, first, downsampling the picture group data to obtain an outline image of the picture group data; then, the contour three-dimensional data of the target object is determined according to the contour image.
As a preferred embodiment, the active structure information emitted by the projector in the structured light generating device to the target may take a variety of forms, including laser stripes, gray codes, sinusoidal stripes, and the like.
As a preferred embodiment, two cameras shoot information of the surface of a target object to obtain a structured light image, and based on the triangulation principle, the three-dimensional image is analyzed and calculated in a three-dimensional mode, so that three-dimensional reconstruction of the target object is achieved.
In one embodiment, the sinusoidal fringe is generated by computer programming and projected to the target object by the projector, then the bending degree of the fringe modulated by the object is photographed by the camera, the bending fringe is demodulated to obtain the phase, and finally the phase is converted into the height of the full field, so as to obtain the height of the target object.
As a preferred embodiment, in step S103, after determining the three-dimensional data of the contour of the target object, in order to calibrate the position of the target object, first, the measurement distance between the target object and the measurement device is determined according to the structured light measurement image data; then, judging whether the measured distance is within the target visual field range, and if so, completing position calibration; if not, the position of the target object is adjusted until the measuring distance is adjusted to be within the target visual field range.
In a specific embodiment, because the target object is uneven, in order to quickly determine the distance between the target object and the measuring equipment, contour three-dimensional data corresponding to a partial region at the center of the visual field of the target object is captured, and distance averaging operation is performed, so that a partial distance average value between the target object and the measuring equipment is obtained; and finally, taking the partial distance average value as the measured distance between the target object and the measuring equipment for subsequent analysis and calculation.
In one embodiment, 1/16 of the cross-sectional area of the field of view of the target object is captured as a partial region of the exact center of the field of view for data calculation and analysis.
As a preferred embodiment, a detection system can be further arranged, so that when the target object is in the target visual field range, the detection system lights up a green light; when the target object is out of the target visual field, the detection system lights the red light, so that the user is reminded to adjust and control the position of the target object in time, and the accuracy of the finally obtained image is guaranteed.
Through the mode, the target visual field range of the measuring equipment is set firstly, then the structural light generating equipment is used for measuring the image data of the target object, the obtained structural light measuring image data is subjected to data processing, the actual distance between the target object and the measuring equipment is determined, and finally whether the measured actual distance is within the target visual field range or not is judged, so that the position of the target object is calibrated, namely, the target object is set within the target visual field range, and the measuring equipment can shoot images with high target object precision in the shooting process.
In order to solve the above problem, the present invention further provides a system for calibrating a position of a target, as shown in fig. 4, fig. 4 is a schematic structural diagram of an embodiment of the system for calibrating a position of a target provided by the present invention, and the system 400 for calibrating a position of a target includes:
a target view range setting module 401, configured to set a target view range of the measurement apparatus;
an image data acquisition module 402 for acquiring structured light measurement image data of an object based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector;
and a position calibration module 403, configured to calibrate a position of the target object according to the target view range and the structured light measurement image data.
The present invention also provides an electronic device, as shown in fig. 5, fig. 5 is a block diagram of an embodiment of the electronic device provided in the present invention. The electronic device 500 may be a computing device such as a mobile terminal, a desktop computer, a notebook, a palmtop, and a server. The electronic device 500 includes a processor 501 and a memory 502, wherein the memory 502 stores a program 503 for calibrating the position of the target.
The memory 502 may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device, in some embodiments. The memory 502 may also be an external storage device of the computer device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device. Further, the memory 502 may also include both internal and external storage units of the computer device. The memory 502 is used for storing application software installed on the computer device and various data, such as program codes for installing the computer device. The memory 502 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the process 503 for calibrating the position of the target object can be executed by the processor 501, so as to implement the method for calibrating the position of the target object according to the embodiments of the present invention.
The processor 501, which in some embodiments may be a Central Processing Unit (CPU), microprocessor or other data Processing chip, is used to execute program codes stored in the memory 502 or process data, such as executing a program for calibrating a position of an object.
The present embodiment further provides a computer-readable storage medium, on which a program for calibrating a position of a target is stored, and when the program is executed by a processor, the computer implements the method for calibrating a position of a target according to any of the above technical solutions.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.

Claims (10)

1. A method of calibrating a position of a target, comprising:
setting a target visual field range of the measuring equipment;
acquiring structured light measurement image data of a target based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector;
and calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
2. The method for calibrating the position of a target object according to claim 1, wherein the setting of the target view range of the measuring device comprises:
acquiring a measurement reference line, a first boundary line and a second boundary line of a target object, wherein the first boundary line is the boundary line and the extension line of the first camera far away from the second camera, and the second boundary line is the boundary line and the extension line of the second camera far away from the first camera;
setting the width of a visual field;
and determining the target view range according to the measurement reference line, the view width, the first boundary line and the second boundary line.
3. The method of calibrating a target position of claim 2 wherein the projection of the target field of view is trapezoidal.
4. The method for calibrating the position of a target object according to claim 1, wherein the acquiring structural light measurement image data of the target object based on the structural light generating device comprises:
acquiring picture group data of the target object based on the at least two cameras and the projector;
and determining the contour three-dimensional data of the target object according to the picture group data.
5. The method for calibrating the position of the target object according to claim 4, wherein the determining the three-dimensional data of the contour of the target object according to the picture group data comprises:
performing down-sampling on the picture group data to obtain a contour image of the picture group data;
and determining the contour three-dimensional data of the target object according to the contour image.
6. The method of calibrating a position of a target object according to claim 1, wherein said calibrating the position of the target object based on the target field of view and the structured light measurement image data comprises:
determining a measuring distance between the target object and measuring equipment according to the structured light measuring image data;
judging whether the measured distance is within the target visual field range, if so, finishing position calibration; if not, adjusting the position of the target object until the measuring distance is adjusted to be within the target visual field range.
7. The method for calibrating the position of an object according to claim 6, wherein the determining the measurement distance between the object and the measurement device according to the structured-light measurement image data comprises:
carrying out distance averaging operation on a partial region in the center of the visual field of the structured light measurement image data to obtain a partial distance average value between the target object and the measuring equipment;
and determining the partial distance average value as the measuring distance between the target object and the measuring equipment.
8. A system for calibrating a position of a target, comprising:
the target visual field range setting module is used for setting a target visual field range of the measuring equipment;
the image data acquisition module is used for acquiring structured light measurement image data of a target based on a structured light generation device, wherein the structured light generation device comprises at least two cameras and a projector;
and the position calibration module is used for calibrating the position of the target object according to the target visual field range and the structured light measurement image data.
9. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the method for calibrating a position of an object according to any one of claims 1 to 7.
10. A storage medium having stored therein computer program instructions which, when executed by a computer, cause the computer to perform a method of calibrating a position of an object according to any one of claims 1 to 7.
CN202211484256.5A 2022-11-24 2022-11-24 Method, system, electronic device and storage medium for calibrating position of target object Pending CN115854910A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211484256.5A CN115854910A (en) 2022-11-24 2022-11-24 Method, system, electronic device and storage medium for calibrating position of target object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211484256.5A CN115854910A (en) 2022-11-24 2022-11-24 Method, system, electronic device and storage medium for calibrating position of target object

Publications (1)

Publication Number Publication Date
CN115854910A true CN115854910A (en) 2023-03-28

Family

ID=85666020

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211484256.5A Pending CN115854910A (en) 2022-11-24 2022-11-24 Method, system, electronic device and storage medium for calibrating position of target object

Country Status (1)

Country Link
CN (1) CN115854910A (en)

Similar Documents

Publication Publication Date Title
EP3640892B1 (en) Image calibration method and device applied to three-dimensional camera
CN109737874B (en) Object size measuring method and device based on three-dimensional vision technology
CN110689581B (en) Structured light module calibration method, electronic device and computer readable storage medium
CN111721236B (en) Three-dimensional measurement system and method and computer equipment
JP5390900B2 (en) Method and apparatus for determining 3D coordinates of an object
CN109377551B (en) Three-dimensional face reconstruction method and device and storage medium thereof
Douxchamps et al. High-accuracy and robust localization of large control markers for geometric camera calibration
CN109716348B (en) Processing multiple regions of interest independently
KR102255017B1 (en) Method for calibrating an image capture sensor comprising at least one sensor camera using a time coded pattern target
CN110691228A (en) Three-dimensional transformation-based depth image noise marking method and device and storage medium
CN112598719B (en) Depth imaging system, calibration method thereof, depth imaging method and storage medium
CN112985772B (en) Depth map detection apparatus, depth map detection method, electronic device, and computer-readable storage medium
CN113822920A (en) Method for acquiring depth information by structured light camera, electronic equipment and storage medium
JP2018009927A (en) Image processing device, image processing method and program
CN116818129B (en) Temperature estimation and thermal distortion correction method applied to structured light reconstruction
CN115423808B (en) Quality detection method for speckle projector, electronic device, and storage medium
CN109741384B (en) Multi-distance detection device and method for depth camera
CN115854910A (en) Method, system, electronic device and storage medium for calibrating position of target object
CN114708316B (en) Structured light three-dimensional reconstruction method and device based on circular stripes and electronic equipment
CN109389645B (en) Camera self-calibration method and system, camera, robot and cloud server
CN114966578A (en) Radar external parameter calibration method and device based on shooting equipment and computer equipment
US11143499B2 (en) Three-dimensional information generating device and method capable of self-calibration
CN114359401A (en) Calibration method, system and equipment
CN114638789A (en) Method and system for hole site detection
CN110232715B (en) Method, device and system for self calibration of multi-depth camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination