A tool verification method and system, computer device and storage medium
By using image processing technology to automatically verify tools in tunnel maintenance, and by comparing tool images using multiple feature dimensions, the problems of error and loss in the verification of tunnel maintenance tools have been solved, achieving efficient and accurate tool management, and reducing costs and safety hazards.
Patent Information
- Application Number
- CN202210785524.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-05
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2042-07-05
AI Technical Summary
In existing technologies, the verification process for tunnel maintenance tools relies on manual operation, which can lead to errors in tool counting and loss, especially at night when visibility is limited, resulting in safety hazards. Furthermore, RFID systems are costly and not suitable for small tools.
Image processing technology is used to segment images and perform similarity comparisons using multiple feature dimensions (color, gradient direction, and contour features) to automatically verify whether the tool has taken the image outside the work area, thus avoiding subjective errors from manual verification.
It automates tool verification, ensuring high accuracy, reduces economic costs, is applicable to various tool sizes, requires no additional equipment, and improves tunnel operation safety.
Smart Images

Figure CN115294447B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of daily detection and maintenance of operating tunnels, and particularly relates to a tool verification method and system, a computer device and a storage medium. BACKGROUND
[0002] With the gradual increase of the operation time of tunnels, it is inevitable for the tunnel structure mainly made of concrete materials to have apparent defects such as water leakage or cracks and peeling. Therefore, the maintenance of the tunnel structure is a necessary means to ensure the long-term stable operation of the tunnel traffic.
[0003] At present, the daily detection and maintenance work of operating tunnels mostly cannot do without manual operation. However, the types and quantities of tools used in the actual maintenance process are large, and the manual operation is mostly carried out at night, with poor lighting conditions and limited visual range, which is extremely easy to cause the counting error and loss of the used tools. This poses a great hidden danger to the safe operation of the train, and endangers the traffic operation safety and the safety of the driver and crew. Therefore, ensuring that the operating personnel take all the maintenance tools out of the operating area is an important factor to ensure the safe operation of the train.
[0004] The inventor found in the research of the related technology that someone proposed a tool equipment management system based on RFID, which uses an RFID radio frequency module to record the entry and check the exit of tools with RFID tags, so as to ensure that all the tools are taken out. However, the RFID chip has poor anti-interference performance and short reading distance, and is also limited by the size of the tool. Many tools are too small to be equipped with any additional equipment. Moreover, the installation of the RFID management system on all the equipment requires a huge financial investment, which is too high in economic cost. SUMMARY
[0005] In view of the problems in the prior art, the present application provides a tool verification method and system, a computer device and a storage medium.
[0006] The present application is implemented as follows. A tool verification method comprises the following steps: segmenting each to-be-detected tool corresponding to-be-detected image from an image comprising all to-be-detected tools to form a to-be-detected image library; the to-be-detected tool is a tool taken out of an operating area by an operating personnel; determining the similarity between the to-be-detected image in the to-be-detected image library and the standard image in a preset standard image library in multiple feature dimensions in turn; and determining the tool not taken back from the operating area by the operating personnel from the standard image library according to the similarity comparison result of the last feature dimension.
[0007] Further, according to the similarity comparison result of the previous feature dimension, it is determined whether the similarity comparison of the next feature dimension needs to be performed, and the to-be-detected image and the standard image which need to perform the similarity comparison of the next feature dimension are determined; wherein each of the standard images corresponds to a standard tool, and all of the standard images form the standard image library; the standard tool is a tool brought into the work area by the work personnel;
[0008] The similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined in the image color feature dimension, the image gradient direction feature dimension, and the image contour feature dimension in sequence.
[0009] Further, the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined in the image color feature dimension, the image gradient feature dimension, and the image contour feature dimension in sequence, including:
[0010] In the image color feature dimension, the similarity between each to-be-detected image in the to-be-detected image library and each standard image in the standard image library is determined one by one, to obtain a plurality of first similarity values corresponding to each to-be-detected image;
[0011] It is determined whether the plurality of first similarity values corresponding to the to-be-detected image meet a first preset condition;
[0012] The first to-be-detected image corresponding to the first similarity value meeting the first preset condition is removed from the to-be-detected image library, to obtain a first to-be-detected image library; and the standard image most similar to the first to-be-detected image is removed from the standard image library, to obtain a first standard image library;
[0013] In the image gradient feature dimension, the similarity between each to-be-detected image in the first to-be-detected image library and each standard image in the first standard image library is determined one by one, to obtain a plurality of second similarity values corresponding to each to-be-detected image;
[0014] It is determined whether the plurality of second similarity values corresponding to the to-be-detected image meet a second preset condition;
[0015] The second to-be-detected image corresponding to the second similarity value meeting the second preset condition is removed from the first to-be-detected image library, to obtain a second to-be-detected image library; and the standard image most similar to the second to-be-detected image is removed from the first standard image library, to obtain a second standard image library;
[0016] In the image contour feature dimension, the similarity between each of the second to-be-detected images and each of the second standard images in the second standard image library is determined one by one, and a plurality of third similarity values corresponding to each of the to-be-detected images are obtained.
[0017] Further, the tool not taken away from the work area by the worker is determined according to the similarity comparison result in the last feature dimension, and the tool not taken away from the work area by the worker includes:
[0018] The Nth similarity value is obtained according to the similarity comparison result in the last feature dimension.
[0019] It is determined whether the Nth similarity value satisfies an Nth preset condition.
[0020] The Nth to-be-detected image corresponding to the Nth similarity value satisfying the Nth preset condition is determined.
[0021] The standard image most similar to the Nth to-be-detected image is removed from the (N-1)th standard image library to obtain an Nth standard image library; the (N-1)th standard image library is obtained by removing the most similar standard image according to the similarity comparison result in the last feature dimension.
[0022] The standard tool in the Nth standard image library is determined as the tool not taken away from the work area by the worker.
[0023] Further, the tool not taken away from the work area by the worker is determined according to the similarity comparison result in the last feature dimension, and the tool not taken away from the work area by the worker includes:
[0024] The third to-be-detected image corresponding to the third similarity value satisfying the third preset condition is determined.
[0025] The third standard image library is obtained by removing the standard image most similar to the third to-be-detected image from the second standard image library.
[0026] The standard tool in the third standard image library is determined as the tool not taken away from the work area by the worker.
[0027] Further, the determination of whether the plurality of first similarity values corresponding to the to-be-detected image satisfy a first preset condition includes:
[0028] The largest first similarity value and the second largest first similarity value are selected from the first similarity values.
[0029] determining whether the maximum first similarity value and the second maximum first similarity value satisfy a first preset condition, the first preset condition being that the maximum first similarity value is greater than or equal to a preset first threshold value and a difference between the maximum first similarity value and the second maximum first similarity value is greater than or equal to a preset second threshold value;
[0030] after determining whether the plurality of first similarity values corresponding to the to-be-detected images satisfy the first preset condition, further comprising:
[0031] determining a first to-be-detected image corresponding to the first similarity value satisfying the first preset condition;
[0032] determining the to-be-detected tool corresponding to the first to-be-detected image as a standard tool brought into the work area by the work personnel.
[0033] before segmenting the to-be-detected image corresponding to each to-be-detected tool from the image including all to-be-detected tools, further comprising:
[0034] determining whether each to-be-detected tool is respectively placed in a rectangular separation region of a preset background plane;
[0035] if yes, taking a panoramic photo of all to-be-detected tools located on the preset background plane to obtain an image including all to-be-detected tools;
[0036] the segmenting the to-be-detected image corresponding to each to-be-detected tool from the image including all to-be-detected tools, comprising:
[0037] segmenting a first image including only the preset background plane and the to-be-detected tools from the image including all to-be-detected tools;
[0038] segmenting the first image into a plurality of second images respectively including only one to-be-detected tool and a corresponding rectangular separation region background;
[0039] performing target segmentation on each second image to obtain a plurality of third images respectively including only the to-be-detected tool;
[0040] rotating the to-be-detected tool in the third image to a target direction to obtain the to-be-detected image corresponding to the to-be-detected tool;
[0041] before determining whether each to-be-detected tool is respectively placed in a rectangular separation region of a preset background plane, further comprising:
[0042] in a case where it is determined that each standard tool is respectively placed in the rectangular separation region of the preset background plane, taking a panoramic photo of all standard tools located on the preset background plane to obtain a standard image;
[0043] segmenting each standard tool corresponding image from the standard image to obtain a plurality of standard images;
[0044] after shooting a panoramic photo for all tools to be detected on the preset background page, further comprising:
[0045] determining the first number of tools to be detected contained in the image, and obtaining the second number of standard tools contained in the standard image obtained in advance;
[0046] if the first number is less than the second number, it is determined that the tools taken back from the work area by the work personnel are missing;
[0047] if the first number is equal to the second number, the step of sequentially determining the similarity between the images to be detected in the image library and the standard images in the preset standard image library in multiple feature dimensions is performed.
[0048] Another object of the present application is to provide a computer device comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to make the processor execute the steps of the tool verification method.
[0049] Another object of the present application is to provide a computer readable storage medium storing a computer program, the computer program being executed by a processor to make the processor execute the steps of the tool verification method.
[0050] Another object of the present application is to provide a tool verification system for implementing the tool verification method, characterized in that the tool verification system comprises:
[0051] a segmentation module for segmenting each image to be detected corresponding to each tool to be detected from the image comprising all tools to be detected to form an image library to be detected; the tool to be detected is the tool taken out of the work area by the work personnel;
[0052] a similarity determination module for sequentially determining the similarity between the images to be detected in the image library to be detected and the standard images in the preset standard image library in multiple feature dimensions; wherein, according to the similarity comparison result of the last feature dimension, it is determined whether the similarity comparison of the next feature dimension is needed, and the images to be detected and the standard images which need to perform the similarity comparison of the next feature dimension are determined; wherein, each standard image corresponds to a standard tool, and all standard images form the standard image library; the standard tool is the tool taken into the work area by the work personnel;
[0053] The tool verification module is configured to determine the tool not taken back from the work area by the worker from the standard image library according to the similarity comparison result of the last feature dimension.
[0054] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the application are analyzed from the following aspects:
[0055] First, in view of the technical problems existing in the prior art and the difficulty in solving the problems, the technical solutions to be protected by the application and the results and data in the research and development process are combined closely, and the technical problems solved by the technical solutions are analyzed in detail and profoundly, and some creative technical effects brought about after the problems are solved. The specific description is as follows: in the embodiment of the application, each image to be detected corresponding to a tool to be detected is segmented from an image including all the tools to be detected to form an image library to be detected; the tool to be detected is a tool taken out of a work area by a worker; the similarity between the images to be detected in the image library to be detected and the standard images in a preset standard image library is determined in a plurality of feature dimensions in turn; wherein, according to the similarity comparison result of the last feature dimension, it is determined whether the similarity comparison of the next feature dimension needs to be performed, and the images to be detected and the standard images that need to be compared in the next feature dimension are determined; wherein, each standard image corresponds to a standard tool, and all the standard images form the standard image library; the standard tool is a tool taken into the work area by the worker; according to the similarity comparison result of the last feature dimension, the tool not taken back from the work area by the worker is determined from the standard image library. In the above method, the similarity between the images to be detected and the standard images is compared, and the tool not taken back from the work area by the worker is determined according to the similarity comparison result. No matter what the size of the tool is, the image similarity comparison algorithm can be used for verification, and no additional equipment needs to be installed for the tool, so the economic cost is relatively low.
[0056] Second, the technical solutions are regarded as a whole or from the perspective of the product, the technical effects and advantages of the technical solutions to be protected by the application are described in detail as follows:
[0057] The application can audit the quantity and integrity of the articles when leaving the site, avoiding accidents caused by the workers forgetting tools on site. Through the image comparison algorithm, manual auditing can be completely replaced, achieving fast auditing speed, high recognition accuracy, and reducing potential risks caused by personnel subjective factors. It can also be applied to realize the article verification of images collected under invisible light or specific wave bands in combination with different image acquisition devices.
[0058] Third, as the auxiliary evidence for the creativity of the claims of the application, it is also embodied in the following important aspects:
[0059] (1) The expected income and commercial value of the technical solution of the present application after transformation are: it can be applied in construction site management on a large scale,
[0060] (2) The technical solution of the present application fills the technical gap in the industry at home and abroad: it fills the technical gap in the field of construction site management and the like, and the clearing and checking of goods.
[0061] (3) Whether the technical solution of the present application solves the technical problems that people have been eager to solve but have failed to succeed: it solves the risk of relying on manual checking in construction site management, which is greatly affected by subjective factors, and provides a complete technical solution and device to effectively solve the problem of clearing and checking goods. BRIEF DESCRIPTION OF DRAWINGS
[0062] Figure 1 a first tool checking method provided for the embodiment of the present application;
[0063] Figure 2 an image diagram including all tools to be detected provided for the embodiment of the present application;
[0064] Figure 3 a first image diagram provided for the embodiment of the present application;
[0065] Figure 4 a second image diagram provided for the embodiment of the present application;
[0066] Figure 5 a third image diagram provided for the embodiment of the present application;
[0067] Figure 6 a to-be-detected image diagram provided for the embodiment of the present application;
[0068] Figure 7 a second tool checking method provided for the embodiment of the present application;
[0069] Figure 8 a structural block diagram of a tool checking system provided for the embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application clearer and more apparent, the present application will be further described in detail below in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0071] I. Explanation of Embodiments. In order to enable those skilled in the art to fully understand how the present application is specifically implemented, this part is an explanation of the embodiments of the technical solution of the claims.
[0072] As Figure 1 shown, a schematic diagram of a first tool verification method provided by an embodiment of the present application is shown. Referring to Figure 1 , the method comprises the following steps:
[0073] 101. segmenting each corresponding to-be-detected image of each to-be-detected tool from an image including all to-be-detected tools to form a to-be-detected image library; the to-be-detected tool is a tool taken out of a work area by a work personnel.
[0074] In an embodiment of the present application, the work area is an area where a work personnel performs work such as construction, inspection, and maintenance. For example, the work area can be a site where a house construction project or a municipal project is under construction or work, and the work personnel is a construction worker who uses a construction tool to perform construction; the work area can also be a tunnel facility area that has been put into operation, and the work personnel is a worker who uses a maintenance tool or a detection tool to perform inspection.
[0075] The purpose of the embodiment of the present application is to verify whether the tool taken out of the work area by the work personnel after work is completed is the same as the tool taken into the work area before, so the tool taken out of the work area can be referred to as a to-be-detected tool, and the tool taken into the work area before can be referred to as a standard tool. By comparing the similarity of the to-be-detected tool and the standard tool, it can be determined whether the to-be-detected tool is the standard tool, and it can be determined which tools are lost.
[0076] Specifically, before the work personnel enters the work area, images of all tools carried by the work personnel can be collected to obtain standard images, and when the work personnel returns from the work area after completing work, images of all tools taken out of the work area by the work personnel are also collected to obtain to-be-detected images.
[0077] When collecting the standard images, the standard tools can be placed one by one on a preset background panel, and then an image including all the standard tools is photographed. When collecting the to-be-detected images, the same method is used to obtain an image including all the to-be-detected tools.
[0078] An image segmentation method is used to segment each to-be-detected tool from an image including all to-be-detected tools to obtain a plurality of to-be-detected images, and the plurality of to-be-detected images form a to-be-detected image library.
[0079] Specifically, the step of segmenting each corresponding to-be-detected image of each to-be-detected tool from an image including all to-be-detected tools comprises the following steps A1-A4:
[0080] A1. segmenting a first image including only the preset background panel and the to-be-detected tool from an image including all to-be-detected tools;
[0081] A2, segmenting the first image into a plurality of second images each including only one tool to be detected and a corresponding rectangular background area;
[0082] A3, performing target segmentation on each of the second images to obtain a plurality of third images each including only one tool to be detected;
[0083] A4, rotating the tool to be detected in the third image to a target direction to obtain a corresponding detection image of the tool to be detected.
[0084] In steps A1-A4, each tool to be detected is segmented from an image including all tools to be detected, and all backgrounds are removed, and the tools to be detected are rotated to a target direction, so as to obtain a plurality of detection images each including only one tool to be detected and all facing the same direction.
[0085] Figure 2 An image including all tools to be detected is provided for an embodiment of the present application. Figure 2 In the image, the preset background plane shown by reference numeral 1 is a white plane, and 11 tools to be detected are respectively placed in 11 rectangular background areas of the preset background plane. Figure 2 In the image, the 11 tools to be detected are target objects, the preset background plane is a background, and the periphery of the preset background plane is an environmental image when the image is taken, which is a noise area. Figure 2 The noise area is shown by reference numeral 2 in the image.
[0086] A first image including only the preset background plane and the tools to be detected is segmented from an image including all tools to be detected, that is, the noise area is removed from the image. Specifically, a threshold T can be set, and the noise area is removed by using a threshold segmentation method; or the noise area is removed by using an edge detection method.
[0087] Figure 3 A first image is provided for an embodiment of the present application. Figure 3 In the image, the noise area 2 is identified and the color is set to black, so as to obtain the first image including only the preset background plane and the tools to be detected.
[0088] The first image is segmented according to the boundary lines of the rectangular background areas, so as to obtain a plurality of second images each including only one tool to be detected and a corresponding rectangular background area.
[0089] Figure 4 A second image is provided for an embodiment of the present application. Figure 4 In the image, 8 second images corresponding to 8 tools to be detected are shown. Each second image includes only one tool to be detected and a corresponding background area.
[0090] Target recognition is performed on the tools to be detected in the second image to obtain a third image including only the tools to be detected. The target recognition method can be threshold segmentation, edge detection, etc.
[0091] Figure 5 A third image schematic diagram is provided for the embodiment of the present application. In the third image, the tools to be detected are identified from the background region, and the background region is set to black. Figure 5
[0092] The tools to be detected can present different postures and directions when placed by the workers. The tools to be detected in the third image can be uniformly adjusted to a target direction so that the placing direction of the tools to be detected is consistent with the direction of the standard tools in the standard image, thereby facilitating subsequent similarity comparison.
[0093] The target direction can be a horizontal direction, a vertical direction, etc., and can be determined according to requirements.
[0094] Figure 6 A to-be-detected image schematic diagram is provided for the embodiment of the present application. The tools to be detected in the plurality of third images are rotated to a horizontal direction to obtain a plurality of to-be-detected images in the third image. Figure 6
[0095] In steps A1-A4, the tools to be detected are segmented from the image one by one and rotated to a target direction to obtain to-be-detected images, which facilitates subsequent similarity comparison of each to-be-detected image and improves the efficiency of similarity comparison.
[0096] In addition, after the standard image is obtained, an image segmentation method can also be used to segment each standard tool from an image including all standard tools to obtain a plurality of standard images, and the plurality of standard images form a standard image library.
[0097] The method for obtaining the standard image can also refer to steps A1-A4, and the standard tools in the final standard image also need to be adjusted to the target direction so that the placing direction of the tools to be detected is consistent with the direction of the standard tools in the standard image, thereby facilitating subsequent similarity comparison.
[0098] 102. Determine the similarity between the to-be-detected images in the to-be-detected image library and the standard images in the preset standard image library in a plurality of feature dimensions in sequence; wherein, according to the similarity comparison result of the last feature dimension, it is determined whether similarity comparison of the next feature dimension is needed, and the to-be-detected images and the standard images that need to be compared in the next feature dimension are determined; wherein, each standard image corresponds to a standard tool, and all standard images form a standard image library; the standard tool is a tool brought into the work area by the worker.
[0099] In the embodiments of the present application, all the to-be-detected images and all the standard images are compared in similarity in a plurality of feature dimensions. And according to the comparison result in each feature dimension, it is determined whether the comparison in the next feature dimension is needed, and which to-be-detected images and standard images need to be compared in the next feature dimension.
[0100] The feature dimension refers to a feature item used to describe an object. For example, the feature dimensions of the to-be-detected images and the standard images can include color features, gradient features, contour features, light and dark features, etc. of the images.
[0101] First, the to-be-detected images in the to-be-detected image library and the standard images in the standard image library are compared in similarity in a first feature dimension. Specifically, a first to-be-detected image is taken out from the to-be-detected image library, and compared in similarity with each standard image in the standard image library, to obtain a plurality of first similarity values. Then, a second to-be-detected image is taken out from the to-be-detected image library, and compared in similarity with the standard images in the first feature dimension respectively, to obtain a plurality of first similarity values. This process is repeated until all the to-be-detected images and the standard images are compared in the first feature dimension, then the comparison is stopped. From all the obtained first similarity values, a target first similarity value satisfying a first preset condition is selected, and the to-be-detected image and the standard image corresponding to the target first similarity value are determined as the images corresponding to the same tool, and the to-be-detected image and the standard image corresponding to the target first similarity value are removed from the to-be-detected image library and the standard image library respectively.
[0102] Then, the remaining to-be-detected images and the standard images are compared in similarity in a second feature dimension respectively, to obtain a plurality of second similarity values. From all the obtained second similarity values, a target second similarity value satisfying a second preset condition is selected, and the to-be-detected image and the standard image corresponding to the target second similarity value are determined as the images corresponding to the same tool, and the to-be-detected image and the standard image corresponding to the target second similarity value are removed from the to-be-detected image library and the standard image library respectively.
[0103] The comparison in similarity in the next feature dimension is continued until there is no remaining image in the to-be-detected image library or the standard image library.
[0104] Optionally, step 102 comprises:
[0105] The similarity between the to-be-detected images in the to-be-detected image library and the standard images in the preset standard image library is determined in sequence in the image color feature dimension, the image gradient direction feature dimension, and the image contour feature dimension.
[0106] In the embodiment of the present application, the image color feature dimension, specifically, the similarity comparison using the image color histogram, the image gradient feature dimension (Histogram of Oriented Gradient, HOG), specifically, the similarity comparison using the gradient direction histogram, and the image contour feature dimension, specifically, the similarity comparison using the largest contour in the image.
[0107] When the worker is working, the tool used by the worker can be stained with oil, so that the color of the tool changes; for some flexible tools, the shape can also change.
[0108] The image color feature can be described by the image color histogram. The image color histogram represents the number feature of the color in the image, and can reflect the statistical distribution and basic tone of the image color. The histogram only contains the frequency of a certain color value in the image. The image color histogram is not affected by the rotation and translation changes of the tool, and can exclude the influence of the shape change of the tool on the verification tool. However, the color histogram only describes the statistical characteristics of the image color, and cannot represent the spatial distribution characteristics of the color. Therefore, the image gradient direction feature is selected as the second feature dimension. The gradient direction feature of the image can reflect the spatial distribution characteristics of different colors of pixels.
[0109] The image gradient direction feature can be described by the direction gradient histogram (Histogram of Oriented Gradient, HOG). The direction gradient histogram is a feature descriptor used for object detection in computer vision and image processing. It constructs the feature by calculating and counting the gradient direction histogram of the local region of the image.
[0110] After the similarity comparison in the image color feature and the image gradient direction feature dimensions, the images similar in color and gradient direction can be detected. However, for the tool with changed color in use, it is still difficult to detect. Therefore, the third feature dimension adopts the image contour feature dimension.
[0111] The image contour refers to the boundary or outline of the shape of the image. The image contour feature can be described by converting the image into a binary image and identifying the largest contour from the binary image. By performing the similarity comparison in the image contour feature dimension, the tool with changed color but unchanged external contour can be detected. For example, the tool stained with oil in use can be detected.
[0112] The embodiment of the present application can detect the tools with changed shape and the tools with changed color in use by determining the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library in the image color feature dimension, the image gradient direction feature dimension and the image contour feature dimension, and the detection applicability and accuracy are higher.
[0113] Optionally, the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined in the image color feature dimension, and includes the following steps d-f:
[0114] d. The to-be-detected image and the standard image are respectively converted from the RGB color space to the HSV color space.
[0115] e. The pixel values of the H channel and the S channel of the to-be-detected image and the standard image in the HSV color space are taken respectively, the histograms of the H channel and the S channel are established according to the taken pixel values of the H channel and the S channel, and the histograms are normalized to obtain a to-be-detected histogram and a standard histogram.
[0116] f. The similarity between the to-be-detected histogram and the standard histogram is calculated by using the Bhattacharyya distance method.
[0117] Optionally, the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined in the image gradient direction feature dimension, and includes the following steps g-l:
[0118] g. The gradient size and the gradient direction of each pixel point in the to-be-detected image and the standard image are calculated respectively.
[0119] h. The to-be-detected image and the standard image are respectively divided into multiple connected regions.
[0120] i. The gradient histogram of each connected region is counted according to the gradient size and the gradient direction, and the number of pixels in different gradient ranges in the connected region is calculated according to the gradient histogram.
[0121] j. All the connected regions are grouped into multiple blocks, the number of pixels in the different gradient ranges in each block is calculated to obtain the gradient direction feature of each block.
[0122] k. The gradient direction features of each block in the to-be-detected image and the standard image are concatenated respectively to obtain the gradient direction features of the to-be-detected image and the standard image.
[0123] l. The similarity between the gradient direction feature of the to-be-detected image and the gradient direction feature of the standard image is calculated.
[0124] Optionally, in the image contour feature dimension, the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined, including the following steps m-o:
[0125] m, respectively acquiring binary images of the to-be-detected image and the standard image, and respectively determining the maximum contour in the to-be-detected image and the standard image by using the binary images;
[0126] n, respectively calculating Hu (Visual pattern recognition by moment invariants) invariant moment parameters corresponding to the maximum contour of the to-be-detected image and the maximum contour of the standard image;
[0127] o, calculating the similarity between the maximum contour of the to-be-detected image and the maximum contour of the standard image by using the Hu invariant moment parameters.
[0128] 103. According to the similarity comparison result of the last feature dimension, the tool that the worker does not take back from the work area is determined from the standard image library.
[0129] By similarity comparison in the last feature dimension, the to-be-detected image and the standard image that satisfy the condition are removed from the to-be-detected image library and the standard image library, and the remaining to-be-detected image and the standard image are obtained. The remaining to-be-detected image is an image with low similarity to each standard image, and it can be determined that the to-be-detected tool corresponding to the remaining to-be-detected image is a tool that the worker does not carry when entering the work area; and the remaining standard image is a tool that the worker carries when entering the work area, but the worker does not take out of the work area, that is, a tool forgotten in the work area.
[0130] In this way, by the method of the embodiment of the application, the tool forgotten by the worker in the work area can be detected.
[0131] Optionally, step 103 includes the following steps B1-B5:
[0132] B1, obtaining a plurality of Nth similarity values according to the similarity comparison result in the last feature dimension;
[0133] B2, determining whether the Nth similarity value satisfies an Nth preset condition;
[0134] B3, determining an Nth to-be-detected image corresponding to the Nth similarity value that satisfies the Nth preset condition;
[0135] B4, removing the standard image most similar to the Nth to-be-detected image from the (N-1)th standard image library to obtain an Nth standard image library; the (N-1)th standard image library is obtained by removing the most similar standard image according to the similarity comparison result of the previous feature dimension;
[0136] B5, determining the standard tool in the Nth standard image library as the tool not taken back from the work area by the worker.
[0137] In steps B1-B5, similarity comparison is performed on the to-be-detected image and the standard image in the last feature dimension to obtain a plurality of Nth similarity values. The Nth similarity value satisfying the Nth preset condition is determined, and then the to-be-detected image and the standard image corresponding to the Nth similarity value satisfying the Nth preset condition are determined. The corresponding standard image is removed from the standard image library to obtain an Nth standard image library. In this way, the standard image in the Nth standard image library is a standard image that cannot be paired with any to-be-detected image, indicating that the standard tool corresponding to the standard image is not taken back from the work area by the worker.
[0138] In summary, in the embodiment of the present application, each to-be-detected image corresponding to each to-be-detected tool is segmented from the image including all to-be-detected tools to form a to-be-detected image library; the to-be-detected tool is a tool taken out of the work area by the worker; similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library is determined in a plurality of feature dimensions in turn; wherein, whether similarity comparison in the next feature dimension needs to be performed is determined according to the similarity comparison result of the previous feature dimension, and the to-be-detected image and the standard image that need to perform similarity comparison in the next feature dimension are determined; each standard image corresponds to a standard tool, and all standard images form the standard image library; the standard tool is a tool taken into the work area by the worker; according to the similarity comparison result of the last feature dimension, the tool not taken back from the work area by the worker is determined from the standard image library. In the above method, similarity comparison is performed on the to-be-detected image and the standard image, the tool not taken back from the work area by the worker is determined according to the similarity comparison result, the image similarity comparison algorithm can be used to verify the tool regardless of the size of the tool, and no additional equipment needs to be installed for the tool, so the economic cost is low.
[0139] In addition, the embodiment of the present application compares the similarity in multiple feature dimensions, and determines whether the similarity comparison in the next feature dimension is needed according to the similarity comparison result in the previous feature dimension, and determines the to-be-detected image and the standard image which need to be compared in the next feature dimension. In this way, the standard image with high similarity to the to-be-detected image can be found gradually from different feature dimensions. Because the comparison is performed in different feature dimensions, and the tool not taken back by the worker from the work area is determined according to the similarity comparison result in the last feature dimension, the accuracy of the finally determined verification result is high,
[0140] In addition, the embodiment of the present application compares the similarity in multiple feature dimensions, and determines whether the similarity comparison in the next feature dimension is needed according to the similarity comparison result in the previous feature dimension, and determines the to-be-detected image and the standard image which need to be compared in the next feature dimension. In this way, the standard image with high similarity to the to-be-detected image can be found gradually from different feature dimensions. Because the comparison is performed in different feature dimensions, and the tool not taken back by the worker from the work area is determined according to the similarity comparison result in the last feature dimension, the accuracy of the finally determined verification result is high,
[0141] As shown in Figure 7 , it is a schematic diagram of a second tool verification method provided by the embodiment of the present application. Referring to Figure 7 , the method comprises the following steps:
[0142] 201. In the case where each of the standard tools is respectively placed in the rectangular partition area of the preset background plane, a panoramic photo is taken for all the standard tools located on the preset background plane to obtain a standard image.
[0143] The worker places the tools carried by the worker in the rectangular partition area of the preset background plane before entering the work area.
[0144] The preset background plane is a background plate for placing tools. In order to facilitate the placement and subsequent image segmentation, the preset background plane can be set as a pure color (such as white) which is different from the color of the tools, and the rectangular partition area can be set to separate different tools.
[0145] The tools carried by the worker before entering the work area are called standard tools. The tool verification system takes a panoramic photo for all the standard tools located on the preset background plane in the case where each of the standard tools is respectively placed in the rectangular partition area of the preset background plane to obtain a standard image including all the standard tools.
[0146] 202. The image corresponding to each of the standard tools is segmented from the standard image to obtain a plurality of standard images.
[0147] The image corresponding to each of the standard tools is segmented according to the rectangular partition area to obtain a plurality of standard images.
[0148] 203. Determine whether each tool to be detected is respectively placed in the rectangular separated area of the preset background plane.
[0149] In the embodiment of the present application, when the worker finishes the work and takes the tools to be detected out of the work area, the worker places the tools to be detected on the preset background plane. The tool verification system determines whether each tool to be detected is respectively placed in the rectangular separated area of the preset background plane. When the determination result is "yes", step 204 is executed. When the determination result is "no", step 203 is continuously executed.
[0150] 204. If yes, a panoramic photo of all the tools to be detected on the preset background plane is taken to obtain an image including all the tools to be detected.
[0151] The panoramic photo is a photo including the preset background plane and all the tools to be detected. The photo can also include environmental noise outside the preset background plane.
[0152] Optionally, after step 204, the method further includes:
[0153] Determining a first number of tools to be detected included in the image, and obtaining a second number of standard tools included in the standard image obtained in advance. If the first number is less than the second number, it is determined that the worker has missed some tools from the work area.
[0154] In the embodiment of the present application, after the image of the tools to be detected is obtained, the number of tools to be detected included in the image is identified, and the number of standard tools included in the standard image is identified, to obtain the first number and the second number respectively.
[0155] The first number and the second number are compared. If the first number is less than the second number, it is indicated that the number of tools to be detected is less than the number of standard tools, and it is indicated that the worker has missed some tools from the work area. At this time, the step of sequentially determining the similarity between the tool image in the tool image library and the standard image in the preset standard image library in multiple feature dimensions can be executed to determine what the missed tools are.
[0156] If the first number is equal to the second number, it is indicated that the number of tools taken out of the work area by the worker is correct, but it cannot be determined whether the tools taken out are completely consistent with the tools taken in. Therefore, the step of sequentially determining the similarity between the tool image in the tool image library and the standard image in the preset standard image library in multiple feature dimensions can still be executed to determine whether the tools taken out are completely consistent with the tools taken in.
[0157] 205. segmenting each tool image corresponding to each tool to be detected from images including all tools to be detected to form a tool image library; the tool to be detected is a tool taken by an operator into a work area.
[0158] In the embodiment of the present application, step 205 can refer to step 101, which will not be described here again.
[0159] 206. determining the similarity between each tool image in the tool image library and each standard image in the standard image library in the image color feature dimension, to obtain a plurality of first similarity values corresponding to each tool image.
[0160] The tool image in the tool image library and the standard image in the standard image library are compared in the image color feature dimension. Specifically, one tool image is taken from the tool image library, and the similarity between the tool image and each standard image in the standard image library is compared to obtain a plurality of first similarity values.
[0161] 207. determining whether the plurality of first similarity values corresponding to the tool image satisfy a first preset condition.
[0162] The plurality of first similarity values are the similarity values between the tool image and each standard image. The first preset condition is preset.
[0163] Optionally, step 207 includes steps C1-C2:
[0164] C1. selecting the largest first similarity value and the second largest first similarity value from the first similarity values;
[0165] C2. determining whether the largest first similarity value and the second largest first similarity value satisfy a first preset condition, the first preset condition being that the largest first similarity value is greater than or equal to a preset first threshold value, and the difference between the largest first similarity value and the second largest first similarity value is greater than or equal to a preset second threshold value.
[0166] In steps C1-C2, the two largest similarity values, i.e., the largest first similarity value and the second largest first similarity value, are selected from the first similarity values, and then it is determined whether the largest first similarity value is greater than or equal to a preset first threshold value. If yes, it is determined whether the difference between the largest first similarity value and the second largest first similarity value is greater than or equal to a preset second threshold value. If yes, it is determined that the first similarity value satisfies the preset first condition.
[0167] The first threshold value should be set as a relatively high similarity value, and the second threshold value should be set as a relatively large difference value. If one of the two conditions is not met, it is determined that the first similarity value does not meet the first preset condition.
[0168] In the first preset condition, first, the largest first similarity value needs to be greater than or equal to the first threshold value, which ensures that the largest similarity value must be a relatively high value. Second, the difference between the largest first similarity value and the second largest first similarity value needs to be greater than or equal to the second preset threshold value, which ensures that the largest first similarity value is much larger than the second largest first similarity value, that is, there is a standard image that is highly similar to the to-be-detected image, and the to-be-detected image is very dissimilar to other standard images. In this way, it can be determined with high confidence that the to-be-detected tool in the to-be-detected image is the standard tool in the standard image. In this way, the accuracy of the verification is effectively improved.
[0169] Optionally, after step 207, the following steps D1-D2 are further included:
[0170] D1, determining a first to-be-detected image corresponding to the first similarity value that meets the first preset condition;
[0171] D2, determining the to-be-detected tool corresponding to the first to-be-detected image as the standard tool brought into the work area by the work personnel.
[0172] In steps D1-D2, if the first similarity value of the to-be-detected image meets the first preset condition, it means that the to-be-detected image is highly similar to a certain standard tool. Therefore, it can be determined that the to-be-detected image is the standard tool.
[0173] 208. Remove the first to-be-detected image corresponding to the first similarity value that meets the first preset condition from the to-be-detected image library to obtain a first to-be-detected image library; and remove the standard image most similar to the first to-be-detected image from the standard image library to obtain a first standard image library.
[0174] After determining that the to-be-detected image is the standard tool, the to-be-detected image is verified and can be removed from the to-be-detected image library. The method of steps 206-208 is performed on each to-be-detected image in the to-be-detected image library, that is, each to-be-detected image corresponding to the first similarity value that meets the first preset condition is removed from the to-be-detected image library, and finally a first to-be-detected image library is obtained.
[0175] And the corresponding standard image is also removed from the standard image library, and finally a first standard image library is obtained.
[0176] For example, steps 206-208 can be simply described as follows:
[0177] a、Take one image c1 in the image library to be detected, and sequentially compare it with n images in the standard image library to obtain n first similarity values. Determine whether the first preset condition is met from the maximum and the second maximum first similarity values in the n first similarity values. If it is met, remove the image c1 from the image library to be detected; at the same time, the standard image corresponding to the maximum first similarity value is d1, and the image d1 is removed from the standard image library. At this time, there are m-1 images in the image library to be detected, and there are n-1 images in the standard image library.
[0178] b、Take another image c2 in the image library to be detected, and compare it with the images in the standard image library according to the method in a. If there is no image in the standard image library that meets the first preset condition with c2, keep c2 in the image library to be detected.
[0179] c、According to the methods in a and b, sequentially compare m images in the image library to be detected with n images in the standard image library. Finally, there are x images left in the image library to be detected, which is the first image library to be detected, and there are y images left in the standard image library, which is the first standard image library.
[0180] Each comparison of the image to be detected, that is, according to the similarity comparison result, removes the corresponding image from the image library to be detected and the standard image library, can reduce the workload of subsequent similarity comparison, and improves the operation efficiency.
[0181] 209. In the image gradient feature dimension, the similarity between each image to be detected in the first image library to be detected and each standard image in the first standard image library is determined, and a plurality of second similarity values corresponding to each image to be detected are obtained.
[0182] The similarity between the image to be detected in the first image library to be detected and the standard image in the first standard image library is compared in the image gradient feature dimension. Specifically, one image to be detected is taken from the first image library to be detected, and the similarity between it and each standard image in the first standard image library is compared to obtain a plurality of second similarity values.
[0183] 210. Determine whether the plurality of second similarity values corresponding to the image to be detected meet the second preset condition.
[0184] Because the feature dimensions are different, the values of the similarity values obtained are also different, so in the first preset condition and the second preset condition, the sizes of the first threshold and the third threshold, and the sizes of the second threshold and the fourth threshold are different.
[0185] But the method of determining whether the similarity value meets the preset condition can be the same, that is, step 210 includes the following steps:
[0186] selecting a maximum second similarity value and a second maximum second similarity value from the second similarity values; determining whether the maximum second similarity value and the second maximum second similarity value satisfy a second preset condition, the second preset condition being that the maximum second similarity value is greater than or equal to a preset third threshold value, and a difference between the maximum second similarity value and the second maximum second similarity value is greater than or equal to a preset fourth threshold value.
[0187] 211. removing a second detected image corresponding to the second similarity value satisfying the second preset condition from the first detected image library to obtain a second detected image library; and removing a standard image most similar to the second detected image from the first standard image library to obtain a second standard image library.
[0188] After it is determined that the detected image is a standard tool, the detected image is verified and can be removed from the first detected image library. The method of steps 209-211 is performed on each detected image in the first detected image library, that is, each corresponding detected image is removed from the detected image library after each time a second similarity value satisfying the second preset condition is obtained, and finally a second detected image library is obtained.
[0189] And the corresponding standard image is also removed from the standard image library, and finally a second standard image library is obtained.
[0190] For example, steps 209-211 can be simply described as follows:
[0191] The x images in the first detected image library are sequentially compared with the y images in the first standard image library in terms of image gradient feature dimension similarity. The specific process is the same as the similarity comparison process in steps a-c. Finally, p images remain in the first detected image library, and q images remain in the first standard image library, which are respectively referred to as a second detected image library and a second standard image library.
[0192] 212. In the image contour feature dimension, the similarity between each detected image in the second detected image library and each standard image in the second standard image library is determined one by one to obtain a plurality of third similarity values corresponding to each detected image.
[0193] The detected images in the second detected image library and the standard images in the second standard image library are compared in terms of image contour feature dimension similarity. Specifically, a detected image is taken from the second detected image library, and each standard image in the second standard image library is compared with the detected image to obtain a plurality of third similarity values.
[0194] 213. Determine a third to-be-detected image corresponding to a third similarity value satisfying a third preset condition.
[0195] Select the largest third similarity value and the second largest third similarity value from the third similarity values; determine whether the largest third similarity value and the second largest third similarity value satisfy a third preset condition. The third preset condition is that the largest third similarity value is greater than or equal to a preset fifth threshold value, and a difference between the largest third similarity value and the second largest third similarity value is greater than or equal to a preset sixth threshold value.
[0196] Select a to-be-detected image satisfying the third preset condition to obtain a third to-be-detected image.
[0197] 214. Remove a standard image most similar to the third to-be-detected image from the standard image library to obtain a third standard image library.
[0198] The standard image most similar to the third to-be-detected image, that is, the standard image with the largest similarity value with the third to-be-detected image. Remove the standard image from the second standard image library to obtain a third standard image library.
[0199] For example, steps 212-214 can be simply described as follows:
[0200] The p images in the second to-be-detected image library are sequentially profiled and compared with the q images in the second standard image library. The specific process is the same as the similarity comparison process in steps a-c. Finally, i images are left in the second to-be-detected image library, and j images are left in the second standard image library, which are respectively referred to as a third to-be-detected image library and a third standard image library.
[0201] 215. Determine the standard tools in the third standard image library as tools not taken out of the work area by the work personnel.
[0202] The images in the third standard image library are images with very low similarity values with any to-be-detected image after matching in three feature dimensions of image color, image gradient, and image profile. It is illustrated that the images in the third standard image library correspond to standard tools that have not been taken out of the work area by the work personnel. Therefore, the standard tools in the third standard image library are determined as tools not taken out of the work area by the work personnel.
[0203] Optionally, after step 215, if i images are left in the third to-be-detected image library and j images are left in the third standard image library, the following logical judgment can be performed:
[0204] If i=0 and j=0, the images in the to-be-detected image library and the standard image library are consistent, which illustrates that the to-be-detected tools and the standard tools are completely consistent.
[0205] If i=0 and j≠0, the image library to be detected is less than the standard image library by j images, which means that the tool to be detected is less than the standard tool by j pieces, i.e. j pieces of tools are not taken back from the work area;
[0206] If i≠0 and j=0, the image library to be detected is more than the standard image library by i images, which means that the tool to be detected is more than the standard tool by i pieces, i.e. the work personnel may take i pieces of tools from the work area in addition;
[0207] If i≠0 and j≠0, the image library to be detected is less than the standard image library by j images, which means that the tool to be detected is less than the standard tool by j pieces, i.e. j pieces of tools are not taken back from the work area.
[0208] The tool verification method in the embodiment of the application has the beneficial effects of the tool verification method in the Figure 1 In addition, the largest first similarity value and the second largest first similarity value are selected from the first similarity values; it is determined whether the largest first similarity value and the second largest first similarity value satisfy a first preset condition, the first preset condition being that the largest first similarity value is greater than or equal to a preset first threshold value, and a difference between the largest first similarity value and the second largest first similarity value is greater than or equal to a preset second threshold value. In this way, it is ensured that the largest similarity value must be a relatively high value, and the largest first similarity value is much greater than the second largest first similarity value, so that it can be determined more reliably that the tool to be detected in the image to be detected is the standard tool in the standard image. In this way, the accuracy of verification is effectively improved.
[0209] In addition, each time the image to be detected is compared, the corresponding images are taken out from the image library to be detected and the standard image library according to the similarity comparison result, which can reduce the workload of subsequent similarity comparison and improve the operation efficiency.
[0210] Figure 8 A structural block diagram of a tool verification system provided by the embodiment of the application is shown in FIG. 3. Figure 8 As shown in FIG. 3, the tool verification system 300 includes the following modules:
[0211] The segmentation module 301 is configured to segment each image corresponding to a tool to be detected from images including all tools to be detected to form an image library to be detected; the tool to be detected is a tool taken out of a work area by a work personnel.
[0212] The similarity determination module 302 is configured to determine the similarity between the to-be-detected image in the to-be-detected image library and the standard image in the preset standard image library in a plurality of feature dimensions in sequence; wherein, according to the similarity comparison result of the previous feature dimension, it is determined whether the similarity comparison of the next feature dimension is needed, and the to-be-detected image and the standard image which need to perform the similarity comparison of the next feature dimension are determined; wherein, each standard image corresponds to a standard tool, and all the standard images form the standard image library; the standard tool is the tool brought into the work area by the worker;
[0213] The tool verification module 303 is configured to determine the tool not taken back from the work area by the worker from the standard image library according to the similarity comparison result of the last feature dimension.
[0214] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0215] II. Application Examples. In order to prove the creativity and technical value of the technical solutions of the present application, this part is an application example of the technical solutions of the claims on specific products or related technologies.
[0216] The present application can be applied in the verification of tools and instruments; it can be applied to the verification of any object, as long as the nature, shape and quantity of the object remain unchanged during use. The method can also be applied to the use scenarios of object theft prevention, security check and automatic vending machine.
[0217] The present application has been successfully applied to the tool verification in the daily inspection of subway tunnels.
[0218] In the inspection work of subway tunnels, the inspection personnel usually form a work shift of 5-8 people, and need to carry 15-20 different specifications of tools. Before entering the site, the types and quantities of the tools need to be manually registered and photographed. When leaving the site, the types and quantities of the tools need to be verified again and photographed again. Usually, the verification of each tool takes a long time, and it is easy to miss.
[0219] After the application, a photo of all tools is taken before approach, which is used for keeping on one hand, and on the other hand, the tool types in the photo are identified by using the device of the application, an image library is established, and the quantity statistics are completed. When leaving, a photo of all tools is taken again, which does not require the same tool arrangement order or position as that when approaching. The tools in the photo can be identified again, and compared with the image library, the verification of tool types, quantity, integrity and the like is completed. Thus, the complexity of tool verification is reduced, the tool verification time is reduced, the risk of human error is avoided, and the subway company highly recognizes and consistently praises.
[0220] It should be noted that the embodiments of the present application can be realized by hardware, software or a combination of software and hardware. The hardware part can be realized by special logic; the software part can be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or a specially designed hardware. Those skilled in the art can understand that the above-mentioned devices and methods can be realized by computer executable instructions and / or included in processor control code, such as carrier media, such as magnetic disk, CD or DVD-ROM, programmable memory, such as read-only memory (firmware), or data carrier, such as optical or electronic signal carrier. The devices of the present application and their modules can be realized by hardware circuit, such as ultra-large scale integrated circuit or gate array, semiconductor, such as logic chip, transistor, or programmable hardware device, such as field programmable gate array, programmable logic device, or software executed by various types of processors, or a combination of the above-mentioned hardware circuit and software, such as firmware.
[0221] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any modification, equivalent replacement and improvement made by those skilled in the art within the technical range disclosed by the present application, as long as it is within the spirit and principle of the present application, should be covered within the protection scope of the present application.
Claims
1. A tool verification method, characterized by, The tool verification method includes: segmenting the image to be detected for each tool from a panoramic image containing all tools to be detected, forming an image library to be detected; the tools to be detected are those taken out of the work area by the operator; determining the similarity between the images to be detected in the image library and standard images in a preset standard image library in sequence across multiple feature dimensions; and determining, based on the similarity comparison result of the last feature dimension, tools that the operator did not take back from the work area from the standard image library. Based on the similarity comparison result of the previous feature dimension, it is determined whether a similarity comparison of the next feature dimension is needed, and the image to be detected and the standard image that need to be compared in the next feature dimension are determined; wherein, each standard image corresponds to a standard tool, and all the standard images constitute the standard image library; the standard tool is the tool brought into the work area by the operator; The step of determining the tools that the operator did not bring back from the work area based on the similarity comparison result of the last feature dimension includes: Based on the similarity comparison results in the last feature dimension, multiple Nth similarity values are obtained; Determine whether the Nth similarity value satisfies the Nth preset condition; Determine the Nth image to be detected corresponding to the Nth similarity value that satisfies the Nth preset condition; The standard image most similar to the Nth image to be detected is removed from the (N-1)th standard image library to obtain the Nth standard image library; the (N-1)th standard image library is obtained by removing the most similar standard image based on the similarity comparison result of the previous feature dimension. The standard tools in the Nth standard image library are identified as those that the operator did not bring back from the work area.
2. The tool verification method of claim 1, wherein, The step of determining the similarity between the image to be detected in the image library and the standard image in the preset standard image library in sequence across multiple feature dimensions includes: determining the similarity between the image to be detected in the image library and the standard image in the preset standard image library in sequence across the image color feature dimension, the image gradient direction feature dimension, and the image contour feature dimension.
3. The tool verification method of claim 2, wherein, The step of determining the similarity between the image to be detected in the image database and the standard image in the preset standard image database, sequentially in the dimensions of image color features, image gradient features, and image contour features, includes: In the dimension of image color features, the similarity between each image to be detected in the image library and each standard image in the standard image library is determined one by one, so as to obtain multiple first similarity values corresponding to each image to be detected; Determine whether the multiple first similarity values corresponding to the image to be detected meet the first preset condition; The first image to be detected, corresponding to the first similarity value that satisfies the first preset condition, is removed from the image library to be detected to obtain the first image library to be detected; and the standard image most similar to the first image to be detected is removed from the standard image library to obtain the first standard image library. In the dimension of image gradient features, the similarity between each image to be detected in the first image library and each standard image in the first standard image library is determined one by one, so as to obtain multiple second similarity values corresponding to each image to be detected; Determine whether the multiple second similarity values corresponding to the image to be detected meet the second preset condition; The second image to be detected, corresponding to the second similarity value that meets the second preset condition, is removed from the first image library to be detected to obtain the second image library to be detected; and the standard image most similar to the second image to be detected is removed from the first standard image library to obtain the second standard image library. In the dimension of image contour features, the similarity between each image to be detected in the second image library and each standard image in the second standard image library is determined one by one, so as to obtain multiple third similarity values corresponding to each image to be detected.
4. The tool verification method as described in claim 3, characterized in that, The step of determining the tools that the operator did not bring back from the work area based on the similarity comparison result of the last feature dimension includes: Determine the third image to be detected that corresponds to the third similarity value that satisfies the third preset condition; The standard image most similar to the third image to be detected is removed from the second standard image library to obtain the third standard image library; The standard tools in the third standard image library are identified as those that the workers did not bring back from the work area.
5. The tool verification method as described in claim 3, characterized in that, Determining whether the multiple first similarity values corresponding to the image to be detected satisfy a first preset condition includes: Select the largest first similarity value and the second largest first similarity value from the first similarity values; Determine whether the largest first similarity value and the second largest first similarity value satisfy a first preset condition. The first preset condition is that the largest first similarity value is greater than or equal to a preset first threshold, and the difference between the largest first similarity value and the second largest first similarity value is greater than or equal to a preset second threshold. After determining whether the multiple first similarity values corresponding to the image to be detected meet the first preset condition, the method further includes: Determine the first image to be detected corresponding to the first similarity value that satisfies the first preset condition; The tool to be detected corresponding to the first image to be detected is identified as the standard tool brought into the work area by the operator; Before segmenting the image corresponding to each tool from the panoramic image including all tools to be detected, the process also includes: Determine whether each tool to be tested is placed within a rectangular partitioned area of the preset background layout; If so, take a panoramic photo of all the tools to be tested located on the preset background surface to obtain a panoramic image including all the tools to be tested; The step of segmenting the image corresponding to each tool to be detected from the panoramic image including all tools to be detected includes: Segment a first image from the panoramic image containing all the tools to be detected, including only the preset background and the tools to be detected; The first image is segmented into multiple second images, each containing only one of the detected tools and a corresponding rectangular partitioned background; Each of the second images is segmented to obtain multiple third images that contain only the tool to be detected; The tool to be detected in the third image is rotated to the target direction to obtain the image to be detected corresponding to the tool to be detected; Before determining whether each tool to be tested is placed within the rectangular partitioned area of the preset background layout, the process also includes: Given that each standard tool is placed in a rectangular partitioned area of the preset background panel, a panoramic photo is taken of all the standard tools located on the preset background panel to obtain a standard image; The image corresponding to each standard tool is segmented from the standard image to obtain multiple standard images; After taking a panoramic photo of all the tools to be inspected located on the preset background surface, the process also includes: Determine a first number of tools to be detected contained in the panoramic image, and obtain a second number of standard tools contained in a pre-obtained standard image; If the first quantity is less than the second quantity, it is determined that the tools brought back by the operator from the work area were missing. If the first quantity equals the second quantity, then the step of determining the similarity between the image to be detected in the image to be detected library and the standard image in the preset standard image library is performed sequentially across multiple feature dimensions.
6. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the tool verification method according to any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the tool verification method according to any one of claims 1 to 5.
8. A tool verification system implementing the tool verification method according to any one of claims 1 to 5, characterized in that, The tool verification system includes: The segmentation module is used to segment the image corresponding to each tool to be detected from the panoramic image including all the tools to be detected, and form a library of images to be detected; the tools to be detected are the tools that the operators take out of the work area. A similarity determination module is used to sequentially determine the similarity between an image to be detected in the image library and a standard image in a preset standard image library across multiple feature dimensions. Specifically, based on the similarity comparison result of the previous feature dimension, it determines whether a similarity comparison for the next feature dimension is needed, and identifies the image to be detected and the standard image that need to be compared for the next feature dimension. Each standard image corresponds to a standard tool, and all the standard images constitute the standard image library. The standard tool is the tool brought into the work area by the operator. The tool verification module is used to determine, based on the similarity comparison result of the last feature dimension, the tools that the operator did not bring back from the work area from the standard image library.
Citation Information
Patent Citations
Tool point inspection method and device, computer equipment and storage medium
CN111523833A
Abnormal work detection system and abnormal work detection method
JP2020102245A