Display cabinet door opening angle detection method, display cabinet and storage medium

By using the first camera in the display cabinet to capture the target image, determine the position of the cabinet and cabinet door frame, and calculate the door opening angle, it solves the problem that the display cabinet cannot accurately detect the opening angle, achieves rapid detection and functional support, and improves the level of intelligence. and update speed.

CN114279367BActive Publication Date: 2024-10-11BEIJING GENKI FOREST BEVERAGE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111591615.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2024-10-11
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

Existing display cabinets cannot accurately detect the opening angle, which limits their ability to perform image collection and video collection, thereby limiting their intelligence and update speed.

Method used

The first camera captures the target image, determines the position information of the bottom of the cabinet and the bottom frame of the cabinet door, calculates the cabinet door opening angle, and achieves fast and accurate door opening angle detection.

Benefits of technology

It realizes the rapid and accurate detection of the opening angle of the display cabinet, supports other functions based on the opening angle, and improves the intelligence and update speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114279367B_ABST
    Figure CN114279367B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for detecting the door opening angle of a display cabinet, a display cabinet and a storage medium, wherein the method comprises: determining a target image captured by a first camera; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet during the period when the door of the display cabinet is open; determining position information of a bottom frame of a cabinet body of the display cabinet in the target image, and determining position information of a bottom frame of the cabinet door in the target image; and determining the door opening angle of the display cabinet in the target image based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of image processing, and in particular to a method for detecting a door opening angle of a display cabinet, a display cabinet, and a storage medium. Background Art

[0002] In recent years, display cabinets have been widely used in convenience stores and large supermarkets, such as unmanned self-service display cabinets and refrigerated display cabinets for displaying refrigerated items. In existing display cabinets, it is impossible to accurately detect the opening angle of the display cabinet, so that the display cabinet cannot be triggered to perform other functions, such as image acquisition and video acquisition. In an era of rapid development of image processing technology, the inability to perform image acquisition and video acquisition will limit the intelligence of the display cabinet, thereby limiting the update speed of the display cabinet. Summary of the invention

[0003] The disclosed embodiments at least provide a display cabinet door opening angle detection method, a display cabinet and a storage medium. The disclosed embodiments can quickly and accurately calculate the display cabinet door opening angle, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for detecting the opening angle of a display cabinet door, comprising: determining a target image captured by a first camera; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet while the door of the display cabinet is open; determining position information of a bottom frame of a cabinet body of the display cabinet in the target image, and determining position information of a bottom frame of the cabinet door in the target image; and determining the opening angle of the cabinet door of the display cabinet in the target image based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door.

[0005] In a second aspect, an embodiment of the present disclosure provides a device for detecting the door opening angle of a display cabinet, comprising: a first determination unit, for determining a target image captured by a first camera; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet while the door of the display cabinet is open; a second determination unit, for determining position information of a bottom frame of a cabinet body of the display cabinet in the target image, and determining position information of a bottom frame of the cabinet door in the target image; and a third determination unit, for determining the door opening angle of the display cabinet in the target image based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door.

[0006] In a third aspect, an embodiment of the present disclosure provides a display cabinet, comprising: a display cabinet body, a first camera, a second camera and a processor, wherein the first camera and the second camera are installed on the display cabinet body, and the lens of the first camera is facing the bottom of the display cabinet body; the first camera is configured to capture a target image toward the bottom of the display cabinet during the period when the door of the display cabinet is opened; the processor is configured to determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the door in the target image; determine the door opening angle of the display cabinet in the target image based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the door; the second camera is configured to capture the inside of the display cabinet when it is detected that the door opening angle meets the preset trigger requirement, so as to obtain an image to be processed, so as to perform image processing on the image to be processed by the processor, and determine the target analysis information of the display cabinet according to the image processing result.

[0007] In a fourth aspect, an embodiment of the present disclosure provides a display cabinet, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for detecting the door opening angle of the display cabinet described above are performed.

[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for detecting the opening angle of a display cabinet are executed.

[0009] In the disclosed embodiment, first, a target image captured by a first camera can be determined; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet while the door of the display cabinet is open; then, position information of a bottom frame of a cabinet body of the display cabinet in the target image can be determined, and position information of a bottom frame of the cabinet door in the target image can be determined; further, the door opening angle of the display cabinet in the target image can be determined based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door.

[0010] By determining the position information of the bottom frame of the cabinet in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0013] Figure 1 A flow chart of a method for detecting a door opening angle of a display cabinet provided by an embodiment of the present disclosure is shown;

[0014] Figure 2 A schematic diagram showing an effect of an optional target image provided by an embodiment of the present disclosure is shown;

[0015] Figure 3 A specific flow chart of determining a target image captured by a first camera in a method for detecting a door opening angle of a display cabinet provided in an embodiment of the present disclosure is shown;

[0016] Figure 4 A specific flow chart of a method for detecting a door opening angle of a display cabinet provided by an embodiment of the present disclosure, wherein the first method determines the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determines the position information of the bottom frame of the cabinet door in the target image;

[0017] Figure 5 A schematic diagram showing a boundary detection result and a target positioning mark in a target image provided by an embodiment of the present disclosure is shown;

[0018] Figure 6 A specific flow chart of the second method of determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determining the position information of the bottom frame of the cabinet door in the target image in a method for detecting the door opening angle of a display cabinet provided by an embodiment of the present disclosure is shown;

[0019] Figure 7 A schematic diagram showing the effect of a first target straight line in a target image provided by an embodiment of the present disclosure is shown;

[0020] Figure 8A specific flow chart of a third method of determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determining the position information of the bottom frame of the cabinet door in the target image in a method for detecting the door opening angle of a display cabinet provided by an embodiment of the present disclosure is shown;

[0021] Fig. 9 A schematic diagram showing the effects of angle 1 and angle 2 in a target image provided by an embodiment of the present disclosure is shown;

[0022] Fig.10 A schematic diagram showing the effect of the installation positions of a first camera and a second camera in a display cabinet provided by an embodiment of the present disclosure;

[0023] Fig.11 A schematic diagram showing a display cabinet door opening angle detection device provided by an embodiment of the present disclosure;

[0024] Fig.12 A schematic diagram of a display cabinet provided by an embodiment of the present disclosure is shown;

[0025] Fig.13 A schematic diagram of another display cabinet provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0027] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0028] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0029] Research has found that existing showcases cannot accurately detect the door opening angle of the showcase, and thus cannot trigger the showcase to perform other functions, such as image acquisition and video acquisition. In an era of rapid development of image processing technology, the inability to perform image acquisition and video acquisition will limit the intelligence of the showcase, thereby limiting the update speed of the showcase.

[0030] Based on the above research, the present disclosure provides a method for detecting the door opening angle of a display cabinet, a display cabinet, and a storage medium. In an embodiment of the present disclosure, first, a target image captured by a first camera can be determined; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet during the period when the cabinet door of the display cabinet is open; then, the position information of the cabinet bottom frame of the display cabinet in the target image can be determined, and the position information of the cabinet door bottom frame in the target image can be determined; further, the cabinet door opening angle of the display cabinet in the target image can be determined based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame.

[0031] By determining the position information of the bottom frame of the cabinet in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0032] In the embodiments of the present disclosure, the display cabinet can be any cabinet whose doors can be opened and closed. For example, the display cabinet can be a display cabinet that supports unmanned self-service functions. The display cabinet can also be a refrigerated cabinet for placing refrigerated items in a supermarket. In addition, the display cabinet can also be a warming cabinet, a freezer for placing frozen items, and any other cabinet whose doors can be opened and closed. The present disclosure does not specifically limit the types of display cabinets.

[0033] To facilitate understanding of the present embodiment, a method for detecting a door opening angle of a display cabinet disclosed in the embodiment of the present disclosure is first introduced in detail.

[0034] See also Figure 1FIG. 1 is a flow chart of a method for detecting a door opening angle of a display cabinet provided by an embodiment of the present disclosure, wherein the method comprises steps S101 to S105, wherein:

[0035] S101: Determine a target image captured by a first camera; wherein the target image is an image captured by the first camera toward the bottom of the showcase while the showcase door is open.

[0036] In the disclosed embodiment, the first camera may be installed on the top of the cabinet door, and the lens of the first camera is arranged toward the bottom of the showcase. When it is detected that the cabinet door of the showcase is opened, the first camera starts shooting to obtain the target image.

[0037] In specific implementation, a door magnetic switch may be installed on the door of the display cabinet. When the door of the display cabinet is opened, the door magnetic switch is triggered. At this time, the first camera may be controlled to shoot toward the bottom of the display cabinet to obtain a target image.

[0038] In an optional embodiment, the first camera may be triggered to shoot at the bottom of the display case to obtain a real-time video stream, and the target image may be determined based on the real-time video stream. In another optional embodiment, the first camera may be triggered to shoot at the bottom of the display case to obtain the target image at intervals, for example, the target image may be shot at the bottom of the display case every 0.5 seconds, and the specific time interval is not specifically limited here.

[0039] S103: Determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image.

[0040] Here, the position information of the bottom frame of the display cabinet can be the position information of the bounding box of the bottom frame of the cabinet, or the pixel coordinates of the frame endpoints of the bottom frame of the cabinet in the target image, or the pixel coordinates of each point in the bottom frame of the cabinet in the target image.

[0041] The position information of the bottom door border may be the position information of the bounding box of the bottom door border, or the pixel coordinates of the border endpoints of the bottom door border in the target image, or the pixel coordinates of each point of the bottom door border in the target image.

[0042] like Figure 2 As shown, Figure 2 The object marked by the mark 10 is the bottom frame of the display cabinet. Figure 2 The object marked by the middle mark 20 is the bottom frame of the door of the display cabinet.

[0043] S105: Determine the door opening angle of the display cabinet in the target image based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame.

[0044] In the embodiment of the present disclosure, after determining the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door, the angle between the bottom frame of the cabinet body and the bottom frame of the cabinet door can be determined based on the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door, and then the door opening angle of the display cabinet can be determined based on the angle.

[0045] Here, the first camera installed in the showcase may be a network camera. After the first camera captures the target image, the target image may be sent to the server via the Internet, so that the server executes the above-described steps S101 to S105.

[0046] In addition, a processor may be installed in the display cabinet, wherein the processor can be connected to the first camera for communication. After the first camera captures the target image, the target image may be sent to the processor so that the processor executes the above-described steps S101 to S105.

[0047] In the disclosed embodiment, first, a target image captured by a first camera can be determined; wherein the target image is an image captured by the first camera toward the bottom of the display cabinet while the door of the display cabinet is open; then, position information of a bottom frame of a cabinet body of the display cabinet in the target image can be determined, and position information of a bottom frame of the cabinet door in the target image can be determined; further, the door opening angle of the display cabinet in the target image can be determined based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door.

[0048] By determining the position information of the bottom frame of the cabinet in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0049] The above steps will be introduced below in conjunction with specific embodiments.

[0050] It can be seen from the above description that in the embodiment of the present disclosure, the target image captured by the first camera is first determined.

[0051] In an optional embodiment, if Figure 3 As shown, the above step S101: determining the target image captured by the first camera specifically includes the following steps:

[0052] Step S201: obtaining a real-time video stream captured by the first camera;

[0053] Step S202: determining a target video stream that meets a target trigger condition in the real-time video stream, wherein the target trigger condition is a condition for triggering detection of an opening angle of a door of the display cabinet;

[0054] Step S203: Determine the target image in the target video stream.

[0055] In the disclosed embodiment, the bottom of the display cabinet can be captured in real time by the first camera, thereby obtaining a real-time video stream. After obtaining the real-time video stream, it is possible to detect whether the real-time video stream meets the target trigger condition. In specific implementation, it is possible to detect whether the real-time video stream meets the condition for triggering the detection of the door opening angle of the display cabinet. If it is determined that the target trigger condition is met, a target video stream that meets the target trigger condition can be determined in the real-time video stream, and a target image can be determined in the target video stream.

[0056] In an optional implementation, the above step S202: determining a target video stream that meets a target trigger condition in the real-time video stream includes:

[0057] Step S2021: Detecting a target moment when a video picture in the real-time video stream changes;

[0058] Step S2022: Determine the video stream collected after the target time in the real-time video stream as the target video stream.

[0059] In the embodiments of the present disclosure, the moment when the video screen in the real-time video stream changes can be detected, and when the change moment is detected, it is determined that the real-time video stream meets the target trigger condition. At this time, the video stream collected after the change moment can be determined as the target video stream.

[0060] Specifically, the similarity between any adjacent video frames in the real-time video stream can be calculated, and then the video picture in the real-time video stream is determined to have changed according to the similarity. If it is determined that the similarity is less than a similarity threshold, it is determined that the video picture in the real-time video stream has changed.

[0061] In the disclosed embodiment, the target video stream may be a video stream in which the video picture in the real-time video stream is continuously changing. For example, a user takes an item from a display cabinet. First, the user opens the door of the display cabinet, takes the corresponding item from the display cabinet, and closes the door of the display cabinet. The video stream in the real-time video stream used to record the above process may be a target video stream, that is, a video stream in which the video picture in the real-time video stream is continuously changing. After the user closes the door of the display cabinet, the video picture of the real-time video stream will no longer change. At this time, the real-time video stream does not meet the target trigger condition.

[0062] In addition, the moment when the video screen in the real-time video stream changes can be detected by other methods, for example, by optical flow tracking algorithm, feature point matching algorithm, image block matching algorithm, etc., which will not be introduced one by one here.

[0063] After the target video stream is determined, the target image can be determined in the target video stream. In an optional implementation, each video frame in the target video stream can be determined as the target image, and the target image can also be determined in the target video stream at preset intervals.

[0064] In the above implementation, by determining the target video stream that meets the target trigger condition in the real-time video stream and determining the target image in the target video stream, the video stream that needs to perform cabinet door opening angle calculation can be quickly and accurately determined in the real-time video stream, thereby improving data processing efficiency.

[0065] In an optional implementation, determining the target image captured by the first camera further includes the following steps:

[0066] In the embodiment of the present disclosure, a door magnetic switch can be pre-installed in the display cabinet, wherein the door magnetic switch mainly consists of a switch and a magnet. The switch part is formed by a reed switch connected by leads and packaged; the magnet part is a magnet with a corresponding magnetic field strength packaged in a plastic or alloy shell. When the two are separated or approached to a certain distance, the switch is disconnected to sense the change in the position of the object.

[0067] After the door of the display cabinet is opened, the door magnetic switch can sense that the door of the display cabinet is opened. At this time, the first camera can be triggered to shoot the target image at a certain time toward the bottom of the display cabinet, for example, the target image can be shot at the bottom of the display cabinet every 0.5 seconds. After the door magnetic switch senses that the door of the display cabinet is closed, the first camera can be controlled to end image acquisition. At this time, the first camera can be in a dormant state, and after detecting that the door of the display cabinet is opened, it can be in a working state again.

[0068] In the disclosed embodiment, after the door magnetic switch senses that the cabinet door of the display cabinet is opened, the first camera may be triggered to start collecting the video stream, and after the door magnetic switch senses that the cabinet door of the display cabinet is closed, the collection of the video stream may be terminated. For the video stream collected by the first camera, a target image may be determined in the video stream. For example, each video frame in the video stream may be determined as the target image, and the target image may be determined in the video stream at a preset interval.

[0069] In the disclosed embodiment, after determining the target image captured by the first camera, the position information of the bottom frame of the cabinet body of the display cabinet in the target image and the position information of the bottom frame of the cabinet door in the target image can be determined.

[0070] In an optional embodiment, if Figure 4 As shown, the above step S103: determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determining the position information of the bottom frame of the cabinet door in the target image, specifically includes the following steps:

[0071] Step S401: input the target image into the target frame detection model for processing to obtain a frame detection result;

[0072] Step S402: Determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the frame detection result.

[0073] In the disclosed embodiment, after the target image is determined, the target image can be input into the target border detection model for processing, so as to obtain the border detection results of the bottom border of the cabinet body and the bottom border of the cabinet door.

[0074] Here, the frame detection result may be the bounding box of the bottom frame of the cabinet (referred to as bounding box A1), and the bounding box of the bottom frame of the door (referred to as bounding box A2). In addition, the frame detection result may also include a target angle, wherein the target angle is two straight lines passing through the target positioning mark determined based on the bounding box A1 and the bounding box A2.

[0075] For example, Figure 5 As shown, the two straight lines can be two straight lines passing through the target positioning mark determined based on the enclosing frame A1 and the enclosing frame A2. Here, the target positioning mark is the intersection position between the bottom frame of the cabinet body and the bottom frame of the cabinet door.

[0076] After the frame detection result is determined in the manner described above, the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door can be determined based on the frame detection result.

[0077] In the embodiment of the present disclosure, if the border detection result includes a bounding box of the bottom border of the cabinet body (represented as bounding box A1) and a bounding box of the bottom border of the cabinet door (represented as bounding box A2), then two straight lines passing through the target positioning mark can be determined based on the bounding box A1 and the bounding box A2, and then the door opening angle of the display cabinet can be determined according to the angle between the two straight lines.

[0078] If the frame detection result includes the bounding box of the bottom frame of the cabinet (recorded as bounding box A1), the bounding box of the bottom frame of the cabinet door (recorded as bounding box A2), and the target angle, then the target angle can be directly determined as the door opening angle of the display cabinet.

[0079] In the above implementation, by determining the position information of the bottom frame of the cabinet and the bottom frame of the door through the target frame detection model, the door opening angle of the display cabinet can be quickly detected.

[0080] In the embodiment of the present disclosure, before the target image is input into the target border detection model for processing and the border detection result is obtained, the border detection model to be trained needs to be trained. The specific training process is described as follows:

[0081] (1) obtaining a target training sample, wherein the target training sample includes a sample image and an image label, wherein the sample image is an image captured by a designated camera toward the bottom of the display cabinet, and the image label is an enclosing frame of a bottom frame of the cabinet body and an enclosing frame of a bottom frame of the cabinet door in the sample image;

[0082] (2) training the bounding box detection model to be trained based on the target training sample;

[0083] (3) When the border detection model to be trained meets the training requirements, the border detection model to be trained that meets the training requirements is determined as the target border detection model.

[0084] In a specific implementation, a large number of sample images can be obtained through the display cabinet. The sample image can be obtained by shooting the bottom of the display cabinet with a designated camera, and then the bottom frame of the cabinet door and the bottom frame of the cabinet body in the sample image can be annotated to obtain the enclosing frame of the bottom frame of the cabinet body and the enclosing frame of the bottom frame of the cabinet door, thereby forming a target training sample. In addition, the door opening angle of each display cabinet in the sample image can be annotated.

[0085] After obtaining the target training samples, the target training samples can also be split into a training set, a validation set, and a test set.

[0086] Next, data enhancement methods can be used to enrich the data set samples (i.e., training set, validation set, and test set). The data enhancement methods can be at least one of the following: random modification of the HSV (Hue, Saturation, Value) channel of the image, color jitter, Gaussian blur, ISO noise, random rotation, random cropping, random enlargement or reduction, mirroring, sharpening, etc.

[0087] After the data set samples are subjected to image enhancement processing, the bounding box detection model to be trained can be trained based on the data set samples after image enhancement processing, thereby obtaining the target bounding box detection model. Here, the bounding box detection model to be trained can use YOLOV5 or other deep learning models, and the present disclosure does not make specific limitations on this, subject to what can be implemented.

[0088] When training the bounding box detection model to be trained based on the dataset samples after image enhancement processing, the bounding box sizes annotated in the dataset samples can be clustered by the K-means clustering algorithm to obtain the clustering results of the bounding boxes. After that, multiple anchor box sizes can be generated for each object in the sample image based on the clustering results of the bounding boxes, and the intersection-and-union ratio between each anchor box and the pre-annotated bounding box can be calculated to determine the bounding box predicted by the bounding box detection model to be trained for the object in multiple anchor boxes according to the calculated intersection-and-union ratio.

[0089] Since different sample images may be taken at different angles and distances, the bounding box sizes of the same object in different sample images are different. The above description generates multiple anchor box sizes for each object in the sample image, which can be understood as determining multiple bounding boxes that meet the scale characteristics of the same object from images taken at different angles and distances based on multiple sample images, i.e., multiple anchor boxes.

[0090] In the disclosed embodiment, label smoothing can be added during the training of the bounding box detection model to be trained. By adding label smoothing, the model can be prevented from overconfidently predicting labels during training, thereby improving the problem of poor generalization ability. In the disclosed embodiment, a target loss function Focal Loss can also be introduced, through which the problem of difficult sample convergence difficulty can be solved.

[0091] In the case that the border detection model to be trained meets the training requirements, the border detection model to be trained that meets the training requirements is determined as the target border detection model.

[0092] After obtaining the target border detection model, if the deployment device of the target border detection model and the feature extraction model is a terminal device, at this time, the target border detection model can also be quantized to convert the target border detection model into an ONNX format model. After that, the target border detection model in ONNX format can be deployed in the processor. Since the existing processor cannot directly use the trained target border detection model, it is necessary to quantize the target border detection model. Through model quantization, the target border detection model can be converted into a corresponding format file through a specified library.

[0093] In an optional embodiment, if Figure 6 As shown, the above step S103: determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determining the position information of the bottom frame of the cabinet door in the target image, specifically includes the following steps:

[0094] Step S601: performing straight line detection on the target image to obtain a straight line detection result, wherein the straight line detection result includes position information of at least one straight line;

[0095] Step S602: Determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the straight line detection result.

[0096] In the embodiment of the present disclosure, a preset straight line detection algorithm may be used to perform straight line detection on the target image, thereby obtaining a straight line detection result. Here, the straight line detection result may include position information of at least one straight line.

[0097] Here, the preset line detection algorithm may be a Hough transform algorithm, a Hough_line line detection algorithm, an LSD (Line Segment Detector) line detection algorithm, or the like. The present disclosure does not specifically limit the algorithm type of the preset line detection algorithm, subject to implementation.

[0098] After obtaining the straight line detection results, the straight line used to represent the bottom frame of the cabinet and the bottom frame of the cabinet door can be determined in at least one straight line, and then the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door can be determined based on the position information of the determined straight line.

[0099] In the above implementation, straight line detection is performed on the target image through a preset straight line detection algorithm, and the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door are determined according to the straight line detection results. This can reduce the demand for the computing power of the processor and improve the efficiency of data calculation.

[0100] In an optional embodiment, the above step S602: determining the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door based on the straight line detection result, specifically includes the following steps:

[0101] Step S6021: Detecting a first target straight line in the straight line detection result that passes through a target positioning mark, wherein the target positioning mark is a position in the cabinet bottom frame and the cabinet door bottom frame that does not change during the cabinet door opening period;

[0102] Step S6022: determining a second target straight line whose straight line slope meets the requirement in the first target straight line;

[0103] Step S6023: Determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the position information of the second target straight line.

[0104] In the embodiments of the present disclosure, Figure 5 As shown, the target positioning mark is the intersection position between the bottom frame of the cabinet body and the bottom frame of the cabinet door.

[0105] In specific implementation, the first target straight line passing through the target positioning mark can be determined in the straight line detection result. Figure 7 As shown, the first target straight line passing through the target positioning mark includes: straight line 1, straight line 2, straight line 3 and straight line 4, wherein straight line 1 is the straight line where the bottom frame of the cabinet is located, straight line 2 is the straight line where the bottom frame of the cabinet door is located, straight line 3 is the straight line where the right side frame of the cabinet is located, and straight line 4 is the straight line where the right side frame of the cabinet door is located.

[0106] After the first target straight line is determined, a second target straight line whose straight line slope meets the requirements can be determined in the first target straight line.

[0107] In the specific implementation, firstly, a sub-image area is determined in the target image, where the sub-image area may be a sub-image area including the bottom frame of the cabinet body and the bottom frame of the cabinet door in the target image. At this time, a first target straight line located in the sub-image area in the straight line detection result can be determined; and then a second target straight line whose straight line slope meets the requirement can be determined in the first target straight line located in the sub-image area.

[0108] by Figure 7 The first target straight line shown in FIG. 1 is used as an example to describe the sub-image region. Figure 7The area shown in . At this time, it can be determined that line 1 and line 2 are located in the sub-image area. Assuming that the horizontal axis of the image is used as the reference axis, at this time, it can be determined that the linear slope of line 1 relative to the reference axis is 0, and the linear slope of line 2 relative to the reference axis is not 0. At this time, it can be determined that line 2 and line 1 are the second target lines that meet the linear slope requirements.

[0109] From the above description, it can be seen that determining the second target straight line whose straight line slope meets the requirement in the first target straight line can be understood as:

[0110] A straight line whose straight line slope is 0 relative to the reference axis and a straight line whose straight line slope is not 0 relative to the reference axis are determined in the first target straight line, and then a second target straight line is determined based on the determined straight lines.

[0111] After the second target straight line is determined, the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame can be determined based on the position information of the second target straight line.

[0112] In specific implementation, the straight line corresponding to the bottom frame of the cabinet can be determined in the second target straight line, and the straight line corresponding to the bottom frame of the cabinet door can be determined in the second target straight line, and then the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door can be determined based on the position information of the corresponding straight lines.

[0113] In the above embodiment, by determining the first target straight line passing through the target positioning mark in the straight line detection result, and then determining the second target straight line whose straight line slope meets the requirements in the first target straight line, the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door are determined according to the position information of the second target straight line. The position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door can be accurately determined from the straight line detection result to improve the accuracy of data calculation.

[0114] In an optional embodiment, if Figure 8 As shown, the above step S103: determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determining the position information of the bottom frame of the cabinet door in the target image, specifically includes the following steps:

[0115] Step S801: performing image segmentation processing on the target image through an image segmentation network to obtain a segmentation result of the cabinet body and a segmentation result of the cabinet door in the target image;

[0116] Step S802: determining the position information of the bottom frame of the cabinet based on the segmentation result of the cabinet, and determining the position information of the bottom frame of the cabinet door based on the segmentation result of the cabinet door.

[0117] In the embodiment of the present disclosure, in addition to determining the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door in the manner described above, the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door can also be determined by image segmentation.

[0118] In specific implementation, the target image can be input into the image segmentation network for image segmentation processing, thereby obtaining the segmentation results of the cabinet and the cabinet door. Since the segmentation result of the cabinet contains the boundary information of the cabinet, and the segmentation result of the cabinet door contains the boundary information of the cabinet door, at this time, the cabinet bottom frame can be determined based on the cabinet segmentation result, and the cabinet door bottom frame can be determined based on the cabinet segmentation result, thereby realizing the determination of the position information of the cabinet bottom frame based on the cabinet segmentation result, and the determination of the position information of the cabinet door bottom frame based on the cabinet segmentation result.

[0119] In the above implementation, the target image is segmented by an image segmentation model to determine the position information of the bottom frame of the cabinet and the bottom frame of the cabinet door according to the image segmentation result. This can speed up the calculation process of the position information, thereby speeding up the calculation process of the cabinet door opening angle, thereby meeting scenarios with higher real-time requirements.

[0120] In the embodiment of the present disclosure, after determining the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door of the display cabinet in the target image, the door opening angle of the display cabinet in the target image can be determined based on the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door.

[0121] From the above description, it can be seen that the frame detection result can include a target angle. In this case, the cabinet door opening angle can be determined based on the target angle. Fig. 9 As shown, if the target angle is Fig. 9 The angle 1 shown in the figure, at this time, the formula: 180 degrees - angle 1 can be used to determine the door opening angle. If the target angle is as follows Fig. 9 The angle 2 shown can now be directly determined as the door opening angle.

[0122] If the frame detection result does not include the target angle, and the position information of the bottom frame of the cabinet and the bottom frame of the door are the position information determined based on the above-mentioned preset straight line detection algorithm and image segmentation network, the door opening angle of the display cabinet in the target image can be determined in the following way, which specifically includes the following steps:

[0123] Step S1051: determining the lengths of the sides of the target triangle based on the position information of the cabinet bottom frame and the cabinet door bottom frame; the cabinet bottom frame and the cabinet door bottom frame in the target image are respectively one side of the target triangle;

[0124] Step S1052: determining the door opening angle of the display cabinet in the target image based on the lengths of the sides of the target triangle.

[0125] In the embodiment of the present disclosure, after determining the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door, a target triangle can be determined based on the two position information. Fig. 9 As shown, the bottom frame of the cabinet body and the bottom frame of the cabinet door in the target image are respectively one side of the target triangle.

[0126] Since the lengths of the bottom frame of the cabinet body and the bottom frame of the cabinet door are equal, the target triangle is an equilateral triangle. At this time, after determining the target triangle, the three side lengths of the target triangle can be determined, and then the door opening angle of the display cabinet in the target image can be determined according to the side lengths of the target triangle, that is, Fig. 9 Angle 2 shown.

[0127] In the above implementation, the target triangle is determined by the position information of the bottom frame of the cabinet body and the bottom frame of the cabinet door, and a more accurate calculation result can be obtained by determining the door opening angle of the display cabinet in the target image according to the lengths of each side of the target triangle.

[0128] In an embodiment of the present disclosure, the method further includes:

[0129] (1) After determining the door opening angle of the display cabinet in the target image, if it is detected that the door opening angle meets a preset triggering requirement, triggering a second camera to shoot inside the display cabinet to obtain an image to be processed;

[0130] (2) performing image processing on the image to be processed, and determining target analysis information of the display cabinet according to the image processing result.

[0131] In the embodiment of the present disclosure, after the door opening angle of the display cabinet is determined in the manner described above, it is possible to detect whether the door opening angle meets the preset trigger requirements. For example, it is possible to detect whether the door opening angle is greater than a preset angle threshold, it is possible to detect whether the door opening angle has been opened to the maximum angle, and it is possible to detect whether the door opening angle no longer changes.

[0132] After detecting that the cabinet door opening angle meets the preset triggering requirement, the second camera can be triggered to shoot toward the interior of the display cabinet to obtain an image to be processed.

[0133] Here, the second camera can be installed on the door handle of the cabinet door, and the lens of the second camera is set toward the inside of the display cabinet, wherein the installation positions of the first camera and the second camera can be as follows: Fig.10 shown.

[0134] After the image to be processed is acquired, the image to be processed can be processed, and the target analysis information of the display cabinet can be determined according to the image processing result. For example, the image to be processed can be subjected to object detection, thereby obtaining the object detection result of each object in the image to be processed.

[0135] In the above implementation, by determining the position information of the bottom frame of the cabinet body in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0136] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0137] Based on the same inventive concept, the embodiment of the present disclosure also provides a display cabinet door opening angle detection device corresponding to the display cabinet door opening angle detection method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned display cabinet door opening angle detection method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0138] Reference Fig.11 FIG. 1 is a schematic diagram of a display cabinet door opening angle detection device provided by an embodiment of the present disclosure, wherein the device comprises: a first determination unit 10, a second determination unit 20, and a third determination unit 30; wherein:

[0139] A first determining unit 10 is used to determine a target image captured by a first camera; wherein the target image is an image captured by the first camera toward the bottom of the showcase when the showcase door is open;

[0140] A second determining unit 20 is used to determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image;

[0141] The third determining unit 30 is configured to determine the door opening angle of the display cabinet in the target image based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame.

[0142] By determining the position information of the bottom frame of the cabinet in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0143] In a possible implementation, the second determination unit is further used to: input the target image into a target border detection model for processing to obtain a border detection result; and determine the position information of the bottom border of the cabinet body and the position information of the bottom border of the cabinet door based on the border detection result.

[0144] In a possible implementation, the device is also used to: obtain target training samples, wherein the target training samples include sample images and image labels, the sample images are images captured by a designated camera toward the bottom of the display cabinet, and the image labels are bounding boxes of the bottom border of the cabinet body and the bottom border of the door in the sample images; train a border detection model to be trained based on the target training samples; and when the border detection model to be trained meets the training requirements, determine the border detection model to be trained that meets the training requirements as the target border detection model.

[0145] In a possible implementation, the second determination unit is further used to: perform straight line detection on the target image to obtain a straight line detection result, wherein the straight line detection result includes position information of at least one straight line; and determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the straight line detection result.

[0146] In a possible implementation, the second determination unit is further used to: detect a first target straight line in the straight line detection result that passes through a target positioning identifier, wherein the target positioning identifier is a position in the bottom frame of the cabinet body and the bottom frame of the cabinet door that does not change during the period when the cabinet door is open; determine a second target straight line in the first target straight line whose straight line slope meets the requirements; and determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the position information of the second target straight line.

[0147] In a possible implementation, the second determination unit is further used to: perform image segmentation processing on the target image through an image segmentation network to obtain a segmentation result of the cabinet and a segmentation result of the cabinet door in the target image; determine the position information of the bottom frame of the cabinet based on the segmentation result of the cabinet, and determine the position information of the bottom frame of the cabinet door based on the segmentation result of the cabinet door.

[0148] In a possible implementation, the device is further used to: after determining the door opening angle of the display cabinet in the target image, if it is detected that the door opening angle meets a preset trigger requirement, trigger a second camera to shoot inside the display cabinet to obtain an image to be processed; perform image processing on the image to be processed, and determine the target analysis information of the display cabinet based on the image processing result.

[0149] In a possible implementation, the first determination unit is further used to: obtain a real-time video stream captured by the first camera; determine a target video stream that meets a target trigger condition in the real-time video stream, wherein the target trigger condition is a condition for triggering detection of an opening angle of a door of the display cabinet; and determine the target image in the target video stream.

[0150] In a possible implementation manner, the first determination unit is further used to: detect a target moment when a video screen in the real-time video stream changes; and determine a video stream collected after the target moment in the real-time video stream as the target video stream.

[0151] In a possible implementation, the third determination unit is further used to: determine the lengths of each side of the target triangle based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame; the cabinet bottom frame and the cabinet door bottom frame in the target image are respectively a side of the target triangle; and determine the door opening angle of the display cabinet in the target image based on the lengths of each side of the target triangle.

[0152] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0153] Reference Fig.12 1 is a schematic diagram of the structure of a display cabinet provided by an embodiment of the present disclosure, wherein the display cabinet comprises: a display cabinet body 111, a first camera 112, a second camera 113 and a processor 114, wherein the first camera 112 and the second camera 113 are installed on the display cabinet body 111, and the lens of the first camera faces the bottom of the display cabinet body, and the lens of the second camera faces the inside of the display cabinet body. The installation positions of the first camera 112 and the second camera 113 in the display cabinet can be as follows: Fig.10 shown.

[0154] The first camera 112 is configured to capture a target image at the bottom of the showcase when the showcase door is open;

[0155] The processor 114 is configured to determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image; based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door, determine the cabinet door opening angle of the display cabinet in the target image.

[0156] Here, the processor 114 may be an NPU (Neural Network Processing Unit) neural network processor. In addition, the processor 114 may also be other types of processors, which is not specifically limited in the present disclosure.

[0157] The second camera 113 is configured to shoot toward the interior of the display cabinet when it detects that the opening angle of the cabinet door meets the preset trigger requirement to obtain an image to be processed, so as to perform image processing on the image to be processed through the processor, and determine the target analysis information of the display cabinet according to the image processing result.

[0158] The following will introduce the above-mentioned method for detecting items in the display cabinet in detail in combination with specific application scenarios.

[0159] Assume that, in advance Fig.10 In the manner shown, a first camera and a second camera are installed in the display cabinet, an NPU neural network processor is included in the display cabinet, and a door magnetic switch is included in the display cabinet, wherein the first camera, the second camera and the door magnetic switch are respectively connected to the NPU neural network processor for communication. Here, the image to be processed collected by the second camera is mainly used for identifying objects in the display cabinet.

[0160] When the user opens the door of the display cabinet, the door magnetic switch generates a door opening signal. After receiving the door opening signal, the NPU neural network processor controls the first camera to start collecting real-time video streams and determines the target image based on the real-time video stream. Afterwards, the first camera can transmit the target image to the NPU neural network processor. After receiving the target image, the NPU neural network processor can input the target image into the target border detection model for processing to obtain a border detection result; based on the border detection result, determine the position information of the bottom border of the cabinet body and the position information of the bottom border of the door, and then determine the door opening angle of the display cabinet in the target image according to the position information of the bottom border of the cabinet body and the position information of the bottom border of the door.

[0161] When the NPU neural network processor detects that the door opening angle meets the preset triggering requirements, the second camera is triggered to shoot inside the display cabinet to obtain the image to be processed. Next, the NPU neural network processor can also perform object detection on the image to be processed, and determine the object detection results (i.e., target analysis information) of each object in the display cabinet based on the image processing results.

[0162] By determining the position information of the bottom frame of the cabinet in the collected target image, and determining the position information of the bottom frame of the cabinet door in the target image, and then determining the door opening angle of the display cabinet according to the above position information, the door opening angle of the display cabinet can be calculated quickly and accurately, thereby providing technical support for realizing other functions of the display cabinet based on the door opening angle.

[0163] Corresponds to Figure 1 The display cabinet door opening angle detection method in the present disclosure embodiment also provides a display cabinet 1300, such as Fig.13 FIG. 1 is a schematic diagram of a display cabinet 1300 provided in an embodiment of the present disclosure, including:

[0164] Processor 131, memory 132, and bus 133; memory 132 is used to store execution instructions, including internal memory 1321 and external memory 1322; the internal memory 1321 is also called internal memory, which is used to temporarily store the operation data in the processor 131 and the data exchanged with the external memory 1322 such as a hard disk. The processor 131 exchanges data with the external memory 1322 through the internal memory 1321. When the display cabinet 1300 is running, the processor 131 communicates with the memory 132 through the bus 133, so that the processor 131 executes the following instructions:

[0165] Determine a target image captured by the first camera; wherein the target image is an image captured by the first camera toward the bottom of the showcase when the showcase door is open;

[0166] Determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image;

[0167] The door opening angle of the display cabinet in the target image is determined based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame.

[0168] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting the door opening angle of the display cabinet described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0169] The disclosed embodiments also provide a computer program product, which carries a program code. The program code includes instructions that can be used to execute the steps of the display cabinet door opening angle detection method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0170] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0171] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0172] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0173] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0174] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0175] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for detecting the opening angle of a display cabinet, characterized in that: include: Determine a target image captured by the first camera; wherein the target image is an image captured by the first camera toward the bottom of the showcase when the showcase door is open; Determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image; Determine the door opening angle of the display cabinet in the target image based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame; The step of determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determining the position information of the bottom frame of the cabinet door in the target image includes: Performing straight line detection on the target image to obtain a straight line detection result, wherein the straight line detection result includes position information of at least one straight line; Determine the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door based on the straight line detection result; The determining the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door based on the straight line detection result includes: Detecting a first target straight line passing through a target positioning mark in the straight line detection result, wherein the target positioning mark is a position in the bottom frame of the cabinet body and the bottom frame of the cabinet door that does not change during the opening of the cabinet door; Determine a second target straight line whose straight line slope meets the requirement in the first target straight line; Determine the position information of the bottom frame of the cabinet and the position information of the bottom frame of the cabinet door based on the position information of the second target straight line; After determining the door opening angle of the display cabinet in the target image, if it is detected that the door opening angle meets a preset triggering requirement, triggering the second camera to shoot toward the inside of the display cabinet to obtain an image to be processed; The image to be processed is subjected to image processing, and target analysis information of the display cabinet is determined according to the image processing result.

2. The method according to claim 1, characterized in that: The step of determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determining the position information of the bottom frame of the cabinet door in the target image includes: Inputting the target image into a target border detection model for processing to obtain a border detection result; The position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door are determined based on the frame detection result.

3. The method according to claim 2, characterized in that The method further comprises: Obtaining a target training sample, wherein the target training sample includes a sample image and an image label, the sample image is an image captured by a designated camera toward the bottom of the display cabinet, and the image label is a bounding box of a bottom frame of the cabinet body and a bounding box of a bottom frame of the cabinet door in the sample image; Training the bounding box detection model to be trained based on the target training sample; In the case that the border detection model to be trained meets the training requirements, the border detection model to be trained that meets the training requirements is determined as the target border detection model.

4. The method according to claim 1, characterized in that: The step of determining the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determining the position information of the bottom frame of the cabinet door in the target image includes: Performing image segmentation processing on the target image through an image segmentation network to obtain a segmentation result of the cabinet body and a segmentation result of the cabinet door in the target image; The position information of the bottom frame of the cabinet is determined based on the segmentation result of the cabinet, and the position information of the bottom frame of the cabinet door is determined based on the segmentation result of the cabinet door.

5. The method according to claim 1, characterized in that The determining the target image captured by the first camera includes: Obtaining a real-time video stream captured by the first camera; Determining a target video stream that meets a target trigger condition in the real-time video stream, wherein the target trigger condition is a condition for triggering detection of an opening angle of a door of the display cabinet; The target image is determined in the target video stream.

6. The method according to claim 5, characterized in that The step of determining a target video stream that meets a target trigger condition in the real-time video stream comprises: Detecting a target moment when a video picture in the real-time video stream changes; The video stream collected after the target time in the real-time video stream is determined as the target video stream.

7. The method according to claim 1, characterized in that The determining the door opening angle of the display cabinet in the target image based on the position information of the cabinet bottom frame and the position information of the cabinet door bottom frame comprises: Based on the position information of the cabinet bottom frame and the cabinet door bottom frame, determining the lengths of the sides of the target triangle; the cabinet bottom frame and the cabinet door bottom frame in the target image are respectively a side of the target triangle; The door opening angle of the display cabinet in the target image is determined based on the lengths of the sides of the target triangle.

8. A display cabinet, characterized in that: include: A display cabinet body, a first camera, a second camera and a processor, wherein the first camera and the second camera are mounted on the display cabinet body, and the lens of the first camera faces the bottom of the display cabinet body; The first camera is configured to capture a target image at the bottom of the showcase while the showcase door is open; The processor is configured to determine the position information of the bottom frame of the cabinet body of the display cabinet in the target image, and determine the position information of the bottom frame of the cabinet door in the target image; determine the cabinet door opening angle of the display cabinet in the target image based on the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door; The second camera is configured to shoot toward the interior of the display cabinet when detecting that the door opening angle meets a preset trigger requirement to obtain an image to be processed, so as to perform image processing on the image to be processed by the processor, and determine the target analysis information of the display cabinet according to the image processing result; When the processor determines the position information of the bottom frame of the cabinet body of the display cabinet in the target image and determines the position information of the bottom frame of the cabinet door in the target image, the processor is specifically configured to: Performing straight line detection on the target image to obtain a straight line detection result, wherein the straight line detection result includes position information of at least one straight line; Determine the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the straight line detection result; When the processor determines the position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door based on the straight line detection result, the processor is specifically configured to: Detecting a first target straight line passing through a target positioning mark in the straight line detection result, wherein the target positioning mark is a position in the bottom frame of the cabinet body and the bottom frame of the cabinet door that does not change during the opening of the cabinet door; Determine a second target straight line whose straight line slope meets the requirement in the first target straight line; The position information of the bottom frame of the cabinet body and the position information of the bottom frame of the cabinet door are determined based on the position information of the second target straight line.

9. A display cabinet, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, the processor and the memory communicate via a bus, and when the machine-readable instructions are executed by the processor, the steps of the method for detecting the door opening angle of a display cabinet as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting the door opening angle of a display cabinet as claimed in any one of claims 1 to 7 are executed.