Method, device, equipment and storage medium for locating object area

By detecting the first object and the second object on the infrared image, and combining the positional relationship between the two regions, the target object area is accurately positioned in the low-resolution infrared image, and the problem of being unable to accurately locate the heat-prone area in the prior art.

CN119131334BActive Publication Date: 2025-03-07STATE GRID INTELLIGENCE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411586983.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-03-07
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

In infrared images captured by drones, due to the low resolution and few target effective pixels, the specific heat-prone areas in the transmission line cannot be accurately positioned, resulting in a significant impact on the target background.

Method used

By performing the first object detection on the infrared image, the first object region is determined, and then performing the second object detection on the infrared image, the second object region is determined, and finally, the target object region of the second object is determined according to the positional relationship of the second object region relative to the first object region.

Benefits of technology

In the case where the infrared image has a low resolution and few target effective pixels, the target object area of ​​the second object to be identified in the infrared image is accurately recognized and positioned, thereby improving the effective positioning of the area where the target object is located.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131334B_ABST
    Figure CN119131334B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an object area positioning method, device, equipment and storage medium, which relate to the field of positioning technology. The method includes performing a first object detection on an infrared image to determine a first object area corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device; performing a second object detection on the infrared image to determine a second object area of ​​a second object contained in the infrared image; and determining a target object area of ​​the second object according to a positional relationship of the second object area relative to the first object area. By using this method, accurate positioning of a target object area involved in a second object in an infrared image is achieved, and by accurately positioning the target object area, effective promotion of business applications involved in the second object can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of positioning technology, and in particular, to an object area positioning method, device, equipment and storage medium. Background Art

[0002] Transmission lines are an important part of the power system, responsible for the transmission and distribution of electrical energy. Among them, heating failures of some equipment and components may lead to large-scale power accidents.

[0003] At present, autonomous inspection by drones has been widely used in the field of power transmission. It mainly uses the massive infrared images obtained by drones to analyze the regional temperature information recorded in the infrared images to avoid accidents caused by heating failures.

[0004] However, due to the low resolution of infrared images collected by drones, the small number of effective target pixels and the uncontrollable shooting angle, it is impossible to accurately locate the specific heat-prone areas in the transmission lines, resulting in a significant impact of the target background on subsequent temperature analysis. Summary of the invention

[0005] The present invention provides an object area positioning method, device, equipment and storage medium to achieve accurate identification and positioning of a target object area corresponding to a target object (second object) in an infrared image.

[0006] In a first aspect, an embodiment of the present invention provides an object region positioning method, which includes: performing a first object detection on an infrared image to determine a first object region corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device; performing a second object detection on the infrared image to determine a second object region of a second object contained in the infrared image; and determining a target object region of the second object based on a positional relationship of the second object region relative to the first object region.

[0007] In a second aspect, an embodiment of the present invention provides an object area positioning device, which includes: a first detection module, used to perform a first object detection on an infrared image, and determine a first object area corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device; a second detection module, used to perform a second object detection on the infrared image, and determine a second object area of ​​a second object contained in the infrared image; and a target determination module, used to determine a target object area of ​​the second object based on a positional relationship of the second object area relative to the first object area.

[0008] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the object area positioning method as described in any embodiment of the present invention.

[0009] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to implement the object region positioning method as described in any embodiment of the present invention.

[0010] The technical solution of the embodiment of the present invention can first perform a first object detection on the infrared image to determine the first object area corresponding to the first object contained in the infrared image, and the infrared image is captured by an infrared device; then perform a second object detection on the infrared image to determine the second object area of ​​the second object contained in the infrared image; finally, the target object area of ​​the second object can be determined according to the positional relationship of the second object area relative to the first object area. The above technical solution of this embodiment detects the first object and the second object in the infrared image respectively to accurately determine all the first object areas and the second object areas in the infrared image, and matches the positional relationship between the second object area and the first object area, so as to achieve accurate identification and positioning of the target object area of ​​the second object to be identified in the infrared image when the resolution of the infrared image captured by the drone is low and the target effective pixels are few, thereby improving the effective positioning of the area where the target object is located, and also enabling the business applications involved in the target object to be effectively promoted.

[0011] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1 The present invention provides a flowchart of a method for locating an object region.

[0014] Figure 2This is an example diagram of positioning the first object area (composite insulator string) in the object area positioning method provided in an embodiment of the present invention.

[0015] Figure 3 This is an example diagram of positioning the position of the first object area (porcelain insulator string) in the object area positioning method provided in an embodiment of the present invention.

[0016] Figure 4 This is an example diagram of locating the position of an unobstructed core rod of a composite insulator in the object area positioning method provided in an embodiment of the present invention.

[0017] Figure 5 This is an example diagram of locating the unobstructed steel cap position of a porcelain insulator in the object area positioning method provided in an embodiment of the present invention.

[0018] Figure 6 This is an example diagram of the positional relationship in which the coordinates of the unobstructed core rod region located by the target segmentation model in the object region positioning method provided by the embodiment of the present invention are completely contained by the coordinates of the region where the composite insulating string is located.

[0019] Figure 7 This is an example diagram of obtaining an area where a complete core rod is located in the object area positioning method provided in an embodiment of the present invention.

[0020] Figure 8 This is an example diagram of the positional relationship in which the coordinates of the unobstructed steel cap area located by the target segmentation model in the object area positioning method provided in the embodiment of the present invention are completely included by the coordinates of the area where the porcelain insulation string is located.

[0021] Fig. 9 A schematic diagram of the structure of an object area positioning device provided by an embodiment of the present invention.

[0022] Fig.10 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0024] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0029] It should be noted that in the massive infrared images obtained by drone inspections, it is often impossible to accurately locate the areas where the insulators are prone to heat up due to problems such as low resolution of the infrared images and obstruction of the shooting angle. As a result, the subsequent analysis of the temperature information recorded in the infrared images will be affected by the target background, resulting in large errors.

[0030] Based on this, an embodiment of the present invention provides a method for locating an object area. Figure 1 A flow chart of the object area positioning method provided in an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of locating the area of ​​the insulator that is prone to heat generation. The method can be executed by an object area positioning device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which is preferably a mobile terminal, a desktop computer, a laptop computer, a server, etc.

[0031] like Figure 1 As shown, the object region positioning method provided by the embodiment of the present invention may specifically include: S101, performing first object detection on an infrared image to determine a first object region corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device.

[0032] The first object can be understood as a type of object in the infrared image that needs to be detected roughly, and can be any identifiable part in the infrared image, and can be one or more. For example, it can be a composite insulator string, a porcelain insulator string, etc. The first object area can be considered as an outer frame area drawn around the first object and containing the first object, which is equivalent to a closed area determined by the angle information of the outer frame and the coordinates of the vertices and the vertex coordinate information, and is used to define the approximate position of the first object in the infrared image.

[0033] In this embodiment, infrared radiation emitted by an object can be captured by an infrared device, such as an infrared camera, to obtain an infrared image. A first object of a specific category in the infrared image is identified by a rough positioning method, such as a target detection method such as a rotating target detection method, and an area occupied by the first object in the image, i.e., the first object area, is determined by drawing an external frame through the vertex coordinates and angle information of the external frame.

[0034] Exemplarily, an infrared camera is used to photograph an environment where one or more composite insulator strings exist to obtain an infrared image, and then all composite insulator strings in the infrared image are identified through a target detection model, and an external rectangular frame is drawn for each composite insulator string. The position area of ​​all insulator strings in the image is determined by the vertex coordinates of the external frame, that is, the closed area formed by all the external rectangular frames.

[0035] S102: Perform second object detection on the infrared image to determine a second object region of the second object contained in the infrared image.

[0036] The second object can be understood as a type of object that has a fine positioning requirement in the infrared image, which can be one or more, for example, a steel cap or all core rods. The second object area can be considered as one or more closed areas determined by the coordinates on the segmentation box by segmenting the second object pixels from the background one by one, which is used to reflect the actual position of the second object.

[0037] In this embodiment, the second object in the infrared image can be identified through precise positioning methods, such as semantic segmentation and instance segmentation target segmentation methods, and the second object can be annotated at the pixel level. The second object pixels can be segmented from the infrared image background one by one, and the second object area containing the second object, that is, the closed area surrounded by the segmentation box, can be determined through the coordinates on the segmentation box.

[0038] Exemplarily, an infrared camera is used to photograph an area where one or more core rods exist to obtain an infrared image, and then all core rods in the infrared image are identified through a target segmentation model, and the pixel areas of all core rods are segmented one by one to obtain multiple segmentation frames belonging to different core rods. The enclosed area is determined by the coordinates on the segmentation frame to determine the area occupied by all core rods.

[0039] S103: Determine a target object region of the second object according to a positional relationship between the second object region and the first object region.

[0040] The target object area may be understood as a valid positioning area of ​​the second object contained in the first object area.

[0041] In this embodiment, the presence of a target object region of the second object in the infrared image is determined based on the segmented frame region of the second object in the infrared image, i.e., the second object region, and the circumscribed frame region of the first object, i.e., the first object region. When the coordinates of the second object region in the infrared image all fall into the coordinates contained in the first object region, it is considered that the target object region of the second object exists in the first object region. At this time, the center points of the two long sides of each second object are found respectively, and a parallel line of the long side of the first object region is drawn through the center points, intersecting with the short side of the first object region, to form an effective positioning area of ​​the second object that exists in the first object region and has the same length as the first object, i.e., the target object region.

[0042] For example, an infrared image is obtained, including a composite insulator string and a core rod, and the region of the insulator string and the region of the core rod have been obtained. At this time, it is determined whether the segmented region of the core rod in the infrared image falls into the outer frame region of the insulator string. If the coordinates of the segmented region of the core rod all fall into the coordinates of the outer frame region of the insulator string, then a parallel line of the long side of the insulator string region is drawn through the midpoints of the two long sides of the core rod region, and intersects with the short side of the insulator string region to obtain the target object region of the core rod, that is, the effectively positioned core rod region.

[0043] An object area positioning method provided by an embodiment of the present invention is to first perform a first object detection on an infrared image to determine a first object area corresponding to a first object contained in the infrared image, and the infrared image is captured by an infrared device; then perform a second object detection on the infrared image to determine a second object area of ​​a second object contained in the infrared image; finally, the target object area of ​​the second object can be determined according to the positional relationship of the second object area relative to the first object area. The above technical scheme of this embodiment detects the first object and the second object in the infrared image respectively to accurately determine all the first object areas and the second object areas in the infrared image, and matches the positional relationship between the second object area and the first object area, so as to achieve accurate identification and positioning of the target object area of ​​the second object to be identified in the infrared image when the resolution of the infrared image captured by the drone is low and the target effective pixels are few, thereby improving the effective positioning of the area where the target object is located, and also enabling the business applications involved in the target object to be effectively promoted.

[0044] As a first optional embodiment of the present embodiment, on the basis of the above embodiment, first object detection may be performed on the infrared image to determine a first object area corresponding to the first object contained in the infrared image, which may be further specified as the following steps.

[0045] a1) detecting the first object in the infrared image by using a trained rotating target detection model, where the first object is a composite insulator string and / or a porcelain insulator string.

[0046] Among them, the rotating target detection technology can be considered as a target detection technology that can not only identify objects in infrared images, but also detect the direction of objects. The core function of the rotating target detection model used in the rotating target detection technology is to output a series of rotated bounding boxes that can more accurately adapt to the actual direction and shape of the object. Compared with the traditional target detection algorithm, the rotating target detection algorithm introduces additional angle parameters and uses a rotating bounding box to frame the object, thereby providing more accurate positioning information.

[0047] In this embodiment, the rotating target detection model used needs to be trained in advance, wherein the training process of the rotating target detection model can be described as: first, constructing an infrared image sample set required for training the rotating target detection model. By collecting infrared sample images containing the first object (composite insulator string and / or porcelain insulator string) from different shooting angles and different shooting directions of the drone, using a rotating box annotation tool such as Rolabelimg, annotating the positions of the composite insulator string and / or porcelain insulator string in the collected infrared sample image, and saving the annotation file corresponding to the infrared sample image in a format such as xml, an infrared image sample set containing the infrared sample image and the corresponding annotation file is constructed.

[0048] Then, the constructed infrared image sample set is used to train a rotating target detection model, such as a redet model. The trained rotating target detection model is used to perform target detection on the first object in the infrared image to identify composite insulator strings and / or porcelain insulator strings distributed in different directions in the infrared image.

[0049] b1) using the first circumscribed rectangle information output by the rotating target detection model to represent the first object region of the composite insulator string and / or the porcelain insulator string.

[0050] The first circumscribed rectangle information may be understood as a rectangular frame circumscribed to the first object and representing the first object region in the infrared image, and is used to record the position and rotation angle information of the first object in the infrared image.

[0051] In this embodiment, the first object in the infrared image input into the rotating target detection model is identified and located, and the position information of the area where the composite insulator string and / or the porcelain insulator string is located is determined by marking the first circumscribed rectangle information on the first object in the infrared image, thereby determining the first object area of ​​the composite insulator string and / or the porcelain insulator string.

[0052] For example, Figure 2 This is an example diagram of the location of the first object area (composite insulator string) in the object area location method provided in the embodiment of the present invention. Figure 2 As shown, the presented image includes the positions of two composite insulator strings distributed in different directions located by the rotating target detection image, and the light-colored rectangular area can be regarded as the first circumscribed rectangle information of the composite insulator string in this infrared image, that is, the first object area of ​​the composite insulator.

[0053] For example, Figure 3 This is an example diagram of the location of the first object area (porcelain insulator string) in the object area location method provided in the embodiment of the present invention. Figure 3As shown, the presented image includes the position of the porcelain insulator string located by the rotating target detection image, and the light-colored rectangular area can be regarded as the first circumscribed rectangular information of the porcelain insulator string in this infrared image, that is, the first object area of ​​the porcelain insulator.

[0054] The above technical solution of this embodiment provides a technical implementation of outputting the first circumscribed rectangle information through the rotating target detection model. The selected rotating target detection model is trained by constructing a labeled infrared image sample library, thereby accurately identifying the composite insulator string and / or the porcelain insulator string, and determining the position and angle information of the composite insulator string and / or the porcelain insulator string.

[0055] As a second optional embodiment of the present embodiment, on the basis of the above embodiment, the second object detection may be performed on the infrared image to determine the second object region of the second object contained in the infrared image, which may be specifically optimized into the following steps.

[0056] a2) Segmenting the infrared image of the second object using a trained target segmentation model, where the second object is a core rod and / or a steel cap.

[0057] Among them, the target segmentation model can be considered as a segmentation model that classifies the pixels in the infrared image according to the object category they belong to, and determines which object or part of the object they belong to by identifying each pixel in the image.

[0058] In this embodiment, the target segmentation model used needs to be trained in advance, wherein the training process of the target segmentation model can be described as follows: first, a sample set of infrared images required for the target segmentation model is constructed. By collecting infrared sample images containing the second object (core rod and / or steel cap) from different shooting angles and different shooting directions of the drone, using a labeling tool such as Labelme, the position of the unobstructed second object in the collected infrared sample image is labeled, and the labeling file corresponding to the infrared sample image is saved in a format such as xml, thereby constructing an infrared image sample set containing infrared sample images and corresponding labeling files.

[0059] Then, the constructed infrared image sample set is input into a target segmentation model, such as Mask R-CNN, etc., and the model is trained to obtain a trained target segmentation model. The second object (core rod and / or steel cap) in the infrared image is segmented and separated from the background by the trained target segmentation model, so as to accurately identify the core rod and / or steel cap in the infrared image.

[0060] b2) using the first contour coordinate information output by the target segmentation model to represent the second object region of the mandrel, and / or using the second contour coordinate information output by the target segmentation model to represent the second object region of the steel cap.

[0061] Among them, the first contour coordinate information can be considered as information obtained by segmenting a certain object or a certain type of object, which can accurately determine the position of the entire contour edge of an object, and is used to divide the area position to which the object belongs. For example, the first contour coordinate information can determine the precise position coordinate information of each point on the edge contour of the second object area of ​​the mandrel. The second contour coordinate information can be understood as information obtained by segmenting a certain object or a certain type of object, which is used to accurately determine the contour edge positions of multiple parts belonging to an object, and is used to accurately determine the position of the entire area of ​​the object by determining multiple parts. For example, the second contour coordinate information can determine the precise position coordinate information of each point on the edge of the second object area of ​​the steel cap, and these coordinates form multiple irregular shapes to closely fit the actual contour of the steel cap belonging to the same whole.

[0062] In this embodiment, the trained target segmentation model is used to segment the core rod and / or steel cap in the infrared image input into the target segmentation model. The second object area of ​​the core rod, i.e., the area enclosed by the first contour coordinate information, can be identified through the first contour coordinate information output by the target segmentation model; the second object area of ​​the steel cap can be identified through the second contour coordinate information output by the target segmentation model.

[0063] For example, Figure 4 This is an example diagram of the positioning of the core rod of the composite insulator that is not blocked in the object area positioning method provided by the embodiment of the present invention. Figure 4 As shown, the two light-colored areas presented are the first contour coordinate information of the two core rods in the infrared image output by the target segmentation model.

[0064] For example, Figure 5 This is an example diagram of the location of the unobstructed steel cap of the porcelain insulator in the object area positioning method provided by the embodiment of the present invention. Figure 5 As shown, the multiple light-colored areas presented are the second contour coordinate information of the steel cap belonging to the same entity in the infrared image output by the target segmentation model.

[0065] The above technical solution of this embodiment provides a technical implementation of outputting the first contour coordinate information and / or the second contour coordinate information through the target segmentation model. The selected target segmentation model is trained by constructing a labeled infrared image sample library, so as to accurately separate the mandrel and / or steel cap from the background, accurately identify the mandrel and / or steel cap, and use the first contour coordinate information and / or the second contour coordinate information to respectively represent the edge coordinate position information of the mandrel and / or steel cap.

[0066] As a third optional embodiment of this embodiment, on the basis of the above embodiment, the target object region of the second object may be determined according to the positional relationship of the second object region relative to the first object region, which may specifically include the following steps.

[0067] a3) Acquire first circumscribed rectangle information representing the first object area, and first contour coordinate information or second contour coordinate information representing the second object area.

[0068] In this embodiment, after the infrared image passes through the trained target detection model, the first object area corresponding to the first object is obtained, the first circumscribed rectangle information is used to characterize the position and angle of the first object area, and the first contour coordinate information or the second contour coordinate information is used to characterize the edge position of the second object. The second object can be a core rod or a steel cap.

[0069] b3) If it is determined that the first contour coordinate information is entirely contained in the first circumscribed rectangle information, determining a target object region of the second object according to the first contour coordinate information and the first circumscribed rectangle information.

[0070] In this embodiment, when all the position coordinates represented by the first contour coordinate information fall within the position coordinate area represented by the first circumscribed rectangle information, the second object is considered to be in the first object area. Then, based on the first contour coordinate information representing the position of the second object and the first circumscribed rectangle information representing the position of the first object area, all the first contour coordinate information in the first circumscribed rectangle information is determined, that is, the target object area of ​​the second object.

[0071] Exemplarily, if the first contour coordinate information of the core rod is all contained in the first circumscribed rectangle information of the composite insulator string, that is, the core rod is considered to be in the composite insulator string, then the complete position of the entire core rod in the composite insulator string is determined based on the first contour coordinate information of the core rod and the first circumscribed rectangle information of the composite insulator string.

[0072] For example, Figure 6This is an example diagram of the positional relationship in which the coordinates of the unobstructed core rod region located by the target segmentation model in the object region positioning method provided by the embodiment of the present invention are completely contained by the coordinates of the region where the composite insulating string is located. Figure 6 As shown, a dark area is presented in the light area, which is the area where the core rods that are not blocked by the target segmentation are located. At this time, it can be considered that the first contour coordinate information of the core rods is all contained in the first circumscribed rectangle information of the composite insulator string.

[0073] As one implementation manner, the third optional embodiment may further concretize the following steps to determine the target object area of ​​the second object according to the first contour coordinate information and the first circumscribed rectangle information.

[0074] b31) Generate a circumscribed rectangle of a first contour area formed by the first contour coordinate information.

[0075] The first contour area can be understood as a closed area surrounded by the first contour coordinate information, which can be a regular area or an irregular area.

[0076] In this embodiment, after segmenting an object, a first contour coordinate information representing the edge of the object can be obtained. When it is determined that the first contour coordinate information is entirely contained in the first circumscribed rectangle information, a minimum circumscribed rectangle circumscribed to the first contour area enclosed by the first contour coordinate information is generated.

[0077] b32) respectively determine a set of coordinate points with the shortest distances from the edge of the first contour area to the four corner points of the circumscribed rectangle, wherein the first coordinate point and the second coordinate point included in the set of coordinate points are adjacent to the first long side of the circumscribed rectangle, and the third coordinate point and the fourth coordinate point are adjacent to the second long side of the circumscribed rectangle.

[0078] Among them, the first long side and the second long side can be considered as the two longer sides in the circumscribed rectangle, and the first long side and the second long side are not the same long side. The first coordinate point and the second coordinate point can be understood as the two coordinate points adjacent to the first long side in the circumscribed rectangle, and are respectively the two coordinate points on the first contour edge that are closest to the two right angles formed by the first long side and the other two short sides of the circumscribed rectangle. The third coordinate point and the fourth coordinate point can be considered as the two coordinate points adjacent to the second long side in the circumscribed rectangle, and are respectively the two coordinate points on the first contour edge that are closest to the two right angles formed by the second long side and the other two short sides of the circumscribed rectangle.

[0079] In this embodiment, by respectively determining the first coordinate point and the second coordinate point of the adjacent first long side, and the third coordinate point and the fourth coordinate point of the adjacent second long side, a set of coordinate points with the shortest distances from the edge of the first contour area to the four corner points on the circumscribed rectangle is determined.

[0080] b33) Acquire a first contour edge coordinate point included between the first coordinate point and the second coordinate point, and a second contour edge coordinate point included between the third coordinate point and the fourth coordinate point.

[0081] Among them, the first contour edge coordinate point can be considered as the set of all coordinate points on the first contour edge included between the first coordinate point and the second coordinate point on the edge of the first contour area, and the first contour edge can be considered as the first contour area edge between the first coordinate point and the second coordinate point close to the first long side. The second contour edge coordinate point can be understood as the set of all coordinate points on the second contour edge included between the third coordinate point and the fourth coordinate point on the edge of the first contour area, and the second contour edge can be considered as the first contour area edge between the third coordinate point and the fourth coordinate point close to the second long side.

[0082] In this embodiment, by determining the first coordinate point and the second coordinate point, the first contour edge coordinate point determined by the first coordinate point and the second coordinate point on the edge of the first contour area is obtained, that is, all coordinate points on the edge of the first contour area contained between the first coordinate point and the second coordinate point on the first contour area; by determining the third coordinate point and the fourth coordinate point, the second contour edge coordinate point determined by the third coordinate point and the fourth coordinate point on the edge of the first contour area is obtained, that is, all coordinate points on the edge of the first contour area contained between the third coordinate point and the fourth coordinate point on the first contour area.

[0083] b34) determining a first center coordinate point of the first coordinate point, the second coordinate point, and the first contour edge coordinate point, and determining a third coordinate point, a fourth coordinate point, and a second center coordinate point of the second contour edge coordinate point.

[0084] Among them, the first center coordinate point can be considered as the midpoint of the first contour edge coordinate points, which can be obtained by the coordinate mean method, that is, calculating the average value of the horizontal and vertical coordinates of all coordinate points in the first center coordinate point. The second center coordinate point can be considered as the midpoint of the second contour edge coordinate points, which can be obtained by the coordinate mean method, that is, calculating the average value of the horizontal and vertical coordinates of all coordinate points in the second center coordinate point.

[0085] In this embodiment, the first center coordinate point is obtained by adopting the coordinate mean method based on the first coordinate point, the second coordinate point and the first contour coordinate point; at the same time, the second center coordinate point is obtained by adopting the coordinate mean method based on the third coordinate point, the fourth coordinate point and the second contour edge coordinate point.

[0086] For example, it is assumed that the first contour coordinate information of the core rod that is not blocked in the composite insulator is located, such as Figure 6 As shown, the circumscribed rectangle of the first contour area formed by the first contour coordinate information is generated at this time, and the first contour edge coordinate point and the second contour edge coordinate point are determined by determining the first coordinate point, the second coordinate point, the third coordinate point and the fourth coordinate point. Assume that the left side of the mandrel area is the first contour edge coordinate point, the right side is the second contour edge coordinate point, and the first contour edge coordinate point has n points, and the coordinates are , , …, , calculate the first center coordinate point by coordinate mean method Coordinates , the formula is: ; ; Similarly, the second center coordinate point can be obtained The coordinates of .

[0087] b35) Determine two first parallel lines that are parallel to the long side of the first circumscribed rectangle information and pass through the two center coordinate points respectively.

[0088] The two first parallel lines may be considered as lines passing through the first center coordinate point and the second center coordinate point respectively and parallel to the long side in the first circumscribed rectangle information, and are used to extend and supplement the area position for effective positioning of the second object.

[0089] In this embodiment, after the first center coordinate point and the second center coordinate point are determined, two first parallel lines parallel to the long side of the first circumscribed rectangle information are drawn through the first center coordinate point and the second center coordinate point respectively.

[0090] b36) determining first short side intersection points of the two first parallel lines and the two short sides in the first circumscribed rectangle information respectively, and constituting a target object region of the second object based on the first short side intersection points.

[0091] The first short side intersection points may be understood as four intersection points generated by respectively intersecting the two first parallel lines with the two short sides of the first circumscribed rectangle information, and are used to limit the extended length of the second object.

[0092] In this embodiment, two first parallel lines and the first short side intersection point of the first parallel line and the short side of the first external frame information form a rectangular area with the same length as the long side of the first external frame information and a width equal to the distance between the two first short side intersection points on the same side of the short side, that is, the target object area of ​​the second object.

[0093] For example, Figure 7 This is an example diagram of obtaining the area where the complete mandrel is located in the object area positioning method provided in the embodiment of the present invention. Figure 7 As shown, the presented figure includes the first circumscribed rectangle information of the composite insulator string output by the target detection model, wherein the first circumscribed frame has four vertices, namely F1, F2, F3 and F4; the first center coordinate point and the second center coordinate point The first contour coordinate information of the core rod is obtained by calculating the midpoint of the first contour edge coordinate point and the midpoint of the second contour edge coordinate point by using the coordinate mean method. , Draw a line parallel to the long side of the first circumscribed rectangle information, and the intersection points with the first short side of the two short sides of the first circumscribed rectangle information are A, B, C and D. The enclosed rectangular shaded area ABCD is the complete area of ​​the core rod in the composite insulator.

[0094] The above technical scheme of this embodiment provides a technical implementation for determining the target object area of ​​the second object based on the first contour coordinate information and the first circumscribed rectangle information. By generating the circumscribed rectangle of the first contour area, the set of coordinate points with the shortest distance from the edge of the first contour area to the four corner points on the circumscribed rectangle are determined respectively, thereby obtaining the first contour edge coordinate point and the second contour edge coordinate point; by using the coordinate mean method, the center coordinate points of the first contour edge coordinate point and the second contour edge coordinate point on the first contour coordinate information are determined respectively, that is, the first center coordinate point and the second center coordinate point, and two parallel lines parallel to the long side of the first circumscribed rectangle information are drawn through the two center coordinate points to intersect with the two short sides of the first circumscribed rectangle information respectively, effectively solving the problem that the second object, such as the core rod, is partially blocked due to the problem of the shooting angle of the infrared image, thereby failing to accurately and completely identify the target object area of ​​the second object in the first object area.

[0095] c3) If it is determined that the second contour coordinate information is included in the first circumscribed rectangle information, determining a target object region of the second object according to the second contour coordinate information and the first circumscribed rectangle information.

[0096] In this embodiment, when all the position coordinates represented by the second contour coordinate information fall within the position coordinate area represented by the first circumscribed rectangle information, the second object is considered to be in the first object area; then, parallel lines are drawn through the two midpoints of the second contour coordinate information and parallel to the two long sides of the first circumscribed rectangle information, intersecting with the two short sides of the first circumscribed rectangle information, to determine all the second contour coordinate information in the first circumscribed rectangle information, that is, the target object area of ​​the second object.

[0097] Exemplarily, if the second contour coordinate information of the steel cap is all contained in the first circumscribed rectangle information of the porcelain insulator string, that is, the steel cap is considered to be in the porcelain insulator string, then based on the second contour coordinate information of the steel cap and the first circumscribed rectangle information of the porcelain insulator string, the location area of ​​all steel caps in the porcelain insulator string is determined.

[0098] For example, Figure 8 This is an example of the positional relationship where the coordinates of the unobstructed steel cap area located by the target segmentation model are completely contained by the coordinates of the area where the porcelain insulation string is located. Figure 8 As shown, there are multiple dark areas in the light area, which are the areas where the unobstructed steel caps are located after the target segmentation. It can be considered that the second contour coordinate information of the above steel caps is all contained in the first circumscribed rectangle information of the porcelain insulator string.

[0099] The above technical solution of this embodiment provides a technical implementation for determining the target object area of ​​the second object according to the positional relationship of the second object area relative to the first object area. By judging whether the first contour coordinate information and / or the second contour coordinate information are all included in the first circumscribed rectangle information, the situation where only the first object or only the second object exists is excluded, thereby improving the accuracy of locating the target object area of ​​the second object.

[0100] As one implementation manner, the third optional embodiment may further specify the following steps to determine the target object area of ​​the second object according to the second contour coordinate information and the first circumscribed rectangle information.

[0101] c31) For each second contour area formed by the second contour coordinate information, determine a first contour coordinate point and a second contour coordinate point on the second contour area with the shortest distance to the long side of the first circumscribed rectangle information.

[0102] The second contour area may be considered as a plurality of closed areas surrounded by the second contour coordinate information.

[0103] In this embodiment, after segmenting the same object, multiple second contour coordinate information representing the contour edges of multiple parts of the same object can be obtained. Among them, in each second contour area formed by the second contour coordinate information, there will be two points that are closest to the two long sides of the first circumscribed rectangle information, which is equivalent to the vertical distance of each point to the closest side of the first circumscribed rectangle information among the above two points is the shortest among all points in the second contour area. The two points that are closest to the two sides of the first circumscribed rectangle information on each second contour area are found, and these points are distinguished according to which side of the first circumscribed rectangle information they are close to, and the points on the same side are divided into one group, and then divided into two groups in total. The sets of the two groups of points are the first contour coordinate points and the second contour coordinate points, respectively.

[0104] c32) determining first key coordinate points and second key coordinate points respectively according to the first contour coordinate points and the second contour coordinate points corresponding to each of the second contour areas.

[0105] The first key coordinate point can be considered as the center point of the first contour coordinate point; the second key coordinate point can be understood as the center point of the second contour coordinate point.

[0106] In this embodiment, the first key coordinate point and the second key coordinate point are determined respectively according to the first contour coordinate point and the second contour coordinate point by calculating the average of the left points of the first contour and the average of the second contour coordinate point.

[0107] For example, it is assumed that there are n unobstructed steel cap areas located in the porcelain insulator, and the arrangement is as follows: Figure 8 As shown, at this time, the first contour coordinate point is obtained, that is, the coordinate of the point on the left long side of the first circumscribed rectangle information closest to the porcelain insulator string in each steel cap area, and there are n points. The coordinates of the first key coordinate point are calculated by the coordinate mean method described in step b31). Similarly, the second key coordinate point can be determined based on the second contour coordinate point.

[0108] c33) Determine two second parallel lines that are parallel to the long side of the first circumscribed rectangle information and pass through the first key coordinate point and the second key coordinate point respectively.

[0109] In this embodiment, after the first key coordinate point and the second key coordinate point are calculated, two lines are drawn passing through the first and second key coordinate points respectively and parallel to the long sides of the first circumscribed rectangular frame information.

[0110] c34) determining second short side intersection points of the two second parallel lines and the two short sides in the first circumscribed rectangle information respectively, and constituting a target object region of the second object based on each of the second short side intersection points.

[0111] The two second parallel lines can be considered as two lines passing through the first and second key coordinate points respectively and parallel to the long side of the first circumscribed frame information, and are used to extend and supplement the position of the effective area of ​​the second object. The second short side intersection points can be understood as the four intersection points generated by making the two second parallel lines intersect with the two short sides of the first circumscribed rectangle information respectively, and are used to limit the extended length of the second object.

[0112] In this embodiment, two second parallel lines and the intersection points of the second parallel lines and the second short sides of the short sides of the first external frame information form a rectangular area with the same length as the long side of the first external frame information and a width equal to the distance between the two intersection points of the second short sides on the same side of the short side, i.e., the target object area of ​​the second object.

[0113] The above technical solution of this embodiment provides a technical implementation for determining the target object area of ​​the second object based on the second contour coordinate information and the first circumscribed rectangle information. By determining the first contour coordinate point and the second contour coordinate point, the first and second key coordinate points of the above two contour coordinate points are determined respectively by using the coordinate mean method, and two parallel lines parallel to the long sides of the first circumscribed rectangle information are made through the above two key coordinate points to intersect with the two short sides of the first circumscribed rectangle information respectively, which effectively solves the problem that the second object, such as a steel cap, is partially blocked due to the problem of the shooting angle of the infrared image, thereby failing to accurately and completely identify the target object area of ​​the second object within the first object area.

[0114] If there is first circumscribed rectangle information that does not include the first contour coordinate information or the second contour coordinate information, a region detection error reminder is given.

[0115] In this embodiment, if it is found that the first contour coordinate information or the second contour coordinate information does not exist in the first circumscribed rectangle information, it means that there is no target object area of ​​the second object in the first circumscribed rectangle information, and a region detection error reminder is given at this time to prompt that an error has occurred in the image positioning and needs to be corrected or re-evaluated. After the region detection error reminder appears, you can choose to re-execute the object region positioning method provided by the present invention to identify and locate again, or you can choose to delete the image.

[0116] The above technical solution of this embodiment provides a processing mechanism when the first circumscribed rectangle information does not contain the first contour coordinate information or the second contour coordinate information, and ensures the accuracy and reliability of object positioning by providing a region detection error reminder.

[0117] Fig. 9 A schematic diagram of the structure of an object area positioning device provided by an embodiment of the present invention is shown in FIG. Fig. 9As shown, the device may include: a first detection module 91, a second detection module 92 and a target determination module 93, wherein the first detection module 91 is used to perform a first object detection on the infrared image, and determine a first object area corresponding to a first object contained in the infrared image, and the infrared image is captured by an infrared device; the second detection module 92 is used to perform a second object detection on the infrared image, and determine a second object area of ​​a second object contained in the infrared image; and the target determination module 93 is used to determine a target object area of ​​the second object based on a positional relationship of the second object area relative to the first object area.

[0118] An object area positioning device provided by an embodiment of the present invention first performs a first object detection on an infrared image to determine a first object area corresponding to a first object contained in the infrared image, and the infrared image is captured by an infrared device; then performs a second object detection on the infrared image to determine a second object area of ​​a second object contained in the infrared image; and finally, the target object area of ​​the second object can be determined according to the positional relationship of the second object area relative to the first object area. The above technical scheme of this embodiment detects the first object and the second object in the infrared image respectively to accurately determine all the first object areas and the second object areas in the infrared image, and matches the positional relationship between the second object area and the first object area, so as to achieve accurate identification and positioning of the target object area of ​​the second object to be identified in the infrared image when the resolution of the infrared image captured by the drone is low and the target effective pixels are few, thereby improving the effective positioning of the area where the target object is located, and also enabling the business applications involved in the target object to be effectively promoted.

[0119] Furthermore, the first detection module 91 can be specifically used to: detect the first object in the infrared image through a trained rotating target detection model, where the first object is a composite insulator string and / or a porcelain insulator string; and use the first circumscribed rectangle information output by the rotating target detection model to represent the first object area of ​​the composite insulator string and / or the porcelain insulator string.

[0120] Furthermore, the second detection module 92 can be specifically used to: segment the infrared image into the second object through a trained target segmentation model, where the second object is a core rod and / or a steel cap; use the first contour coordinate information output by the target segmentation model to represent the second object area of ​​the core rod, and / or use the second contour coordinate information output by the target segmentation model to represent the second object area of ​​the steel cap.

[0121] Furthermore, the target determination module 93 may specifically include: an information acquisition unit, used to acquire first circumscribed rectangle information representing the first object area, and first contour coordinate information or second contour coordinate information representing the second object area; a first matching unit, used to determine the target object area of ​​the second object according to the first contour coordinate information and the first circumscribed rectangle information if it is determined that the first contour coordinate information is all contained in the first circumscribed rectangle information; and a second matching unit, used to determine the target object area of ​​the second object according to the second contour coordinate information and the first circumscribed rectangle information if it is determined that the second contour coordinate information is contained in the first circumscribed rectangle information.

[0122] Further, the first matching unit can be specifically used to: generate a circumscribed rectangle of the first contour area formed by the first contour coordinate information; respectively determine a set of coordinate points with the shortest distance from the edge of the first contour area to the four corner points on the circumscribed rectangle, wherein the first coordinate point and the second coordinate point included in the set of coordinate points are adjacent to the first long side of the circumscribed rectangle, and the third coordinate point and the fourth coordinate point are adjacent to the second long side of the circumscribed rectangle; obtain the first contour edge coordinate point contained between the first coordinate point and the second coordinate point, and the second contour edge coordinate point contained between the third coordinate point and the fourth coordinate point; determine the first center coordinate point of the first coordinate point, the second coordinate point and the first contour edge coordinate point, and determine the second center coordinate point of the third coordinate point, the fourth coordinate point and the second contour edge coordinate point; determine two first parallel lines that are parallel to the long side in the first circumscribed rectangle information and pass through them respectively; determine the first short side intersection points of the two first parallel lines with the two short sides in the first circumscribed rectangle information, and form the target object area of ​​the second object based on each of the first short side intersection points.

[0123] Further, the second matching unit can be specifically used to: determine, for each second contour area formed by the second contour coordinate information, the first contour coordinate point and the second contour coordinate point with the shortest distance from the second contour area to the long side of the first circumscribed rectangle information; determine the first key coordinate point and the second key coordinate point respectively according to the first contour coordinate point and the second contour coordinate point corresponding to each second contour area; determine two second parallel lines that are parallel to the long side of the first circumscribed rectangle information and pass through the first key coordinate point and the second key coordinate point respectively; determine the second short side intersection points of the two second parallel lines with the two short sides of the first circumscribed rectangle information respectively, and constitute the target object area of ​​the second object based on the second short side intersection points.

[0124] Optionally, the object area positioning device further includes: an error prompting module, configured to give an area detection error prompt if there is first circumscribed rectangle information that does not include the first contour coordinate information or the second contour coordinate information.

[0125] The object region positioning device provided in the embodiment of the present invention can execute the object region positioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0126] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0127] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Fig.10 , which shows an electronic device (eg Fig.10 The terminal device in the embodiment of the present invention may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players) or vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs, desktop computers, etc. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0128] like Fig.10 As shown, the electronic device 100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 102 or a program loaded from a storage device 108 to a random access memory (RAM) 103. In the RAM 103, various programs and data required for the operation of the electronic device 100 are also stored. The processing device 101, the ROM 102, and the RAM 103 are connected to each other via a bus 104. An edit / output (I / O) interface 105 is also connected to the bus 104.

[0129] Typically, the following devices may be connected to the I / O interface 105: an input device 106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 109. The communication device 109 may allow the electronic device 100 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 100 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0130] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 109, or installed from the storage device 108, or installed from the ROM 102. When the computer program is executed by the processing device 101, the above-mentioned functions defined in the method of the embodiment of the present invention are executed.

[0131] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0132] The electronic device provided in the embodiment of the present invention and the object area positioning method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0133] An embodiment of the present invention provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the object area positioning method provided by the above embodiment is implemented.

[0134] It should be noted that the computer-readable medium of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0135] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0136] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0137] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device executes the object area positioning method.

[0138] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0139] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] The units involved in the embodiments of the present invention may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0141] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0142] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing.

[0143] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.

[0144] In addition, although each operation is described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present invention. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for locating an object region, characterized in that: include: Performing first object detection on the infrared image to determine a first object area corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device; Performing second object detection on the infrared image to determine a second object region of the second object contained in the infrared image; determining a target object region of the second object according to a positional relationship of the second object region relative to the first object region; Wherein, determining the target object region of the second object according to the positional relationship of the second object region relative to the first object region includes: Acquire first circumscribed rectangle information representing the first object area, and first contour coordinate information or second contour coordinate information representing the second object area; If it is determined that the first contour coordinate information is entirely contained in the first circumscribed rectangle information, determining a target object region of the second object according to the first contour coordinate information and the first circumscribed rectangle information; If it is determined that the second contour coordinate information is included in the first circumscribed rectangle information, determining the target object area of ​​the second object according to the second contour coordinate information and the first circumscribed rectangle information; The method further comprises: If there is first circumscribed rectangle information that does not include the first contour coordinate information or the second contour coordinate information, a region detection error prompt is given.

2. The method according to claim 1, characterized in that The performing first object detection on the infrared image to determine a first object area corresponding to the first object contained in the infrared image includes: Using a trained rotating target detection model, detecting the first object on the infrared image, where the first object is a composite insulator string and / or a porcelain insulator string; The first circumscribed rectangle information output by the rotating target detection model is used to represent the first object area of ​​the composite insulator string and / or the porcelain insulator string.

3. The method according to claim 1, characterized in that The performing second object detection on the infrared image to determine a second object region of the second object contained in the infrared image includes: Segmenting the infrared image of the second object using a trained target segmentation model, where the second object is a core rod and / or a steel cap; The first contour coordinate information output by the target segmentation model is used to represent the second object area of ​​the mandrel, and / or the second contour coordinate information output by the target segmentation model is used to represent the second object area of ​​the steel cap.

4. The method according to claim 1, characterized in that The step of determining a target object region of the second object according to the first contour coordinate information and the first circumscribed rectangle information includes: Generate a circumscribed rectangle of a first contour area formed by the first contour coordinate information; Determine respectively a set of coordinate points with the shortest distances from the edge of the first contour area to four corner points of the circumscribed rectangle, wherein the first coordinate point and the second coordinate point included in the set of coordinate points are adjacent to the first long side of the circumscribed rectangle, and the third coordinate point and the fourth coordinate point are adjacent to the second long side of the circumscribed rectangle; Acquire a first contour edge coordinate point included between the first coordinate point and the second coordinate point, and a second contour edge coordinate point included between the third coordinate point and the fourth coordinate point; Determine the first coordinate point, the second coordinate point and the first center coordinate point of the first contour edge coordinate point, and determine the third coordinate point, the fourth coordinate point and the second center coordinate point of the second contour edge coordinate point; determine two first parallel lines that are parallel to the long side of the first circumscribed rectangle information and pass through respectively; Determine first short side intersection points of the two first parallel lines and the two short sides in the first circumscribed rectangle information, and construct a target object region of the second object based on the first short side intersection points.

5. The method according to claim 1, characterized in that The step of determining a target object region of the second object according to the second contour coordinate information and the first circumscribed rectangle information includes: For each second contour area formed by the second contour coordinate information, determine the first contour coordinate point and the second contour coordinate point on the second contour area with the shortest distance to the long side of the first circumscribed rectangle information; Determine a first key coordinate point and a second key coordinate point respectively according to the first contour coordinate point and the second contour coordinate point corresponding to each of the second contour areas; Determine two second parallel lines that are parallel to the long side of the first circumscribed rectangle information and pass through the first key coordinate point and the second key coordinate point respectively; Determine the second short side intersection points of the two second parallel lines and the two short sides in the first circumscribed rectangle information, and construct a target object area of ​​the second object based on the second short side intersection points.

6. An object area positioning device, characterized in that: include: A first detection module, configured to perform first object detection on an infrared image and determine a first object region corresponding to a first object contained in the infrared image, wherein the infrared image is captured by an infrared device; A second detection module, configured to perform second object detection on the infrared image and determine a second object region of the second object contained in the infrared image; a target determination module, configured to determine a target object region of the second object according to a positional relationship between the second object region and the first object region; Wherein, the target determination module specifically includes: An information acquisition unit, configured to acquire first circumscribed rectangle information representing the first object area, and first contour coordinate information or second contour coordinate information representing the second object area; a first matching unit, configured to determine a target object region of the second object according to the first contour coordinate information and the first circumscribed rectangle information if it is determined that the first contour coordinate information is entirely contained in the first circumscribed rectangle information; a second matching unit, configured to determine a target object region of the second object according to the second contour coordinate information and the first circumscribed rectangle information if it is determined that the second contour coordinate information is included in the first circumscribed rectangle information; The device also includes: The error prompting module is used to give a region detection error prompt if there is first circumscribed rectangle information that does not include the first contour coordinate information or the second contour coordinate information.

7. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the object area positioning method described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the object area positioning method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Lane line detection method and device, computer equipment and storage medium

    CN112597846A

  • GIS equipment monitoring method and system based on image recognition

    CN117218589A