Pan-tilt position self-checking method and device, storage medium and electronic device
A cloud platform and equipment technology, applied in the field of communication, can solve the problem of low control accuracy of cloud platform equipment, and achieve the effect of improving accuracy
Pending Publication Date: 2021-11-30
ZHEJIANG DAHUA TECH
6 Cites 0 Cited by
AI-Extracted Technical Summary
Problems solved by technology
[0004] Embodiments of the present invention provide a pan-tilt position self-check method and device, a storage medium,...
Method used
[0082] In summary, the present embodiment improves the accuracy of the position of the PTZ camera without optocouplers by combining the...
Abstract
The embodiment of the invention provides a pan-tilt position self-checking method and device, a storage medium and an electronic device, and the method comprises the steps: obtaining a first image through target camera equipment when pan-tilt equipment is located at a first position, and the pan-tilt equipment is used for controlling the shooting angle of the target camera equipment; according to a preset rotation angle, controlling the pan-tilt equipment to rotate to a second position, so that a second image is obtained at the second position through the target camera device, and the first image and the second image both comprise the first object; calculating a first pixel difference of the first object between the first image and the second image; and adjusting the position of the pan-tilt equipment by using the first pixel difference. According to the method and the device, the problem of low adjustment accuracy of the holder equipment in the prior art is solved, and the effect of improving the adjustment accuracy of the holder equipment is achieved.
Application Domain
Television system detailsColor television details +1
Technology Topic
EngineeringComputer hardware +1
Image
Examples
- Experimental program(1)
Example Embodiment
[0022] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] It should be noted that the specification and claims of the present invention and the terms "first", "second", "second", or the like are used to distinguish a similar object without having to describe a particular order or award order.
[0024] The method embodiments provided in the present application embodiment can be performed in a mobile terminal, a computer terminal, or a similar computing device. Take the mobile terminal as an example. figure 1 It is a hardware configuration block diagram of a mobile terminal of a mobile terminal according to an embodiment of the present invention. like figure 1 As shown, the mobile terminal can include one or more ( figure 1 Only one) processor 102 (processor 102 can include, but is not limited to, processing means for storing data) and memory 104 for storing data, wherein said mobile terminals may also include Transmission device 106 for communication function and input output device 108. One of ordinary skill in the art will appreciate that figure 1 The structure shown is only schematic, and does not limit the structure of the mobile terminal. For example, mobile terminals may also include ratio figure 1 More or fewer components shown, or have figure 1 Different configurations.
[0025] Memory 104 can be used to store computer programs, such as software programs, and modules of application software, such as computer programs corresponding to the cloud station auto-inspection method in the embodiment of the present invention, by running a computer program stored in memory 104, Thereby performing various functional applications and data processing, that is, the above method is implemented. Memory 104 can include a high speed random memory, further comprising a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memories. In some examples, memory 104 can further include a memory remotely set relative to processor 102, which can be connected to the mobile terminal over a network. Examples of the above network include, but are not limited to, Internet, enterprise internal networks, local area networks, mobile communication networks, and combinations thereof.
[0026] The transmission device 106 is configured to receive or transmit data via a network. The above network specific examples can include a wireless network provided by a communication provider of a mobile terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can communicate with the Internet by the base station to communicate with the Internet with other network devices. In one example, the transmission device 106 can be a radio frequency (a referred to as an RF) module for communicating with the Internet via a wireless manner.
[0027] In this embodiment, a printing method of a cloud station is provided. figure 2 It is a flow chart of a printing method according to an embodiment of the present invention, such as figure 2 As shown, the process includes the following steps:
[0028] Step S202, in the case where the PTZ device is in the first position, the first image is acquired by the target imaging device, wherein the PTZ device is used to control the shooting angle of the target imaging device;
[0029] Step S204, controlling the rotation device to the second position according to the preset rotation angle to obtain a second image in the second position by the target imaging device, wherein the first image and the second image include the first object;
[0030]Step S206, calculating a first difference between the first target pixel between the first and second images;
[0031] Step S208, the pixel difference using the first position adjusting device PTZ.
[0032] Wherein the step of performing main body of the terminal or the like may be, but is not limited thereto.
[0033] This embodiment include, without limitation applied to the rotation angle of the image pickup apparatus PTZ device for adjusting the scene.
[0034] In the present embodiment, the self-test mainly through image head apparatus, the image head apparatus determines a first pixel difference, the pixel difference determining each of a first, it is determined whether the value exceeds a threshold.
[0035] In the present embodiment, the first object is included in a first image textured, not solid such as ceilings, floors this scenario, the object can have a certain shape.
[0036] Through the above steps, the case where the head is in the first position of the apparatus, acquiring a first image obtained by imaging the target apparatus, wherein the head angle of a control target apparatus for photographing the image pickup apparatus; PTZ preset rotational angle control apparatus is rotated to the second position to the target obtained by the imaging device at a second location of the second image, wherein the first image and the second image comprises a first object; calculating a first target between the first image and the second image a first difference pixel by pixel difference between a first adjustment position of the device head. That is, the position of the cloud station device is adjusted by adjusting the first image and the second image acquired in the first position and the second position, and the purpose of adjusting the cloud station apparatus is implemented. Therefore, problems with low adjustment accuracy of PTZ equipment can be solved, and the effect of improving the accuracy of the adjustment of PTZ equipment is achieved.
[0037] In one exemplary embodiment, a first calculation of the first target pixel differences between the first image and the second image, comprising:
[0038] S1, determining a first value of a first pixel in the first image of the object;
[0039] S2, determining a second value of the first pixel in the second image of the object;
[0040] S3, by using the first pixel value and the second pixel between the first pixel value calculating a first difference image and the second image.
[0041] In the present embodiment, the regimens are adjusted by acquiring a first embodiment of the first object image and the second image head position of the device, it is not suitable for inspection of the first head device in the scene.
[0042] In one exemplary embodiment, the difference with the first pixel position adjusting device head, comprising:
[0043] Sl, calculating a ratio difference between the first pixel and the predetermined rotation angle, a predetermined rotation angle to obtain the pixel deviation of each corresponding degrees of rotation;
[0044] Sl, in the case where the degree of deviation of each pixel corresponding to the rotation is less than a first predetermined threshold value, the degree of variation with each pixel corresponding to the rotation adjustment device PTZ position.
[0045] In the present embodiment, for example, crawl image containing the texture object A, and the current position of a recording head device. The head device then rotated b ° (typically less than 2 °, to ensure that the target is not textured current field), B image acquisition, image analysis by an algorithm A and B in the target image a first pixel difference C X, then each degree a first target pixel corresponding to the difference X c / b.
[0046] In one exemplary embodiment, the method further comprising:
[0047] Sl, in the case where the deviation of each pixel corresponding to degrees of rotation equal to or greater than a first predetermined threshold value, deleting the first image.
[0048] In the present embodiment, for example, if the deviation is greater than the angle e the set threshold value (boundary value POST maximum error), then again re-analysis algorithm. Three times greater than the set threshold, then delete the image A end.
[0049] After one exemplary embodiment, the difference with the first pixel position adjustment head device, the method further comprising:
[0050] S1, a first movement step number is calculated in a first head device in the predetermined direction;
[0051] S2, calculating the number of steps of the second head moving device in a second predetermined direction;
[0052] S3, the number of steps based on the first motion and the second motion the number of steps to calculate the total number of steps moving head device;
[0053] S4, using the total number of steps for the position of head movement device can be adjusted.
[0054] In the present embodiment, for example, by using mechanical limit boundary PTZ camera head self-test device, in a horizontal direction, for example, moving from the left border to the right border (corresponding to a first predetermined direction), to calculate the total movement number of steps, then moving to the right boundary of the left boundary (corresponding to the second predetermined direction), the step of computing motion.
[0055] In one exemplary embodiment, the total number of steps using the head movement position adjusting device, comprising:
[0056] Sl, according to the rotation range of PTZ preset level device, determining the total number of steps corresponding to the number of steps for each motion degrees of rotation;
[0057] S2, the position of the head device is adjusted by the number of steps each corresponding to degrees of rotation.
[0058] In the present embodiment, the horizontal rotary head apparatus to determine the range of the horizontal direction of each step that is representative of the degree of completion of the self-test device head.
[0059] After one exemplary embodiment, the difference with the first pixel position adjustment head device, the method further comprising:
[0060] S1, the control head apparatus is rotated from the first position to the second position to the first position in the third image is acquired by the target imaging apparatus, wherein the first image and the third image comprises a first object;
[0061] S2, calculating a first target pixel a difference between the second and the third image of the first image;
[0062] S3, a difference with the first pixel, a second pixel difference and a predetermined offset angle determines the rotation angle of the head device;
[0063] S4, based on the deviation of the adjustment of the angular position of the head device.
[0064] In one exemplary embodiment, the deviation angle based on the position adjustment of the head apparatus, comprising:
[0065] Sl, in the case where the deviation angle is smaller than a second predetermined threshold value, using the position of the head deviation angle adjusting device.
[0066] In one exemplary embodiment, the method further comprising:
[0067] Sl, in the case where the deviation angle is greater than or equal to a second predetermined threshold value, re-acquiring an image at a first position, in order to retrieve the image using the calculated bias angle;
[0068] S2, the number of re-calculation of the angle of deviation is larger than the case where the preset number of times, the first image is deleted.
[0069] In the present embodiment, the application device is not the first head of the self-test scenario, for example, the current device to re-position a crawl image C, and image analysis and image C A pixel deviation d, the deviation of the pixel calculating an angle corresponding to the deviation e is d / c * b.
[0070] Below a threshold value: if the deviation e is greater than the angle threshold setting (boundary POST maximum error value), the algorithm again re-analyzed. Contact three times greater than the set threshold, then delete the picture ends A. Fine: the set is less than the threshold value, fine adjustment is performed according to the position e.
[0071] The following specific embodiments of the present invention will be described in conjunction with:
[0072] In this embodiment, the self-test device rely on mechanical pan stop member is described as an example, includes a preliminary image of the video adjustment + fine adjustment algorithm combining scheme, the purpose of improving the accuracy of coordinate PTZ camera head.
[0073] This embodiment mainly includes the following contents:
[0074] Sl, first boundary self-test program that uses existing self test head device, if the head is not the first time the self-test device, then the self-test will be performed after the fine adjustment algorithm head apparatus, particularly the processes image 3 Indicated.
[0075] Self-test using the boundary comprises a mechanical stop boundary PTZ camera head self-test, in a horizontal direction, for example, the movement from the left border to the right border, calculate the total number of movement steps, and then moved to the right boundary of the left boundary, calculating a motion number of steps, and the horizontal direction can be determined according to a horizontal rotation range of each step of the device representative of the degree of self-tests to complete the head.
[0076] First self-test, comprising a reference picture if A is absent, is considered to be the first time the self-test, this time to crawl image of a location, and further determines the target image contained in the X textures, and if not, the device re-rotated head crawl image until the images caught a containing texture object, and records the current position a. The apparatus is then rotated b ° (typically less than 2 °, to ensure that the target is not textured current field), acquired image B, by an algorithm analyzing the first image pixel difference c A and B in the target image of X, each of the corresponding the first target pixel X difference of c / b.
[0077] Analysis algorithm, if not the first time the self-test, fine tuning algorithm is performed, the current head position a device to re-crawl image C, and then analyzing the pixel variation d pictures A and C are pictures, then the corresponding pixel deviation calculating e is the deviation angle d / c * b.
[0078] Where the deviation angle is lower than a threshold value, if the deviation is greater than the angle e the set threshold value (boundary value POST maximum error), then again re-analysis algorithm. Three times greater than the set threshold, then delete the image A end.
[0079] In this embodiment, three times greater than the set threshold, the end of the main A picture is deleted avoid a situation: the camera at the scene changed, specific changes in the target, in this case may lead to self-image The actual position deviation. This situation is no longer self-starting image, or use the existing boundaries of the self-test.
[0080] Fine: the set is less than the threshold value, fine adjustment is performed according to the position e.
[0081] The present embodiment can be applied without optocoupler weekly PTZ camera will be automatically maintained, the scene will PTZ device in self-test, self-test + through the boundary analysis algorithm ensures automatic maintenance position each time substantially automatic maintenance constant.
[0082] As described above, the present embodiment and the fine adjust the image combining program video algorithms to improve the accuracy optocoupler PTZ camera head position by a mechanical stop member initial self-test adjusted.
[0083]Through the description of the above embodiments, those skilled in the art will clearly understand that the method according to the above embodiments can be implemented by means of software plus necessary general hardware platform, of course, can also pass hardware, but in many cases, the former is More preferred embodiments. Based on this understanding, the technical solution of the present invention essentially or contributes to the prior art in the form of a software product, the computer software product is stored in a storage medium (such as ROM / RAM, disk, " In an optical disc, including a number of instructions to enable a terminal device (can be a mobile phone, computer, server, or network device, etc.) to perform various embodiments of the present invention.
[0084] In the present embodiment, a pan / desk position self-test device is provided, and the apparatus is used to implement the above embodiments and preferred embodiments, and will not be described in the following details. As used herein, the term "module" can achieve a combination of software and / or hardware of a predetermined function. Although the apparatus described in the following examples is preferably implemented in software, the implementation of hardware, or combinations of software and hardware may also be conceived.
[0085] Figure 4 It is a structural block diagram of a cloud station self-test device according to an embodiment of the present invention, such as Figure 4 As shown, the apparatus includes:
[0086] The first acquisition module 42 is configured to acquire the first image through the target imaging device in the case where the cloud station device is in the first position, wherein the PTZ device is used to control the shooting angle of the target imaging device;
[0087] The first control module 44 is configured to rotate to the second position by the preset rotation angle to obtain a second image through the target imaging device in the second position, wherein the first image and the second image include the first image. An object;
[0088] The first calculation module 46 is used to calculate the first image difference between the first object in the first image and the second image;
[0089] The first adjustment module 48 is configured to adjust the position of the above-described PTZ device using the first pixel difference described above.
[0090] In an exemplary embodiment, the first calculation module, including:
[0091] The first determination unit is configured to determine the first pixel value of the first object in the first image;
[0092] The second determination unit is configured to determine the second pixel value of the first object in the second image;
[0093] The first calculation unit is used to calculate the first image and the first pixel difference between the first image and the second image by the first pixel value and the second pixel value.
[0094] In an exemplary embodiment, the first adjustment module, including:
[0095] The second computing unit is used to calculate the ratio between the first pixel difference and the above-described preset rotation angle, resulting in a pixel deviation corresponding to each of the above-described preset rotational angles;
[0096] In the case where the pixel deviation of each of the above rotation degrees is less than the first preset threshold, the position of the PTZ device is adjusted by the pixel deviation corresponding to each of the above rotation.
[0097] In an exemplary embodiment, the above apparatus also includes:
[0098] The first deletion module is used to delete the first image when the pixel deviation corresponding to each of the above rotation degrees is greater than or equal to the first preset threshold.
[0099] In an exemplary embodiment, the above apparatus also includes:
[0100] The second computing module is used to adjust the position of the above-described PTZ device by the above-described first pixel difference, calculate the first movement step number in the first preset direction;
[0101] The third calculation module is configured to calculate the second movement step number of the above-mentioned cloud device in the second preset direction;
[0102] The fourth calculation module is calculated based on the above first movement step and the second moving step number of the number of moving points of the above-described cloud station equipment;
[0103] The second adjustment module is used to adjust the position of the above-described PTZ device using the total number of movement of the above-described moving step.
[0104] In an exemplary embodiment, the second adjustment module, including:
[0105] The third determination unit is used to determine the number of rotational degree of each step in the total length of motion in the total step number of the movement of the moving step of the movement in the above-described display device;
[0106] The second adjustment unit is used to adjust the position of the above-described PTZ device by using the number of rotational degrees corresponding to each of the above numbers.
[0107] In an exemplary embodiment, the above apparatus also includes:
[0108] After the second control module is configured to adjust the position of the above-described cloud station apparatus with the above-described first pixel difference, control said that the cloud station device is rotated from the second position to the first position to pass the above-described first. The position acquisition third image, wherein the first image and the third image include the first object;
[0109] The second computing module is used to calculate the second pixel difference between the first object in the first image and the third image;
[0110] The first determination module is configured to utilize the first pixel difference, the second pixel difference, and the above-described preset rotation angle;
[0111] The second adjustment module is used to adjust the position of the above-described PTZ device based on the above deviation angle.
[0112] In an exemplary embodiment, the second adjustment module, including:
[0113] The third adjustment unit is configured to adjust the position of the PTZ device with the above deviation angle when the deviation angle is less than the second preset threshold.
[0114] In an exemplary embodiment, the above apparatus also includes:
[0115] The first processing module is used to re-acquire an image at the first position in the first position to calculate the deviation angle using the re-acquired image by the above-described deviation angle greater than or equal to the second preset threshold.
[0116] The second deletion module is used to delete the first image in the case where the number of times the number of times the deviation angle is greater than the number of default.
[0117] It should be noted that the various modules described above can be implemented by software or hardware. For the latter, it can be implemented in the following manner, but is not limited thereto: The above module is located in the same processor; or, the above modules are in any combination The form is located in different processors, respectively.
[0118] Embodiments of the present invention also provide a computer readable storage medium that stores a computer program in which the computer program is set to run the steps in any of the above method embodiments.
[0119] In the present embodiment, the computer readable storage medium can be set to store a computer program for performing the above steps.
[0120] In an exemplary embodiment, the computer readable storage medium can include, but is not limited to: a U disk, read-only memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM) , Mobile hard drives, disks, or optical discs, etc., can store media of the computer program.
[0121] Embodiments of the present invention also provide an electronic device, including a memory and a processor stored in a computer program, which is set to run the computer program to perform the steps in any of the above method embodiments.
[0122] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, the input / output device and the processor connection.
[0123] In an exemplary embodiment, the processor can be set to perform the above steps through a computer program.
[0124] Specific examples in this embodiment can refer to the examples described in the above-described embodiments and exemplary embodiments, this embodiment will not be described later.
[0125] Obviously, those skilled in the art will appreciate that the modules or each step of the present invention can be implemented using a general-purpose computing device, which can be concentrated on a single computing device or distributed in a network composed of a plurality of computing devices. On the upper, they can be implemented by the program code executable by the computing device, thereby being stored in the storage device by a computing device, and in some cases, the display may be performed in order of this. Or the steps described, or they are fabricated into individual integrated circuit modules, or the plurality of modules or steps thereof are made into a single integrated circuit module. Thus, the invention is not limited to any particular hardware and software binding.
[0126] It is merely preferred embodiments of the present invention, and is not intended to limit the invention, and those skilled in the art can have various changes and variations. Any modification, equivalent replacement, improvement, etc. according to the present invention should be included within the scope of the invention.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Similar technology patents
Vision-based offline map establishing and positioning method
Owner:SHENZHEN QIANHAI YYD ROBOT CO LTD
Apparatus and method for determining thermal neutron capture cross section of a subsurface formation from a borehole using multiple detectors
Owner:BAKER HUGHES INC
On-line automobile aluminium alloy hub blank deformation measurement method and measurement device
Owner:BEIJING ORIENT
Coastal monitoring and defense decision-making system based on multi-dimensional space fusion and method thereof
Owner:DALIAN LANDSEA MARITECH
Measurement method of thickness of subsurface damaged layer of bucky optical material
Owner:XI AN JIAOTONG UNIV
Classification and recommendation of technical efficacy words
- High precision
Method for forecasting short-term power in wind power station
Owner:NORTH CHINA ELECTRIC POWER UNIV (BAODING) +1
Numerical control machine tool wear monitoring method
Owner:HUAZHONG UNIV OF SCI & TECH +1
Advertisement recommendation method and apparatus
Owner:SHENZHEN TENCENT COMP SYST CO LTD