Splicing method and device based on machine room cabinet grid door detection and storage medium

The YOLOv8 model is used to detect and cut the cabinet grid door, and the ORB feature detection and Graph cut algorithm are used for image splicing, which solves the problems of manual error and low efficiency in the traditional method, and achieves efficient and accurate cabinet image splicing, which is suitable for different applications. Type and size of cabinets.

CN118628349APending Publication Date: 2024-09-10SHANDONG NEW GENERATION INFORMATION IND TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410979356.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The traditional cabinet image stitching method suffers from large manual operation errors, low efficiency and insufficient accuracy. Especially when processing images containing grid doors, it is difficult to accurately identify and crop, and cannot meet the needs of large-scale computer room management.

Method used

The YOLOv8 model is used to detect and crop the cabinet grid door, and ORB feature detection, affine transformation and Graph cut algorithms are combined for image splicing to ensure the accuracy of cropping and splicing.

Benefits of technology

It improves the efficiency and accuracy of cabinet image stitching, reduces manual operation time, is suitable for cabinets of different types and sizes, and enhances the versatility of the image stitching method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_23
    Figure QLYQS_23
  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_15
    Figure QLYQS_15
Patent Text Reader

Abstract

The invention discloses a splicing method and device based on machine room cabinet grid door detection and a storage medium, and relates to the technical field of image processing, four pictures of a cabinet are taken from top to bottom, a YOLOv8 model is used for detecting a grid door in each picture and obtaining boundary information, the images are cut according to the boundary information, the cut images are spliced from top to bottom, and a splicing result is obtained. And a complete cabinet image is formed. According to the method, through the automatic detection and cutting process, the manual operation time is greatly shortened, the splicing precision is improved, the method is suitable for cabinets of different types and sizes, the applicability is high, and the method is suitable for large-scale machine room management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a splicing method, a device and a storage medium based on detection of grid doors of computer room cabinets. Background Art

[0002] In a data center or computer room, cabinet management and monitoring are important links to ensure its normal operation. Traditional cabinet image stitching methods are usually implemented manually or through simple image stitching algorithms, stacking and stitching multiple cabinet photos. However, these methods have the following disadvantages: 1. Large manual operation errors: Manual cutting and splicing are prone to errors, resulting in poor splicing effects.

[0003] 2. Inefficiency: Manual operation is time-consuming and labor-intensive and cannot meet the needs of large-scale computer room management.

[0004] 3. Insufficient precision: Traditional algorithms are prone to errors when processing image details, especially when there are grid doors in the cabinet image, which makes it more difficult to accurately identify and crop. Summary of the invention

[0005] In order to overcome the shortcomings of the above technologies, the present invention provides an image stitching method, device and storage medium based on computer room cabinet grid door detection, which detects and crops the grid door by using the YOLOv8 model to achieve efficient and accurate cabinet image stitching.

[0006] The technical solution adopted by the present invention to overcome the technical problems is: A splicing method based on detection of grid doors of computer room cabinets, comprising: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.

[0007] Furthermore, four photos of the cabinet are taken from top to bottom using a high-definition camera, and there are overlapping areas in each photo.

[0008] Preferably, the above-mentioned image detection model is a YOLOv8 model.

[0009] Furthermore, the method for cropping the image after the grid gate detection is as follows: The coordinates of the upper left corner of the grid gate of the image Coordinates to its lower right corner The line connecting the two as the diagonal of the square is in the A square grid gate boundary is established in the image, and the images on the left and right sides of the grid gate boundary are removed.

[0010] Furthermore, the four cropped images are stitched together to obtain a stitched image as follows: Use the ORB feature detection algorithm to obtain the matching feature points of the four cropped images; AffineTransform is used to transform the cropped image using the matched feature points; After the four transformed images are stitched together, the stitched image is optimized using the Graph cut algorithm.

[0011] On the other hand, the present invention also relates to a splicing device based on the detection of grid doors of machine room cabinets, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.

[0012] On the other hand, the present invention also relates to a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.

[0013] The beneficial effects of the present invention are as follows: by using the YOLOv8 model to detect the cabinet mesh door, and performing image cropping and splicing according to the detection results, the accuracy of cropping and splicing is ensured, so as to improve the efficiency and accuracy of cabinet image splicing. The automated detection and cropping process greatly reduces the manual operation time. It is applicable to cabinets of different types and sizes, and improves the versatility of the image splicing method. DETAILED DESCRIPTION

[0014] The present invention is further described below.

[0015] Example 1 A splicing method based on detection of grid doors of computer room cabinets, comprising: Get 4 images covering the doors of the cabinet. Load the pre-trained image detection model and set the model detection parameters.

[0016] Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, .

[0017] Crop the image after grid gate detection.

[0018] The four cropped images are stitched together to obtain a stitched cabinet image.

[0019] In this embodiment, a high-definition camera is used to take four photos of the cabinet from top to bottom, and there are overlapping areas in each photo.

[0020] In this embodiment, the image detection model is a YOLOv8 model.

[0021] In this embodiment, the method for cutting the image after the grid gate detection is: The coordinates of the upper left corner of the grid gate of the image Coordinates to its lower right corner The line connecting the two as the diagonal of the square is in the A square grid gate boundary is established in the image, and the images on the left and right sides of the grid gate boundary are removed.

[0022] In this embodiment, the method of stitching the four cropped images to obtain the stitched image is as follows: The ORB feature detection algorithm is used to obtain the matching feature points of the four cropped images. ORB is an efficient and powerful feature detection and description algorithm that combines the FAST keypoint detector and the BRIEF descriptor and is optimized for speed and performance.

[0023] The cropped image is transformed using the matched feature points through affine transformation AffineTransform. Affine Transform is applicable to affine transformations, including rotation, scaling, and translation.

[0024] After stitching the four transformed images, the stitched image is optimized using the Graph Cut algorithm. Graph Cut is an image segmentation and fusion algorithm based on energy minimization. It can be used to optimize the gaps in image stitching to make the transition more natural.

[0025] Example 2 A splicing device based on machine room cabinet grid door detection includes: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs.

[0026] The processor is used to execute by running the program stored in the memory.

[0027] Get 4 images covering the doors of the cabinet.

[0028] Load the pre-trained image detection model and set the model detection parameters.

[0029] Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, .

[0030] Crop the image after grid gate detection.

[0031] The four cropped images are stitched together to obtain a stitched cabinet image.

[0032] Example 3 A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements: Get 4 images covering the doors of the cabinet. Load the pre-trained image detection model and set the model detection parameters.

[0033] Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, .

[0034] Crop the image after grid gate detection.

[0035] The four cropped images are stitched together to obtain a stitched cabinet image.

[0036] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A splicing method based on machine room cabinet grid door detection, characterized in that: include: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.

2. The method for splicing computer room cabinet grid doors based on detection according to claim 1 is characterized in that: Use high-definition video equipment to take 4 photos of the cabinet from top to bottom, and there are overlapping areas in each photo.

3. The method for splicing computer room cabinet grid doors based on detection according to claim 1 is characterized in that: The image detection model is a YOLOv8 model.

4. The method for splicing computer room cabinet grid doors based on detection according to claim 1 is characterized in that: The method for cropping the image after the grid gate detection is as follows: The coordinates of the upper left corner of the grid gate of the image Coordinates to its lower right corner The line connecting the two as the diagonal of the square is in the A square grid gate boundary is established in the image, and the images on the left and right sides of the grid gate boundary are removed.

5. The method for splicing computer room cabinet grid doors based on detection according to claim 1 is characterized in that: The method of stitching the four cropped images to obtain the stitched image is as follows: Use the ORB feature detection algorithm to obtain the matching feature points of the four cropped images; AffineTransform is used to transform the cropped image using the matched feature points; After the four transformed images are stitched together, the stitched image is optimized using the Graph cut algorithm.

6. A splicing device based on machine room cabinet grid door detection, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: The memory is used to store computer programs; The processor is configured to execute, by running a program stored in the memory: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.

7. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, which, when executed by a processor, implements: Get 4 images covering the doors of the cabinet; Load the pre-trained image detection model and set the model detection parameters; Input 4 images of cabinet doors into the pre-trained image detection model to detect the grid door in each image, and obtain the boundary information of the grid door in each image. ,in For the The X-axis coordinate of the upper left corner of the grid gate of the image, is the Y-axis coordinate of the upper left corner of the grid gate of the i-th image, For the The X-axis coordinate of the lower right corner of the grid gate of the image, is the Y-axis coordinate of the lower right corner of the grid gate of the i-th image, ; Crop the image after grid gate detection; The four cropped images are stitched together to obtain a stitched cabinet image.