CN111462252A - Method, device and system for calibrating camera device - Google Patents

Method, device and system for calibrating camera device Download PDF

Info

Publication number
CN111462252A
CN111462252A CN202010273724.9A CN202010273724A CN111462252A CN 111462252 A CN111462252 A CN 111462252A CN 202010273724 A CN202010273724 A CN 202010273724A CN 111462252 A CN111462252 A CN 111462252A
Authority
CN
China
Prior art keywords
calibration
camera device
target camera
position information
calibration reference
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.)
Granted
Application number
CN202010273724.9A
Other languages
Chinese (zh)
Other versions
CN111462252B (en
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.)
Beijing Aibee Technology Co Ltd
Original Assignee
Beijing Aibee 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 Beijing Aibee Technology Co Ltd filed Critical Beijing Aibee Technology Co Ltd
Priority to CN202010273724.9A priority Critical patent/CN111462252B/en
Publication of CN111462252A publication Critical patent/CN111462252A/en
Application granted granted Critical
Publication of CN111462252B publication Critical patent/CN111462252B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The application discloses a method, a device and a system for calibrating a camera device. Determining a target camera device from all uncalibrated camera devices by using a position information set and real-time position information of the calibration equipment; and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state. Therefore, whether the calibration reference image of each camera device in the scene is acquired can be known according to the calibration state of the device in the scene. In addition, the target camera device is determined by utilizing the position information set and the real-time position information of the calibration equipment, so that the order of collecting the calibration reference images of the camera device is ensured. Therefore, the technical scheme of the application improves the collection efficiency of the calibration reference image of the camera device, avoids repeated collection or missing collection, and further improves the calibration efficiency.

Description

Method, device and system for calibrating camera device
Technical Field
The present disclosure relates to the field of instrument and device calibration technologies, and in particular, to a method, a device, and a system for calibrating a camera device.
Background
With the wide application of the camera device, a lot of scenes such as a market or a playground are monitored by using a large number of camera devices. Today, some technologies are already in use for tracking a moving object in a scene by retrieving an image captured by a camera deployed in the scene.
The calibration of instruments and equipment is a conventional means adopted in the fields of optics, electricity, machinery and the like for obtaining accurate measurement results at present. In practical application, when parameters of a camera device deployed in a scene are not calibrated, the accuracy of an obtained monitoring result is poor. For example, the motion trajectories of the same target object obtained by using videos shot by two cameras arranged adjacently in a scene are difficult to join. Further, when the parameters of the camera are not calibrated, tracking of the moving target object may fail, resulting in a reduction in the safety and controllability of the scene. Therefore, it is necessary and critical to calibrate the camera.
Currently, a plurality of cameras in a scene may be calibrated by using a movable calibration apparatus. The movable calibration equipment reaches the shooting area of the camera devices in the scene, each camera device shoots an image containing the calibration equipment, and the calibration of the camera devices is completed through the processing of the shot image.
However, in the specific implementation process of the above technology, the problems of missing calibration and repeated calibration are easy to occur. If the calibration is missed, the calibration equipment is driven to move to the shooting area of the camera device with the missed calibration again to collect images, so that inconvenience is brought to the calibration task, and time is wasted. If repeated calibration occurs, unnecessary time consumption is generated. How to improve the calibration efficiency of the camera device has become a technical problem which needs to be solved urgently in the field.
Disclosure of Invention
Based on the above problems, the present application provides a method, an apparatus, and a system for calibrating a camera device, so as to improve calibration efficiency of multiple camera devices in a scene.
The embodiment of the application discloses the following technical scheme:
in a first aspect, the present application provides a method for calibrating a camera device, which is applied to a handheld terminal device, and the method includes:
acquiring a position information set and real-time position information of calibration equipment; the set of location information includes: position information of all uncalibrated camera devices in a scene where the calibration equipment is located;
determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set;
when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from a first state to a second state; and the calibration reference image of the target camera device is used for calibrating the target camera device.
Optionally, the determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set specifically includes:
and determining an uncalibrated camera device closest to the real-time position of the calibration equipment according to the real-time position information and the position information set, and taking the uncalibrated camera device as the target camera device.
Optionally, the determining that the calibration reference image of the target camera device is completely acquired specifically includes:
responding to screenshot operation, and acquiring a screenshot image of the target camera device;
sending the intercepted image to the calibration equipment so that the calibration equipment performs validity detection according to the intercepted image;
receiving an effectiveness detection result sent by the calibration equipment;
when the validity detection result indicates that the validity detection of the intercepted image passes, recording the intercepted image as a calibration reference image;
and when the calibration reference image of the target camera device meets a preset condition, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, before the acquiring the captured image of the target camera, the method further includes:
responding to the screenshot operation, and sending a calibration reference object generation instruction to the calibration equipment; the calibration reference object generation instruction is used for instructing the calibration equipment to generate and display a calibration reference object;
the calibration reference image comprises the calibration reference.
Optionally, the method further includes:
pulling the video stream of the target camera device in real time;
the obtaining of the captured image of the target camera device in response to the screenshot operation specifically includes:
and in response to the screenshot operation, intercepting a video frame from the video stream, and taking the video frame as the intercepted image.
Optionally, the method further includes:
drawing a dividing line on the upper layer of a display area of the video stream to divide the display area into a plurality of sub-areas;
receiving first position information sent by the calibration equipment; the first position information indicates the position of the calibration reference in the calibration reference image;
drawing a calibration reference frame on the display area according to the first position information;
when the calibration reference image of the target camera device meets the preset condition, determining that the calibration reference image of the target camera device is completely acquired, specifically comprising:
and when each sub-area comprises at least one calibration reference frame, or the number of the calibration reference images of the target camera device reaches a first preset threshold value, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, the method further includes: and storing the first position information and/or the number of calibration reference images of the target camera device.
Optionally, after determining a target camera from all the uncalibrated cameras according to the real-time position information and the position information set, the method further includes:
and sending a control instruction to the calibration equipment to instruct the calibration equipment to move to the shooting area of the target camera device.
Optionally, the method further includes:
updating the calibration state of the target camera device from the second state to the first state in response to a recalibration instruction for the target camera device;
and sending an image deleting instruction to the calibration equipment to instruct the calibration equipment to delete the calibration reference image of the target camera device.
Optionally, the method further includes:
constructing a base map of the scene;
and drawing and displaying all the camera devices in the scene on the base map according to the positions and the calibration states.
Optionally, when it is determined that the calibration reference image of the target camera device is completely acquired, the method further includes:
sending a first packing instruction to the calibration equipment to instruct the calibration equipment to pack the calibration reference image of the target camera device;
receiving an address of a data packet corresponding to a target camera device sent by the calibration equipment;
downloading the data packet according to the address, and uploading the data packet to a cloud server so that the cloud server calibrates the target camera device according to the data packet;
alternatively, the first and second electrodes may be,
and sending a second packaging instruction to the calibration equipment to instruct the calibration equipment to package the calibration reference image of the target camera device, and uploading a data packet corresponding to the target camera device to the cloud server, so that the cloud server calibrates the target camera device according to the data packet.
Optionally, when it is determined that the acquisition of the calibration reference images of all the cameras in the scene is completed, the method further includes:
sending a third packing instruction to the calibration equipment to instruct the calibration equipment to pack the calibration reference images of all the camera devices;
receiving addresses of total data packets sent by the calibration equipment;
downloading the total data packets according to the addresses, and uploading the total data packets to a cloud server so that the cloud server can calibrate all the camera devices according to the total data packets;
alternatively, the first and second electrodes may be,
and sending a fourth packing instruction to the calibration equipment to instruct the calibration equipment to pack the calibration reference images of all the camera devices, and uploading the total data packet to the cloud server, so that the cloud server calibrates all the camera devices according to the total data packet.
In a second aspect, the present application provides an apparatus for calibrating a camera device, which is applied to a handheld terminal device, and includes:
the position information acquisition module is used for acquiring a position information set and real-time position information of the calibration equipment; the set of location information includes: position information of all uncalibrated camera devices in a scene where the calibration equipment is located;
the target camera shooting device determining module is used for determining a target camera shooting device from all the uncalibrated camera shooting devices according to the real-time position information and the position information set;
the judging module is used for judging whether the calibration reference image of the target camera device is acquired;
the calibration state updating module is used for updating the calibration state of the target camera device from a first state to a second state when the judgment result of the judging module is yes; and the calibration reference image of the target camera device is used for calibrating the target camera device.
Optionally, the target image capturing device determining module specifically includes:
and the first determining unit is used for determining an uncalibrated camera device closest to the real-time position of the calibration equipment according to the real-time position information and the position information set, and taking the uncalibrated camera device as the target camera device.
Optionally, the determining module specifically includes:
the screenshot obtaining unit is used for responding to screenshot operation and obtaining a screenshot image of the target camera device;
a first sending unit, configured to send the captured image to the calibration device, so that the calibration device performs validity detection according to the captured image;
the first receiving unit is used for receiving the validity detection result sent by the calibration equipment;
the screenshot obtaining unit is further configured to record the captured image as a calibration reference image when the validity detection result indicates that validity detection of the captured image passes;
the first judgment unit is used for judging whether the calibration reference image of the target camera device meets a preset condition or not; and when the calibration reference image of the target camera device meets a preset condition, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, the apparatus for calibrating a camera device further includes:
the first sending module is used for responding to the screenshot operation and sending a calibration reference object generation instruction to the calibration equipment; the calibration reference object generation instruction is used for instructing the calibration equipment to generate and display a calibration reference object;
the calibration reference image comprises the calibration reference.
Optionally, the apparatus for calibrating a camera device further includes:
the video stream acquisition module is used for pulling the video stream of the target camera device in real time;
the screenshot obtaining unit is specifically configured to intercept a video frame from the video stream in response to the screenshot operation, and use the video frame as the intercepted image.
Optionally, the apparatus for calibrating a camera device further includes:
the drawing module is used for drawing a dividing line on the upper layer of a display area of the video stream so as to divide the display area into a plurality of sub-areas;
the first receiving module is used for receiving first position information sent by the calibration equipment; the first position information indicates the position of the calibration reference in the calibration reference image;
the drawing module is further used for drawing a calibration reference frame on the display area according to the first position information;
the first judging unit is specifically configured to:
judging whether the first condition or the second condition meets at least one condition, and determining that the calibration reference image of the target camera device is completely acquired when the judgment result is yes;
the first condition is: each sub-region comprises at least one calibration reference frame; the second condition is: and the number of the calibration reference images of the target camera device reaches a first preset threshold value.
Optionally, the apparatus for calibrating a camera device further includes: and the storage module is used for storing the first position information and/or the number of the calibration reference images of the target camera device.
Optionally, the apparatus for calibrating a camera device further includes:
and the movement control module is used for sending a control instruction to the calibration equipment so as to indicate the calibration equipment to move to the shooting area of the target camera device.
Optionally, the calibration state updating module is further configured to update the calibration state of the target image capturing apparatus from the second state to the first state in response to a recalibration instruction for the target image capturing apparatus;
the device for calibrating the camera device further comprises: and the second sending module is used for sending an image deleting instruction to the calibration equipment so as to instruct the calibration equipment to delete the calibration reference image of the target camera device.
Optionally, the apparatus for calibrating a camera device further includes:
the scene base map building module is used for building a base map of the scene;
the camera device drawing module is used for drawing all camera devices in the scene on the base map according to positions and calibration states;
and the display module is used for displaying all the camera devices on the base map.
Optionally, when the determination result of the determining module is yes, the apparatus for calibrating a camera device further includes:
a third sending module, configured to send a first packing instruction to the calibration device to instruct the calibration device to pack the calibration reference image of the target camera;
the second receiving module is used for receiving the address of the data packet corresponding to the target camera device sent by the calibration equipment;
the first downloading module is used for downloading the data packet according to the address;
the first uploading module is used for uploading the data packet to a cloud server so that the cloud server can calibrate the target camera device according to the data packet;
or, the apparatus for calibrating a camera device further comprises:
a fourth sending module, configured to send a second packing instruction to the calibration device to instruct the calibration device to pack the calibration reference image of the target camera, and upload a data packet corresponding to the target camera to the cloud server, so that the cloud server calibrates the target camera according to the data packet.
Optionally, when the determination result of the determining module is yes, the apparatus for calibrating a camera device further includes:
a fifth sending module, configured to send a third packing instruction to the calibration apparatus to instruct the calibration apparatus to pack the calibration reference images of all the camera devices;
a third receiving module, configured to receive an address of a total data packet sent by the calibration device;
the second downloading module is used for downloading the total data packet according to the address;
the second uploading module is used for uploading the total data packets to a cloud server so that the cloud server can calibrate all the camera devices according to the total data packets;
or, the apparatus for calibrating a camera device further comprises:
a sixth sending module, configured to send a fourth packing instruction to the calibration equipment, so as to instruct the calibration equipment to pack the calibration reference images of all the cameras, and upload the total data packet to the cloud server, so that the cloud server calibrates all the cameras according to the total data packet.
In a third aspect, the present application provides a system for calibrating a camera device, comprising: calibrating equipment and handheld terminal equipment; the calibration equipment is in communication connection with the handheld terminal equipment;
the calibration equipment is used for moving in the scene, moving to a shooting area of a target camera device in the scene according to the control of the handheld terminal equipment, and generating and displaying a calibration reference object according to the control of the handheld terminal equipment;
the handheld terminal device is used for acquiring a position information set and real-time position information of the calibration device; determining the target camera device from all uncalibrated camera devices according to the real-time position information and the position information set; when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from a first state to a second state;
the calibration reference image of the target camera device is used for calibrating the target camera device;
the set of location information includes: and position information of all uncalibrated camera devices in the scene where the calibration equipment is located.
Optionally, the system further comprises: the network video recorder NVR server is used for providing the video stream of each camera device in the scene for the handheld terminal equipment;
the handheld terminal equipment is further used for pulling the video stream of the target camera device from the NVR server; in response to the screenshot operation, intercepting a video frame from a video stream of the target camera device, and taking the video frame as an intercepted image of the target device; sending the intercepted image to the calibration equipment;
the calibration equipment is further used for detecting whether the intercepted image contains a calibration reference object displayed by the calibration equipment, and when the intercepted image is confirmed to contain the identifiable calibration reference object, the intercepted image is judged to be effective;
the handheld terminal device is further configured to receive an validity detection result sent by the calibration device, and when the validity detection result indicates that validity detection of the captured image passes, record the captured image as a calibration reference image; judging whether the calibration reference image of the target camera device meets a preset condition or not; and when the calibration reference image of the target camera device meets a preset condition, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, an android system is operated on the handheld terminal device;
the calibration equipment comprises first industrial control equipment and second industrial control equipment, wherein the first industrial control equipment runs an Andriod system and is used for displaying the calibration reference object, the second industrial control equipment runs an L inux system and is provided with a robot operating system ROS, the second industrial control equipment is used for feeding back real-time position information of the calibration equipment to handheld terminal equipment, displaying the calibration reference object according to the control of the handheld terminal equipment, controlling the first industrial control equipment to display the calibration reference object and sending the effectiveness detection result to the handheld terminal equipment.
Optionally, the system further includes: the cloud server is used for providing the position information set for the handheld terminal equipment;
the calibration device is configured to provide a data packet corresponding to the target camera to the cloud server, where the data packet includes: a calibration reference image of the target camera device;
and the cloud server is used for calibrating the target camera device according to the data packet.
Compared with the prior art, the method has the following beneficial effects:
in the method, a target camera device is determined from all uncalibrated camera devices by utilizing a position information set and real-time position information of a calibration device; and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state. Therefore, whether the calibration reference image of each camera device in the scene is acquired can be known according to the calibration state of the device in the scene. For example, the calibration state of a certain camera device is a second state, which indicates that the calibration reference image of the camera device has been collected, and repeated collection is not needed, so that the camera device is prevented from being repeatedly calibrated; and if the calibration state of a certain camera device is not the second state, the calibration reference image of the camera device is not acquired or is not acquired sufficiently, so that the camera device is prevented from being calibrated. In addition, the target camera device is determined by utilizing the position information set and the real-time position information of the calibration equipment, so that the order of collecting the calibration reference images of the camera device is ensured. Therefore, the technical scheme of the application improves the collection efficiency of the calibration reference image of the camera device, avoids repeated collection or missing collection, and further improves the calibration efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a method for calibrating a camera device according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another method for calibrating a camera device according to an embodiment of the present disclosure;
fig. 3 is a bottom view of a scene provided in an embodiment of the present application;
FIG. 4 is a drawing diagram of the upper layer of the display area of a video stream;
fig. 5 is a schematic structural diagram of an apparatus for calibrating a camera device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a system for calibrating a camera device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another system for calibrating a camera device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a system for calibrating a camera device according to an embodiment of the present application.
Detailed Description
As described above, the problem of missed calibration or repeated calibration is likely to occur when the current camera device is calibrated, which seriously affects the calibration efficiency. In order to solve the problem, the inventors have studied to provide a method, an apparatus, and a system for calibrating an image pickup apparatus. In the method, an uncalibrated target camera device in a scene is determined by combining a position information set and real-time position information of a movable calibration device in the scene; and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state. The target camera device is determined, and the calibration reference images of the camera device are collected more orderly. In addition, the calibration state is updated after the calibration reference image is acquired, so that whether the calibration reference image of each camera device is acquired completely or not is convenient to know, acquisition missing or repeated acquisition is avoided, calibration missing or repeated calibration is prevented, and the calibration efficiency is improved.
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, an application scenario of the embodiment of the present application is described. The scene can be any scene needing to be calibrated by the camera device, such as a playground, a scenic spot, a shopping mall, a pedestrian street and the like. A plurality of cameras are installed in a scene, and need to be calibrated, and the calibration contents may include: internal parameters and/or external parameters of the camera device. The internal parameters may include, but are not limited to, any of the following: lens distortion, equivalent focal length, principal point coordinates, and the like. External parameters may include, but are not limited to, any of the following: the position of the imaging device, the lens orientation, the shooting area range, and the like.
For convenience of calibration, the scenario of this embodiment further includes: calibration equipment and handheld terminal equipment. The calibration equipment is movable, displays the calibration reference object, has the functions of operation and data processing, and can be in communication connection with the handheld terminal equipment. The handheld terminal device can be a mobile phone or a tablet personal computer and other portable mobile terminal devices, and can be held by a worker who executes a calibration task. The staff can hold the handheld terminal device, and the handheld terminal device responds to the operation of the staff and communicates with the calibration device to realize the function of the handheld terminal device.
For example, the calibration device may send its own real-time location information to the handheld terminal device; moving according to the control of the handheld terminal device; generating and displaying a calibration reference; checking the validity of the image; feeding back an image validity check result to the handheld terminal equipment; and transmitting the data packet address and the like to the handheld terminal equipment.
The following first describes a method for calibrating an image capturing apparatus provided in the present application with reference to embodiments and drawings.
Method embodiment
Referring to fig. 1, a flowchart of a method for calibrating a camera device according to an embodiment of the present disclosure is shown. In the method embodiment provided by the application, the handheld terminal device in the scene is used as an execution subject for description.
As shown in fig. 1, the method for calibrating a camera device includes:
step 101: and acquiring a position information set and real-time position information of the calibration equipment.
In the embodiment of the present application, the position information set includes: and calibrating the position information of all the uncalibrated camera devices in the scene where the equipment is located.
In one possible implementation, the set of position information includes position information of all cameras in the scene, i.e. both position information of calibrated cameras and position information of uncalibrated cameras.
In another possible implementation, the set of position information only includes position information of all uncalibrated cameras in the scene. In this implementation, once the imaging device involved in the set of position information is calibrated, the position information of that imaging device is removed from the set of position information.
The set of location information may be in the form of a list. Typically, the position information for each camera in the scene is known prior to calibration, although calibration may be required. For example, if the cloud server includes a location information set, in this step, the handheld terminal device may obtain the location information set by communicating with the cloud server, so as to obtain location information of all uncalibrated camera devices in the scene.
Step 102: and determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set.
In the embodiment of the application, in order to promote the orderly acquisition of the calibration reference images of the uncalibrated camera devices and reduce the probability of missed calibration or repeated calibration, the target camera devices are determined from all uncalibrated camera devices according to the real-time position information of the calibration equipment and the position information set.
In a possible implementation manner, in this step, an uncalibrated camera device closest to the real-time position of the calibration device may be determined according to the real-time position information and the position information set of the calibration device, and the uncalibrated camera device is used as a target camera device, that is, a next camera device that needs to perform calibration reference image acquisition.
It can be understood that, in the above implementation manner, by using the uncalibrated camera apparatus closest to the real-time position of the calibration apparatus as the target camera apparatus, the moving route of the calibration apparatus is simplified, which is equivalent to setting the moving destination area of the calibration apparatus at the current stage. After the target camera is determined, the handheld terminal device may send a control instruction to the calibration device to instruct the calibration device to move to the shooting area of the target camera. After the calibration equipment reaches the shooting area of the target camera device, the calibration equipment can move in the area to generate and display a calibration reference object, so that the calibration reference image of the target camera device can be conveniently acquired.
Step 103: and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state.
The calibration reference image of the target imaging apparatus is an image that can be used as a data base to calibrate the target imaging apparatus. That is, to calibrate internal parameters and/or external parameters of the target image pickup device, a calibration reference image captured by the target image pickup device is required.
In the embodiment of the application, each camera is marked with a calibration state. Since the calibration reference image needs to be collected first, and the camera device is calibrated by using the collected calibration reference image after the collection is completed, in this embodiment, when the collection of the calibration reference image of a certain camera device is completed, the camera device can be calibrated smoothly by default. In this embodiment, the calibration state reflects whether the calibration reference image of the image capturing apparatus is acquired.
For example, the calibration state of the camera device is a first state, which indicates that the calibration reference image of the camera device is not completely acquired; the calibration state of the camera device is a second state, which indicates that the calibration reference image of the camera device is completely acquired.
Therefore, in the embodiment of the present application, when the handheld terminal device determines that the calibration reference image of the target camera is completely captured, the calibration state of the target camera may be updated from the first state to the second state. Therefore, a worker holding the handheld terminal device can conveniently determine whether the calibration reference image of the camera device is collected or not by reading the calibration state of the camera device in the scene.
In the method for calibrating a camera device provided in the above embodiment, a target camera device is determined from all uncalibrated camera devices by using a position information set and real-time position information of a calibration apparatus; and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state. Therefore, whether the calibration reference image of each camera device in the scene is acquired can be known according to the calibration state of the device in the scene.
For example, the calibration state of a certain camera device is a second state, which indicates that the calibration reference image of the camera device has been collected, and repeated collection is not needed, so that the camera device is prevented from being repeatedly calibrated; and if the calibration state of a certain camera device is not the second state, the calibration reference image of the camera device is not acquired or is not acquired sufficiently, so that the camera device is prevented from being calibrated. In addition, the target camera device is determined by utilizing the position information set and the real-time position information of the calibration equipment, so that the order of collecting the calibration reference images of the camera device is ensured. Therefore, the technical scheme of the application improves the collection efficiency of the calibration reference image of the camera device, avoids repeated collection or missing collection, and further improves the calibration efficiency.
It should be noted that, in the foregoing embodiments, for convenience of understanding, only one target imaging device is described. In practical application, however, after the calibration reference image of one target camera device is acquired according to the above operation, the next target camera device can be determined continuously, and the process is repeated until the calibration reference images of all the camera devices in the scene are acquired, so that calibration of a large scene and multiple camera devices can be realized.
Referring to fig. 2, it is a flowchart of another method for calibrating a camera device according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes:
step 201: and acquiring a position information set and real-time position information of the calibration equipment.
Step 202: and determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set.
The implementation manner of steps 201-.
Step 203: and responding to the screenshot operation, and acquiring a screenshot image of the target camera device.
In this step, the screenshot operation may be specifically provided by a worker holding the handheld terminal device. In a possible implementation manner, a screenshot function module is displayed on a screen of the handheld terminal device, and a worker clicks the screenshot function module to perform screenshot operation. In another possible implementation manner, the handheld terminal device includes a key or a key combination corresponding to the screenshot operation, and the screenshot operation is performed when the worker presses the key or presses the case combination. It can be understood that the above is only an example form of the screenshot operation, and the screenshot operation may also be implemented in other ways in practical application, so the specific implementation form of the screenshot operation is not limited here.
A Network Video Recorder (English full name: Network Video Recorder, English abbreviation: NVR) server has an internal Network IP address and an open external Network access address. The handheld terminal apparatus pulls the video stream to each camera from the NVR server. Specifically, the handheld terminal device may implement pulling a video stream of the target camera; and in response to the screenshot operation, intercepting the video frame from the video stream, and taking the video frame as an intercepted image.
In a possible implementation manner, a worker watches a played video stream shot by the target camera through a handheld terminal device, and when finding that the calibration device has moved into the shooting area of the target camera, the worker can perform screenshot operation.
In addition, before the captured image of the target camera device is acquired in this step, the handheld terminal device may further send a calibration reference object generation instruction to the calibration device in response to the capture operation. In a possible implementation manner, the calibration device includes two industrial control devices, where a first industrial control device is used to display the calibration reference object, and the calibration device utilizes a second industrial control device to implement communication with the handheld terminal device. As an example, the first industrial control device may be a tablet computer or other device with a large screen; the second industrial control device may have a data processing function, and the processor thereof can implement a preset algorithm, such as an image validity detection algorithm, when running the program.
In the initial stage of calibration data acquisition, a first calibration device is started, an application program for displaying a calibration reference object is automatically called up, and a connection network is automatically monitored. And when the network is connected to the calibration network, automatically jumping to a calibration page, registering ROS node communication, and entering a ready state. The handheld terminal device is also connected to the calibration network, and registers ROS node communication. The first industrial control equipment, the second industrial control equipment and the handheld terminal equipment are communicated through the ROS.
The second industrial control device of the calibration device can randomly generate the calibration reference object in real time according to the calibration reference object generation instruction. By way of example, the calibration reference may be a two-dimensional code, a bar code, or other pattern. The specific implementation form of the calibration reference is not limited herein. And after the reference object is generated, the second industrial control equipment sends a message for displaying the calibration reference object to the first industrial control equipment, so that the second industrial control equipment can display the calibration reference object generated by the first industrial control equipment according to the message.
The purpose of capturing the captured image in this step is to identify whether it is a valid calibration reference image. The calibration reference image should contain the calibration reference object generated and displayed by the calibration device. Since the calibration reference image obtained is necessarily based on the calibration reference object displayed by the calibration device, it can be understood that the calibration reference image is obtained at the same time when the calibration reference object is displayed, or the calibration reference image is obtained after the calibration reference object is displayed. Because the generation, the display and the acquisition of the intercepted image of the calibration reference object are triggered after the screenshot responding operation, the operation of acquiring the intercepted image can be delayed in order to ensure the effectiveness of the acquired intercepted image as much as possible. Therefore, the time synchronization of the acquisition of the intercepted image by the handheld terminal equipment and the display of the calibration reference object by the calibration equipment is ensured.
Step 204: and sending the intercepted image to the calibration equipment so that the calibration equipment performs validity detection according to the intercepted image.
In this step, the handheld terminal device sends the captured image obtained in the previous step to the calibration device. In one possible implementation, the scaling device acquires 1420 encoded video stream single frame data (grayscale data) every preset time interval (e.g., 1 second) at the previous step. Because the second industrial control device of the calibration device is built with a Robot Operating System (full English name: Robot Operating System, abbreviated English: ROS), the handheld terminal device can send the gray data to the second industrial control device of the calibration device through ROS communication.
In this embodiment, the second industrial control device of the calibration device may detect and identify the image, for example, detect and identify whether the image includes the calibration reference object, and send the validity detection result to the handheld terminal device. If the captured image contains the calibration reference object, the validity detection result sent by the calibration equipment indicates that the validity detection of the captured image passes; and if the calibration reference object is not contained, the validity detection result sent by the calibration equipment indicates that the validity detection of the intercepted image fails. In addition, if the captured image includes the calibration reference object, the second industrial control device of the calibration device may further identify position information (hereinafter referred to as first position information) of the calibration reference object in the captured image. The first position information is effective to intercept the position of the calibration reference object in the image. In addition, the calibration equipment can also count the number of effective screenshot images of the target camera device. For example, the calibration apparatus adds 1 every time it detects and identifies a valid truncated image.
Step 205: and receiving an effectiveness detection result sent by the calibration equipment.
In this step, the handheld terminal device receives the validity detection result of the captured image by the calibration device. In addition, if the validity detection result indicates that the validity detection is passed, the handheld terminal device may further receive first position information associated with the intercepted image, which is provided by the calibration device. In addition, the handheld terminal device can also receive the number of valid captured images (i.e., calibration reference images) of the target camera.
In addition, the handheld terminal device can synchronously store the first position information and the number of the calibration reference images. For example, the handheld terminal device runs an Andriod system, the Andriod system has a database, and the data is stored in the database for local storage.
It can be understood that during the process of acquiring images by using the handheld terminal device and the calibration device, the acquisition may be interrupted due to rest or other reasons. Through the quantity and the first positional information of the calibration reference images of the local storage target camera device, continuous collection after interruption can be facilitated, excessive or missing collection of collected images is prevented, calibration efficiency is improved, and intelligent calibration experience of workers is improved.
Step 206: and when the validity detection result indicates that the validity detection of the intercepted image passes, recording the intercepted image as a calibration reference image.
That is, when the calibration apparatus detects and recognizes that the captured image is valid, it means that the captured image can be used to calibrate the target imaging device. The captured image that passes the detection may be used as a calibration reference image.
Step 207: and when the calibration reference image of the target camera device meets the preset condition, determining that the calibration reference image of the target camera device is completely acquired.
To facilitate understanding of this step, the following description is made in conjunction with fig. 3 and 4. Fig. 3 is a scene base diagram provided in the embodiment of the present application. Fig. 4 is a schematic drawing diagram of an upper layer of a display area of a video stream according to an embodiment of the present application.
As shown in fig. 3, a base map of the scene is pre-constructed prior to image acquisition. The base map may be a mesh map, and the present embodiment does not limit the effect of the base map to be drawn and the tool for drawing the base map. All cameras are plotted on the base map according to the position and calibration status (e.g., first status, second status) of each camera in the scene. The camera device has at least two attributes, one of which is a position attribute, namely a position in the scene base map; and the second is a calibration state attribute, namely whether the calibration reference image of the camera device is acquired or not. The attributes can be displayed in the base map, and further, a worker can know the approximate position and the calibration state of each camera in the scene shown in the base map by looking up the base map.
In addition, the handheld terminal device can also draw the mark representing the calibration device on the base map in real time according to the real-time position information and the angle information sent by the calibration device. The indication may be a small arrow, the direction of which is pointing in the direction of movement of the calibration device. The handheld terminal device may also select a target camera in response to a selection operation by the worker. For example, in the imaging device in the first calibration state, the imaging device closest to the small arrow is used as the target imaging device.
The dividing line may be drawn on the upper layer of the display area of the video stream of the target image pickup device. The dividing line is used to divide the display area into a plurality of sub-areas 401. As shown in fig. 4, the display area is divided into 9 sub-areas. Since the handheld terminal device receives the first position information from the calibration device, the calibration reference frame 402 can be drawn in the display area according to the position of the calibration reference object indicated by the first position information.
It should be noted that the sub-regions may be divided according to area or position. For example, the 9 sub-regions divided are equal in area. Therefore, the area of each region is ensured to be uniform as much as possible, and when the calibration equipment displays the calibration reference objects in a plurality of uniform sub-regions, the handheld terminal equipment can acquire the calibration reference images in which the calibration reference objects are uniformly distributed as much as possible.
The possible implementation manner provided by the embodiment of the present application based on step 207 is as follows:
and when each subarea comprises at least one calibration reference frame, or the number of the calibration reference images of the target camera device reaches a first preset threshold value, determining that the calibration reference image acquisition of the target camera device is finished.
Taking fig. 4 as an example, when each sub-region 401 includes at least one calibration reference frame 402, it may be determined that the calibration reference image of the target camera device is completely acquired, that is, at least 9 valid captured images are acquired as the calibration reference image.
The first preset threshold may be set according to a scene or a calibration accuracy requirement. For example, if the scene is open and there are few obstacles, a higher first preset threshold may be set; if there are many obstacles (e.g. seats, potting, infrastructure) in the scene, a lower first preset threshold may be set. In addition, if the requirement on the calibration precision is high, a higher first preset threshold value can be set; if the requirement on the calibration accuracy is low, a first lower preset threshold value can be set. The first preset threshold is 15 as an example.
Step 208: and updating the calibration state of the target camera device from the first state to the second state.
The implementation manner of step 208 is substantially the same as that of step 103 in the foregoing embodiment, and the description about step 208 may refer to the foregoing embodiment, which is not repeated herein.
As can be seen from the interfaces shown in fig. 3 and 4, a screenshot function module a, a selection module B, and a calibration completion module C are disposed around the display area of the base map or the video stream. The screenshot function module A responds to screenshot operation of a worker; the selection module B responds to selection operation of a worker, for example, a certain camera device is selected as a target camera device; and the calibration completion module C responds to the completion of the calibration operation of the staff to stop image acquisition of a certain camera device in the scene.
As shown in fig. 3 and 4, the interface further includes a recalibration module D, which is responsive to a recalibration command for the target imaging apparatus. That is, after the calibration reference image of the target camera device is acquired, and the calibration state of the target camera device is updated to the second state, if the operator applies the recalibration operation to the recalibration module D, which is equivalent to providing a recalibration instruction for the target camera device, the calibration state of the target camera device is updated from the second state to the first state. In addition, the handheld terminal equipment sends an image deleting instruction to the calibration equipment, and deletes the calibration reference image of the target camera device, which is remained in the calibration equipment in the previous image acquisition, detection and identification links.
That is to say, in the embodiment of the present application, the camera device that has already acquired the calibration reference image may be acquired again according to the operation of the worker, so as to recalibrate the camera device.
In practical application, a first list can be established for the camera device in the first state; a second list may be established for cameras in a second state. And after the recalibration is triggered, the camera device is transferred from the second list to the first list, and when the calibration reference image of the camera device is acquired, the camera device is transferred from the first list to the second list. As shown in fig. 3 and 4, when the first list is selected, the IP addresses of all the image capturing apparatuses whose calibration states are the first states are displayed; and if the second list is selected, displaying the IP addresses of all the camera devices with the calibration state being the second state. In fig. 3, the first state and the second state of the image pickup apparatus show different effects, for example, the image pickup apparatuses 301 and 302 are the image pickup apparatus in the first state; the imaging device 303 is an imaging device in the second state.
In addition, in the interfaces shown in fig. 3 and 4, the number of captured images for a selected camera and the number of effective images (i.e., calibration reference images) therein are displayed.
In the method provided in the above embodiment, when it is determined that the calibration reference object of the target imaging device is completely acquired, the calibration reference image may also be directly or indirectly uploaded by the calibration device, so as to implement calibration using the calibration reference images:
the first implementation mode comprises the following steps: and (5) indirectly uploading the calibration equipment. Specifically, the handheld terminal device is used as an intermediary. The handheld terminal equipment sends a first packing instruction to the calibration equipment to instruct the calibration equipment to pack the calibration reference image of the target camera device; receiving an address of a data packet corresponding to a target camera device sent by calibration equipment; and downloading the data packet according to the address, and uploading the data packet to a cloud server so that the cloud server calibrates the target camera device according to the data packet.
The second implementation mode comprises the following steps: and directly uploading the calibration equipment. And the handheld terminal equipment sends a second packaging instruction to the calibration equipment to instruct the calibration equipment to package the calibration reference image of the target camera device, and uploads a data packet corresponding to the target camera device to the cloud server, so that the cloud server calibrates the target camera device according to the data packet.
In the first and second implementation manners, data can be packed and uploaded every time a calibration reference image of one camera device is acquired, so that real-time calibration of the calibration camera device is realized. In addition, after the calibration reference images of all the camera devices are collected, the calibration reference images can be uniformly packaged and uploaded, and the following third and fourth implementation modes are specifically referred to.
The third implementation mode comprises the following steps: and (5) indirectly uploading the calibration equipment. Specifically, the handheld terminal device is used as an intermediary. The handheld terminal equipment sends a third packaging instruction to the calibration equipment to instruct the calibration equipment to package the calibration reference images of all the camera devices; receiving addresses of total data packets sent by calibration equipment; and downloading the total data packet according to the address, and uploading the total data packet to a cloud server so that the cloud server calibrates all the camera devices according to the total data packet.
The fourth implementation mode comprises the following steps: and directly uploading the calibration equipment. And the handheld terminal equipment sends a fourth packaging instruction to the calibration equipment to indicate the calibration equipment to package the calibration reference images of all the camera devices, and uploads the total data packet to the cloud server, so that the cloud server calibrates all the camera devices according to the total data packet.
In the third and fourth implementation manners, the calibration reference image of each camera in the total data packet may be distinguished according to the unique identifier of the camera, and the calibration reference images are respectively packed and then summarized to the total data packet.
In addition, in practical application, if the calibration device or the handheld terminal device has a function of calibrating the camera device according to the calibration reference image, the calibration device or the handheld terminal device can also perform calibration instead of uploading to the cloud server for calibration.
In the existing calibration schemes, the acquisition and processing of calibration data are separated. For example, after data collection, the user needs to manually hold a hard disk to copy the data at the NVR server and then bring the data back for processing. However, in this method, it is necessary to collect data first, copy the data, and process the data, which is time-consuming and labor-consuming. In the scheme provided by the embodiment of the application, the video stream of the camera device is pulled in real time and can be processed in real time, data do not need to be copied manually in a special process, time consumed by calibration is saved, the burden of manual operation is reduced, and the calibration process is convenient and fast. The video stream is pulled without affecting the processing of other tasks.
In the existing calibration scheme, a worker cannot know whether a camera device is available (whether the camera device fails) or not in the calibration data acquisition process and cannot select a calibration position (namely, a display position of a calibration reference object in the calibration data acquisition process). In the embodiment of the present application, a worker may check the calibration state and the video stream of the target camera through the handheld terminal device, and may control the calibration device to move to a specific sub-area through the drawn calibration reference frame, so as to collect the captured image. Therefore, real-time controllability is obviously improved in the calibration data acquisition process.
Based on the method for calibrating the camera device provided by the foregoing embodiment, correspondingly, the present application further provides a device for calibrating the camera device. The following description is made in conjunction with the embodiments and the accompanying drawings.
Device embodiment
Referring to fig. 5, a schematic structural diagram of an apparatus 500 for calibrating a camera device according to an embodiment of the present disclosure is shown. The apparatus 500 is applied to a handheld terminal device in a scene.
As shown in fig. 5, the apparatus 500 for calibrating a camera device includes:
a position information obtaining module 501, configured to obtain a position information set and real-time position information of a calibration device; the set of location information includes: calibrating the position information of all uncalibrated camera devices in the scene where the equipment is located;
a target camera determination module 502, configured to determine a target camera from all uncalibrated cameras according to the real-time location information and the location information set;
a judging module 503, configured to judge whether the calibration reference image of the target camera device is acquired;
a calibration state updating module 504, configured to update the calibration state of the target image capturing apparatus from the first state to the second state when the determination result of the determining module 503 is yes; the calibration reference image of the target camera is used for calibrating the target camera.
In the apparatus 500 provided in the above embodiment, a target image capturing apparatus is determined from all uncalibrated image capturing apparatuses by using the position information set and the real-time position information of the calibration device; and when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from the first state to the second state. Therefore, whether the calibration reference image of each camera device in the scene is acquired can be known according to the calibration state of the device in the scene. For example, the calibration state of a certain camera device is a second state, which indicates that the calibration reference image of the camera device has been collected, and repeated collection is not needed, so that the camera device is prevented from being repeatedly calibrated; and if the calibration state of a certain camera device is not the second state, the calibration reference image of the camera device is not acquired or is not acquired sufficiently, so that the camera device is prevented from being calibrated. In addition, the target camera device is determined by utilizing the position information set and the real-time position information of the calibration equipment, so that the order of collecting the calibration reference images of the camera device is ensured. Therefore, the device 500 provided by the technical scheme of the application improves the collection efficiency of the calibration reference image of the camera device, avoids repeated collection or missing collection, and further improves the calibration efficiency.
Optionally, the target image capturing apparatus determining module 502 in the apparatus 500 specifically includes:
and the first determining unit is used for determining an uncalibrated camera device closest to the real-time position of the calibration equipment according to the real-time position information and the position information set, and taking the uncalibrated camera device as a target camera device.
By taking the uncalibrated camera device closest to the real-time position of the calibration equipment as the target camera device, the moving route of the calibration equipment is simplified, and the moving target area of the calibration equipment at the current stage is equivalently set.
Optionally, the determining module 503 in the apparatus 500 specifically includes:
the screenshot obtaining unit is used for responding to screenshot operation and obtaining a screenshot image of the target camera device;
the first sending unit is used for sending the intercepted image to the calibration equipment so that the calibration equipment can carry out validity detection according to the intercepted image;
the first receiving unit is used for receiving the validity detection result sent by the calibration equipment;
the screenshot obtaining unit is further used for recording the intercepted image as a calibration reference image when the validity detection result indicates that the validity detection of the intercepted image passes;
the first judging unit is used for judging whether a calibration reference image of the target camera device meets a preset condition or not; and when the calibration reference image of the target camera device meets the preset condition, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, the apparatus 500 further includes:
the first sending module is used for responding to screenshot operation and sending a calibration reference object generation instruction to the calibration equipment; the calibration reference object generating instruction is used for instructing the calibration equipment to generate and display a calibration reference object;
the calibration reference image includes a calibration reference.
Optionally, the apparatus 500 further includes:
the video stream acquisition module is used for pulling the video stream of the target camera device in real time;
and the screenshot acquiring unit is specifically used for responding to screenshot operation, intercepting a video frame from the video stream, and taking the video frame as an intercepted image.
Optionally, the apparatus 500 further includes:
the drawing module is used for drawing a dividing line on the upper layer of a display area of the video stream so as to divide the display area into a plurality of sub-areas;
the first receiving module is used for receiving first position information sent by the calibration equipment; the first position information indicates the position of the calibration reference object in the calibration reference image;
the drawing module is further used for drawing a calibration reference frame on the display area according to the first position information;
the first judging unit is specifically configured to:
judging whether the first condition or the second condition meets at least one condition, and determining that the calibration reference image of the target camera device is completely acquired when the judgment result is yes;
the first condition is: each sub-region comprises at least one calibration reference frame; the second condition is: the number of the calibration reference images of the target camera device reaches a first preset threshold value.
Optionally, the apparatus 500 further includes: and the storage module is used for storing the first position information and/or the number of the calibration reference images of the target camera device.
Optionally, the apparatus 500 further includes: and the movement control module is used for sending a control instruction to the calibration equipment so as to instruct the calibration equipment to move to the shooting area of the target camera device.
Optionally, the calibration state updating module 504 in the apparatus 500 is further configured to update the calibration state of the target image capturing apparatus from the second state to the first state in response to a recalibration instruction for the target image capturing apparatus;
the apparatus 500 further comprises: and the second sending module is used for sending an image deleting instruction to the calibration equipment so as to instruct the calibration equipment to delete the calibration reference image of the target camera device.
Optionally, the apparatus 500 further includes:
the scene base map building module is used for building a base map of a scene;
the camera device drawing module is used for drawing all camera devices in a scene on the base map according to the positions and the calibration states;
and the display module is used for displaying all the camera devices on the base map.
Optionally, when the determination result of the determining module 503 is yes, the apparatus 500 for calibrating an image capturing apparatus further includes:
the third sending module is used for sending a first packing instruction to the calibration equipment so as to instruct the calibration equipment to pack the calibration reference image of the target camera device;
the second receiving module is used for receiving the address of the data packet corresponding to the target camera device sent by the calibration equipment;
the first downloading module is used for downloading the data packet according to the address;
the first uploading module is used for uploading the data packet to the cloud server so that the cloud server can calibrate the target camera device according to the data packet;
alternatively, the apparatus 500 for calibrating a camera further comprises:
and the fourth sending module is used for sending a second packaging instruction to the calibration equipment so as to instruct the calibration equipment to package the calibration reference image of the target camera device, and uploading a data packet corresponding to the target camera device to the cloud server so that the cloud server calibrates the target camera device according to the data packet.
When the determination result of the determination module 503 is yes, the apparatus 500 for calibrating a camera further includes:
the fifth sending module is used for sending a third packing instruction to the calibration equipment so as to instruct the calibration equipment to pack the calibration reference images of all the camera devices;
the third receiving module is used for receiving the address of the total data packet sent by the calibration equipment;
the second downloading module is used for downloading the total data packet according to the address;
the second uploading module is used for uploading the total data packets to the cloud server so that the cloud server can calibrate all the camera devices according to the total data packets;
alternatively, the apparatus 500 for calibrating a camera further comprises:
and the sixth sending module is used for sending a fourth packing instruction to the calibration equipment so as to instruct the calibration equipment to pack the calibration reference images of all the camera devices, and uploading the total data packet to the cloud server so as to enable the cloud server to calibrate all the camera devices according to the total data packet.
In the existing calibration schemes, the acquisition and processing of calibration data are separated. For example, after data collection, the user needs to manually hold a hard disk to copy the data at the NVR server and then bring the data back for processing. However, in this method, it is necessary to collect data first, copy the data, and process the data, which is time-consuming and labor-consuming. In the scheme provided by the embodiment of the application, the video stream of the camera device is pulled in real time and can be processed in real time, data do not need to be copied manually in a special process, time consumed by calibration is saved, the burden of manual operation is reduced, and the calibration process is convenient and fast. The video stream is pulled without affecting the processing of other tasks.
In the existing calibration scheme, a worker cannot know whether a camera device is available (whether the camera device fails) or not in the calibration data acquisition process and cannot select a calibration position (namely, a display position of a calibration reference object in the calibration data acquisition process). In the embodiment of the present application, a worker may check the calibration state and the video stream of the target camera through the handheld terminal device, and may control the calibration device to move to a specific sub-area through the drawn calibration reference frame, so as to collect the captured image. Therefore, real-time controllability is obviously improved in the calibration data acquisition process.
Based on the method and the device for calibrating the camera device provided by the foregoing embodiments, correspondingly, the application further provides a system for calibrating the camera device. The following description is made in conjunction with the embodiments and the accompanying drawings.
System embodiment
Referring to fig. 6, the figure is a schematic structural diagram of a system 600 for calibrating a camera device according to an embodiment of the present application.
As shown in fig. 6, the system 600 includes: calibration equipment 601 and handheld terminal equipment 602. The calibration device 601 is in communication connection with the handheld terminal device 602. Wherein the calibration device 601 may be a movable robot. The handheld terminal device 602 may be a portable terminal device with a display screen, such as a mobile phone or a tablet computer.
The calibration device 601 is configured to move in a scene, move to a shooting area of a target camera in the scene according to control of the handheld terminal device 602, and generate and display a calibration reference object according to control of the handheld terminal device 602. By way of example, the calibration reference object may be a two-dimensional code or a dot-matrix chart
The handheld terminal device 602 is configured to obtain a position information set and real-time position information of the calibration device 601; determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set; when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from a first state to a second state;
the calibration reference image of the target camera device is used for calibrating the target camera device;
the set of location information includes: and calibrating the position information of all uncalibrated camera devices in the scene where the equipment 601 is located.
In the above described method embodiments and apparatus embodiments, the information interaction method between the calibration device 601 and the handheld terminal device 602 has already been described, and therefore, details are not described here again, and related contents may refer to the foregoing embodiments.
The system 600 provided by the application acquires calibration reference images of the camera device more orderly by determining the target camera device. In addition, the calibration state is updated after the calibration reference image is acquired, so that whether the calibration reference image of each camera device is acquired completely or not is convenient to know, acquisition missing or repeated acquisition is avoided, calibration missing or repeated calibration is prevented, and the calibration efficiency is improved.
As shown in fig. 7, optionally, a system 700 for calibrating a camera device is further provided, where the system 700 further includes: a network video recorder NVR server 603, configured to provide video streams of each camera in a scene to the handheld terminal device 602;
the handheld terminal device 602 is further configured to pull the video stream of the target camera from the NVR server 603; in response to the screenshot operation, intercepting a video frame from a video stream of the target camera device, and taking the video frame as an intercepted image of the target device; sending the captured image to the calibration device 601;
the calibration device 601 is further configured to detect whether the captured image includes a calibration reference object displayed by the captured image, and when it is determined that the captured image includes a recognizable calibration reference object, determine that the captured image is valid;
the handheld terminal device 602 is further configured to receive an validity detection result sent by the calibration device 601, and when the validity detection result indicates that validity detection of the captured image passes, record the captured image as a calibration reference image; judging whether a calibration reference image of a target camera device meets a preset condition or not; and when the calibration reference image of the target camera device meets the preset condition, determining that the calibration reference image of the target camera device is completely acquired.
Optionally, an android system runs on the handheld terminal device 602;
as shown in fig. 8, the system 800 for calibrating a camera device includes a first industrial control device 6011 and a second industrial control device 6012, where the first industrial control device 6011 runs an Andriod system for displaying a calibration reference, the second industrial control device 6012 runs an L inux system, and a robot operating system ROS is built in the L inux system, and the second industrial control device 6012 is configured to feed back real-time position information of the calibration device to the handheld terminal device 602, display the calibration reference according to control of the handheld terminal device 602, control the first industrial control device 6011 to display the calibration reference, and send an effectiveness detection result to the handheld terminal device 602.
The first industrial control device 6011 is fixed to the calibration device, and displays the calibration reference object through its own display screen. The second industrial control device 6012 is simply referred to as an algorithm end. In addition, the calibration device can also comprise a moving mechanism, such as a roller, a motor and the like.
In the system 800 shown in fig. 8, the method may further include: the cloud server 801 is used for providing a position information set for the handheld terminal device 602;
the second industrial control device 6012 of the calibration device is configured to provide a data packet corresponding to the target camera device to the cloud server 801, where the data packet includes: a calibration reference image of the target camera device;
and the cloud server 801 is configured to calibrate the target camera device according to the data packet.
In addition, the second industrial control device 6012 of the calibration apparatus may further send a package address of the image data to the handheld terminal device 602, so that the handheld terminal device 602 downloads the data package according to the address. After the data packet is downloaded by the handheld terminal device 602, the data packet is uploaded to the cloud server 801, so that the cloud server 801 calibrates the camera device (including calibrating internal parameters and/or external parameters) by using image data in the data packet.
It should be noted that, in the present specification, all the embodiments are described in a progressive manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus and system embodiments, since they are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described embodiments of the apparatus and system are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts suggested as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only one specific embodiment of the present application, but the scope of the present application 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 application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for calibrating a camera device is applied to a handheld terminal device, and comprises the following steps:
acquiring a position information set and real-time position information of calibration equipment; the set of location information includes: position information of all uncalibrated camera devices in a scene where the calibration equipment is located;
determining a target camera device from all uncalibrated camera devices according to the real-time position information and the position information set;
when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from a first state to a second state; and the calibration reference image of the target camera device is used for calibrating the target camera device.
2. The method according to claim 1, wherein the determining a target camera from all uncalibrated cameras according to the real-time location information and the location information set specifically comprises:
and determining an uncalibrated camera device closest to the real-time position of the calibration equipment according to the real-time position information and the position information set, and taking the uncalibrated camera device as the target camera device.
3. The method according to claim 1, wherein the determining that the acquisition of the calibration reference image of the target camera device is completed specifically includes:
responding to screenshot operation, and acquiring a screenshot image of the target camera device;
sending the intercepted image to the calibration equipment so that the calibration equipment performs validity detection according to the intercepted image;
receiving an effectiveness detection result sent by the calibration equipment;
when the validity detection result indicates that the validity detection of the intercepted image passes, recording the intercepted image as a calibration reference image;
and when the calibration reference image of the target camera device meets a preset condition, determining that the calibration reference image of the target camera device is completely acquired.
4. The method of claim 3, wherein prior to said acquiring the truncated image of the target camera, the method further comprises:
responding to the screenshot operation, and sending a calibration reference object generation instruction to the calibration equipment; the calibration reference object generation instruction is used for instructing the calibration equipment to generate and display a calibration reference object;
the calibration reference image comprises the calibration reference.
5. The method of claim 3, further comprising:
pulling the video stream of the target camera device in real time;
the obtaining of the captured image of the target camera device in response to the screenshot operation specifically includes:
and in response to the screenshot operation, intercepting a video frame from the video stream, and taking the video frame as the intercepted image.
6. The method of claim 5, further comprising:
drawing a dividing line on the upper layer of a display area of the video stream to divide the display area into a plurality of sub-areas;
receiving first position information sent by the calibration equipment; the first position information indicates the position of the calibration reference in the calibration reference image;
drawing a calibration reference frame on the display area according to the first position information;
when the calibration reference image of the target camera device meets the preset condition, determining that the calibration reference image of the target camera device is completely acquired, specifically comprising:
and when each sub-area comprises at least one calibration reference frame, or the number of the calibration reference images of the target camera device reaches a first preset threshold value, determining that the calibration reference image of the target camera device is completely acquired.
7. The method of claim 1, wherein after said determining a target camera from said all uncalibrated cameras from said set of real-time position information and said set of position information, said method further comprises:
and sending a control instruction to the calibration equipment to instruct the calibration equipment to move to the shooting area of the target camera device.
8. The method of any one of claims 1-7, further comprising:
updating the calibration state of the target camera device from the second state to the first state in response to a recalibration instruction for the target camera device;
and sending an image deleting instruction to the calibration equipment to instruct the calibration equipment to delete the calibration reference image of the target camera device.
9. The device for calibrating the camera device is applied to the handheld terminal equipment, and comprises the following components:
the position information acquisition module is used for acquiring a position information set and real-time position information of the calibration equipment; the set of location information includes: position information of all uncalibrated camera devices in a scene where the calibration equipment is located;
the target camera shooting device determining module is used for determining a target camera shooting device from all the uncalibrated camera shooting devices according to the real-time position information and the position information set;
the judging module is used for judging whether the calibration reference image of the target camera device is acquired;
the calibration state updating module is used for updating the calibration state of the target camera device from a first state to a second state when the judgment result of the judging module is yes; and the calibration reference image of the target camera device is used for calibrating the target camera device.
10. A system for calibrating a camera device, comprising: calibrating equipment and handheld terminal equipment; the calibration equipment is in communication connection with the handheld terminal equipment;
the calibration equipment is used for moving in the scene, moving to a shooting area of a target camera device in the scene according to the control of the handheld terminal equipment, and generating and displaying a calibration reference object according to the control of the handheld terminal equipment;
the handheld terminal device is used for acquiring a position information set and real-time position information of the calibration device; determining the target camera device from all uncalibrated camera devices according to the real-time position information and the position information set; when the calibration reference image of the target camera device is determined to be completely acquired, updating the calibration state of the target camera device from a first state to a second state;
the calibration reference image of the target camera device is used for calibrating the target camera device;
the set of location information includes: and position information of all uncalibrated camera devices in the scene where the calibration equipment is located.
CN202010273724.9A 2020-04-09 2020-04-09 Method, device and system for calibrating camera device Active CN111462252B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010273724.9A CN111462252B (en) 2020-04-09 2020-04-09 Method, device and system for calibrating camera device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010273724.9A CN111462252B (en) 2020-04-09 2020-04-09 Method, device and system for calibrating camera device

Publications (2)

Publication Number Publication Date
CN111462252A true CN111462252A (en) 2020-07-28
CN111462252B CN111462252B (en) 2023-10-24

Family

ID=71683009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010273724.9A Active CN111462252B (en) 2020-04-09 2020-04-09 Method, device and system for calibrating camera device

Country Status (1)

Country Link
CN (1) CN111462252B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377437A (en) * 2021-08-11 2021-09-10 景网技术有限公司 Smart city front-end equipment repair workload analysis method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707879A (en) * 2012-04-17 2012-10-03 上海量明科技发展有限公司 Method for selecting image contour of screenshot area, client and system
CN108604234A (en) * 2015-07-15 2018-09-28 查比公司 System and method for screenshot capture link
CN110009004A (en) * 2019-03-14 2019-07-12 努比亚技术有限公司 Image processing method, computer equipment and storage medium
US20190294878A1 (en) * 2018-03-23 2019-09-26 NthGen Software Inc. Method and system for obtaining vehicle target views from a video stream
CN110910459A (en) * 2018-12-27 2020-03-24 北京爱笔科技有限公司 Camera device calibration method and device and calibration equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102707879A (en) * 2012-04-17 2012-10-03 上海量明科技发展有限公司 Method for selecting image contour of screenshot area, client and system
CN108604234A (en) * 2015-07-15 2018-09-28 查比公司 System and method for screenshot capture link
US20190294878A1 (en) * 2018-03-23 2019-09-26 NthGen Software Inc. Method and system for obtaining vehicle target views from a video stream
CN110910459A (en) * 2018-12-27 2020-03-24 北京爱笔科技有限公司 Camera device calibration method and device and calibration equipment
CN110009004A (en) * 2019-03-14 2019-07-12 努比亚技术有限公司 Image processing method, computer equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Y. TSIN等: "Statistical calibration of CCD imaging process" *
袁明昱;那真;张立;: "基于嵌入式系统的智能动态摄像头" *
闫霞等: "基于HALCON软件的摄像机标定" *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377437A (en) * 2021-08-11 2021-09-10 景网技术有限公司 Smart city front-end equipment repair workload analysis method and system
CN113377437B (en) * 2021-08-11 2021-11-09 景网技术有限公司 Smart city front-end equipment repair workload analysis method and system

Also Published As

Publication number Publication date
CN111462252B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
JP4195991B2 (en) Surveillance video monitoring system, surveillance video generation method, and surveillance video monitoring server
US11019282B2 (en) Shooting system and shooting method
JP2004318823A (en) Information display system, information processing apparatus, pointing device and pointer mark displaying method in information display system
CN110910460B (en) Method and device for acquiring position information and calibration equipment
CN107229274B (en) Position indication method, terminal device, self-propelled device, and program
JP2015001756A (en) State change management system, state change management server, and state change management terminal
JP2017162103A (en) Inspection work support system, inspection work support method, and inspection work support program
CN109540122B (en) Method and device for constructing map model
CN112492215B (en) Shooting control method and device and electronic equipment
CN112399084A (en) Unmanned aerial vehicle aerial photography method and device, electronic equipment and readable storage medium
KR101466132B1 (en) System for integrated management of cameras and method thereof
CN111462252B (en) Method, device and system for calibrating camera device
JP2008176768A (en) Image processor
CN109064499A (en) A kind of multistory frame seismic testing high-speed video measurement method based on distribution parsing
JP5974819B2 (en) Auxiliary imaging device and program
CN108108396B (en) Aerial photography picture splicing management system for aircraft
KR101118926B1 (en) System for observation moving objects
JP2012019374A (en) Electronic album creation server, information processor, electronic album creation system, and control method of electronic album creation server
CN113905211A (en) Video patrol method, device, electronic equipment and storage medium
WO2020179439A1 (en) Displacement detection method, photography instruction method, displacement detection device, and photography instruction device
JP2012119971A (en) Monitoring video display unit
JP2014222410A (en) Portable display device and display program, and operation guide system
CN111279352B (en) Three-dimensional information acquisition system through pitching exercise and camera parameter calculation method
CN111242107B (en) Method and electronic device for setting virtual object in space
CN113063421A (en) Navigation method and related device, mobile terminal and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant