Intelligent inspection method, inspection robot, readable storage medium and program product
By analyzing the differences between real-time images collected by inspection robots and standard images, and eliminating pixels within a preset pixel value range, compliance testing is performed. This solves the problem of existing technologies being unable to accurately detect illegal intrusions, thus improving inspection efficiency and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 国能新朔铁路有限责任公司
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-21
AI Technical Summary
Existing intelligent inspection technologies cannot detect unauthorized intrusions into the inspection environment in real time and accurately, especially in high-risk locations, which may threaten the safety of equipment operation and personnel.
By collecting real-time images and target trajectory points through inspection robots, the difference areas between real-time images and standard images are determined, pixels within a preset pixel value range are removed, and compliance inspection is performed on the object areas after removal to determine whether there is any illegal intrusion.
It enables accurate and timely detection of the inspection environment, reduces false alarms and missed alarms, improves inspection efficiency and safety, and reduces the workload and risks of manual inspection.
Smart Images

Figure CN122435528A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to an intelligent inspection method, an inspection robot, a readable storage medium, and a program product. Background Technology
[0002] In the inspection of complex and critical equipment such as substations in industries like power, petroleum, and chemicals, the inspection tasks not only include monitoring the equipment itself but also real-time monitoring of the surrounding environment and the safety of personnel. Because substations are often located in remote and dangerous areas with complex environments, manual inspection is not only difficult but also struggles to ensure the accuracy of the results, posing significant safety hazards to inspection personnel in hazardous environments.
[0003] With the continuous development of intelligent technology, inspection work has gradually shifted from manual inspection to automated inspection, such as inspection robots. The application of intelligent inspection technology is gradually becoming an important means to improve work efficiency, ensure equipment safety, and reduce human error.
[0004] Current intelligent inspection technologies typically rely on inspection robots for image acquisition and environmental analysis. These robots collect real-time images of the inspection environment and transmit them to a monitoring system for analysis, enabling tasks such as equipment status monitoring and environmental detection. However, existing technologies, when processing the acquired image data, usually only focus on the status of the equipment itself, neglecting the issue of personnel safety in the inspection environment. Especially in high-risk locations, the presence of unauthorized intruders could pose a serious threat to equipment operational safety and / or the safety of legitimate personnel.
[0005] Therefore, how to detect illegal intrusions into the inspection environment in real time and accurately has become an urgent problem to be solved in intelligent inspection. Summary of the Invention
[0006] The purpose of this application is to provide an intelligent inspection method, inspection robot, readable storage medium, and program product to solve the problem that existing inspection methods cannot accurately detect illegal intrusions into the inspection environment in real time.
[0007] To solve the above-mentioned technical problems, this specification is implemented as follows: Firstly, an intelligent inspection method is provided for use with an inspection robot, the method comprising: Collect real-time images of the inspection environment and the target trajectory points corresponding to the real-time images; Determine the difference region between the real-time image and a standard image of the target trajectory point, wherein there are no intrusive objects in the standard image; Pixels within a preset pixel value range are removed from the object region corresponding to the target object within the difference region. The target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the preset main color of the corresponding object. Based on the removed object regions, compliance checks are performed on the target objects to determine whether there is any illegal intrusion at the target trajectory points.
[0008] Optionally, determining the difference region between the real-time image and the standard image of the target trajectory point includes: In the color space, the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point are subtracted to obtain a first difference image including the color pixel difference. In the grayscale space, the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point are subtracted to obtain a second difference image including the grayscale pixel difference. The first difference image and the second difference image are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point.
[0009] Optionally, the first difference image and the second difference image are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point, including: Remove color pixel differences in the first difference image that are less than a preset color threshold, and remove grayscale pixel differences in the second difference image that are less than a preset grayscale threshold; Extract a first pixel region composed of pixels at multiple consecutive pixel positions in the first difference image after removal, and extract a second pixel region composed of pixels at multiple consecutive pixel positions in the second difference image after removal. The target first pixel region in the first pixel region and the target second pixel region in the second pixel region are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point. Among them, the target first pixel region has the largest number of pixels at the corresponding consecutive pixel positions in the extracted first pixel region, and the target second pixel region has the largest number of pixels at the corresponding consecutive pixel positions in the extracted second pixel region.
[0010] Optionally, removing pixels within a preset pixel value range from the object region corresponding to the target object within the difference region includes: Extract the image region corresponding to the preset pixel value range from the difference region; The pixels at the edge of the target image region in the extracted image region are extracted and enclosed to form a complete image region, wherein the target image region has the largest number of corresponding pixels in the extracted image region; The complete image region is taken as the object region corresponding to the target object; Remove pixels within the object region that correspond to the preset pixel value range.
[0011] Optionally, before extracting the image region corresponding to the preset pixel value range from the difference region, the method further includes: Obtain a preset range of pixel counts that match the depth of field of the difference region; If the number of pixels in the difference region is within the preset pixel count range, then the image region corresponding to the preset pixel count range is extracted from the difference region.
[0012] Optionally, based on the removed object region, compliance detection is performed on the target object, including: Extract a feature region consisting of pixels at multiple consecutive pixel positions in the object region after removal, wherein the feature region includes features on the target object; The features of the feature region are compared with the preset features of the corresponding object to detect whether the target object is compliant.
[0013] Optionally, comparing the features of the feature region with the preset features of the corresponding object to detect whether the target object is compliant includes: If the extracted feature regions include multiple regions, then based on the features of each feature region, including text, pattern, shape and / or color, calculate the description vector of the corresponding feature of each feature region. Calculate the similarity between the description vector of the corresponding feature in each feature region and the description vector of the corresponding object's preset features; Determine the number of feature regions in the plurality of feature regions whose similarity is greater than a preset similarity threshold; If the number of the feature regions exceeds a preset threshold, the target object is detected as compliant and it is determined that the target trajectory point does not have any illegal intrusion. If the number of the feature regions does not exceed a preset threshold, the target object is detected as non-compliant and the target trajectory point is determined to have been illegally intruded.
[0014] In a second aspect, an inspection robot is provided, including a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0015] Thirdly, a readable storage medium is provided that stores a program or instructions which, when executed by a processor, implement the steps of the method described in the first aspect.
[0016] Fourthly, a computer program product is provided, comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the steps of the method described in the first aspect.
[0017] In this embodiment, the inspection robot collects real-time images of the inspection environment and target trajectory points corresponding to the real-time images; determines the difference region between the real-time images and the standard images of the target trajectory points, wherein there are no intruding objects in the standard images; removes pixels within a preset pixel value range from the object region corresponding to the target object within the difference region, where the target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the corresponding object's preset main color; based on the removed object region, the target object is subjected to compliance detection to determine whether there is illegal intrusion at the target trajectory point. Thus, abnormal situations in the real-time images can be accurately and promptly identified. The standard images are derived from historical images without intruding objects, providing an interference-free comparison benchmark and ensuring the accuracy and precision of image matching. When there is a difference between the real-time image and the corresponding standard image, the difference region can be accurately extracted. By analyzing the non-main color pixels of the objects within the difference region, normal environmental changes and illegal intrusion behaviors can be distinguished more meticulously and accurately, ensuring high accuracy in the identification process, reducing false alarms and missed alarms, thereby significantly improving inspection efficiency and safety, and reducing the workload and risks of manual inspection. Attached Figure Description
[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a flowchart illustrating the intelligent inspection method according to an embodiment of this application.
[0019] Figure 2 This is a structural block diagram of the intelligent inspection device according to an embodiment of this application.
[0020] Figure 3 This is a structural block diagram of the inspection robot according to an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. The drawing numbers in this application are only used to distinguish the various steps in the solution and are not used to limit the execution order of the various steps. The specific execution order is subject to the description in the specification.
[0022] To address the problems existing in the prior art, embodiments of this application provide an intelligent inspection method applied to an inspection robot. For example... Figure 1 As shown, the method includes steps 102 to 108.
[0023] Step 102: Collect real-time images of the inspection environment and the target trajectory points corresponding to the real-time images.
[0024] Real-time images are captured by the inspection robot as it moves along a preset path. The robot takes real-time pictures of the inspection environment as it moves along the path. Multiple known trajectory points exist along the preset path. The inspection robot captures images of the inspection environment corresponding to each trajectory point in real time and records the correlation between each real-time image and its corresponding trajectory point.
[0025] Step 104: Determine the difference region between the real-time image and the standard image of the target trajectory point, wherein there are no intrusive objects in the standard image.
[0026] At any given moment, when the inspection robot is inspecting along the same preset path, it collects a series of "standard images" at multiple known trajectory points at the same location on the preset path. These standard images serve as historical references and record the normal image characteristics of the preset path in the absence of external interference or illegal intrusion. Some or more standard images may or may not contain objects. If an object is present in a standard image, the corresponding object is a currently existing legal object.
[0027] By comparing the real-time image captured by the inspection robot at the target trajectory point with the corresponding historical reference standard image, it is possible to identify whether there is an unauthorized intrusion object in the real-time image corresponding to the target trajectory point. If it is determined that there is no difference between the real-time image corresponding to the target trajectory point and the standard image, that is, the real-time image features of the real-time image are consistent with the conventional image features of the corresponding standard image, it indicates that there is no intruding object in the real-time image corresponding to the target trajectory point, and thus it is determined that there is no unauthorized intrusion at the target trajectory point.
[0028] If a discrepancy is found between the real-time image and the standard image corresponding to the target trajectory point, that is, the real-time image features of the real-time image are inconsistent with the conventional image features of the corresponding standard image, it indicates that there may be an intruding object in the real-time image corresponding to the target trajectory point.
[0029] By matching the real-time image of the target trajectory point at the corresponding location of the inspection robot with the standard image of the same trajectory point collected in the past, the consistency between the real-time image of the target trajectory point of the inspection robot and the standard image is ensured. This is used to compare whether there are any abnormal changes in the inspection environment corresponding to the target trajectory point (such as illegal intrusion objects).
[0030] By comparing a real-time image with a standard image, the regions of difference between the two can be calculated. If a part of the real-time image differs from that of the standard image, that part will be marked as a region of difference.
[0031] In one specific embodiment, determining the difference region between the real-time image and the standard image of the target trajectory point includes: in the color space, subtracting the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point to obtain a first difference image including color pixel differences; in the grayscale space, subtracting the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point to obtain a second difference image including grayscale pixel differences; and merging the first difference image and the second difference image to obtain the difference region between the real-time image and the standard image of the target trajectory point.
[0032] In this embodiment, a dual-channel (color + grayscale) difference region extraction algorithm is employed. The pixel values of corresponding pixels at the same pixel location in the RGB color space of the real-time image and the corresponding standard image are directly subtracted to obtain a first difference image, which consists of multiple color pixel differences corresponding to the same pixel location. By comparing the pixel values of the real-time image and the corresponding standard image in the color space, the difference regions in the corresponding color spaces between the two can be preliminarily identified.
[0033] Similarly, by directly subtracting the pixel values of corresponding pixels at the same position in the grayscale space of the real-time image and the corresponding standard image, a second difference image is obtained, which includes the grayscale pixel differences. This second difference image consists of multiple grayscale pixel differences corresponding to the same pixel position. By comparing the pixel values of the real-time image and the corresponding standard image in grayscale space, the corresponding grayscale space difference regions between them can be preliminarily identified. If the acquired real-time image and the corresponding standard image are RGB color images, they can be converted to grayscale images before subtracting the pixel values at the corresponding pixel positions.
[0034] Then, the first and second difference images are merged to obtain the difference region between the real-time image of the target trajectory point and the standard image.
[0035] By determining the difference image in a color space, the intrusion of colored objects (such as hard hats or work clothes) can be effectively captured. Grayscale images are not sensitive to color but are sensitive to changes in structure and brightness. By determining the difference image in a grayscale space, objects with obvious grayscale features or shadow changes can be captured better.
[0036] Optionally, merging the first difference image and the second difference image to obtain the difference region between the real-time image and the standard image of the target trajectory point includes: removing color pixel differences in the first difference image that are less than a preset color threshold, and removing grayscale pixel differences in the second difference image that are less than a preset grayscale threshold; extracting a first pixel region composed of pixels at multiple consecutive pixel positions in the first difference image after removal, and extracting a second pixel region composed of pixels at multiple consecutive pixel positions in the second difference image after removal; merging the target first pixel region in the first pixel region and the target second pixel region in the second pixel region to obtain the difference region between the real-time image and the standard image of the target trajectory point, wherein the target first pixel region has the most pixels at consecutive pixel positions in the extracted first pixel region, and the target second pixel region has the most pixels at consecutive pixel positions in the extracted second pixel region.
[0037] In this embodiment, threshold filtering is applied to the difference images in grayscale space and color space respectively to remove small differences that may be noise.
[0038] For each color pixel difference in the first difference image, if the difference is less than a set color threshold, the difference is considered insignificant and can be ignored. Only color pixel differences greater than or equal to the color threshold are retained, and the pixel locations with these larger color pixel differences are extracted as part of the significant difference region. By eliminating small difference values, some noise and unimportant details are removed, making the processed image more focused on those significantly changing difference regions. This enhances the detection of significant difference regions and improves the accuracy and efficiency of subsequent operations.
[0039] Similarly, for each grayscale pixel difference in the second difference image, if the difference is less than a set grayscale threshold, the difference is considered insignificant and can be ignored. Only grayscale pixel differences greater than or equal to the grayscale threshold are retained, and the pixel locations with these larger grayscale differences are extracted as part of the significant difference region. By eliminating small difference values, some noise and unimportant details are removed, making the processed image more focused on those significantly changing difference regions. This enhances the detection of significant difference regions and improves the accuracy and efficiency of subsequent operations. Furthermore, grayscale images can help extract structural information from the image, so comparing grayscale images can better highlight structural differences.
[0040] By using precise threshold filtering and pixel region extraction, important difference regions in corresponding difference images can be identified efficiently and accurately, improving the reliability and processing efficiency of difference detection and adapting to the difference analysis needs of images with different complexities.
[0041] After removing color pixel differences smaller than a preset color threshold from the first difference image, the pixel positions corresponding to the remaining color pixel differences may be scattered, adjacent, or exist alone. If the pixel positions corresponding to the remaining color pixel differences are continuous and form a continuous pixel region, then the pixel region composed of these remaining continuous pixel positions is extracted from the first difference image after the above removal operation.
[0042] If the remaining color pixel differences correspond to consecutive pixel positions that form multiple consecutive pixel regions—for example, some consecutive pixel positions forming one consecutive pixel region, and other consecutive pixel positions forming another consecutive pixel region—then certain rules are needed to determine which consecutive pixel regions will be the final difference regions. In this embodiment, optionally, the consecutive pixel region with the largest number of pixels corresponding to the consecutive pixel positions will be selected as the final extracted first pixel region.
[0043] Similarly, after removing grayscale pixel differences smaller than a preset grayscale threshold from the second difference image, the pixel positions corresponding to the remaining grayscale pixel differences may be scattered, adjacent, or exist alone. If the pixel positions corresponding to the remaining grayscale pixel differences are continuous and form a continuous pixel region, then the pixel region composed of these remaining continuous pixel positions is extracted from the second difference image after the above removal operation.
[0044] If the consecutive pixel positions corresponding to the remaining grayscale pixel differences form multiple consecutive pixel regions, for example, some consecutive pixel positions form one consecutive pixel region and other consecutive pixel positions form another consecutive pixel region, then the consecutive pixel region with the largest number of pixels at the corresponding consecutive pixel positions is taken as the final extracted second pixel region.
[0045] By selecting the pixel region with the highest number of corresponding pixels from multiple pixel regions as the final result, the resulting difference region is highly representative, prioritizing the most significant changes in the image. This mechanism further improves the accuracy of the difference region, especially when processing images with multiple small change regions, ensuring the priority identification of important regions.
[0046] Then, the first and second pixel regions extracted are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point. This merging method allows for a more comprehensive identification of the differences between the standard and real-time images, ensuring greater accuracy and reliability in identifying the difference region.
[0047] Step 106: Remove pixels within a preset pixel value range from the object region corresponding to the target object within the difference region. The target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the preset main color of the corresponding object.
[0048] This application embodiment detects unauthorized intrusion by distinguishing between the safety helmets or work clothes worn by staff and non-staff members, that is, by determining whether it is a staff member by identifying the characteristics of the safety helmet and / or work clothes.
[0049] Step 104 can identify inconsistencies between the real-time image and the standard image. If a target object, such as a safety helmet or work clothes, is further identified in the discrepancy area, a legality check needs to be performed on the target object. That is, it is necessary to check whether the safety helmet or work clothes appearing in the discrepancy area are standard safety helmets or work clothes worn by staff inside the premises.
[0050] In this step, it's necessary to remove the primary color of the standard safety helmet or work clothes from the object area corresponding to the target object. For example, if the target object is identified as a safety helmet, the helmet's color composition mainly includes the primary color corresponding to most areas of the helmet, and non-primary colors such as text, patterns, logos, badges, reflective strips, and chin straps. Therefore, pixels within the range of the primary color corresponding to the standard safety helmet need to be removed from the object area. In other words, pixels of the non-primary color on the helmet are retained after removal.
[0051] Similarly, if the target object is identified as work clothes, the color composition of the work clothes mainly includes the main color corresponding to most areas of the work clothes, and the non-main colors corresponding to the text, patterns, logos, badges, and buttons on the work clothes. In this case, it is necessary to remove pixels with the pixel values of the main color of the standard work clothes from the object area corresponding to the work clothes. That is, after removal, the pixels of the non-main color on the work clothes are retained.
[0052] This step identifies whether a region in the image matching the characteristics of a safety helmet / work uniform exists, based on a predefined range of pixel values. If the pixel values of the differing region fall within the corresponding range, it indicates that the image may contain an internal worker. The pixel value range corresponds to the standard range of pixel values for the main color of a safety helmet / work uniform. The main color of the safety helmet and the main color of the work uniform may be the same or different, and their corresponding pixel value ranges may also be the same or different.
[0053] In one specific embodiment, removing pixels within a preset pixel value range from the object region corresponding to the target object within the difference region includes: extracting the image region corresponding to the preset pixel value range from the difference region; extracting pixels at the edge of the target image region in the extracted image region and forming a complete image region, wherein the target image region has the largest number of corresponding pixels in the extracted image region; using the complete image region as the object region corresponding to the target object; and removing pixels within the object region corresponding to the preset pixel value range.
[0054] In this embodiment, the shape and boundary of the corresponding target object are first identified based on a preset pixel value range. After extracting the image region corresponding to the preset pixel value range from the difference region, multiple image regions may be extracted, for example, multiple safety helmets that meet the conditions may be identified.
[0055] At this point, you can select the image region with the highest number of pixels. The goal is to focus on the most representative areas with significant differences. The image region with the highest number of pixels usually means that the differences in that region are more significant, and therefore it is more meaningful as the object region.
[0056] In the image region with the largest number of pixels, extract the pixels located at the boundaries or edges of the image region, as these define the shape and boundaries of that region. Edge pixels can usually accurately depict the contours and structure of the image region, and extracting edge pixels is helpful for subsequent image analysis and processing.
[0057] Multiple extracted edge pixels are used to define the boundaries of the corresponding regions, forming a complete image region. This complete image region includes all pixels enclosed by the edge pixels, and all pixels within this complete image region belong to the difference region. Guided by the edge pixels, the complete image region is constructed, ensuring that all pixels within this region are correctly included.
[0058] Then, the complete image region described above is taken as the object region corresponding to the target object.
[0059] It is understandable that, since there are text or pattern areas with different main colors on the safety helmet or work clothes (usually contained within the image area corresponding to the main color), and the extraction of the object area where the target object is located in step 106 is only based on the pixel value range of the main color. In order to obtain a complete image of the target object, the complete image of the target object is extracted by edge pixels, that is, all pixels within the complete image area, in order to extract more feature information for recognition processing.
[0060] Within the discrepancy region, instead of blindly identifying, pixels belonging to the preset pixel value range corresponding to the safety helmet or work clothes are first extracted. This is equivalent to preliminary target screening within the candidate region. The extracted pixels may form multiple disconnected regions. The region with the most pixels is selected as the primary target. Instead of directly using the screened pixel region, the edge pixels of that region are first found, and then these edge points are used to enclose a complete, closed region. Finally, all pixels within this closed region are considered as the object region. Through region closure, even if some pixels inside the safety helmet or clothing are not correctly classified due to color or lighting, the shape of the entire object region remains complete, preserving complete information for subsequent feature extraction.
[0061] By extracting edge pixels and restoring region integrity, object regions can be reconstructed more accurately, avoiding local deviations caused by errors. In complex or dynamic image processing, it can extract effective and complete object regions more stably and reliably, adapting to image analysis needs in different application scenarios.
[0062] In one specific embodiment, before extracting the image region corresponding to the preset pixel value range from the difference region, the method further includes: obtaining a preset pixel number range that matches the depth of field of the difference region; if the number of pixels in the difference region is within the preset pixel number range, then extracting the image region corresponding to the preset pixel value range from the difference region.
[0063] Depth of field refers to the range of distances between objects in an image, from near to far. Depth of field can be acquired using a depth camera. When acquiring an image, depth information, i.e., the distance from the object to the camera, is obtained simultaneously. In this embodiment, real-time depth data of the image is recorded and associated with the target trajectory points at the corresponding locations of the inspection robot to ensure accurate spatial positioning information of the image.
[0064] Understandably, due to the principle of perspective (objects appear larger when closer and smaller when farther away) in photography, the number of pixels occupied by the same object varies at different depths of field. At close range, the number of pixels may be larger; at distant range, the number of pixels may be smaller. This embodiment requires matching the corresponding range of pixel counts based on the depth of field and the actual size range of the target object. That is, different depths of field correspond to different preset ranges of pixel counts.
[0065] By analyzing the depth of field in the difference region, the actual depth of the difference region can be confirmed, and the number of pixels in the difference region can be matched with the actual size range of the target object. If the number of pixels in the difference region exceeds or falls below a preset pixel count range associated with the depth of field, it indicates that the difference region may be abnormal. If the number of pixels in the difference region is within the preset pixel count range associated with the depth of field, the image region corresponding to the preset pixel value range of the object is first extracted from the difference region, and then the pixels at the edge of the image region with the highest number of pixels are extracted and used to form a complete image region.
[0066] By employing a depth-of-field pixel count filtering mechanism, after identifying the difference regions, the system first determines whether the total number of pixels falls within the preset pixel count range corresponding to the current foreground depth. Only difference regions of reasonable size proceed to the next step of fine-grained identification. By associating the two-dimensional pixel information with the three-dimensional spatial information in the image, interference caused by perspective effects can be effectively filtered out (such as a stain on a wall, whose pixel count does not change with inspection due to a fixed distance, thus potentially being filtered out), further improving the accuracy of detection.
[0067] Step 108: Based on the removed object region, perform compliance detection on the target object to determine whether there is any illegal intrusion at the target trajectory point.
[0068] In the initially identified object area of the safety helmet / work clothes, pixels of the main color of the safety helmet / work clothes are removed. The remaining object area consists of pixel features of non-main colors on the target object, such as logos and reflective strips on the safety helmet, and buttons, stripes, and badges on the work clothes. By analyzing these pixel features in the removed object area, the compliance of the target object can be detected.
[0069] The removed object region retains the pixel features of non-primary colors on the target object. By comparing these non-primary color pixel features with those of a standard object of the corresponding type, it can be determined whether the target object in the real-time image of the target trajectory point conforms to the characteristics of a standard safety helmet / work uniform. If the features of the removed object region do not conform to the standard safety helmet / work uniform, then the person corresponding to the target object can be identified as an unauthorized intruder.
[0070] In one specific embodiment, compliance detection of the target object is performed based on the removed object region, including: extracting a feature region composed of pixels at multiple consecutive pixel positions in the removed object region, the feature region including features on the target object; comparing the features of the feature region with preset features of the corresponding object to detect whether the target object is compliant.
[0071] Since the main color of a safety helmet or work uniform has relatively little feature information, while the text or patterns on the helmet or work uniform have more obvious feature information, by removing pixels in the range of pixel values corresponding to the main color of the object area, the feature area composed of the non-main color area can be obtained.
[0072] The non-primary color area may include multiple regions. For example, a safety helmet may include both a logo and reflective strips. If the logo's color is different from the reflective strip's color, then the pixel values corresponding to the non-primary color of the logo will differ from those corresponding to the non-primary color of the reflective strips. A subset of consecutive pixels in the removed object area constitutes the feature area corresponding to the logo, and a subset of consecutive pixels in the removed object area constitutes the feature area corresponding to the reflective strips.
[0073] By comparing the features on the target object within each feature region with the corresponding preset features of the object, the compliance of the target object can be detected. For example, when the target object is a safety helmet, the features on the feature region corresponding to the reflective strip of the safety helmet are compared with the features corresponding to the reflective strip of a standard safety helmet. If the features match, it means that the target object is a compliant standard safety helmet, the person wearing the safety helmet in the corresponding real-time image is an internal worker, and there is no illegal intrusion at the target trajectory point.
[0074] Similarly, for example, when the target object is a safety helmet, the features on the feature area corresponding to the reflective strip of the safety helmet are compared with the features corresponding to the reflective strip of a standard safety helmet. If the features match, it means that the target object is a compliant standard safety helmet, the person wearing the safety helmet in the corresponding real-time image is an internal worker, and there is no illegal intrusion at the target trajectory point.
[0075] If a safety helmet corresponds to multiple feature areas, such as the feature area corresponding to the logo and the feature area corresponding to the reflective strip, then compliance can only be determined if the features of both feature areas match the preset features corresponding to the standard safety helmet. Of course, the preset features correspond to different features for different feature areas.
[0076] In one specific embodiment, comparing the features of the feature regions with the preset features of the corresponding objects to detect whether the target object is compliant includes: if the extracted feature regions include multiple regions, calculating the description vector of the corresponding features of each feature region based on the features of text, patterns, shapes and / or colors; calculating the similarity between the description vector of the corresponding features of each feature region and the description vector of the preset features of the corresponding object; determining the number of feature regions among the multiple feature regions whose corresponding similarity is greater than a preset similarity threshold; if the number of feature regions exceeds a preset number threshold, detecting that the target object is compliant and determining that the target trajectory point does not have illegal intrusion; if the number of feature regions does not exceed the preset number threshold, detecting that the target object is non-compliant and determining that the target trajectory point has illegal intrusion.
[0077] When comparing the features of each feature region with the preset features of the corresponding object, a description vector is calculated for each feature region, including text, patterns, shapes, and / or colors. The description vector of a feature is typically a vector or numerical value generated based on information such as the shape, texture, and color of the feature region, representing the uniqueness of that feature region. For example, the feature region corresponding to the reflective strips on a safety helmet includes the features of the reflective strip's pattern, shape, and color; therefore, a description vector for the corresponding feature is generated based on these three types of feature information.
[0078] Feature description vectors are crucial for feature matching and similarity calculation. These vectors enable quantitative analysis and effective comparison of feature regions. Feature description vectors can be mathematical vectors capable of describing local texture and shape, such as Scale-invariant feature transform (SIFT), Speeded-Up Robust Features (SURF), and Oriented Brief (ORB).
[0079] Since the text, pattern, shape, and color information on safety helmets or work clothes are constant, description vectors corresponding to the text, pattern, shape, and color information can be preset for comparison.
[0080] The calculation of feature description vectors fully considers the local features of feature regions, making the description of each feature region more accurate and ensuring efficient recognition in the matching process.
[0081] The system acquires multiple preset features corresponding to text, patterns, shapes, and colors from the feature regions of a standard safety helmet or work uniform. Each preset feature has a corresponding preset feature description vector. Preset features are predefined image sample features, which can be features from template images, training images, or standard image sets. The feature description vectors of the preset features are used as a reference; their similarity is determined by comparing them with the description vectors of the corresponding features in the extracted feature regions.
[0082] The similarity between the description vector of each feature region and the description vector of the corresponding preset feature of the object is calculated. This can usually be done using methods such as Euclidean distance or cosine similarity. The number of feature regions with a similarity greater than a preset similarity threshold is also counted.
[0083] By performing multiple rounds of matching calculations between multiple feature description vectors and preset feature description vectors, the impact of errors caused by a single feature description vector can be effectively avoided, enhancing the stability of image recognition. This is especially true in diverse or complex image environments, where key image features can be identified more consistently. In summary, through precise feature region extraction, feature description vector calculation, and multi-dimensional similarity matching, not only can key information in images be extracted efficiently, but the recognition results can also be accurately matched.
[0084] If the number of feature regions counted exceeds a preset threshold, the target object is detected as compliant, and the target trajectory point is determined to be free of unauthorized intrusion. If the number of feature regions counted does not exceed the preset threshold, the target object is detected as non-compliant, and the target trajectory point is determined to be free of unauthorized intrusion. An unauthorized intrusion alert can also be sent.
[0085] The description vectors of these extracted features are compared with the description vectors of features on a pre-defined, standard safety helmet / work uniform. Only when the number of matched features exceeds a certain threshold is the target object corresponding to that feature region confirmed as a standard safety helmet or work uniform. Otherwise, it is determined to be a non-standard safety helmet or non-standard work uniform.
[0086] If both safety helmet and work clothes feature regions exist simultaneously, the similarity of the feature description vectors of the feature regions is evaluated by combining the preset similarity thresholds for the corresponding object types. This allows for accurate differentiation of the feature regions of safety helmets and work clothes, ensuring clear classification of feature regions in specific environments, effectively improving the accuracy of target object recognition, and accurately distinguishing between work clothes and safety helmet regions within areas of difference.
[0087] By using a comparison of similarity and a threshold as the criterion, this approach is flexible and highly adaptable. In different application environments, the threshold can be adjusted according to specific needs to optimize recognition accuracy. This mechanism is robust and can adapt to varying image quality, lighting changes, or background interference. By comparing similarity and directly classifying feature regions, the image analysis process is simplified, avoiding complex post-processing operations.
[0088] In this embodiment, the inspection robot collects real-time images of the inspection environment and target trajectory points corresponding to the real-time images; determines the difference region between the real-time images and the standard images of the target trajectory points, wherein there are no intruding objects in the standard images; removes pixels within a preset pixel value range from the object region corresponding to the target object within the difference region, where the target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the corresponding object's preset main color; based on the removed object region, the target object is subjected to compliance detection to determine whether there is illegal intrusion at the target trajectory point. Thus, abnormal situations in the real-time images can be accurately and promptly identified. The standard images are derived from historical images without intruding objects, providing an interference-free comparison benchmark and ensuring the accuracy and precision of image matching. When there is a difference between the real-time image and the corresponding standard image, the difference region can be accurately extracted. By analyzing the non-main color pixels of the objects within the difference region, normal environmental changes and illegal intrusion behaviors can be distinguished more meticulously and accurately, ensuring high accuracy in the identification process, reducing false alarms and missed alarms, thereby significantly improving inspection efficiency and safety, and reducing the workload and risks of manual inspection.
[0089] Optionally, such as Figure 2 As shown in the figure, this application embodiment also provides an intelligent inspection device 1000, applied to an inspection robot. The intelligent inspection device 1000 includes: The acquisition module 1200 is used to acquire real-time images of the inspection environment and the target trajectory points corresponding to the real-time images; The determining module 1400 is used to determine the difference region between the real-time image and the standard image of the target trajectory point, wherein there are no intrusive objects in the standard image; The elimination module 1600 is used to eliminate pixels within a preset pixel value range from the object region corresponding to the target object in the difference region. The target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the preset main color of the corresponding object. The detection module 1800 is used to perform compliance detection on the target object based on the removed object region to determine whether there is any illegal intrusion at the target trajectory point.
[0090] It is understood that the modules included in the intelligent inspection device 1000 of this embodiment are capable of achieving... Figure 1 To avoid repetition, the various processes implemented in the method implementation examples will not be described again here.
[0091] Optionally, such as Figure 3 As shown in the figure, this application embodiment also provides an inspection robot 2000, including a processor 2400 and a memory 2200. The memory 2200 stores a program or instructions that can run on the processor 2400. When the program or instructions are executed by the processor 2400, they implement the various steps of the above-described intelligent inspection method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0092] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of any of the above-described intelligent inspection method embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The readable storage medium includes computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0093] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to enable a computer to execute various processes of any of the above-described intelligent inspection method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0094] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0095] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, 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 is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0096] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An intelligent inspection method, characterized in that, The method, applied to inspection robots, includes: Collect real-time images of the inspection environment and the target trajectory points corresponding to the real-time images; Determine the difference region between the real-time image and a standard image of the target trajectory point, wherein there are no intrusive objects in the standard image; From the object region corresponding to the target object within the difference region, remove pixels within a preset pixel value range. The target object includes a safety helmet or work clothes, and the preset pixel value range is the pixel value range of the preset main color of the corresponding object. Based on the removed object regions, compliance checks are performed on the target objects to determine whether there is any illegal intrusion at the target trajectory points.
2. The method according to claim 1, characterized in that, Determining the difference region between the real-time image and the standard image of the target trajectory point includes: In the color space, the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point are subtracted to obtain a first difference image including the color pixel difference. In the grayscale space, the pixel values of pixels at the same pixel position in the real-time image and the standard image of the target trajectory point are subtracted to obtain a second difference image including the grayscale pixel difference. The first difference image and the second difference image are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point.
3. The method according to claim 2, characterized in that, Merging the first difference image and the second difference image to obtain the difference region between the real-time image and the standard image of the target trajectory point includes: Remove color pixel differences in the first difference image that are less than a preset color threshold, and remove grayscale pixel differences in the second difference image that are less than a preset grayscale threshold; Extract a first pixel region composed of pixels at multiple consecutive pixel positions in the first difference image after removal, and extract a second pixel region composed of pixels at multiple consecutive pixel positions in the second difference image after removal. The target first pixel region in the first pixel region and the target second pixel region in the second pixel region are merged to obtain the difference region between the real-time image and the standard image of the target trajectory point. Among them, the target first pixel region has the largest number of pixels at the corresponding consecutive pixel positions in the extracted first pixel region, and the target second pixel region has the largest number of pixels at the corresponding consecutive pixel positions in the extracted second pixel region.
4. The method according to claim 1, characterized in that, From the object region corresponding to the target object within the difference region, remove pixels within a preset pixel value range, including: Extract the image region corresponding to the preset pixel value range from the difference region; The pixels at the edge of the target image region in the extracted image region are extracted and enclosed to form a complete image region, wherein the target image region has the largest number of corresponding pixels in the extracted image region; The complete image region is taken as the object region corresponding to the target object; Remove pixels within the object region that correspond to the preset pixel value range.
5. The method according to claim 4, characterized in that, Before extracting the image region corresponding to the preset pixel value range from the difference region, the method further includes: Obtain a preset range of pixel counts that match the depth of field of the difference region; If the number of pixels in the difference region is within the preset pixel count range, then the image region corresponding to the preset pixel count range is extracted from the difference region.
6. The method according to claim 1, characterized in that, Based on the removed object regions, compliance checks are performed on the target object, including: Extract a feature region consisting of pixels at multiple consecutive pixel positions in the object region after removal, wherein the feature region includes features on the target object; The features of the feature region are compared with the preset features of the corresponding object to detect whether the target object is compliant.
7. The method according to claim 6, characterized in that, Comparing the features of the feature region with the corresponding preset features of the object to detect whether the target object is compliant includes: If the extracted feature regions include multiple regions, then based on the features of each feature region, including text, pattern, shape and / or color, calculate the description vector of the corresponding feature of each feature region. Calculate the similarity between the description vector of the corresponding feature in each feature region and the description vector of the corresponding preset feature of the object; Determine the number of feature regions in the plurality of feature regions whose similarity is greater than a preset similarity threshold; If the number of the feature regions exceeds a preset threshold, the target object is detected as compliant and it is determined that the target trajectory point does not have any illegal intrusion. If the number of the feature regions does not exceed a preset threshold, the target object is detected as non-compliant and the target trajectory point is determined to have been illegally intruded.
8. An inspection robot, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the method as described in any one of claims 1-7.
9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-7.
10. A computer program product, characterized in that, The computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform the steps of the method as described in any one of claims 1-7.