Camera testing method and apparatus
Patent Information
- Application Number
- CN202211209095.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2042-09-30
AI Technical Summary
但是在实际应用中,人工测试费时费力、效率低下,不利于大规模地对测试摄像机
[0044]本发明中,利用录播主机的图像检测、全自动跟踪功能,让录播主机与摄像机连接,通过判断录播主机的画面是否正确切换来判断摄像机能否正常执行修改图像参数设置、转动等产生输出画面发生变化的指令,整套方法简单,不需要通过人工判断,省时省力,提高测试效率。
Smart Images

Figure CN115914614B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of the Internet, and more specifically, to a camera testing method and apparatus. Background Technology
[0002] With the development of internet technology, cameras have permeated all aspects of work and life. A pan-tilt camera is a camera equipped with a pan-tilt unit. It has a device that allows the camera to rotate in both horizontal and vertical directions, enabling it to capture images from multiple angles. The pan-tilt unit contains two motors. The angles of horizontal and vertical rotation can be adjusted using limit switches.
[0003] Currently, camera power-off restart tests verify whether the camera outputs images normally after restarting and completing its self-test, whether image parameter settings are effective, and, for PTZ cameras, whether the recording and broadcasting control of the PTZ camera's rotation is normal. These tests typically require manual judgment. However, in practical applications, manual testing is time-consuming, labor-intensive, and inefficient, making it unsuitable for large-scale testing of cameras. Summary of the Invention
[0004] To overcome at least one of the defects described in the prior art, the present invention provides a camera testing method and apparatus. The technical solution adopted by the present invention is as follows.
[0005] In a first aspect, the present invention provides a camera testing method applied to a gimbal testing system;
[0006] The PTZ testing system includes: a first recording host and the camera to be tested;
[0007] The first recording and broadcasting host includes: a first video input interface, a second video input interface, and a video output interface;
[0008] The first recording host selects the corresponding video from the videos input at the video input interface and outputs it at the video output interface according to the preset video switching logic.
[0009] The video switching logic includes: for a video input through the first video input interface, when the video frame changes, outputting the video input through the first video input interface;
[0010] The video output from the camera under test is connected to the first video input interface of the recording host;
[0011] The camera testing method includes the following steps:
[0012] Control the first recording and playback host to output video from the second video input interface;
[0013] A control command is sent to the camera under test, the control command being used to change the working state of the camera under test in order to generate a video with a changed image.
[0014] Obtain the video output status of the first recording host, and determine whether the first recording host outputs video from the first video input interface based on the video output status;
[0015] If the first recording host is not outputting video from the first video input interface, it is determined that the camera under test is malfunctioning.
[0016] In one embodiment, the camera to be tested is a pan-tilt camera, and the control command is a pan-tilt rotation command.
[0017] In one implementation, the control command is a camera zoom command.
[0018] In one implementation, the control command is a command to change video image parameter settings.
[0019] In one embodiment, the gimbal testing system further includes: a power supply device;
[0020] The power supply device is used to power the camera under test;
[0021] The camera testing method also includes the following steps:
[0022] A restart command is sent to the power supply device, which instructs the power supply device to turn off the power switch that turns on the camera under test, so as to restart the camera under test;
[0023] Obtain the video output status of the first recording host, and determine whether the first recording host is outputting video from the first video input interface based on the video output status. If the first recording host is not outputting video from the first video input interface, determine that the power-off restart function of the camera under test is abnormal.
[0024] In one embodiment, the PTZ testing system further includes: a second recording and broadcasting host;
[0025] The instruction receiving port of the camera under test is connected to the second recording host;
[0026] The second recording host is controlled to send the control commands to the camera under test.
[0027] In one embodiment, the PTZ testing system further includes: a second recording and broadcasting host;
[0028] The second recording host provides POC power to the camera under test;
[0029] The camera testing method also includes the following steps:
[0030] A restart command is sent to the second recording host. The restart command is used to instruct the second recording host to turn off the power switch of the camera under test so as to restart the camera under test.
[0031] Obtain the video output status of the first recording host, and determine whether the first recording host is outputting video from the first video input interface based on the video output status. If the first recording host is not outputting video from the first video input interface, determine that the power-off restart function of the camera under test is abnormal.
[0032] Secondly, the present invention provides a camera testing device applied to a PTZ testing system, wherein the PTZ testing system includes: a first recording host and a camera to be tested;
[0033] The first recording and broadcasting host includes: a first video input interface, a second video input interface, and a video output interface;
[0034] The first recording host selects the corresponding video from the videos input at the video input interface and outputs it at the video output interface according to the preset video switching logic.
[0035] The video switching logic includes: for a video input through the first video input interface, when the video frame changes, the video input through the first video input interface is output.
[0036] The video output from the camera under test is connected to the first video input interface of the recording host;
[0037] The camera testing equipment includes:
[0038] The control module is used to control the output of video from the second video input interface of the first recording host;
[0039] The sending module is used to send control commands to the camera under test. The control commands are used to change the working state of the camera under test so as to generate a video with a changed image.
[0040] The acquisition module is used to acquire the video output status of the first recording host and determine whether the first recording host outputs video from the first video input interface based on the video output status.
[0041] The judgment module is used to determine that the camera under test is malfunctioning when the first recording host is not outputting video from the first video input interface.
[0042] Thirdly, the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of any of the above embodiments.
[0043] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the method of any of the above embodiments.
[0044] In this invention, the image detection and fully automatic tracking functions of the recording host are used to connect the recording host to the camera. By judging whether the recording host's screen switches correctly, it is determined whether the camera can normally execute instructions such as modifying image parameter settings and rotating to produce changes in the output screen. The whole method is simple, does not require manual judgment, saves time and effort, and improves testing efficiency. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the test system according to Embodiment 1 of the present invention.
[0046] Figure 2 This is a flowchart illustrating Embodiment 1 of the present invention.
[0047] Figure 3 This is a schematic diagram of the overall structure of Embodiment 2 of the present invention. Detailed Implementation
[0048] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0049] It should be noted that the terms "first, second, ..." used in the embodiments of the present invention are merely to distinguish similar objects and do not represent a specific order of objects. It is understood that "first, second, ..." can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first, second, ..." can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0050] Example 1
[0051] The camera testing method of the present invention is applied to a camera testing system, such as... Figure 1 As shown, the camera testing system includes: a first recording host 1 and a camera to be tested 2.
[0052] The first recording and broadcasting host 1 has multiple video input interfaces (HDMI in) and video output interfaces (HDMI out). The first recording and broadcasting host 1 selects the corresponding video from the input videos of the video input interfaces and outputs the video from the output interfaces (HDMI out) according to its internal video switching logic. For ease of description, in this application, the video input interface connected to the camera under test is referred to as the first video input interface, and the other interfaces are collectively referred to as the second video input interface. The first recording and broadcasting host 1 has image detection and fully automatic tracking functions. For the video input through the first video input interface (HDMI in), when the image in the video changes, the video switching logic of the first recording and broadcasting host is triggered, automatically switching the output video to the video with the changed image.
[0053] The video output from camera 2 under test is input to the first video input interface HDMI in of the first recording host.
[0054] It should be noted that the process of the video output from the camera under test 2 to the video input interface of the first recording host can be either direct output, i.e., the two devices are directly connected and the video signal is directly transmitted, or indirect output, i.e., the video signal output from the camera under test 2 reaches the first recording host 1 after passing through several intermediate devices.
[0055] Please see Figure 2 , Figure 2 This is a flowchart illustrating a camera testing method according to Embodiment 1 of the present invention. The method includes steps S110, S120, S130, and S140. It should be noted that steps S110, S120, S130, and S140 are merely reference numerals used to clearly explain the embodiment and the accompanying drawings. Figure 2 The correspondence is not intended to limit the order of steps in this embodiment.
[0056] The method in this embodiment is applied to Figure 1 On the control equipment in the middle.
[0057] Step S110: Control the first recording host to output the video from the second video input interface.
[0058] This method utilizes the automatic switching output screen function of the first recording host mentioned above. Therefore, the first recording host needs to be debugged so that the current output of the first recording host is not the HDMI in screen connected to the camera under test.
[0059] It should be noted that the first recording host may have multiple second video input interfaces. The second video input interface referred to in step S110 refers to one of all the second video input interfaces, or it can be understood as one of the video input ports in the first recording host other than the first video input interface.
[0060] Step S120: Send a control command to the camera under test. The control command is used to change the working state of the camera under test so as to generate a video with a changed image.
[0061] When the operating state of the camera under test remains unchanged, it continuously records a certain object with the same parameters and outputs a video of that object. The output video image remains static, identical, and unchanged. The purpose of changing the operating state of the camera under test in this step is to make its output video image change.
[0062] In one embodiment, the camera to be tested is a pan-tilt camera, and the control command is a pan-tilt rotation command.
[0063] When a PTZ camera rotates horizontally or vertically, the image it captures changes, resulting in a video outputting the altered image.
[0064] In one implementation, the control command is a camera zoom command.
[0065] When a camera zooms in, the image it captures changes, meaning it produces and outputs a video showing this change.
[0066] In one implementation, the control command is a command to change video image parameter settings.
[0067] When video image parameters, such as brightness, contrast, chroma, and saturation, are modified, the resulting and output video image will also change accordingly.
[0068] It should be noted that the process of issuing control commands to the camera under test can be direct, such as issuing control commands to the camera, or indirect, such as sending commands to a third-party device so that the third-party device can issue control commands to the camera.
[0069] Step S130: Obtain the video output status of the first recording host, and determine whether the first recording host outputs video from the first video input interface based on the video output status;
[0070] Step S140: When the first recording host is not outputting video from the first video input interface, it is determined that the camera under test is malfunctioning.
[0071] Typically, the video output status of the first recording host can be obtained through interface queries, which indicates which HDMI input is currently being output. Of course, besides interface queries, other methods can also be used to obtain the video output status of the first recording host.
[0072] Because the first recording host has image detection and fully automatic tracking functions, for video input via the first video input interface (HDMI in), when the image in the video changes, it will automatically switch the output video to the video with the changed image. Since the output video of the camera under test is connected to the HDMI in video input interface of the first recording host, and step S120 causes a change in the output video image of the camera under test, under normal circumstances, the first recording host will switch to the input image of the camera under test. If the first recording host cannot switch to the input image of the camera under test, it proves that the camera has not or cannot execute the command in step S120, and therefore the camera under test is malfunctioning.
[0073] In this method, the image detection and fully automatic tracking functions of the recording host are used to connect the recording host to the camera. By judging whether the recording host's screen switches correctly, it is determined whether the camera can normally execute instructions such as modifying image parameter settings and rotating to produce changes in the output screen. The whole method is simple, does not require manual judgment, saves time and effort, and improves testing efficiency.
[0074] In one embodiment, the gimbal testing system further includes: a power supply device;
[0075] The power supply device is used to power the camera under test;
[0076] The camera testing method further includes steps S150 and S160.
[0077] Step S150: Send a restart command to the power supply device. The restart command is used to instruct the power supply device to turn off the power supply switch of the camera under test in order to restart the camera under test.
[0078] Step S160: Obtain the video output status of the first recording host, and determine whether the first recording host is outputting video from the first video input interface based on the video output status. If the first recording host is not outputting video from the first video input interface, determine that the power-off restart function of the camera under test is abnormal.
[0079] This is a camera power-off restart test. In the pan-tilt-zoom (PTZ) power-off restart test, it verifies whether the camera functions normally after restarting. The camera restart process involves powering off and then on again. After power is restored, the first recording host detects a change in the video output of the first video input interface. Normally, it should switch back to the video from the first video input interface. However, if it fails to switch back, it indicates that the camera's power-off restart function is malfunctioning.
[0080] In one implementation, the PTZ testing system further includes: a second recording and broadcasting host;
[0081] The instruction receiving port of the camera under test is connected to the second recording host;
[0082] The second recording host is controlled to send the control commands to the camera under test.
[0083] In practical use, the camera is usually controlled by the recording host. The instruction receiving port of the camera under test is connected to the second recording host to test whether the instruction receiving port of the camera under test is normal.
[0084] In one embodiment, the PTZ testing system further includes: a second recording and broadcasting host;
[0085] The second recording host provides POC power to the camera under test;
[0086] The camera testing method further includes steps S170 and S180.
[0087] Step S170: Send a restart command to the second recording host. The restart command is used to instruct the second recording host to turn off the power switch of the camera under test in order to restart the camera under test.
[0088] Step S180: Obtain the video output status of the first recording host, and determine whether the first recording host is outputting video from the first video input interface based on the video output status. If the first recording host is not outputting video from the first video input interface, determine that the power-off restart function of the camera under test is abnormal.
[0089] This implementation method is the same as the aforementioned camera power-off and restart test, the difference being that a second recording host provides POC power to the camera under test. In actual use, the recording host typically powers the camera's POC. Compared to the previous implementation method, this method can also test the POC power supply interface.
[0090] Example 2
[0091] Corresponding to the method in Example 1, such as Figure 3As shown, the present invention also provides a camera testing device, which is applied to a gimbal testing system;
[0092] The PTZ testing system includes: a first recording host and the camera to be tested;
[0093] The first recording and broadcasting host includes: a first video input interface, a second video input interface, and a video output interface;
[0094] The first recording host selects the corresponding video from the videos input at the video input interface and outputs it at the video output interface according to the preset video switching logic.
[0095] The video switching logic includes: for a video input through the first video input interface, when the video frame changes, the video input through the first video input interface is output.
[0096] The video output from the camera under test is connected to the first video input interface of the recording host;
[0097] The camera testing device includes: a control module 310, a transmission module 320, an acquisition module 330, and a judgment module 340.
[0098] Control module 310 is used to control the first recording host to output video from the second video input interface;
[0099] The sending module 320 is used to send control commands to the camera under test, the control commands being used to change the working state of the camera under test so as to generate video with changing images;
[0100] The acquisition module 330 is used to acquire the video output status of the first recording host and determine whether the first recording host outputs video from the first video input interface based on the video output status.
[0101] The judgment module 340 is used to determine that the camera under test is malfunctioning when the first recording host is not outputting video from the first video input interface.
[0102] In one embodiment, the camera to be tested is a pan-tilt camera, and the control command is a pan-tilt rotation command.
[0103] In one implementation, the control command is a camera zoom command.
[0104] In one implementation, the control command is a command to change video image parameter settings.
[0105] In one embodiment, the gimbal testing system further includes: a power supply device;
[0106] The power supply device is used to power the camera under test;
[0107] The sending module is also used to send a restart command to the power supply device, the restart command being used to instruct the power supply device to turn off the power supply switch of the camera under test, so as to restart the camera under test;
[0108] The judgment module is also used to obtain the video output status of the first recording host, and to determine whether the first recording host outputs video from the first video input interface based on the video output status. If the first recording host does not output video from the first video input interface, it is determined that the power-off restart function of the camera under test is abnormal.
[0109] In one embodiment, the PTZ testing system further includes: a second recording and broadcasting host;
[0110] The instruction receiving port of the camera under test is connected to the second recording host;
[0111] The sending module sends the control command to the camera under test by controlling the second recording host.
[0112] In one embodiment, the PTZ testing system further includes: a second recording and broadcasting host;
[0113] The second recording host provides POC power to the camera under test;
[0114] The sending module is also used to send a restart command to the second recording host. The restart command is used to instruct the second recording host to turn off the power switch of the camera under test in order to restart the camera under test.
[0115] The judgment module is also used to obtain the video output status of the first recording host, and to determine whether the first recording host outputs video from the first video input interface based on the video output status. If the first recording host does not output video from the first video input interface, it is determined that the power-off restart function of the camera under test is abnormal.
[0116] In this device, the image detection and fully automatic tracking functions of the recording host are used to connect the recording host to the camera. By judging whether the recording host's screen switches correctly, it can be determined whether the camera can normally execute commands such as modifying image parameter settings and rotating to produce changes in the output screen. The whole method is simple, does not require manual judgment, saves time and effort, and improves testing efficiency.
[0117] Example 3
[0118] This invention also provides a storage medium storing computer instructions that, when executed by a processor, implement the camera testing method of any of the above embodiments.
[0119] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, random access memory (RAM), read-only memory (ROM), magnetic disks, or optical disks.
[0120] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, RAM, ROM, magnetic disks, or optical disks.
[0121] Corresponding to the computer storage medium described above, one embodiment also provides a computer device, which includes a memory, an encoder, and a computer program stored in the memory and executable on the encoder, wherein the encoder executes the program to implement any of the camera testing methods described in the above embodiments.
[0122] The aforementioned computer equipment utilizes the image detection and fully automatic tracking functions of the recording host to connect the recording host to the camera. By judging whether the recording host's image switches correctly, it can determine whether the camera can normally execute instructions such as modifying image parameter settings and rotating to produce changes in the output image. The whole method is simple, does not require manual judgment, saves time and effort, and improves testing efficiency.
[0123] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0124] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A camera testing method, characterized in that, Application in gimbal testing systems; The PTZ test system includes: a first recording host, a camera under test, control equipment, and power supply equipment; The first recording and broadcasting host includes: a first video input interface, a second video input interface, and a video output interface; The first recording host selects the corresponding video from the videos input at the video input interface and outputs it at the video output interface according to the preset video switching logic. The video switching logic includes: for a video input through the first video input interface, when the video frame changes, outputting the video input through the first video input interface; The video output from the camera under test is connected to the first video input interface of the recording host; The power supply device is used to power the camera under test; The camera testing method is applied to the control device, and the testing method includes the following steps: Control the first recording and playback host to output video from the second video input interface; A control command is sent to the camera under test. The control command is used to change the working state of the camera under test so as to generate a video with a changing image. The control command is either a camera zoom command or a command to change the video image parameter settings. Perform an interface query on the first recording host to obtain the video output status of the first recording host, and determine whether the first recording host has switched to outputting video from the first video input interface based on the video output status. When the control command is issued and the first recording host does not switch to outputting video from the first video input interface, it is determined that the camera under test has malfunctioned. A restart command is sent to the power supply device, which instructs the power supply device to turn off the power switch that turns on the camera under test, so as to restart the camera under test; When the restart command is issued and the first recording host does not switch to outputting video from the first video input interface, it is determined that the power-off restart function of the camera under test is abnormal.
2. The camera testing method according to claim 1, characterized in that, The camera to be tested is a PTZ camera, and the control commands also include: PTZ rotation commands.
3. The camera testing method according to claim 1 or 2, characterized in that, The PTZ testing system also includes: a second recording and broadcasting host; The instruction receiving port of the camera under test is connected to the second recording host; The second recording host is controlled to send the control commands to the camera under test.
4. The camera testing method according to claim 1 or 2, characterized in that, The power supply device is the second recording and broadcasting host; The second recording host provides POC power to the camera under test.
5. A camera testing device, characterized in that, Applied to gimbal testing systems The PTZ testing system also includes: a first recording host, the camera under test, and a power supply device; The first recording and broadcasting host includes: a first video input interface, a second video input interface, and a video output interface; The first recording host selects the corresponding video from the videos input at the video input interface and outputs it at the video output interface according to the preset video switching logic. The video switching logic includes: for a video input through the first video input interface, when the video frame changes, the video input through the first video input interface is output. The video output from the camera under test is connected to the first video input interface of the recording host; The power supply device is used to power the camera under test; The camera testing equipment includes: The control module is used to control the output of video from the second video input interface of the first recording host; The sending module is used to send control commands to the camera under test, the control commands being used to change the working state of the camera under test to generate a video with a changed image; and to send a restart command to the power supply device, the restart command being used to instruct the power supply device to turn off the power switch of the camera under test to restart the camera under test; wherein, the control commands are camera zoom commands or commands to change video image parameter settings. The acquisition module is used to acquire the video output status of the first recording host and determine whether the first recording host has switched to outputting video from the first video input interface based on the video output status. The judgment module is used to determine that the camera under test is malfunctioning when the control command is issued and the first recording host does not switch to outputting video from the first video input interface; and to determine that the power-off restart function of the camera under test is malfunctioning when the restart command is issued and the first recording host does not switch to outputting video from the first video input interface.
6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Method and apparatus for automatic monitoring malfunction of front end platform of video supervisory equipment
CN101098466A
Automatic recorded broadcast tracker of integration
CN204669511U