CN110139040A - Method, apparatus, PTZ camera, equipment and the medium of PTZ camera positioning - Google Patents

Method, apparatus, PTZ camera, equipment and the medium of PTZ camera positioning Download PDF

Info

Publication number
CN110139040A
CN110139040A CN201910524982.7A CN201910524982A CN110139040A CN 110139040 A CN110139040 A CN 110139040A CN 201910524982 A CN201910524982 A CN 201910524982A CN 110139040 A CN110139040 A CN 110139040A
Authority
CN
China
Prior art keywords
ptz camera
coordinates
targets
pixel
coordinate
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
CN201910524982.7A
Other languages
Chinese (zh)
Other versions
CN110139040B (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.)
GUANGDONG ANJUBAO DIGITAL TECHNOLOGY Co Ltd
Original Assignee
GUANGDONG ANJUBAO DIGITAL 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 GUANGDONG ANJUBAO DIGITAL TECHNOLOGY Co Ltd filed Critical GUANGDONG ANJUBAO DIGITAL TECHNOLOGY Co Ltd
Priority to CN201910524982.7A priority Critical patent/CN110139040B/en
Publication of CN110139040A publication Critical patent/CN110139040A/en
Application granted granted Critical
Publication of CN110139040B publication Critical patent/CN110139040B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Landscapes

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

Abstract

This application provides method, apparatus, PTZ camera, equipment and the media of a kind of positioning of PTZ camera.The method of PTZ camera positioning includes: the clicking operation for monitoring user on the display screen of video pictures for showing PTZ camera shooting;It obtains the clicking operation and corresponds to M pixel on the display screen, the M is the integer greater than 1;A coordinates of targets is determined from the corresponding multiple coordinates of the display screen according to the M pixel, wherein each coordinate pair answers multiple pixels on the display screen;The positioning of the PTZ camera is carried out according to the coordinates of targets.The application can reduce the error between coordinate and user's practical touch click on area, improve the positioning accuracy of PTZ camera.

Description

Method, apparatus, PTZ camera, equipment and the medium of PTZ camera positioning
Technical field
This application involves PTZ camera field of locating technology, method, dress in particular to PTZ camera positioning It sets, PTZ camera, equipment and medium.
Background technique
As the universal and user of domestic intelligent video camera is to camera supervised range requirement, user can pass through hand Machine application watches monitored picture and manipulation PTZ camera rotation in real time.Currently used control PTZ camera rotation Mode is: using up and down by key control, if but user needs PTZ camera to turn to a certain position, if holder is taken the photograph The motor rotation amplitude of camera is small, then needs to repeat the operation several times direction key, it is poor to will lead to user experience.In order to improve use Family experience, it is thus proposed that by calculating the coordinate of lens distortion front and back arbitrary point, and each coordinate pair answers the side of a pixel Formula positions to realize, however there are large errors for this positioning method, so that position inaccurate.
Summary of the invention
In view of this, method, apparatus, the PTZ camera, equipment of PTZ camera positioning provided by the embodiments of the present application And medium, the error between coordinate and user's practical touch click on area can be reduced, improve positioning accuracy.
In a first aspect, a kind of method of PTZ camera positioning provided by the embodiments of the present application, which comprises monitoring Clicking operation of the user on the display screen of video pictures for showing PTZ camera shooting;It is corresponding to obtain the clicking operation M pixel on the display screen, the M are the integer greater than 1;It is corresponding from the display screen according to the M pixel Multiple coordinates in determine a coordinates of targets, wherein each coordinate pair answers multiple pixels on the display screen;According to The coordinates of targets carries out the positioning of the PTZ camera.
During above-mentioned realization, the application by using multiple pixels as a coordinate so that user into When row clicking operation, M pixel on the display screen is corresponded to by obtaining the clicking operation, according to the M pixel Point determines a coordinates of targets from the corresponding multiple coordinates of the display screen, real so as to effectively reduce coordinate and user The error between click on area is touched on border, improves positioning accuracy.
With reference to first aspect, the embodiment of the present application provides the first possible embodiment of first aspect, and described The positioning of the PTZ camera is carried out according to the coordinates of targets, comprising: Xiang Suoshu PTZ camera sends the coordinates of targets, In order to which the PTZ camera is positioned according to the coordinates of targets.
During above-mentioned realization, by the way that the coordinates of targets will be sent to the PTZ camera, so that holder Video camera can calculate the step number that holder needs to rotate by received coordinates of targets, and then navigate to coordinates of targets pair The position answered.
With reference to first aspect, the embodiment of the present application provides second of possible embodiment of first aspect, and described The positioning of the PTZ camera is carried out according to the coordinate, comprising: the PTZ camera is determined according to the coordinates of targets Rotational parameters;The rotational parameters are sent to the PTZ camera, in order to which the PTZ camera is joined according to the rotation Number is positioned.
During above-mentioned realization, cloud is determined according to coordinates of targets by the process resource using electronic equipment itself Rotational parameters are sent to PTZ camera by the rotational parameters of platform video camera, so that PTZ camera is receiving rotational parameters After can directly be positioned, without calculating to the data received, the processing money of PTZ camera can be reduced Source expense improves the locating speed of PTZ camera.
The possible embodiment of second with reference to first aspect, the embodiment of the present application provide the third of first aspect Possible embodiment, the rotational parameters that the PTZ camera is determined according to the coordinates of targets, comprising: described in determining The offset parameter of the central point of the relatively described video pictures of coordinates of targets, the offset parameter include that horizontal axis offset and the longitudinal axis are inclined Shifting amount;Total rotation step of the PTZ camera is determined according to the parameter preset of the offset parameter and the PTZ camera Number;Using total rotation step number as the rotational parameters of the PTZ camera.
During above-mentioned realization, the offset by the determination coordinates of targets relative to the central point of the video pictures is joined Number;Total rotation step number of the PTZ camera is determined according to the parameter preset of the offset parameter and the PTZ camera, To accurately calculate the total step number that PTZ camera needs to rotate, PTZ camera is rotated based on accurate total step number To the corresponding position of coordinates of targets, and then improve positioning accuracy.
The third possible embodiment with reference to first aspect, the embodiment of the present application provide the 4th kind of first aspect Possible embodiment, the parameter preset include the object distance of the cradle head camera, maximum rotation step number, rotation radian and most Big rotational angle.
The 4th kind of possible embodiment with reference to first aspect, the embodiment of the present application provide the 5th kind of first aspect Possible embodiment, the parameter preset according to the offset parameter and the PTZ camera determine the holder camera shooting Total rotation step number of machine, comprising: calculate the first quotient of the horizontal axis offset Yu the object distance;Calculate the maximum rotation step Product between several, the described rotation radian and the maximum rotation angle;First quotient is multiplied with the product, is obtained First rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With calculate described vertical Second quotient of axle offset amount and the object distance;Second quotient is multiplied with the product, obtains the second rotation step number, institute Stating the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;By the first rotation step number and described second Step number is rotated as total rotation step number.
During above-mentioned realization, pass through horizontal axis offset, longitudinal axis amount, object distance, maximum rotation step number, rotation radian The total step number that PTZ camera needs to rotate accurately is calculated with maximum rotation angle, PTZ camera is based on accurate Total step number turn to the corresponding position of coordinates of targets, and then improve positioning accuracy.
The 5th kind of possible embodiment with reference to first aspect, the embodiment of the present application provide the 6th kind of first aspect Possible embodiment, the first rotation step number meet:Wherein, the numberxCharacterize described One rotation step number, the xoffset characterize the horizontal axis offset;The Distance characterizes the object distance;It is describedTable Levy the rotation radian;The LevelMax characterizes the maximum rotation step number;The DegreeMax characterizes the maximum rotation Angle.
The 6th kind of possible embodiment with reference to first aspect, the embodiment of the present application provide the 7th kind of first aspect Possible embodiment, the second rotation step number meet:Wherein, the numberyCharacterize described Two rotation step numbers, the yoffset characterize the horizontal axis offset.
With reference to first aspect, the embodiment of the present application provides the 8th kind of possible embodiment of first aspect, and described A coordinates of targets is determined from the corresponding multiple coordinates of the display screen according to the M pixel, comprising: determines institute respectively State coordinate belonging to each pixel in M pixel;Judge whether coordinate belonging to each pixel is same coordinate; If coordinate belonging to each pixel is same coordinate, using the coordinate as the coordinates of targets;If each picture Coordinate belonging to vegetarian refreshments is not same coordinate, determines each of the corresponding multiple coordinates of the M pixel seat respectively Number comprising the pixel in the M pixel in mark;It will include the picture in the M pixel in the multiple coordinate The largest number of coordinates of vegetarian refreshments are as the coordinates of targets.
During above-mentioned realization, by determining coordinate belonging to each pixel in the M pixel respectively;Judgement Whether coordinate belonging to each pixel is same coordinate;If coordinate belonging to each pixel is same coordinate, Using the coordinate as the coordinates of targets;If coordinate belonging to each pixel is not same coordinate, institute is determined respectively State the number comprising the pixel in the M pixel in each of the corresponding multiple coordinates of the M pixel coordinate; Using include in the multiple coordinate pixel in the M pixel the largest number of coordinates as the coordinates of targets, So that it is determined that a more accurate coordinates of targets out, so that PTZ camera can turn to more accurate position, To improve the positioning accuracy of PTZ camera.
Second aspect, a kind of method of PTZ camera positioning provided by the embodiments of the present application, which comprises receive The coordinates of targets that electronic equipment is sent, the coordinates of targets are true from the corresponding multiple coordinates of display screen of the electronic equipment One made, each coordinate pair answer multiple pixels on the display screen;Rotational parameters are determined according to the coordinates of targets; It is positioned according to the rotational parameters.
During above-mentioned realization, the coordinate as obtained in the application is corresponding multiple pixels, so as to So that obtained coordinates of targets is finger click location when user is clicked using touch screen, and then reduce coordinate and user Error between practical touch click on area improves positioning accuracy.
In conjunction with second aspect, the embodiment of the present application provides the first possible embodiment of second aspect, and described Rotational parameters are determined according to the coordinates of targets, comprising: determine the inclined of the central point of the relatively described video pictures of the coordinates of targets Shifting parameter, the offset parameter include horizontal axis offset and longitudinal axis amount;It is imaged according to the offset parameter and the holder The parameter preset of machine determines total rotation step number;Using total rotation step number as the rotational parameters.
In conjunction with second aspect, the embodiment of the present application provides second of possible embodiment of second aspect, described pre- Setting parameter includes the object distance of the cradle head camera, maximum rotation step number, rotation radian and maximum rotation angle.
In conjunction with second of possible embodiment of second aspect, the embodiment of the present application provides the third of second aspect Possible embodiment, it is described that total rotation step number is determined according to the offset parameter and the parameter preset of the PTZ camera, It include: the first quotient for calculating the horizontal axis offset and the object distance;Calculate the maximum rotation step number, the rotation radian Product between the maximum rotation angle;First quotient is multiplied with the product, obtains the first rotation step number, institute Stating the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With, calculate the longitudinal axis amount with it is described Second quotient of object distance;Second quotient is multiplied with the product, obtains the second rotation step number, the second rotation step number For the rotation step number of the PTZ camera on longitudinal axis;Using the first rotation step number and the second rotation step number as institute State total rotation step number.
In conjunction with the third possible embodiment of second aspect, the embodiment of the present application provides the 4th kind of second aspect Possible embodiment, the first rotation step number meet:Wherein, the numberxCharacterize described One rotation step number, the xoffset characterize the horizontal axis offset;The Distance characterizes the object distance;It is describedTable Levy the rotation radian;The LevelMax characterizes the maximum rotation step number;The DegreeMax characterizes the maximum rotation Angle,Indicate the first quotient.
In conjunction with the 4th kind of possible embodiment of second aspect, the embodiment of the present application provides the 5th kind of second aspect Possible embodiment, the second rotation step number meet:Wherein, the numberyCharacterize described Two rotation step numbers, the yoffset characterize the horizontal axis offset,Indicate the second quotient.
The third aspect, a kind of device of PTZ camera positioning provided by the embodiments of the present application, described device includes: monitoring Module, for monitoring clicking operation of the user on the display screen of video pictures for showing PTZ camera shooting;First obtains Modulus block corresponds to M pixel on the display screen for obtaining the clicking operation, and the M is the integer greater than 1;The Two obtain module, for determining that a target is sat from the corresponding multiple coordinates of the display screen according to the M pixel Mark, wherein each coordinate pair answers multiple pixels on the display screen;Locating module, for according to the coordinates of targets into The positioning of the row PTZ camera.
In conjunction with the third aspect, the embodiment of the present application provides the first possible embodiment of the third aspect, described fixed Position module, is also used to: Xiang Suoshu PTZ camera sends the coordinates of targets, in order to which the PTZ camera is according to the mesh Mark coordinate is positioned.
In conjunction with the third aspect, the embodiment of the present application provides second of possible embodiment of the third aspect, described fixed Position module, comprising: the first submodule, for determining the rotational parameters of the PTZ camera according to the coordinates of targets;Second Submodule, for sending the rotational parameters to the PTZ camera, in order to which the PTZ camera is according to the rotation Parameter is positioned.
In conjunction with second of possible embodiment of the third aspect, the embodiment of the present application provides the third of the third aspect Possible embodiment, the first submodule, is also used to: determining the inclined of the central point of the relatively described video pictures of the coordinates of targets Shifting parameter, the offset parameter include horizontal axis offset and longitudinal axis amount;It is imaged according to the offset parameter and the holder The parameter preset of machine determines total rotation step number of the PTZ camera;Using total rotation step number as the PTZ camera Rotational parameters.
In conjunction with the third possible embodiment of the third aspect, the embodiment of the present application provides the 4th kind of the third aspect Possible embodiment, the parameter preset include the object distance of the cradle head camera, maximum rotation step number, rotation radian and most Big rotational angle.
In conjunction with the 4th kind of possible embodiment of the third aspect, the embodiment of the present application provides the 5th kind of the third aspect Possible embodiment, the parameter preset according to the offset parameter and the PTZ camera determine the holder camera shooting Total rotation step number of machine, comprising: calculate the first quotient of the horizontal axis offset Yu the object distance;Calculate the maximum rotation step Product between several, the described rotation radian and the maximum rotation angle;First quotient is multiplied with the product, is obtained First rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With calculate described vertical Second quotient of axle offset amount and the object distance;Second quotient is multiplied with the product, obtains the second rotation step number, institute Stating the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;By the first rotation step number and described second Step number is rotated as total rotation step number.
In conjunction with the 5th kind of possible embodiment of the third aspect, the embodiment of the present application provides the 6th kind of the third aspect Possible embodiment, the first rotation step number meet:Wherein, the numberxCharacterize described One rotation step number, the xoffset characterize the horizontal axis offset;The Distance characterizes the object distance;It is describedTable Levy the rotation radian;The LevelMax characterizes the maximum rotation step number;The DegreeMax characterizes the maximum rotation Angle,Indicate the first quotient.
In conjunction with the 6th kind of possible embodiment of the third aspect, the embodiment of the present application provides the 7th kind of the third aspect Possible embodiment, the second rotation step number meet:Wherein, the numberyCharacterize described Two rotation step numbers, the yoffset characterize the horizontal axis offset,Indicate the second quotient.
In conjunction with the third aspect, the embodiment of the present application provides the 8th kind of possible embodiment of the third aspect, and second obtains Modulus block, is also used to: determining coordinate belonging to each pixel in the M pixel respectively;Judge each pixel Whether affiliated coordinate is same coordinate;If coordinate belonging to each pixel be same coordinate, using the coordinate as The coordinates of targets;If coordinate belonging to each pixel is not same coordinate, determine that the M pixel is corresponding respectively Each of multiple coordinates coordinate in the number comprising the pixel in the M pixel;By the multiple coordinate In the largest number of coordinates comprising the pixel in the M pixel as the coordinates of targets.
Fourth aspect, the device of PTZ camera positioning provided by the embodiments of the present application, described device includes: reception mould Block, for receiving the coordinates of targets of electronic equipment transmission, the coordinates of targets is from the corresponding multiple coordinates of the display screen One determined, each coordinate pair answer multiple pixels on the display screen;Processing module, for being sat according to the target It marks and determines rotational parameters;Locating module, for being positioned according to the rotational parameters.
5th aspect, a kind of electronic equipment provided by the embodiments of the present application, comprising: communication module, memory, processor with And store the computer program that can be run in the memory and on the processor, the memory and the communication mould Block is with the processor communication, realization cloud as described in any one of first aspect when the processor executes the computer program The step of method of platform Camera Positioning.
6th aspect, a kind of PTZ camera provided by the embodiments of the present application, comprising: communication module, memory, processor And store the computer program that can be run in the memory and on the processor, the memory and the communication Module is with the processor communication, and realization is as described in any one of second aspect when the processor executes the computer program The step of method of PTZ camera positioning.
7th aspect, a kind of storage medium provided by the embodiments of the present application are stored with instruction on the storage medium, work as institute Instruction is stated when running on computers, so that the computer is executed such as the described in any item PTZ cameras positioning of first aspect Method;Alternatively, when described instruction is run on computers, so that the computer is executed as described in any one of second aspect PTZ camera positioning method.
Eighth aspect, a kind of computer program product provided by the embodiments of the present application, the computer program product are being counted When being run on calculation machine, so that computer executes the method such as the described in any item PTZ camera positioning of first aspect;Alternatively, institute When stating computer program product and running on computers, so that computer is executed such as the described in any item holders camera shootings of second aspect The method of machine positioning.
Other feature and advantage of the disclosure will illustrate in the following description, alternatively, Partial Feature and advantage can be with Deduce from specification or unambiguously determine, or by implement the disclosure above-mentioned technology it can be learnt that.
To enable the above objects, features, and advantages of the application to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is electronic equipment provided by the embodiments of the present application and the schematic diagram that PTZ camera interacts;
Fig. 2 is the flow chart of the method for PTZ camera provided by the embodiments of the present application positioning;
Fig. 3 is that projection of the coordinates of targets point in PTZ camera is shown in the method for PTZ camera shown in Fig. 2 positioning It is intended to;
Fig. 4 is the flow chart of the method for another PTZ camera positioning provided by the embodiments of the present application;
Fig. 5 is the flow chart of the method for another PTZ camera positioning provided by the embodiments of the present application;
Fig. 6 is the flow chart of the method for another PTZ camera positioning provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of the device of PTZ camera provided by the embodiments of the present application positioning;
Fig. 8 is the structural schematic diagram of the device of another PTZ camera positioning provided by the embodiments of the present application;
Fig. 9 is the structural schematic diagram of a kind of electronic equipment provided by the embodiments of the present application;
Figure 10 is a kind of structural schematic diagram of PTZ camera provided by the embodiments of the present application.
Specific embodiment
Drawbacks described above existing in the prior art, applicants contemplate that being applicant after practicing and carefully studying It is obtaining as a result, therefore, what the discovery procedure of the above problem and hereinafter the embodiment of the present application were proposed regarding to the issue above Solution all should be the contribution that applicant makes the application during the application.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, technical solutions in the embodiments of the present application is described.
With reference to the accompanying drawing, it elaborates to some embodiments of the application.In the absence of conflict, following Feature in embodiment and embodiment can be combined with each other.
Referring to Fig. 1, being that electronic equipment 100 provided by the embodiments of the present application shows with what PTZ camera 200 interacted It is intended to.The electronic equipment 100 is communicatively coupled by network with a PTZ camera 200, with carry out data communication or Interaction.
Optionally, the network, which can be mobile network, wireless network, such as the network, can be GPRS (General Packet Radio Service, general packet radio service technology), 4G (the 4th Generation mobile Communication technology, fourth generation mobile communication technology) network, 5G (the 5th Generation mobile Communication technology, the 5th third-generation mobile communication technology) network, internet etc..Here, being not especially limited.
Optionally, the electronic equipment 100 is used to monitor user and draws in the video for showing the PTZ camera shooting Clicking operation on the display screen of the electronic equipment in face;It obtains the clicking operation and corresponds to M picture on the display screen Vegetarian refreshments, the M are the integer greater than 1;One is determined from the corresponding multiple coordinates of the display screen according to the M pixel A coordinates of targets, wherein each coordinate pair answers multiple pixels on the display screen;By network to the PTZ camera 200 send the coordinates of targets, in order to which the PTZ camera 200 is positioned according to the coordinates of targets.Either institute Electronic equipment 100 is stated for determining the PTZ camera according to the coordinates of targets after determining a coordinates of targets Rotational parameters;The rotational parameters are sent to the PTZ camera 200 by network, in order to the PTZ camera 200 It is positioned according to the rotational parameters.
Optionally, the PTZ camera 200 is used to receive the coordinates of targets of the transmission of electronic equipment 100, and the target is sat Mark is one determined from the corresponding multiple coordinates of the display screen, and each coordinate pair answers multiple pictures on the display screen Vegetarian refreshments;Rotational parameters are determined according to the coordinates of targets;It is positioned according to the rotational parameters.
Alternatively, in another middle implementation, conversion of the PTZ camera without coordinates of targets to rotational parameters It calculates.Specifically, the PTZ camera 200 be used for receive electronic equipment 100 transmission rotational parameters, according to rotational parameters into Row positioning is calculated without carrying out coordinates of targets to the conversion of rotational parameters.
Optionally, the quantity of the PTZ camera 200 can be multiple.
Optionally, an electronic equipment 100 can control a PTZ camera 200 in the same time and be rotated.
It is of course also possible to be that an electronic equipment 100 controls more PTZ cameras 200 in the same time and rotated. For example, that is, the display screen of electronic equipment 100 can be divided into multiple sub- display screens when electronic equipment 100 has split screen function, User one PTZ camera 200 of control can rotate on each sub- display screen.
It should be understood that above are only example and non-limiting.
Referring to Fig. 2, being the flow chart of the method for PTZ camera positioning provided by the embodiments of the present application, it should be appreciated that Fig. 2 Shown in method can by PTZ camera position device execute, which can be with device shown in Fig. 7 hereinafter Corresponding, which can be the various equipment for being able to carry out this method, for example, such as tablet computer, smart phone mobile terminal, The embodiment of the present application is not limited to this, and is specifically comprised the following steps:
Step S101, click behaviour of the monitoring user on the display screen of video pictures for showing PTZ camera shooting Make.
Optionally, video pictures can be covered with display screen.
Certainly, in actual use, video pictures can not also be covered with display screen.Here, being not especially limited.
It should be understood that in the embodiment of the present application, it is corresponding aobvious in the video pictures that the clicking operation of user can be user Clicking operation on display screen curtain.
In one implementation, multiple pixels constitute a coordinate on the screen area of the display screen.For example, hand The entire screen of machine is distinguished as 1920*1080, which may include a region of 800*800.In the display Multiple coordinates are divided into the screen area of screen, for example, each coordinate includes one piece of region of 5*5 size, then the display The screen area of screen is divided into 25600 coordinates altogether;For another example each coordinate includes the region of 20*20 size, then this is aobvious The screen area of display screen is divided into 1600 coordinates altogether;Wherein, each coordinate can correspond to a positional parameter, the positional parameter It can be electronic equipment to be determined or determined by PTZ camera according to coordinates of targets, the application according to the coordinates of targets of detection Embodiment is not limited to this.
It should be understood that the center that the coordinate in the embodiment of the present application can be the screen area of the display screen is the seat of origin Mark is unit with above-mentioned multiple pixels (one piece of region, such as 5*5 or 20*20 etc. of i.e. above-mentioned one coordinate of composition) Coordinate.
Optionally, what clicking operation can be that user carries out on a display screen click, double-click or long-pressing movement generates.
Certainly, in actual use, it is also possible to realize by gesture and is clicked on the display screen of electronic equipment Operation.Here, being not especially limited.
Optionally, PTZ camera is referred to as cradle head camera.
Step S102 obtains the clicking operation and corresponds to M pixel on the display screen.
Optionally, M is the integer greater than 1.For example, M can be 2,3 or 4 etc..
Certainly, in actual use, M may not also be integer, for example, M may be 1.5,2.5 or 4.5 etc..Here, not Make specific limit.
Optionally, it is clicked on a display screen due to user by finger, a blocked area can be formed on a display screen Domain, and the size of this occlusion area and user's finger are related to the contact area of display screen, and since finger has centainly greatly Small and shape, therefore the corresponding pixel of occlusion area is greater than 1 certainly.
As an implementation, after getting clicking operation, can by obtain the clicking operation triggered it is every A pixel, so that obtaining clicking operation corresponds to M pixel on the display screen.
Step S103 determines a target from the corresponding multiple coordinates of the display screen according to the M pixel Coordinate.
Wherein, each coordinate pair answers multiple pixels on the display screen.
Optionally, the corresponding pixel of each coordinate is all different, i.e., does not have intersection between each coordinate.
Optionally, a rectangular area is collectively formed in multiple pixels corresponding to each coordinate.
Optionally, which is square.
Certainly, in actual use, rectangular area may be rectangle.Here, being not especially limited.
Certainly, in actual use, multiple pixels corresponding to each coordinate are formed by region and are also possible to be round Or ellipse.Here, being not especially limited.
Optionally, the corresponding multiple coordinates of the display screen can be understood as all pixels o'clock on display screen according to one Fixed number amount is divided into a coordinate, then all pixels point can be divided into multiple coordinates.
As an implementation, step S103 includes: respectively in the determining M pixel belonging to each pixel Coordinate;Judge whether coordinate belonging to each pixel is same coordinate;If coordinate belonging to each pixel is Same coordinate, using the coordinate as the coordinates of targets;If coordinate belonging to each pixel is not same coordinate, point It does not determine in each of the corresponding multiple coordinates of the M pixel coordinate comprising the pixel in the M pixel The number of point;Using the largest number of coordinates comprising the pixel in the M pixel in the multiple coordinate as described in Coordinates of targets.
As the first application scenarios, it is assumed that 6,6 pixel all respective coordinates a of M, then using coordinate a as target Coordinate.Assuming that 4 pixel respective coordinates a in 6 pixels, remaining 2 pixel respective coordinates b, due to being wrapped in coordinate a 4 pixels have been included, and there was only 2 pixels in coordinate b, it is seen then that containing the pixel in 6 pixels in coordinate b Number is less than the number of the pixel in coordinate a, therefore using coordinate a as the coordinates of targets.
During above-mentioned realization, by determining coordinate belonging to each pixel in the M pixel respectively;Judgement Whether coordinate belonging to each pixel is same coordinate;If coordinate belonging to each pixel is same coordinate, Using the coordinate as the coordinates of targets;If coordinate belonging to each pixel is not same coordinate, institute is determined respectively State the number comprising the pixel in the M pixel in each of the corresponding multiple coordinates of the M pixel coordinate; Using include in the multiple coordinate pixel in the M pixel the largest number of coordinates as the coordinates of targets, So that it is determined that a more accurate coordinates of targets out, so that PTZ camera can be moved to more accurate position.
As second of application scenarios, it is assumed that 3 pixel respective coordinates a in 6 pixels, remaining 3 pixel Respective coordinates b, i.e., when the number in multiple coordinates including pixel in the M pixel is equal, can from coordinate a or One is randomly selected in coordinate b as coordinates of targets.
During above-mentioned realization, pass through the number phase comprising the pixel in the M pixel in multiple coordinates Whens equal, one is chosen from multiple coordinates at random and is used as coordinates of targets, can to navigate to can control PTZ camera Under the premise of the corresponding position of coordinates of targets, user experience is promoted.
As the third application scenarios, it is assumed that 3 pixel respective coordinates a in 6 pixels, remaining 3 pixel Respective coordinates b after PTZ camera is moved to the corresponding position coordinate a, then will be sat first using coordinate a as coordinates of targets B is marked as coordinates of targets, so that PTZ camera moves again to the corresponding position coordinate b, to promote user experience.
As the 4th kind of application scenarios, it is assumed that 3 pixel respective coordinates a in 6 pixels, remaining 3 pixel Respective coordinates b then first determines holder that is, when the number comprising the pixel in the M pixel in multiple coordinates is equal Video camera is moved to coordinate a and the coordinate b step number to be moved respectively, will move the few conduct coordinates of targets of step number.For example, cloud Platform video camera is moved to the corresponding position coordinate a and needs mobile 10 steps, is moved to the corresponding position coordinate b and needs 9 steps, then will sit B is marked as coordinates of targets.
As the 5th kind of application scenarios, it is assumed that 3 pixel respective coordinates a in 6 pixels, remaining 3 pixel Respective coordinates b then first determines holder that is, when the number comprising the pixel in the M pixel in multiple coordinates is equal Video camera is moved to coordinate a and the coordinate b step number to be moved respectively, will move the few conduct first aim coordinate of step number, Then using another coordinate as the second coordinates of targets, so that PTZ camera is come by multiple bearing in once-through operation The position that user specifies is navigated to, and then promotes user experience.
As another embodiment, step S103 includes: corresponding more from the display screen according to the M pixel A coordinate is determined in a coordinate;Determine a coordinate is normalized, coordinates of targets is obtained.
Optionally, since the size of distinct electronic apparatuses hair display screen may be different, while the video of distinct electronic apparatuses Resolution ratio may not also be identical, and in order to improve compatibility, the coordinate triggered to clicking operation is normalized, i.e., by coordinate Transverse and longitudinal coordinate proportionally zooms to uniform range.For example, the abscissa in coordinate (x, y) is normalized into (- 256,256), Ordinate of orthogonal axes is normalized into (- 144,144).
Certainly, in actual use, the abscissa in coordinate (x, y) can also be normalized to (- 512,512), will be indulged Axial coordinate normalizes to (- 288,288).
It should be understood that above are only example and non-limiting.
Step S104 carries out the positioning of the PTZ camera according to the coordinates of targets.
As an implementation, step S104 includes: to send the coordinates of targets to the PTZ camera, in order to The PTZ camera is positioned according to the coordinates of targets.
Optionally, electronic equipment sends the coordinates of targets to the PTZ camera by network.
During above-mentioned realization, by the way that the coordinates of targets will be sent to the PTZ camera, so that holder Video camera can calculate the step number that holder needs to rotate by received coordinates of targets, and then navigate to needed for user Near the range of (or specified).
As another embodiment, step S104 includes: to determine the PTZ camera according to the coordinates of targets Rotational parameters;The rotational parameters are sent to the PTZ camera, in order to which the PTZ camera is joined according to the rotation Number is positioned.
During above-mentioned realization, cloud is determined according to coordinates of targets by the process resource using electronic equipment itself Rotational parameters are sent to PTZ camera by the rotational parameters of platform video camera, so that PTZ camera is receiving rotational parameters After can directly be positioned, without calculating to the data received, the processing money of PTZ camera can be reduced Source expense improves the locating speed of PTZ camera.
Optionally, the rotational parameters that the PTZ camera is determined according to the coordinates of targets, comprising: described in determining The offset parameter of the central point of the relatively described video pictures of coordinates of targets, the offset parameter include that horizontal axis offset and the longitudinal axis are inclined Shifting amount;Total rotation step of the PTZ camera is determined according to the parameter preset of the offset parameter and the PTZ camera Number;Using total rotation step number as the rotational parameters of the PTZ camera.
Optionally, the parameter preset has been configured in PTZ camera when PTZ camera is dispatched from the factory, when electronics is set The standby available parameter preset to the PTZ camera of client when being associated with PTZ camera, in electronic equipment.
Wherein, association refers to user by the client in electronic equipment to bind PTZ camera, so that user can The video pictures of PTZ camera shooting are shown with the display screen by electronic equipment.
Optionally, the parameter preset includes but is not limited to the object distance of the cradle head camera, maximum rotation step number, rotation Radian and maximum rotation angle.
Optionally, the object distance of cradle head camera refer to image to PTZ camera distance.For example, using L × W's Black drawing board (the black drawing board is as object of reference), PTZ camera and drawing board object distance Z, according to the Pixel Dimensions of object of reference Height × Width, the object distance D of available image to PTZ camera, then D=Height × Z/L.
Optionally, maximum rotation step number refers to the maximum step number that PTZ camera can rotate.
In general, the setting of the maximum rotation step number of PTZ camera can be configured according to actual needs.
Certainly, in actual use, PTZ camera has set maximum rotation step number when leaving the factory.
Optionally, rotation radian refers to every turn of PTZ camera radian when moving a step.For example, the rotation of PTZ camera Radian can be 10 degree, be also possible to 5 degree etc..
Optionally, maximum rotation angle refers to the maximum angle that PTZ camera can rotate, such as PTZ camera Maximum rotation angle can rotate 360 degree, or rotation 180 degree etc..
It should be understood that the example above is merely illustrative and non-limiting.
Optionally, as shown in figure 3, the coordinate of the central point of video pictures is
Optionally, height characterizes the width of video pictures, and width characterizes the height of video pictures.
Optionally, horizontal axis offset are as follows:
Optionally, longitudinal axis amount:Wherein, x indicates the horizontal axis of coordinates of targets Amount, y indicate the longitudinal axis amount of coordinates of targets.
During above-mentioned realization, the offset by the determination coordinates of targets relative to the central point of the video pictures is joined Number;Total rotation step number of the PTZ camera is determined according to the parameter preset of the offset parameter and the PTZ camera; Using total rotation step number as the rotational parameters of the PTZ camera, to accurately calculate what PTZ camera needed to rotate Step number is rotated, to reduce the error between coordinate and user's practical touch click on area, improves positioning accuracy.
Optionally, the parameter preset according to the offset parameter and the PTZ camera determines the holder camera shooting Total rotation step number of machine, comprising: calculate the first quotient of the horizontal axis offset Yu the object distance;Calculate the maximum rotation step Product between several, the described rotation radian and the maximum rotation angle;First quotient is multiplied with the product, is obtained First rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With calculate described vertical Second quotient of axle offset amount and the object distance;Second quotient is multiplied with the product, obtains the second rotation step number, institute Stating the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;By the first rotation step number and described second Step number is rotated as total rotation step number.
Optionally, the first rotation step number meets:
Wherein, the numberxThe first rotation step number is characterized, the xoffset characterizes the horizontal axis offset;Institute State Distance characterize image to PTZ camera object distance;It is describedCharacterize the rotation radian;The LevelMax table Levy the maximum rotation step number;The DegreeMax characterizes the maximum rotation angle,Indicate the first quotient.
Certainly, in actual use, rotation radian is also denoted as
Optionally, the second rotation step number meets:
Wherein, the numberyThe second rotation step number is characterized, the yoffset characterizes the horizontal axis offset,Indicate the second quotient.
Optionally, always rotation step number rotates step number for PTZ camera rotates on transverse axis first and rotates on longitudinal axis Second rotation step number summation.
Optionally, in practical applications, horizontal motor and motor vertical are provided in PTZ camera, PTZ camera exists When rotation, by controlled level motor rotation the first rotation step number, control motor vertical rotation the second rotation step number, and then realize The positioning of PTZ camera navigates to the corresponding position of coordinates of targets that user specifies.
During above-mentioned realization, by the first quotient for calculating the horizontal axis offset and the object distance;Described in calculating Product between maximum rotation step number, the rotation radian and the maximum rotation angle;First quotient is multiplied with described Product is multiplied, and obtains the first rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis; With calculate the second quotient of the longitudinal axis amount Yu the object distance;Second quotient is multiplied with the product, obtains Two rotation step numbers, the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;Described first is rotated Step number and the second rotation step number are as total rotation step number, to accurately obtain the first rotation step number of PTZ camera Step number is rotated with second, so that PTZ camera can rotate step number accurate rotational to user based on the first rotation step number and second The corresponding position of specified coordinates of targets is realized in the premise for reducing the error between coordinate and user's practical touch click on area Under, improve positioning accuracy.
The method of the positioning of PTZ camera provided by the embodiment of the present application, by monitoring the point of user on a display screen After hitting operation, the corresponding M pixel of clicking operation is obtained, according to M pixel from the corresponding multiple coordinates of the display screen In determine a coordinates of targets, wherein each coordinate pair answers multiple pixels on the display screen, according to coordinates of targets To realize the positioning of PTZ camera.Due in the application using multiple pixels as a coordinate, so as to effectively reduce Error between coordinate and user's practical touch click on area improves positioning accuracy.
Referring to Fig. 4, being the flow chart of the method for another PTZ camera positioning provided by the embodiments of the present application, Ying Li Solution, method shown in Fig. 4 can by PTZ camera position device execute, the device can with shown in Fig. 8 hereinafter Device it is corresponding, which can be the PTZ camera for being able to carry out this method, specifically comprises the following steps:
Step S201 receives the coordinates of targets that electronic equipment is sent.
Wherein, the coordinates of targets is one determined from the corresponding multiple coordinates of display screen of electronic equipment, often A coordinate pair answers multiple pixels on the display screen.
Step S202 determines rotational parameters according to the coordinates of targets.
As an implementation, step S202 comprises determining that the center of the relatively described video pictures of the coordinates of targets The offset parameter of point, the offset parameter includes horizontal axis offset and longitudinal axis amount;According to the offset parameter and the cloud The parameter preset of platform video camera determines total rotation step number;Using total rotation step number as the rotational parameters.
Optionally, the parameter preset includes the object distance of the cradle head camera, maximum rotation step number, rotation radian and most Big rotational angle.
It is optionally, described that total rotation step number is determined according to the offset parameter and the parameter preset of the PTZ camera, It include: the first quotient for calculating the horizontal axis offset and the object distance;Calculate the maximum rotation step number, the rotation radian Product between the maximum rotation angle;First quotient is multiplied with the product, obtains the first rotation step number, institute Stating the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With, calculate the longitudinal axis amount with it is described Second quotient of object distance;Second quotient is multiplied with the product, obtains the second rotation step number, the second rotation step number For the rotation step number of the PTZ camera on longitudinal axis;Using the first rotation step number and the second rotation step number as institute State total rotation step number.
Optionally, the first rotation step number meets:
Wherein, the numberxThe first rotation step number is characterized, the xoffset characterizes the horizontal axis offset;Institute State Distance characterize image to PTZ camera object distance;It is describedCharacterize the rotation radian;The LevelMax table Levy the maximum rotation step number;The DegreeMax characterizes the maximum rotation angle,Indicate the first quotient.
Certainly, in actual use, rotation radian is also denoted as
Optionally, the second rotation step number meets:
Wherein, the numberyThe second rotation step number is characterized, the yoffset characterizes the horizontal axis offset,Indicate the second quotient.
Optionally, always rotation step number rotates step number for PTZ camera rotates on transverse axis first and rotates on longitudinal axis Second rotation step number summation.
In order to avoid repeating, the specific embodiment of step S202 is referred to step S104.
Step S203 is positioned according to the rotational parameters.
Optionally, in practical applications, horizontal motor and motor vertical are provided in PTZ camera, PTZ camera exists When rotation, by controlled level motor rotation the first rotation step number, control motor vertical rotation the second rotation step number, and then realize The positioning of PTZ camera navigates to the corresponding position of coordinates of targets that user specifies.
The method of the positioning of PTZ camera provided by the embodiment of the present application is sat by receiving the target that electronic equipment is sent Mark, the coordinates of targets is one determined from the corresponding multiple coordinates of display screen of the electronic equipment, each coordinate Multiple pixels on the corresponding display screen, determine rotational parameters according to coordinates of targets;Determined according to the rotational parameters Position.The coordinate as obtained in the application is corresponding multiple pixels, so that obtained coordinates of targets is Finger click location when being clicked for user using touch screen, and then reduce between coordinate and user's practical touch click on area Error improves positioning accuracy.
It is described in detail respectively in the method that single-ended mode positions PTZ camera above in association with Fig. 2 and Fig. 4, It is non-limiting as example below, it using electronic equipment and PTZ camera is executing subject in the embodiment of the present application in conjunction with Fig. 5 PTZ camera positioning method be described in detail.Method as shown in Figure 5 includes:
Step S301, electronic equipment monitoring user is on the display screen of video pictures for showing PTZ camera shooting Clicking operation.
Step S302, electronic equipment obtain the clicking operation and correspond to M pixel on the display screen.
Step S303, electronic equipment are determined from the corresponding multiple coordinates of the display screen according to the M pixel One coordinates of targets.
Step S304, electronic equipment send the coordinates of targets to the PTZ camera.
Correspondingly, PTZ camera receives the coordinates of targets that electronic equipment is sent.
Step S305, PTZ camera determine rotational parameters according to the coordinates of targets.
Step S306, PTZ camera are positioned according to the rotational parameters.
Optionally, the specific embodiment of step S301 to step S306 are referred to description above, here, no longer superfluous It states.
As a kind of application scenarios, when user shows the view that the PTZ camera is shot by the display screen in mobile phone Clicking operation is carried out on frequency picture, when such as clicking, obtains the corresponding M pixel of clicking operation, according to M pixel from described A coordinates of targets is determined in the corresponding multiple coordinates of display screen, and the coordinates of targets is sent by server and is imaged to holder Machine.PTZ camera receives the coordinates of targets that electronic equipment is sent, and rotational parameters is determined according to the coordinates of targets, according to rotation Driving parameter horizontal motor is rotated with motor vertical, to realize the rotation to PTZ camera.
It is described in detail respectively in the method that single-ended mode positions PTZ camera above in association with Fig. 2 and Fig. 4, It is non-limiting as example below, it using electronic equipment and PTZ camera is executing subject in the embodiment of the present application in conjunction with Fig. 6 PTZ camera positioning method be described in detail.Method as shown in FIG. 6 includes:
Step S401, electronic equipment monitoring user is on the display screen of video pictures for showing PTZ camera shooting Clicking operation.
Step S402, electronic equipment obtain the clicking operation and correspond to M pixel on the display screen.
Step S403, electronic equipment are determined from the corresponding multiple coordinates of the display screen according to the M pixel One coordinates of targets.
Step S404, electronic equipment determine the rotational parameters of the PTZ camera according to the coordinates of targets.
Step S405, electronic equipment send the rotational parameters to the PTZ camera.
Correspondingly, PTZ camera receives the rotational parameters that electronic equipment is sent.
Step S406, PTZ camera are positioned according to the rotational parameters.
Optionally, the specific embodiment of step S401 to step S406 are referred to description above, here, no longer superfluous It states.
It is taken the photograph referring to Fig. 7, Fig. 7 is shown using the one-to-one holder of method of PTZ camera shown in Fig. 2 positioning The device of camera positioning, it should be appreciated that the electronic equipment 700 is corresponding with above-mentioned Fig. 2 embodiment of the method, is able to carry out side shown in Fig. 2 Each step that method embodiment is related to, the specific function of electronic equipment 700 may refer to it is described above, for avoid weight It is multiple, it is appropriate herein to omit detailed description.Electronic equipment 700 includes at least one can be in the form of software or firmware (firmware) The software function for being stored in memory or being solidificated in the operating system (operating system, OS) of electronic equipment 700 Module.Specifically, which includes:
Monitoring modular 510, for monitoring user on the display screen of video pictures for showing PTZ camera shooting Clicking operation.
First obtains module 520, corresponds to M pixel on the display screen, the M for obtaining the clicking operation For the integer greater than 1.
Second obtains module 530, for being determined from the corresponding multiple coordinates of the display screen according to the M pixel A coordinates of targets out, wherein each coordinate pair answers multiple pixels on the display screen.
Locating module 540, for carrying out the positioning of the PTZ camera according to the coordinates of targets.
Optionally, the locating module 540, is also used to: Xiang Suoshu PTZ camera sends the coordinates of targets, in order to The PTZ camera is positioned according to the coordinates of targets.
Optionally, the locating module 540, comprising: the first submodule, for determining the cloud according to the coordinates of targets The rotational parameters of platform video camera;Second submodule, for sending the rotational parameters to the PTZ camera, in order to described PTZ camera is positioned according to the rotational parameters.
Optionally, the first submodule is also used to: determining the inclined of the central point of the relatively described video pictures of the coordinates of targets Shifting parameter, the offset parameter include horizontal axis offset and longitudinal axis amount;It is imaged according to the offset parameter and the holder The parameter preset of machine determines total rotation step number of the PTZ camera;Using total rotation step number as the PTZ camera Rotational parameters.
Optionally, the parameter preset includes the object distance of the cradle head camera, maximum rotation step number, rotation radian and most Big rotational angle.
Optionally, the parameter preset according to the offset parameter and the PTZ camera determines the holder camera shooting Total rotation step number of machine, comprising: calculate the first quotient of the horizontal axis offset Yu the object distance;Calculate the maximum rotation step Product between several, the described rotation radian and the maximum rotation angle;First quotient is multiplied with the product, is obtained First rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With calculate described vertical Second quotient of axle offset amount and the object distance;Second quotient is multiplied with the product, obtains the second rotation step number, institute Stating the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;By the first rotation step number and described second Step number is rotated as total rotation step number.
Optionally, the first rotation step number meets:Wherein, the numberxCharacterize described One rotation step number, the xoffset characterize the horizontal axis offset;The Distance characterizes the object distance;It is describedTable Levy the rotation radian;The LevelMax characterizes the maximum rotation step number;The DegreeMax characterizes the maximum rotation Angle.
Optionally, the second rotation step number meets:Wherein, the numberyCharacterize described Two rotation step numbers, the yoffset characterize the horizontal axis offset.
Optionally, second module 530 is obtained, is also used to: is determined in the M pixel respectively belonging to each pixel Coordinate;Judge whether coordinate belonging to each pixel is same coordinate;If coordinate belonging to each pixel is Same coordinate, using the coordinate as the coordinates of targets;If coordinate belonging to each pixel is not same coordinate, point It does not determine in each of the corresponding multiple coordinates of the M pixel coordinate comprising the pixel in the M pixel The number of point;Using the largest number of coordinates comprising the pixel in the M pixel in the multiple coordinate as described in Coordinates of targets.
It is taken the photograph referring to Fig. 8, Fig. 8 is shown using the one-to-one holder of method of PTZ camera shown in Fig. 4 positioning The device of camera positioning, it should be appreciated that the device 600 is corresponding with above-mentioned Fig. 4 embodiment of the method, is able to carry out the reality of method shown in Fig. 4 Each step that example is related to is applied, which may refer to described above, to avoid repeating, fit herein It is described in detail when omitting.Device 600 includes that at least one can be stored in memory in the form of software or firmware (firmware) In or the software function module that is solidificated in the operating system (operating system, OS) of device 600.Specifically, the dress Setting 600 includes:
Receiving module 610, for receiving the coordinates of targets of electronic equipment transmission, the coordinates of targets is from the display screen One determined in corresponding multiple coordinates, each coordinate pair answer multiple pixels on the display screen.
Processing module 620, for determining rotational parameters according to the coordinates of targets.
Locating module 630, for being positioned according to the rotational parameters.
Optionally, processing module 620 are also used to: determining the central point of the relatively described video pictures of the coordinates of targets Offset parameter, the offset parameter include horizontal axis offset and longitudinal axis amount;It is taken the photograph according to the offset parameter and the holder The parameter preset of camera determines total rotation step number of the PTZ camera;Using total rotation step number as rotational parameters.
Optionally, the parameter preset includes the object distance of the cradle head camera, maximum rotation step number, rotation radian and most Big rotational angle.
Optionally, the parameter preset according to the offset parameter and the PTZ camera determines the holder camera shooting Total rotation step number of machine, comprising: calculate the first quotient of the horizontal axis offset Yu the object distance;Calculate the maximum rotation step Product between several, the described rotation radian and the maximum rotation angle;First quotient is multiplied with the product, is obtained First rotation step number, the first rotation step number is the rotation step number of the PTZ camera on transverse axis;With calculate described vertical Second quotient of axle offset amount and the object distance;Second quotient is multiplied with the product, obtains the second rotation step number, institute Stating the second rotation step number is the rotation step number of the PTZ camera on longitudinal axis;By the first rotation step number and described second Step number is rotated as total rotation step number.
Optionally, the first rotation step number meets:Wherein, the numberxCharacterize described One rotation step number, the xoffset characterize the horizontal axis offset;The Distance characterizes the object distance;It is describedTable Levy the rotation radian;The LevelMax characterizes the maximum rotation step number;The DegreeMax characterizes the maximum rotation Angle,Indicate the first quotient.
Optionally, the second rotation step number meets:Wherein, the numberyCharacterize described Two rotation step numbers, the yoffset characterize the horizontal axis offset,Indicate the second quotient.
The application also provides a kind of electronic equipment, and Fig. 9 is the structural representation of the electronic equipment 700 in the embodiment of the present application Figure, as shown in figure 9, electronic equipment 700 may include processor 710, communication module 720, memory 730 and at least one communication Bus 740.Wherein, communication bus 720 is for realizing the direct connection communication of these components.Wherein, in the embodiment of the present application Communication module 720 is used to carry out the communication of signaling or data with other node devices, for example, communication module 720 is used for described PTZ camera sends the coordinates of targets, or for sending the rotational parameters to the PTZ camera.Processor 710 can be a kind of IC chip, the processing capacity with signal.
Above-mentioned processor 710 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) or other programmable logic device, discrete gate Or transistor logic, discrete hardware components.May be implemented or execute disclosed each method in the embodiment of the present application, Step and logic diagram.General processor can be microprocessor or the processor 710 is also possible to any conventional processing Device etc..
Memory 730 may be, but not limited to, random access memory (Random Access Memory, RAM), only It reads memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Computer-readable instruction fetch is stored in memory 730, when the computer-readable instruction fetch is executed by the processor 710 When, electronic equipment 700 can execute each step that above-mentioned Fig. 2 embodiment of the method is related to.
Electronic equipment 700 further includes display screen.
The memory 730, processor 710, each element of display screen are directly or indirectly electrically connected between each other, with reality The transmission or interaction of existing data.Electrically connect for example, these elements can be realized between each other by one or more communication bus 740 It connects.The processor 710 is for executing the executable module stored in memory 730, such as the software function that device 500 includes Module or computer program.Also, device 500 is for executing following methods: monitoring user is showing PTZ camera shooting Video pictures display screen on clicking operation;It obtains the clicking operation and corresponds to M pixel on the display screen, institute Stating M is the integer greater than 1;A target is determined from the corresponding multiple coordinates of the display screen according to the M pixel Coordinate, wherein each coordinate pair answers multiple pixels on the display screen;The holder is carried out according to the coordinates of targets to take the photograph The positioning of camera.
Optionally, device 500 can be mounted on electronic equipment 700 in the form of APP (Application, application program) In.
Display screen provides an interactive interface (such as user interface) between the electronic equipment and user, passes through Interactive interface shows the video pictures of PTZ camera shooting.In the present embodiment, the display screen can be touch control display. It can be the capacitance type touch control screen or resistance type touch control screen etc. of support single-point and multi-point touch operation if touch control display.Branch It holds single-point and multi-point touch operation refers to that touch control display can sense the one or more positions on the touch control display The touch control operation generated simultaneously, and the touch control operation that this is sensed transfers to processor to be calculated and handled.
It is appreciated that structure shown in Fig. 9 is only to illustrate, the electronic equipment 700 may also include more than shown in Fig. 9 Perhaps less component or with the configuration different from shown in Fig. 9.Each component shown in Fig. 9 can use hardware, software Or combinations thereof realize.
The embodiment of the present application also provides a kind of PTZ camera, and Figure 10 is the PTZ camera 800 in the embodiment of the present application Structural schematic diagram, as shown in figure 9, PTZ camera 800 may include processor 810, communication module 820,830 and of memory At least one communication bus 840.Wherein, communication bus 820 is for realizing the direct connection communication of these components.Wherein, this Shen Please the communication module 820 in embodiment be used to carry out the communication of signaling or data with other node devices, for example, communication module 820 for receiving the coordinates of targets of electronic equipment transmission, or the rotational parameters for receiving electronic equipment transmission.Processor 810 can be a kind of IC chip, the processing capacity with signal.
Above-mentioned processor 810 can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) or other programmable logic device, discrete gate Or transistor logic, discrete hardware components.May be implemented or execute disclosed each method in the embodiment of the present application, Step and logic diagram.General processor can be microprocessor or the processor 810 is also possible to any conventional processing Device etc..
Memory 830 may be, but not limited to, random access memory (Random Access Memory, RAM), only It reads memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Computer-readable instruction fetch is stored in memory 830, when the computer-readable instruction fetch is executed by the processor 810 When, PTZ camera 800 can execute each step that above-mentioned Fig. 4 embodiment of the method is related to.
Optionally, PTZ camera 800 further includes horizontal motor and motor vertical, horizontal motor and motor vertical with place Device 810 is managed to communicate.
The processor 810 for executing the executable module stored in memory 830, such as device 600 include it is soft Part functional module or computer program.Also, device 600 is used to execute following methods: receiving the target that electronic equipment is sent and sits Mark, the coordinates of targets is one determined from the corresponding multiple coordinates of display screen of the electronic equipment, each coordinate Multiple pixels on the corresponding display screen;Rotational parameters are determined according to the coordinates of targets;According to the rotational parameters into Row positioning.
Optionally, horizontal motor is used to be rotated according to the rotational parameters with motor vertical, so that PTZ camera Navigate to the corresponding position of coordinates of targets.
It is appreciated that structure shown in Fig. 10 be only illustrate, the electronic equipment 800 may also include than shown in Figure 10 more More perhaps less component or with the configuration different from shown in Figure 10.Each component shown in Figure 10 can using hardware, Software or combinations thereof is realized.
The embodiment of the present application also provides a kind of storage medium, and instruction is stored on the storage medium, when described instruction exists When being run on computer, method described in implementation method embodiment when the computer program is executed by processor, to avoid weight Multiple, details are not described herein again.
The application also provides a kind of computer program product to be made when the computer program product is run on computers It obtains computer and executes method described in embodiment of the method.
Through the above description of the embodiments, those skilled in the art can be understood that the application can lead to Hardware realization is crossed, the mode of necessary general hardware platform can also be added to realize by software, based on this understanding, this Shen Technical solution please can be embodied in the form of software products, which can store in a non-volatile memories In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.), including some instructions are used so that a computer equipment (can be Personal computer, server or network equipment etc.) execute each implement scene of the application method.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.It should also be noted that similar label and letter exist Similar terms are indicated in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing It is further defined and explained.

Claims (12)

1. a kind of method of PTZ camera positioning, which is characterized in that the described method includes:
Clicking operation of the monitoring user on the display screen of video pictures for showing PTZ camera shooting;
It obtains the clicking operation and corresponds to M pixel on the display screen, the M is the integer greater than 1;
A coordinates of targets is determined from the corresponding multiple coordinates of the display screen according to the M pixel, wherein each Coordinate pair answers multiple pixels on the display screen;
The positioning of the PTZ camera is carried out according to the coordinates of targets.
2. according to claim 1 PTZ camera positioning method, which is characterized in that it is described according to the coordinates of targets into The positioning of the row PTZ camera, comprising:
The coordinates of targets is sent to the PTZ camera, in order to which the PTZ camera is carried out according to the coordinates of targets Positioning.
3. the method for PTZ camera positioning according to claim 1, which is characterized in that described to carry out institute according to the coordinate State the positioning of PTZ camera, comprising:
The rotational parameters of the PTZ camera are determined according to the coordinates of targets;
The rotational parameters are sent to the PTZ camera, in order to which the PTZ camera is carried out according to the rotational parameters Positioning.
4. the method for PTZ camera positioning according to claim 3, which is characterized in that described true according to the coordinates of targets The rotational parameters of the fixed PTZ camera, comprising:
Determine that the offset parameter of the central point of the relatively described video pictures of the coordinates of targets, the offset parameter include that horizontal axis is inclined Shifting amount and longitudinal axis amount;
Total rotation step number of the PTZ camera is determined according to the parameter preset of the offset parameter and the PTZ camera;
Using total rotation step number as the rotational parameters of the PTZ camera.
5. the method for PTZ camera positioning according to claim 4, which is characterized in that the parameter preset includes the cloud Object distance, maximum rotation step number, rotation radian and the maximum rotation angle of platform camera, it is described according to the offset parameter and described The parameter preset of PTZ camera determines total rotation step number of the PTZ camera, comprising:
Calculate the first quotient of the horizontal axis offset Yu the object distance;
Calculate the product between the maximum rotation step number, the rotation radian and the maximum rotation angle;
First quotient is multiplied with the product, obtains the first rotation step number, the first rotation step number is the holder The rotation step number of video camera on transverse axis;With,
Calculate the second quotient of the longitudinal axis amount Yu the object distance;
Second quotient is multiplied with the product, obtains the second rotation step number, the second rotation step number is the holder The rotation step number of video camera on longitudinal axis;
Using the first rotation step number and the second rotation step number as total rotation step number.
6. the method for PTZ camera positioning according to claim 1, which is characterized in that described according to the M pixel A coordinates of targets is determined from the corresponding multiple coordinates of the display screen, comprising:
Coordinate belonging to each pixel in the M pixel is determined respectively;
Judge whether coordinate belonging to each pixel is same coordinate;
If coordinate belonging to each pixel is same coordinate, using the coordinate as the coordinates of targets;
If coordinate belonging to each pixel is not same coordinate, the corresponding multiple seats of the M pixel are determined respectively Number comprising the pixel in the M pixel in each of mark coordinate;
The largest number of coordinates comprising the pixel in the M pixel in the multiple coordinate are sat as the target Mark.
7. a kind of method of PTZ camera positioning, which is characterized in that the described method includes:
The coordinates of targets that electronic equipment is sent is received, the coordinates of targets is corresponding multiple from the display screen of the electronic equipment One determined in coordinate, each coordinate pair answer multiple pixels on the display screen;
Rotational parameters are determined according to the coordinates of targets;
It is positioned according to the rotational parameters.
8. a kind of device of PTZ camera positioning, which is characterized in that described device includes:
Monitoring modular, for monitoring click behaviour of the user on the display screen of video pictures for showing PTZ camera shooting Make;
First obtains module, correspond to M pixel on the display screen for obtaining the clicking operation, the M is greater than 1 Integer;
Second obtains module, for determining one from the corresponding multiple coordinates of the display screen according to the M pixel Coordinates of targets, wherein each coordinate pair answers multiple pixels on the display screen;
Locating module, for carrying out the positioning of the PTZ camera according to the coordinates of targets.
9. a kind of device of PTZ camera positioning, which is characterized in that described device includes:
Receiving module, for receiving the coordinates of targets of electronic equipment transmission, the coordinates of targets is corresponding from the display screen One determined in multiple coordinates, each coordinate pair answer multiple pixels on the display screen;
Processing module, for determining rotational parameters according to the coordinates of targets;
Locating module, for being positioned according to the rotational parameters.
10. a kind of electronic equipment characterized by comprising communication module, memory, processor and be stored in the storage In device and the computer program that can run on the processor, the memory and the communication module with the processor Communication, the processor are realized when executing the computer program as PTZ camera as claimed in any one of claims 1 to 6 is fixed The step of method of position.
11. a kind of PTZ camera characterized by comprising communication module, memory, processor and be stored in described deposit In reservoir and the computer program that can run on the processor, the memory and the communication module with the processing Device communication, the processor realize the side of PTZ camera positioning as claimed in claim 7 when executing the computer program The step of method.
12. a kind of storage medium, which is characterized in that the storage medium for storing instruction, when described instruction on computers When operation, so that the computer executes the method such as PTZ camera as claimed in any one of claims 1 to 6 positioning;Alternatively, When described instruction is run on computers, so that the computer executes PTZ camera positioning as claimed in claim 7 Method.
CN201910524982.7A 2019-06-17 2019-06-17 Pan-tilt camera positioning method and device, pan-tilt camera, equipment and medium Active CN110139040B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910524982.7A CN110139040B (en) 2019-06-17 2019-06-17 Pan-tilt camera positioning method and device, pan-tilt camera, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910524982.7A CN110139040B (en) 2019-06-17 2019-06-17 Pan-tilt camera positioning method and device, pan-tilt camera, equipment and medium

Publications (2)

Publication Number Publication Date
CN110139040A true CN110139040A (en) 2019-08-16
CN110139040B CN110139040B (en) 2020-11-13

Family

ID=67577615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910524982.7A Active CN110139040B (en) 2019-06-17 2019-06-17 Pan-tilt camera positioning method and device, pan-tilt camera, equipment and medium

Country Status (1)

Country Link
CN (1) CN110139040B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572567A (en) * 2019-08-27 2019-12-13 高新兴科技集团股份有限公司 Camera control method and computer storage medium
CN110807803A (en) * 2019-10-11 2020-02-18 北京文香信息技术有限公司 Camera positioning method, device, equipment and storage medium
CN111163263A (en) * 2019-12-30 2020-05-15 深圳市置辰海信科技有限公司 Method for realizing camera target linkage tracking by adopting position projection mode
CN113645399A (en) * 2021-06-29 2021-11-12 浙江大华技术股份有限公司 Method and device for determining running position of holder equipment
WO2023051027A1 (en) * 2021-09-29 2023-04-06 亮风台(上海)信息科技有限公司 Method and device for acquiring real-time image information of target object

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005607A (en) * 2006-01-20 2007-07-25 天津市亚安科技电子有限公司 Video frequency monitoring system with three dimemension dynamic presetting function head
CN101865664A (en) * 2010-05-18 2010-10-20 武汉大学 Portable dynamic deflection displacement measuring device and method
CN102111541A (en) * 2009-12-28 2011-06-29 索尼公司 Image pickup control apparatus, image pickup control method and program
US20130155026A1 (en) * 2011-12-16 2013-06-20 International Business Machines Corporation New kind of multi-touch input device
CN103841313A (en) * 2012-11-27 2014-06-04 华为技术有限公司 Pan-tilt camera control method, system and device
CN104301715A (en) * 2014-10-15 2015-01-21 天津市亚安科技股份有限公司 Method and device for achieving 3D preset accurate linkage between camera and pan-tilt
US20180278600A1 (en) * 2016-01-19 2018-09-27 Regwez, Inc. Multi-factor masked access control system
CN108803669A (en) * 2018-07-05 2018-11-13 北京淳中科技股份有限公司 Holder rotating direction control method, device, electronic equipment and storage medium
CN109032190A (en) * 2018-07-05 2018-12-18 北京淳中科技股份有限公司 Holder rotating direction control method, device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005607A (en) * 2006-01-20 2007-07-25 天津市亚安科技电子有限公司 Video frequency monitoring system with three dimemension dynamic presetting function head
CN102111541A (en) * 2009-12-28 2011-06-29 索尼公司 Image pickup control apparatus, image pickup control method and program
CN101865664A (en) * 2010-05-18 2010-10-20 武汉大学 Portable dynamic deflection displacement measuring device and method
US20130155026A1 (en) * 2011-12-16 2013-06-20 International Business Machines Corporation New kind of multi-touch input device
CN103841313A (en) * 2012-11-27 2014-06-04 华为技术有限公司 Pan-tilt camera control method, system and device
CN104301715A (en) * 2014-10-15 2015-01-21 天津市亚安科技股份有限公司 Method and device for achieving 3D preset accurate linkage between camera and pan-tilt
US20180278600A1 (en) * 2016-01-19 2018-09-27 Regwez, Inc. Multi-factor masked access control system
CN108803669A (en) * 2018-07-05 2018-11-13 北京淳中科技股份有限公司 Holder rotating direction control method, device, electronic equipment and storage medium
CN109032190A (en) * 2018-07-05 2018-12-18 北京淳中科技股份有限公司 Holder rotating direction control method, device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572567A (en) * 2019-08-27 2019-12-13 高新兴科技集团股份有限公司 Camera control method and computer storage medium
CN110807803A (en) * 2019-10-11 2020-02-18 北京文香信息技术有限公司 Camera positioning method, device, equipment and storage medium
CN111163263A (en) * 2019-12-30 2020-05-15 深圳市置辰海信科技有限公司 Method for realizing camera target linkage tracking by adopting position projection mode
CN113645399A (en) * 2021-06-29 2021-11-12 浙江大华技术股份有限公司 Method and device for determining running position of holder equipment
WO2023051027A1 (en) * 2021-09-29 2023-04-06 亮风台(上海)信息科技有限公司 Method and device for acquiring real-time image information of target object

Also Published As

Publication number Publication date
CN110139040B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN110139040A (en) Method, apparatus, PTZ camera, equipment and the medium of PTZ camera positioning
US8952893B2 (en) Portable device and method for controlling the same
CN104662558B (en) Finger tip for gesture input positions
CN110177272B (en) Anti-shake test method and device for camera, storage medium and intelligent terminal
CN107172361B (en) A kind of method and mobile terminal of pan-shot
CN110251936B (en) Method and device for controlling virtual camera in game and storage medium
CN107395995B (en) Mobile terminal and its rotating camera control method
US10963100B2 (en) Interactive object control method and apparatus, terminal, and computer-readable storage medium
US20130176337A1 (en) Device and Method For Information Processing
US20130286049A1 (en) Automatic adjustment of display image using face detection
US20150084881A1 (en) Data processing method and electronic device
CN110400337A (en) Image processing method, device, electronic equipment and storage medium
US9690533B2 (en) Displaying system, display controller, storage medium and method
CN104204993B (en) Orientation sensing computing device
CN107562288A (en) Response method based on infrared contactor control device, infrared contactor control device and medium
CN111309232B (en) Display area adjusting method and device
CN105426067A (en) Desktop icon replacement method and apparatus
JP6409644B2 (en) Display control method, display control program, and information processing apparatus
CN106989697A (en) The acquisition methods and device of a kind of optical axis included angle
CN109743438A (en) A kind of method and apparatus sending multimedia messages
CN106101552B (en) A kind of panorama photographic method and mobile terminal
CN110276794A (en) Information processing method, information processing unit, terminal device and server
US11386612B2 (en) Non-transitory computer-readable medium, image processing method, and image processing system for controlling progress of information processing in response to a user operation
CN103000161B (en) A kind of method for displaying image, device and a kind of intelligent hand-held terminal
CN112887777B (en) Interactive prompting method and device for interactive video, electronic equipment and 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