Cleaning target positioning method and device, electronic device, and storage medium
Patent Information
- Application Number
- CN202410803043.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-06-20
AI Technical Summary
[0005]本发明提供一种清洁目标定位方法及装置、电子设备及存储介质,用以解决现有技术中需要用户操作才能对清洁目标进行定位的缺陷,实现无需用户操作便可自动化识别清洁目标所在位置并对其进行清洁的目的
[0024]本发明还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种清洁目标定位方法。
Smart Images

Figure CN121194056B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent cleaning technology, and in particular to a cleaning target positioning method and apparatus, electronic device and storage medium. Background Technology
[0002] Currently, cleaning equipment (such as robotic vacuum cleaners) cleans an entire area of space, such as the entire floor of a room. After cleaning, the equipment can generate a map of the area so that it can effectively avoid obstacles during the next cleaning session.
[0003] In practice, if only one area in an area needs cleaning—for example, if there's only one water stain—cleaning only that spot is unnecessary. Cleaning the entire area would be wasteful. If only the water stain needs cleaning, the user must specify its location on a map of the area, instructing the cleaning equipment to move there. This process is complex. For instance, the user needs to open the cleaning equipment's application (APP), open the map generated by the equipment within the APP, and manually click on the approximate location of the water stain. The APP sends this location to a server, which converts it to corresponding coordinates on the map and sends them to the cleaning equipment. The equipment then moves to that location and cleans it. This process not only requires complex user operations but also suffers from inaccurate positioning due to the inherent subjectivity of user choices. For example, users might determine the approximate location of the cleaning target based on their subjective judgment and then click on the corresponding spot on the map. Users are often quite arbitrary in this case, leading to low accuracy. Clicking on an entire area would waste resources.
[0004] Therefore, how to automatically identify and clean the location of cleaning targets without user intervention has become an urgent problem to be solved. Summary of the Invention
[0005] This invention provides a cleaning target positioning method and apparatus, electronic device and storage medium to solve the defects of the prior art that require user operation to locate the cleaning target, and to achieve the purpose of automatically identifying the location of the cleaning target and cleaning it without user operation.
[0006] This invention provides a method for locating a cleaning target, applied to a server, comprising the following steps.
[0007] The system acquires the camera's installation height, the initial horizontal orientation of the camera lens when it is installed at the shooting position, and the first coordinates corresponding to the camera's position on the cleaning equipment map. It receives reports from the camera of the camera lens rotating from the target shooting position to the installed shooting position, including a first vertical rotation angle, a second horizontal rotation angle, and a horizontal rotation direction. When the camera identifies a cleaning target in the current shooting frame, it adjusts its current shooting position to the target shooting position, where the cleaning target is centered in the camera's shooting frame. Based on the installation height, the first angle, and the second angle, it obtains the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map. Based on the first coordinates, horizontal distance, vertical distance, initial orientation, and rotation direction, it obtains the second coordinates of the cleaning target on the cleaning equipment map.
[0008] According to a cleaning target positioning method provided by the present invention, the horizontal and vertical distances of the cleaning target relative to a camera on a cleaning equipment map are obtained based on the installation height, a first angle, and a second angle. The method includes: calculating a first distance between the cleaning target and the projection point of the camera on the ground based on the first angle and the installation height; calculating a second distance in the horizontal direction between the cleaning target and the projection point and a third distance in the vertical direction between the cleaning target and the projection point based on the first distance and the second angle; and using the second distance as the horizontal distance and the third distance as the vertical distance.
[0009] According to a cleaning target positioning method provided by the present invention, a second coordinate of a cleaning target on a cleaning equipment map is obtained based on a first coordinate, a horizontal distance, a vertical distance, an initial direction, and a rotation direction. The method includes: determining a first parameter value based on the initial direction, wherein the first parameter value represents a first offset direction of the second coordinate relative to the first coordinate in the horizontal direction; determining a second parameter value based on the initial direction and the rotation direction, wherein the second parameter value represents a second offset direction of the second coordinate relative to the first coordinate in the vertical direction; determining the relative coordinate of the second coordinate relative to the first coordinate based on the initial direction, the horizontal distance, the vertical distance, the first parameter value, and the second parameter value; and obtaining the second coordinate based on the first coordinate and the relative coordinate.
[0010] According to a method for locating a clean target provided by the present invention, the initial direction includes any one of east, west, south, and north, and the relative coordinates include a first relative coordinate value in the horizontal direction and a second relative coordinate value in the vertical direction. Determining the relative coordinates of the second coordinates with respect to the first coordinates based on the initial direction, horizontal distance, vertical distance, a first parameter value, and a second parameter value includes: determining a first parameter value corresponding to the initial direction; determining a second parameter value corresponding to the rotation direction under the initial direction based on the initial direction and the rotation direction; when the initial direction is east or west, obtaining a first product of the first parameter value and the horizontal distance as the first relative coordinate value, and obtaining a second product of the second parameter value and the vertical distance as the second relative coordinate value; and when the initial direction is south or north, obtaining a third product of the first parameter value and the vertical distance as the first relative coordinate value, and obtaining a fourth product of the second parameter value and the horizontal distance as the second relative coordinate value.
[0011] This invention provides a method for locating a clean target, applied to a camera, comprising the following steps.
[0012] Upon identifying a cleaning target in the captured image, the current shooting position is adjusted to the target shooting position, where the cleaning target is centered in the captured image. The camera lens is controlled to rotate from the target shooting position to the installation shooting position, where the camera lens initially faces horizontally when in the installation shooting position. A first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position are acquired. The first angle, the second angle, and the rotation direction are sent to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired camera installation height. Based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the pre-acquired position of the camera on the cleaning equipment map, the second coordinates of the cleaning target on the cleaning equipment map are obtained.
[0013] This invention provides a cleaning target positioning device for use on a server. The device includes: an installation parameter acquisition module, a receiving module, a first processing module, and a second processing module.
[0014] The installation parameter acquisition module is used to acquire the camera's installation height, the initial horizontal direction of the camera lens when it is installed in the shooting position, and the first coordinates corresponding to the camera's position on the cleaning equipment map.
[0015] The receiving module is used to receive the camera's reported rotation angle in the vertical direction, rotation angle in the horizontal direction, and rotation direction in the horizontal direction corresponding to the camera lens rotating from the target shooting position to the installation shooting position; when the camera recognizes that there is a clean target in the current shooting frame, it adjusts the current shooting position to the target shooting position, and the clean target is located in the center of the camera's shooting frame at the target shooting position;
[0016] The first processing module is used to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle.
[0017] The second processing module is used to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, horizontal distance, vertical distance, initial direction, and rotation direction.
[0018] This invention provides a cleaning target positioning device for use with a camera. The device includes: a position adjustment module, a control module, a rotation parameter acquisition module, and a transmission module.
[0019] The position adjustment module is used to adjust the current shooting position to the target shooting position when a cleaning target is identified in the shooting frame; wherein, the cleaning target is located in the center of the shooting frame at the target shooting position.
[0020] The control module is used to control the camera lens to rotate from the target shooting position to the installation shooting position; wherein, when the camera is in the installation shooting position, the lens is facing in the horizontal direction as the initial direction.
[0021] The rotation parameter acquisition module is used to acquire the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position.
[0022] The sending module is used to send a first angle, a second angle, and a rotation direction to the server, so as to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the pre-acquired position of the camera on the cleaning equipment map.
[0023] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the cleaning target positioning methods described above.
[0024] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the cleaning target location methods described above.
[0025] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the cleaning target positioning methods described above.
[0026] The cleaning target positioning method, apparatus, electronic device, and storage medium provided by this invention can acquire, on the server side, the installation height of the camera, the initial direction of the camera lens in the horizontal direction when it is installed at the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map. On the camera side, when the camera identifies the cleaning target in the shooting frame, it adjusts the camera lens to rotate from the current shooting position to the target shooting position. At the target shooting position, the cleaning target is located in the center of the camera's shooting frame. The camera also acquires the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position, and sends the first angle, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction to the server. Then, the server receives the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction reported by the camera. Based on the installation height, the first angle, and the second angle, it obtains the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map. Based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction, it obtains the second coordinates of the cleaning target on the cleaning equipment map. Therefore, the present invention can locate the cleaning target in the automatically identified shooting image without manual operation, so that the cleaning device can move to the location of the cleaning target and clean it according to the positioning result. This solves the defect of the prior art that requires user operation to locate the cleaning target, and realizes the purpose of automatically identifying the location of the cleaning target and cleaning it without user operation. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0028] Figure 1 This is one of the flowcharts of the cleaning target positioning method provided by the present invention.
[0029] Figure 2 This is a schematic diagram of the camera installation height in the cleaning target positioning method provided by the present invention.
[0030] Figure 3 This is an information interaction diagram between the server, camera, client, and cleaning equipment in the cleaning target positioning method provided by the present invention.
[0031] Figure 4 This is a schematic diagram of the center of the camera image in the cleaning target positioning method provided by the present invention.
[0032] Figure 5 This is one of the schematic diagrams of the central area of the camera image in the cleaning target positioning method provided by the present invention.
[0033] Figure 6 This is the second schematic diagram of the central area of the camera image in the cleaning target positioning method provided by the present invention.
[0034] Figure 7 This is a schematic diagram showing the positional relationship between the center of the camera image and the cleaning target in the cleaning target positioning method provided by the present invention.
[0035] Figure 8 This is a schematic diagram illustrating the calculation of the first distance in the cleaning target positioning method provided by the present invention.
[0036] Figure 9 This is a schematic diagram illustrating the calculation of the second and third distances in the cleaning target positioning method provided by the present invention.
[0037] Figure 10 This is the second flowchart of the cleaning target positioning method provided by the present invention.
[0038] Figure 11 This is one of the schematic diagrams illustrating the calculation of the second coordinate based on the first coordinate and the relative coordinate in the cleaning target positioning method provided by the present invention.
[0039] Figure 12 This is the second schematic diagram of the method for locating a clean target provided by the present invention, which calculates the second coordinate based on the first coordinate and the relative coordinate.
[0040] Figure 13 This is the third flowchart of the cleaning target positioning method provided by the present invention.
[0041] Figure 14 This is one of the structural schematic diagrams of the cleaning target positioning device provided by the present invention.
[0042] Figure 15 This is the second schematic diagram of the cleaning target positioning device provided by the present invention.
[0043] Figure 16This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0045] The following is combined Figures 1-13 The cleaning target positioning method of the present invention will be described in detail.
[0046] Figure 1 This is one of the flowcharts illustrating the cleaning target positioning method provided by the present invention. For example... Figure 1 As shown, the cleaning target positioning method of this invention includes the following steps S110 to S140.
[0047] S110 to S140 can be used in servers that connect cameras and clients.
[0048] S110: Obtain the camera's installation height, the initial horizontal direction of the camera lens when it is installed in the shooting position, and the first coordinates corresponding to the camera's position on the cleaning equipment map.
[0049] The installation height of a camera can be, for example, the vertical distance from the center of the camera lens to the ground. Figure 2 As shown, the installation height is the vertical height H of the center of the camera lens from the ground.
[0050] The shooting position is the initial position of the installed camera.
[0051] In some examples, the optical axis of the camera lens is parallel to the horizontal plane at the shooting position. The initial horizontal direction of the camera lens at the shooting position can be any of the following: due north, due south, due east, or due west.
[0052] In some examples, the optical axis of the camera lens may not be parallel to the horizontal plane at the shooting position, and the angle between the optical axis of the camera lens and the horizontal plane can be any angle other than 0.
[0053] It should be noted that the camera lens's optical axis is parallel to the horizontal plane at the installation position for ease of installation (due north, due south, due east, and due west are easier to identify and determine based on human cognitive habits) and for convenient subsequent calculation of relative coordinates (due north, due south, due east, and due west conform to people's cognitive habits of direction, and it is also easier to set calculation parameters based on these). Without considering cognitive habits, the initial direction can also be any direction other than due north, due south, due east, and due west, such as southeast, northwest, a direction perpendicular to the ceiling, or a direction perpendicular to the ground, etc. This embodiment of the invention does not limit the initial direction.
[0054] For example, after cleaning a section of floor in a space, the cleaning equipment can generate a map corresponding to that section of floor, namely the cleaning equipment map mentioned above. If a camera is installed in the space, the camera's position on the cleaning equipment map is specifically the position of the camera's projection point on the floor.
[0055] See Figure 3 As shown, server 300 connects camera 200, client 400, and cleaning equipment 500. After installing camera 200, the user can input the camera's installation height, the initial horizontal direction of the camera lens when it is installed, and the camera's position on the cleaning equipment map in client 400, according to the actual installation situation.
[0056] In practice, server 300 can send parameter requests to client, and client 400 can send the above-mentioned installation height, initial direction, and camera position on the cleaning equipment map and other survey parameters related to camera installation to server 300 according to the above-mentioned parameter requests.
[0057] After obtaining the location of the camera 200 on the cleaning equipment map, the server 300 can convert the location into the first coordinates of the camera 200 on the cleaning equipment map, thereby obtaining the first coordinates corresponding to the location of the camera 200 on the cleaning equipment map.
[0058] Client 400 is the IoT client corresponding to server 300. When using client 400, users can register a client account on client 400, log in to the client with the client account, and perform operations such as adding cleaning equipment and cameras under the client account to achieve interconnection and interoperability between cleaning equipment 500, camera 200 and server 300.
[0059] S120: Receives the camera lens rotating from the target shooting position to the installation shooting position by a first angle in the vertical direction, a second angle in the horizontal direction, and the direction of rotation in the horizontal direction, as reported by the camera. When the camera recognizes that there is a clean target in the current shooting frame, it adjusts the current shooting position to the target shooting position, where the clean target is located in the center of the camera's shooting frame.
[0060] The camera can identify cleaning targets in the current shooting frame using a preset intelligent recognition algorithm. For example, if the camera's shot is of the ground with cleaning targets such as water stains and paper scraps, the camera can identify these targets using the preset intelligent algorithm.
[0061] The preset intelligent algorithm can be set by those skilled in the art according to the actual situation, and the embodiments of the present invention do not limit it.
[0062] When the camera detects a cleaning target in the current shooting frame, it can control the pan-tilt head to rotate and adjust the position of the cleaning target in the shooting frame so that the cleaning target is in the center of the shooting frame. In this case, the camera's shooting position is the target shooting position.
[0063] like Figure 4 As shown, the center of the captured image is the camera's view (corresponding to...). Figure 4 The intersection point 403 of the horizontal median 401 and the vertical median 402 within the rectangle enclosed by the solid lines.
[0064] The target being cleaned is centered in the frame. Specifically, the target being cleaned is located in the central area of the frame (see [link]). Figure 5 and Figure 6 ), or the center of the cleaned target coincides with the center of the captured image (see Figure 7 (The positional relationship between the shaded area in part b and the center of the captured image).
[0065] The cleaning target being located in the center of the shooting frame can specifically mean that the cleaning target is located in a central area determined according to the size of the cleaning target, and the center of this central area coincides with the center of the shooting frame.
[0066] The shape of the central area, determined by the size of the cleaning target, can be circular, rectangular, or similar.
[0067] like Figure 5 As shown in the shaded area, the central region is circular. The radius of the target can be determined based on the size of the target being cleaned. Then, a circular area with the center of the captured image as the center and the radius of the target as the radius is used as the central region.
[0068] like Figure 6 As shown in the shaded area, the shape of the central region is rectangular. The length and width can be determined according to the size of the target to be cleaned. Then, the center of the captured image is used as the center of the rectangle, and the aforementioned length and width are used as the length and width of the rectangle to obtain an area, which is then used as the central region.
[0069] like Figure 7 As shown in part a, the camera recognizes the current captured image ( Figure 7 The cleaning target exists within the rectangle enclosed by the solid line in part a. Figure 7 In the case of the shaded area (part a), the target being cleaned is not initially centered in the frame. In this situation, the camera begins to rotate its pan / tilt head, adjusting its shooting position to center the target as shown in the image. Figure 7 The center of the captured image shown in section b is the target shooting position.
[0070] With the camera adjusted to the target shooting position, the pan-tilt head is controlled to rotate from the target shooting position to the mounted shooting position. During this process, the camera records the first angle of rotation of the camera lens in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction.
[0071] In some embodiments, the process of rotating the camera from the target shooting position to the installation shooting position can be as follows: First, control the pan-tilt unit to rotate in the vertical direction, so that the camera lens rotates from the target shooting position to the first shooting position in the vertical direction. The position of the first shooting position in the vertical direction is the same as the position of the installation shooting position in the vertical direction. In this case, the angle of rotation of the camera lens when rotating from the target shooting position to the first shooting position is recorded as the first angle. Then, control the pan-tilt unit to rotate in the horizontal direction, so that the camera lens rotates from the first shooting position to the installation shooting position. The angle of rotation of the camera lens when rotating from the first shooting position to the installation shooting position is recorded as the second angle, and the rotation direction of the camera lens in the horizontal direction when rotating from the first shooting position to the installation shooting position is recorded.
[0072] Of course, it is understandable that the process of rotating the camera from the target shooting position to the installation shooting position can also be achieved by first controlling the pan-tilt head to rotate horizontally, so that the camera lens rotates horizontally from the target shooting position to the second shooting position. The horizontal position of the second shooting position is the same as the horizontal position of the installation shooting position. In this case, the angle of rotation of the camera lens from the target shooting position to the second shooting position is recorded as the second angle, and the horizontal rotation direction of the camera lens from the target shooting position to the second shooting position is also recorded. Then, the pan-tilt head is controlled to rotate vertically, so that the camera lens rotates from the second shooting position to the installation shooting position, and the angle of rotation of the camera lens from the second shooting position to the installation shooting position is recorded as the first angle.
[0073] The direction of rotation can be either a first direction or a second direction, with the first and second directions being opposite.
[0074] For example, the rotation direction can be clockwise or counterclockwise in the horizontal direction. Alternatively, the rotation direction can be to the left or to the right. The reference standard for left or right rotation can be set by those skilled in the art according to the actual situation, and this embodiment of the invention does not limit this.
[0075] The gimbals listed above are two-directional gimbals, meaning they rotate in both horizontal and vertical directions. In specific implementations, embodiments of the present invention support gimbals that can rotate simultaneously in both horizontal and vertical directions in eight directions, as long as it is possible to obtain the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation of the target shooting position to the mounting shooting position.
[0076] S130: Based on the installation height, the first angle, and the second angle, obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map.
[0077] First, the first distance between the cleaning target and the camera's projection point on the ground can be calculated based on the first angle and the installation height.
[0078] See Figure 8 Given an angle of A1 and an installation height of H1, the first distance S1 between the cleaning target and the projection point B of the camera 200 on the ground can be calculated using the following formula: S1 = H1 * tan(90° - A1). "*" indicates multiplication.
[0079] After obtaining the first distance, the second distance between the cleaning target and the projection point in the horizontal direction and the third distance between the cleaning target and the projection point in the vertical direction can be calculated based on the first distance and the second angle.
[0080] like Figure 9 As shown, the second angle is A2. The second distance S2 in the horizontal direction between the cleaning target and the projection point B can be calculated by the following formula: S2=S1*sin(A2).
[0081] like Figure 9 As shown, the second angle is A2. The third distance S3 between the cleaning target and the projection point B in the vertical direction can be calculated by the following formula: S3 = S1 * cos(A2).
[0082] Finally, the second distance is taken as the horizontal distance of the cleaning target relative to the camera on the cleaning equipment map, and the third distance is taken as the vertical distance of the cleaning target relative to the camera on the cleaning equipment map.
[0083] S140: Based on the first coordinates, horizontal distance, vertical distance, initial direction, and rotation direction, obtain the second coordinates of the cleaning target on the cleaning equipment map.
[0084] like Figure 10 As shown, the execution process of S140 can be specifically described as S1010 to S1040.
[0085] S1010: Determine the first parameter value based on the initial direction; wherein the first parameter value represents the first offset direction of the second coordinate relative to the first coordinate in the horizontal direction of the plane.
[0086] Multiple preset initial directions (such as due east, due west, due south, and due north) can be pre-set to correspond with multiple parameter values, and the parameter value corresponding to the initial direction in the above correspondence can be used as the first parameter value.
[0087] For example, multiple preset initial directions include due east, due west, due south, and due north. The corresponding relationships can be set as follows: the parameter value for due east is 1, the parameter value for due west is -1, the parameter value for due north is 1, and the parameter value for due south is -1.
[0088] When the initial direction is due east, the first parameter value can be determined to be 1 according to the above correspondence. Similarly, when the initial direction is due west, the first parameter value can be determined to be -1 according to the above correspondence. When the initial direction is due north, the first parameter value can be determined to be 1 according to the above correspondence. When the initial direction is due south, the first parameter value can be determined to be -1 according to the above correspondence.
[0089] S1020: Determine the value of the second parameter based on the initial direction and the rotation direction; wherein the value of the second parameter represents the second offset direction of the second coordinate relative to the first coordinate in the vertical direction of the plane.
[0090] As can be seen from the above description of the direction of rotation, the direction of rotation includes either the first direction or the second direction, and the first direction and the second direction are opposite.
[0091] With different initial orientations, the second offset direction in the vertical plane after the camera lens rotates based on the rotation direction may be the same or different. For example, if the initial orientation is due east and the rotation direction is to the left (facing due east, to the left), after rotation, the camera is closer to due east, and the second offset direction in the vertical plane is vertically downward; while if the initial orientation is due west and the rotation direction is to the left (facing due west, to the left), after rotation, the camera is closer to due west, and the second offset direction in the vertical plane is vertically upward.
[0092] Therefore, the second parameter value may differ for the same rotation direction under different initial directions. To determine the second parameter value for the rotation direction under different initial directions, we can determine the first direction parameter value for the first direction and the second direction parameter value for the second direction based on the initial direction.
[0093] In some embodiments, when the initial direction is due east or due west, the first direction parameter is -1 and the second direction parameter is 1; when the initial direction is due south or due north, the first direction parameter is 1 and the second direction parameter is -1.
[0094] After determining the first and second direction parameter values corresponding to the initial direction, the first direction parameter value can be used as the second parameter value if the rotation direction is the first direction, and the second direction parameter value can be used as the second parameter value if the rotation direction is the second direction.
[0095] For example, if the first direction is to the left and the second direction is to the right, and the initial direction is due east and the rotation direction is to the left, the value of the second parameter is -1.
[0096] It should be noted that there is no specific order in which the first and second parameter values are determined. You can determine the first parameter value first and then the second parameter value, or vice versa.
[0097] It is understood that the methods for determining the first and second parameter values described above are merely exemplary. The methods for determining the first and second parameter values in this embodiment of the invention include, but are not limited to, the methods listed above, as long as the initial direction and rotation direction can be clearly represented by the corresponding parameter values. For example, an initial direction parameter corresponding to the initial direction can be pre-set, including the first parameter value and a rotation direction parameter corresponding to the rotation direction, and then the rotation direction parameter value is determined as the second parameter value based on the rotation direction.
[0098] For example, the initial direction can be any of east, west, south, or north. In this case, the north direction parameter can be set to (m, 1), the south direction parameter to (m, -1), the east direction parameter to (1, n), and the west direction parameter to (-1, n). Here, m represents the rotation direction parameter in the north and south direction parameters, and n represents the rotation direction parameter in the east and west direction parameters. If the rotation direction includes left or right, m = 1 and n = -1 are preset for left rotation, and m = -1 and n = 1 for right rotation. In this case, if the initial direction is due east and the rotation direction is to the left, the due east direction parameter can be obtained as (1, n). Since the rotation direction is to the left, n = -1. Thus, the first parameter value is 1 and the second parameter value is -1. That is, when the rotation direction is to the left, the due east direction parameter is (1, -1).
[0099] It should be noted that the first and second parameter values are only used to indicate direction, and the absolute values of both the first and second parameter values are 1.
[0100] S1030: Determine the relative coordinates of the second coordinate with respect to the first coordinate based on the initial direction, horizontal distance, vertical distance, first parameter value, and second parameter value.
[0101] In some embodiments, the initial direction includes any one of east, west, south, and north, and the relative coordinates include a first relative coordinate value in the horizontal direction and a second relative coordinate value in the vertical direction. Based on this, when the initial direction is east or west, a first product of the first parameter value and the horizontal distance is obtained as the first relative coordinate value, and a second product of the second parameter value and the vertical distance is obtained as the second relative coordinate value; when the initial direction is south or north, a third product of the first parameter value and the vertical distance is obtained as the first relative coordinate value, and a fourth product of the second parameter value and the horizontal distance is obtained as the second relative coordinate value.
[0102] Example 1: Let the horizontal distance a = S2, the vertical distance b = S3, the initial direction be due east, and the rotation direction be to the left. In this case, the first parameter value can be obtained as 1 and the second parameter value as -1 through S1010 to S1020. The first relative coordinate value = a * 1, and the second relative coordinate value = b * (-1).
[0103] Example 2: Let the horizontal distance a = S2, the vertical distance b = S3, the initial direction be due north, and the rotation direction be to the right. In this case, the first parameter value can be obtained as -1 and the second parameter value as 1 through S1010 to S1020. The first relative coordinate value = b*(-1), and the second relative coordinate value = a*1.
[0104] S1040: Obtain the second coordinate based on the first coordinate and the relative coordinate.
[0105] The first coordinate system includes a first horizontal coordinate and a first vertical coordinate, and the second coordinate system includes a second horizontal coordinate and a second vertical coordinate.
[0106] When obtaining the second coordinate, the first horizontal coordinate and the first relative coordinate value can be summed to obtain the first summation result, which is then used as the second horizontal coordinate. Similarly, the first vertical coordinate and the second relative coordinate value can be summed to obtain the second summation result, which is then used as the second vertical coordinate.
[0107] For example, the first coordinate is (x1, y1), where x1 is the first horizontal coordinate and y1 is the first vertical coordinate. The second coordinate is (x2, y2), where x2 is the second horizontal coordinate and y2 is the second vertical coordinate.
[0108] Taking the case in Example 1 of S1030 as an example, the initial direction is due east, and the rotation direction is to the left, corresponding to... Figure 11 Vertically upward is north, vertically downward is south, horizontally to the left is west, and horizontally to the right is east. After the camera detects the cleaning target, it rotates to the left on the horizontal plane to return to its initial installation position facing due east. According to the calculation rules in S1030, the first relative coordinate value = a*1, and the second relative coordinate value = b*(-1). If the first coordinate of the camera's projection point B on the ground on the cleaning equipment map is (x1, y1), then... Figure 11 As shown, x2 = x1 + a*1, y2 = y1 + b*(-1), so the second coordinate is (x1 + a*1, y1 + b*(-1)). Wherein, Figure 11 In this equation, the positive direction of x is horizontal to the right, and the positive direction of y is vertical downward.
[0109] Taking the case in Example 2 of S1030 as an example, the initial direction is due north, and the rotation direction is to the right, corresponding to... Figure 12 Vertically upward is north, vertically downward is south, horizontally to the left is west, and horizontally to the right is east. After the camera detects the cleaning target, it rotates to the right on the horizontal plane back to its initial installation position facing due north. According to the calculation rules in S1030, the first relative coordinate value = b*(-1), and the second relative coordinate value = a*1. If the first coordinate of the camera's projection point B on the ground on the cleaning equipment map is (x1, y1), then... Figure 12 As shown, x2 = x1 + b*(-1), y2 = y1 + a*1, so the second coordinates are (x1 + b*(-1), y1 + a*1). Wherein, Figure 12 In this equation, the positive direction of x is horizontal to the right, and the positive direction of y is vertical downward.
[0110] To obtain the second coordinates of the cleaning target on the cleaning equipment map, see [link / reference]. Figure 3 As shown, the second coordinate can be sent to the cleaning equipment. The cleaning equipment moves to the location of the cleaning target according to the second coordinate and cleans the target. This completes the process of automatically identifying the cleaning target and cleaning it, thereby achieving the goal of cleaning a local area in a certain region without the need for manual operation by the user.
[0111] Figure 13 This is one of the flowcharts of the cleaning target positioning method provided by the present invention. Figure 13 The cleaning target localization method shown is applied to a camera and includes steps S1110 to S1140 as follows. The cleaning target localization method described below can be referred to in correspondence with the cleaning target localization method described above.
[0112] S1110: When a cleaning target is identified in the shooting frame, the shooting position is adjusted to the target shooting position; wherein, the cleaning target is located in the center of the shooting frame at the target shooting position.
[0113] S1120: Controls the camera to rotate from the target shooting position to the installation shooting position; wherein, when the camera is in the installation shooting position, the lens is facing in the horizontal direction as the initial direction.
[0114] S1130: Obtain the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position.
[0115] S1140: Send the first angle, the second angle, and the rotation direction to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired camera installation height, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates corresponding to the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the position of the camera on the cleaning equipment.
[0116] The cleaning target positioning method provided by this invention can acquire, on the server side, the installation height of the camera, the initial direction of the camera lens in the horizontal direction when it is installed at the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map. On the camera side, when the cleaning target is identified in the shooting frame, the camera lens is adjusted to rotate from the current shooting position to the target shooting position. At the target shooting position, the cleaning target is located in the center of the camera's shooting frame. The camera also acquires the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position, and sends the first angle, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction to the server. Then, the server receives the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction reported by the camera. Based on the installation height, the first angle, and the second angle, the horizontal distance and vertical distance of the cleaning target relative to the camera on the cleaning equipment map are obtained. Based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction, the second coordinates of the cleaning target on the cleaning equipment map are obtained. Therefore, the present invention can locate the cleaning target in the automatically identified shooting image without manual operation, so that the cleaning device can move to the location of the cleaning target and clean it according to the positioning result. This solves the defect of the prior art that requires user operation to locate the cleaning target, and realizes the purpose of automatically identifying the location of the cleaning target and cleaning it without user operation.
[0117] The cleaning target positioning device provided by the present invention is described below. The cleaning target positioning device described below and the cleaning target positioning method described above can be referred to in correspondence.
[0118] Figure 14 This is a schematic diagram of the cleaning target positioning device applied to the server side provided by the present invention. Figure 14 As shown, the cleaning target positioning device 1400 includes:
[0119] The installation parameter acquisition module 1401 is used to acquire the installation height of the camera, the initial direction in which the lens of the camera is facing in the horizontal direction when the camera is installed in the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map.
[0120] The installation height, initial orientation, and camera position on the cleaning equipment map can be obtained from the client. The first coordinate can be obtained by converting the camera's position on the cleaning equipment map.
[0121] The receiving module 1402 is used to receive the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction of the camera lens as reported by the camera, corresponding to the rotation of the camera lens from the target shooting position to the installation shooting position; when the camera recognizes that there is a clean target in the current shooting frame, it adjusts the current shooting position to the target shooting position, and the clean target is located in the center of the camera shooting frame at the target shooting position;
[0122] The first processing module 1403 is used to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle.
[0123] The second processing module 1404 is used to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, horizontal distance, vertical distance, initial direction and rotation direction.
[0124] Figure 15 This is a schematic diagram of the cleaning target positioning device applied to the camera side provided by the present invention.
[0125] The position adjustment module 1501 is used to adjust the current shooting position to the target shooting position when a cleaning target is identified in the shooting frame; wherein, the cleaning target is located in the center of the shooting frame at the target shooting position.
[0126] The control module 1502 is used to control the camera lens of the camera to rotate from the target shooting position to the installation shooting position when the position adjustment module 1501 determines the target shooting position; wherein, when the camera is in the installation shooting position, the lens is facing the initial direction in the horizontal direction.
[0127] The rotation parameter acquisition module 1503 is used to acquire the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position.
[0128] The sending module 1504 is used to send a first angle, a second angle, and a rotation direction to the server, so as to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates corresponding to the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the position of the camera on the cleaning equipment map.
[0129] The cleaning target positioning device provided by this invention can acquire, on the server side, the installation height of the camera, the initial direction of the camera lens in the horizontal direction when it is installed in the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map. On the camera side, when the camera recognizes the cleaning target in the shooting image, it adjusts the camera lens to rotate from the current shooting position to the target shooting position. At the target shooting position, the cleaning target is located in the center of the camera's shooting image. The camera also acquires the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position, and sends the first angle, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction to the server. Then, the server receives the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the rotation direction in the horizontal direction reported by the camera. Based on the installation height, the first angle, and the second angle, it obtains the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map. Based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction, it obtains the second coordinates of the cleaning target on the cleaning equipment map. Therefore, the present invention can locate the cleaning target in the automatically identified shooting image without manual operation, so that the cleaning device can move to the location of the cleaning target and clean it according to the positioning result. This solves the defect of the prior art that requires user operation to locate the cleaning target, and realizes the purpose of automatically identifying the location of the cleaning target and cleaning it without user operation.
[0130] Figure 16 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 16As shown, the electronic device may include: a processor 1610, a communication interface... The processor 1610, communication interface 1620, memory 1630, and communication bus 1640 communicate with each other via communication bus 1640. The processor 1610 can call logical instructions in memory 1630 to execute a cleaning target positioning method. This method includes: acquiring the camera's installation height, the initial horizontal direction of the camera lens when it is installed at the shooting position, and the first coordinates corresponding to the camera's position on the cleaning equipment map; receiving the camera's reported first vertical rotation angle, second horizontal rotation angle, and horizontal rotation direction corresponding to the rotation from the target shooting position to the installation shooting position; adjusting the camera's shooting position to the target shooting position when the cleaning target is identified in the shooting frame, with the cleaning target centered in the shooting frame at the target shooting position; obtaining the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle; and obtaining the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, horizontal distance, vertical distance, initial direction, and rotation direction.
[0131] Alternatively, the processor 1610 may invoke logic instructions in the memory 1630 to execute a cleaning target localization method, the method comprising: adjusting the shooting position to a target shooting position when a cleaning target is identified in the shooting frame; wherein the cleaning target is located at the center of the shooting frame at the target shooting position; controlling the camera to rotate from the target shooting position to the installation shooting position; wherein the camera lens is initially oriented in the horizontal direction when in the installation shooting position; acquiring a first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position; sending the first angle, the second angle, and the rotation direction to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the position of the camera on the cleaning equipment map.
[0132] Furthermore, the logical instructions in the aforementioned memory 1630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0133] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the cleaning target positioning method provided by the above methods. The method includes: acquiring the installation height of a camera, the initial direction in which the lens of the camera is facing in the horizontal direction when the camera is installed at the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map; receiving a first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a direction of rotation in the horizontal direction reported by the camera from the target shooting position to the installation shooting position; adjusting the shooting position of the camera to the target shooting position when the cleaning target is identified in the shooting image, wherein the cleaning target is located at the center of the shooting image at the target shooting position; obtaining the horizontal distance and vertical distance of the cleaning target relative to the camera on the cleaning equipment map according to the installation height, the first angle, and the second angle; and obtaining the second coordinates of the cleaning target on the cleaning equipment map according to the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction.
[0134] Alternatively, the method includes: upon identifying a cleaning target in the captured image, adjusting the shooting position to a target shooting position; wherein, at the target shooting position, the cleaning target is located at the center of the captured image; controlling the camera to rotate from the target shooting position to the installation shooting position; wherein, when the camera is in the installation shooting position, the lens is facing the initial direction in the horizontal direction; acquiring a first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position; sending the first angle, the second angle, and the rotation direction to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the position of the camera on the cleaning equipment map.
[0135] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a cleaning target positioning method provided by the methods described above. This method includes: acquiring the installation height of a camera, the initial direction in which the lens of the camera is facing in the horizontal direction when the camera is installed at the shooting position, and the first coordinates corresponding to the position of the camera on a cleaning equipment map; receiving a first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a direction of rotation in the horizontal direction reported by the camera, corresponding to the rotation from the target shooting position to the installation shooting position; adjusting the shooting position of the camera to the target shooting position when a cleaning target is identified in the shooting frame, wherein the cleaning target is located at the center of the shooting frame at the target shooting position; obtaining the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle; and obtaining the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction.
[0136] Alternatively, the method includes: upon identifying a cleaning target in the captured image, adjusting the shooting position to a target shooting position; wherein, at the target shooting position, the cleaning target is located at the center of the captured image; controlling the camera to rotate from the target shooting position to the installation shooting position; wherein, when the camera is in the installation shooting position, the lens is facing the initial direction in the horizontal direction; acquiring a first angle of rotation in the vertical direction, a second angle of rotation in the horizontal direction, and a rotation direction in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position; sending the first angle, the second angle, and the rotation direction to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the position of the camera on the cleaning equipment map.
[0137] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for locating a cleaning target, characterized in that, Applied to a server, the method includes: The installation height of the camera, the initial direction in which the lens of the camera is pointing horizontally when it is installed in the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map are obtained. The camera receives a first vertical angle, a second horizontal angle, and a horizontal direction of rotation of the camera lens from the target shooting position to the installation shooting position, as reported by the camera. When the camera recognizes the presence of a cleaning target in the current shooting frame, it adjusts the current shooting position to the target shooting position, where the cleaning target is located at the center of the camera's shooting frame. Based on the installation height, the first angle, and the second angle, the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map are obtained; The second coordinates of the cleaning target on the cleaning equipment map are obtained based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction.
2. The method for locating a cleaning target according to claim 1, characterized in that, The step of obtaining the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle includes: Based on the first angle and the installation height, calculate the first distance between the cleaning target and the projection point of the camera on the ground; Based on the first distance and the second angle, calculate the second distance in the horizontal direction between the cleaning target and the projection point and the third distance in the vertical direction between the cleaning target and the projection point; The second distance is taken as the horizontal distance, and the third distance is taken as the vertical distance.
3. The method for locating a cleaning target according to claim 1 or 2, characterized in that, The step of obtaining the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction includes: Based on the initial direction, a first parameter value is determined; wherein, the first parameter value represents the first offset direction of the second coordinate relative to the first coordinate in the horizontal direction of the plane; A second parameter value is determined based on the initial direction and the rotation direction; wherein, the second parameter value represents the second offset direction of the second coordinate relative to the first coordinate in the plane perpendicular direction; The relative coordinates of the second coordinates with respect to the first coordinates are determined based on the initial direction, the horizontal distance, the vertical distance, the first parameter value, and the second parameter value. The second coordinate is obtained based on the first coordinate and the relative coordinate.
4. The cleaning target positioning method according to claim 3, characterized in that, The initial direction includes any one of the due east, due west, due south, and due north directions, and the relative coordinates include: a first relative coordinate value in the horizontal direction of the plane and a second relative coordinate value in the vertical direction of the plane; Determining the relative coordinates of the second coordinate with respect to the first coordinate based on the initial direction, the horizontal distance, the vertical distance, the first parameter value, and the second parameter value includes: When the initial direction is due east or due west, the first product of the first parameter value and the horizontal distance is obtained as the first relative coordinate value, and the second product of the second parameter value and the vertical distance is obtained as the second relative coordinate value; and, When the initial direction is due south or due north, the third product of the first parameter value and the vertical distance is obtained as the first relative coordinate value, and the fourth product of the second parameter value and the horizontal distance is obtained as the second relative coordinate value.
5. A method for locating a cleaning target, characterized in that, Applied to a camera, the method includes: Upon identifying a cleaning target in the captured image, the current shooting position is adjusted to the target shooting position; wherein, at the target shooting position, the cleaning target is located in the center of the captured image; The camera lens of the camera is controlled to rotate from the target shooting position to the installation shooting position; wherein, when the camera lens is in the installation shooting position, its initial direction in the horizontal direction is the initial direction. Obtain the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position; The first angle, the second angle, and the rotation direction are sent to the server to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera. Based on the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the first coordinates corresponding to the position of the camera on the cleaning equipment map, the server obtains the second coordinates of the cleaning target on the cleaning equipment map.
6. A cleaning target positioning device, characterized in that, Applied to a server, the device includes: The installation parameter acquisition module is used to acquire the installation height of the camera, the initial direction in which the lens of the camera is facing in the horizontal direction when the camera is installed in the shooting position, and the first coordinates corresponding to the position of the camera on the cleaning equipment map. The receiving module is used to receive the camera's reported rotation angle in the vertical direction, rotation angle in the horizontal direction, and rotation direction in the horizontal direction corresponding to the camera lens rotating from the target shooting position to the installation shooting position; when the camera recognizes the presence of a clean target in the current shooting frame, it adjusts the current shooting position to the target shooting position, where the clean target is located at the center of the camera's shooting frame at the target shooting position; The first processing module is used to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the installation height, the first angle, and the second angle. The second processing module is used to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates, the horizontal distance, the vertical distance, the initial direction, and the rotation direction.
7. A cleaning target positioning device, characterized in that, Applied to a camera, the device includes: The position adjustment module is used to adjust the current shooting position to the target shooting position when a cleaning target is identified in the shooting frame; wherein, the cleaning target is located in the center of the shooting frame at the target shooting position; The control module is used to control the camera lens of the camera to rotate from the target shooting position to the installation shooting position; wherein, when the camera lens is in the installation shooting position, the initial direction is the horizontal orientation of the lens. The rotation parameter acquisition module is used to acquire the first angle of rotation in the vertical direction, the second angle of rotation in the horizontal direction, and the direction of rotation in the horizontal direction corresponding to the rotation from the target shooting position to the installation shooting position. The sending module is configured to send the first angle, the second angle, and the rotation direction to the server, so as to instruct the server to obtain the horizontal and vertical distances of the cleaning target relative to the camera on the cleaning equipment map based on the first angle, the second angle, and the pre-acquired installation height of the camera, and to obtain the second coordinates of the cleaning target on the cleaning equipment map based on the first coordinates corresponding to the horizontal distance, the vertical distance, the initial direction, the rotation direction, and the position of the camera on the cleaning equipment map.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the cleaning target positioning method as described in any one of claims 1 to 4 or the cleaning target positioning method as described in claim 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the cleaning target positioning method as described in any one of claims 1 to 4 or the cleaning target positioning method as described in claim 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the cleaning target positioning method as described in any one of claims 1 to 4 or the cleaning target positioning method as described in claim 5.
Citation Information
Patent Citations
High-definition radar linkage tracking control camera shooting system and linkage tracking method
CN104796612A
Cleaning system
JP2020089632A