WO2020199775A1 - 货架状态确定方法及装置、存储介质 - Google Patents

货架状态确定方法及装置、存储介质 Download PDF

Info

Publication number
WO2020199775A1
WO2020199775A1 PCT/CN2020/075805 CN2020075805W WO2020199775A1 WO 2020199775 A1 WO2020199775 A1 WO 2020199775A1 CN 2020075805 W CN2020075805 W CN 2020075805W WO 2020199775 A1 WO2020199775 A1 WO 2020199775A1
Authority
WO
WIPO (PCT)
Prior art keywords
label
shelf
image
feature
information
Prior art date
Application number
PCT/CN2020/075805
Other languages
English (en)
French (fr)
Inventor
张欢欢
刘童
唐小军
张治国
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Publication of WO2020199775A1 publication Critical patent/WO2020199775A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Definitions

  • the present disclosure relates to the field of image processing technology, in particular to a method and device for determining shelf status, and a storage medium.
  • the empty shelf calculation method in the related art usually uses a direct comparison between the shelf image and the shelf template image to obtain the empty position. However, this calculation method cannot accurately determine the specific empty position of the shelf and is prone to errors.
  • one of the objectives of the embodiments of the present disclosure is to provide a shelf state determination method, device, and storage medium, which can calculate more accurate shelf changes.
  • the first aspect of the embodiments of the present disclosure provides a method for determining shelf status, including:
  • the method for determining shelf status further includes:
  • the shelf change position information includes shelf out-of-stock position information.
  • obtaining shelf partition information according to the label backplane information and label information includes:
  • shelf partition information is obtained.
  • performing label backplane detection on the shelf image includes:
  • the false label backplane edge straight line that is falsely detected in the straight line detection result is removed, and the broken label backplane edge straight line is connected to obtain the label backplane information of the shelf.
  • performing label detection on the shelf image includes:
  • the pending label area where the second correlation coefficient is greater than the preset coefficient threshold is a label.
  • the first image feature is an image feature including at least one of a brightness feature, a color feature, a direction feature, and a gradient feature.
  • the second image feature is a texture feature including at least one of angular second moment feature, contrast feature, inverse moment feature, correlation feature, and entropy feature.
  • detecting the goods change area of the shelf includes:
  • the goods change area is detected.
  • detecting and obtaining the goods change area according to the shelf image and the reference image includes:
  • a device for determining shelf status including:
  • the memory stores instructions that can be executed by the processor, and when the instructions are executed by the processor, the processor:
  • the processor when the instruction is executed by the processor, the processor further causes the processor to push the shelf change position information to a designated user.
  • the shelf change position information includes shelf out-of-stock position information.
  • the instructions when executed by the processor, also cause the processor to:
  • shelf partition information is obtained.
  • the instructions when executed by the processor, also cause the processor to:
  • the false label backplane edge straight line that is falsely detected in the straight line detection result is removed, and the broken label backplane edge straight line is connected to obtain the label backplane information of the shelf.
  • the instructions when executed by the processor, also cause the processor to:
  • the pending label area where the second correlation coefficient is greater than the preset coefficient threshold is a label.
  • the first image feature is an image feature including at least one of a brightness feature, a color feature, a direction feature, and a gradient feature.
  • the second image feature is a texture feature including at least one of angular second moment feature, contrast feature, inverse moment feature, correlation feature, and entropy feature.
  • the instructions when executed by the processor, also cause the processor to:
  • the goods change area is detected.
  • the instructions when executed by the processor, also cause the processor to:
  • the third aspect of the embodiments of the present disclosure provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of the shelf state determination method when the computer program is executed by a processor.
  • FIG. 1 is a schematic flowchart of a method for determining a shelf state provided by an embodiment of the disclosure
  • FIG. 2A is a schematic diagram of shelf images in an embodiment of the disclosure.
  • 2B is a schematic diagram of a label template image in an embodiment of the disclosure.
  • 2C is a schematic diagram of a reference image in an embodiment of the disclosure.
  • 2D is a schematic diagram of detecting a straight line of the edge of the label backplane in an embodiment of the disclosure
  • FIG. 3A is a schematic diagram of a process of detecting tags in an embodiment of the disclosure.
  • FIG. 3B is a schematic diagram of a process of calculating a first correlation coefficient in an embodiment of the disclosure
  • FIG. 3C is a schematic diagram of a specific flow of a step of determining a label in an embodiment of the disclosure.
  • FIG. 3D is a schematic flowchart of calculating shelf partition information in an embodiment of the disclosure.
  • FIG. 3E is a schematic diagram of a process of detecting a cargo change area in an embodiment of the disclosure.
  • FIG. 4 is a schematic diagram of functional modules of a device for determining a shelf state provided by an embodiment of the disclosure
  • FIG. 5 is a schematic diagram of the hardware structure of an apparatus for executing the method for determining shelf status provided by an embodiment of the disclosure.
  • a method for determining shelf status is proposed, which can calculate more accurate shelf changes.
  • the method for determining shelf status includes:
  • Step 11 Obtain shelf images, refer to Figure 2A.
  • the shelf image 200 may be photographed in real time by a camera set in front of the shelf, and the photographed shelf image 200 may be obtained through a corresponding wired or wireless transmission method.
  • preprocessing such as noise removal and image enhancement may also be performed first.
  • the shelf image 200 may also be obtained in other ways, for example, from a remote server, generated in real time in a virtual reality (VR) environment, or copied through a portable storage device.
  • the shelf in the shelf image 200 may include a side bracket 210, a label back plate 220, a label 230, and goods 240 of the shelf.
  • reference numeral 250 indicates the position of part of the out-of-stock goods in the shelf image 200.
  • Step 12 Perform label backplane detection and label detection on the shelf image 200 to obtain label backplane information and label information of the shelf.
  • the label back plate 220 is a rectangular area where labels are placed between two shelves, and the label back plate area 220 has a certain degree of distinction from other areas of the shelf.
  • the input of the label backplane detection is the shelf image 200, and the output is the 4 edge line segment information of the label backplane 220.
  • the label 230 here refers to the label that records the cargo information of each kind of goods 240.
  • the label can usually be a price tag.
  • the price tag may also include price information.
  • Labels usually only record the information related to the goods and do not include the price information of the goods.
  • performing label backplane detection on the shelf image 200 may include the following steps:
  • the straight line detection method can be implemented by using Canny algorithm, Sobel operator, Laplacian operator, Hough transform algorithm and other algorithms;
  • a line diagram of the label backplane 220 as shown in FIG. 2D may be obtained.
  • the line graph may include, for example, the detected actual edge straight line 260 of the label backplane 220, the broken portion 270 of the missed edge straight line, and/or the erroneously detected non-edge straight line 280.
  • the false detection and/or missed detection of the edge line including (but not limited to): light changes, obstructions, excessive image preprocessing, and so on.
  • the method of removing the line edge of the false label backplane detected by mistake may include (but is not limited to), for example, judging the line length, and comparing it or its ratio with respect to the width (or height) of the shelf image
  • the predetermined threshold value is compared, and when it is less than the predetermined threshold value, it can be regarded as a falsely detected false label backplane edge straight line. This is because, usually, the label backplane traverses the entire shelf image, so the length of the edge line of the label backplane or its ratio relative to the shelf image should be large enough.
  • the label backplane is usually rectangular (or trapezoidal as shown in Figure 2A, Figure 2C, and Figure 2D due to image distortion)
  • the edge line constitutes a rectangular (or trapezoidal) shape, which can be regarded as a falsely detected false label backplane edge line.
  • the method of judging whether it is the edge of the pseudo-label backplane is not limited to the above-mentioned embodiment.
  • the two edge straight lines are judged to have a disconnection less than the threshold length on substantially one straight line, they can be regarded as the edge straight line missed detection, and they are automatically connected into one line. straight line.
  • performing label detection on the shelf image includes:
  • Step 121 Obtain a label template image, as shown in FIG. 2B.
  • the label template image may be collected in advance according to the pattern of the goods label actually used.
  • FIG. 2B shows an example of a label image of a commodity in a supermarket, and the label template image can be obtained by replacing specific words with symbols.
  • the label template images of different layers on the shelf can be extracted from top to bottom.
  • Step 122 Extract the first image features of the label template image and the shelf image.
  • the first image feature is an image feature including at least one of a brightness feature, a color feature, a direction feature, and a gradient feature.
  • the method for extracting the brightness feature includes:
  • the label template image and the shelf image are color images, calculate the gray average of the 3 color channels of red, green and blue (RGB) and generate a gray image, and normalize the gray image, namely The pixel value of the image is divided by the maximum value of the image pixel to obtain the brightness characteristic image;
  • the label template image and the shelf image are grayscale images, then the grayscale images are normalized to obtain brightness characteristics.
  • the method for extracting the color feature includes:
  • the label template image and the shelf image are color images, for the pixel point (x, y), where x is the row value and y is the column value, the red channel of the marked image is at the pixel point (x, y) The value is r, the pixel value of the green channel at the pixel point (x, y) is g, the pixel value of the blue channel at the pixel point (x, y) is b, and the four dimensions below the pixel point (x, y) are extracted Color characteristics:
  • the above operations are performed on all the pixels in the image to generate the corresponding four color feature images, and the above four color feature images are respectively normalized to obtain the color features.
  • the label template image and the shelf image are grayscale images, these color features are not extracted.
  • the method for extracting the direction feature includes:
  • the Gabor wavelet transform is used to extract the features of four directions of 0 degree, 35 degrees, 90 degrees, and 135 degrees of the label template image and the shelf image respectively, and normalization is performed to obtain the direction characteristics.
  • the method for extracting the gradient feature includes:
  • gray-scale the image into a gray-scale image If the label template image and the shelf image are color images, gray-scale the image into a gray-scale image; extract the gradient amplitude feature of the gray-scale image, and normalize it to obtain the gradient feature;
  • the gradient features of the grayscale images are directly extracted and normalized to obtain the gradient features.
  • the gradient of the image function f(x, y) at the point (x, y) is a vector with magnitude and direction
  • G x and G y are used to represent the image function f(x, y) in the x direction and y
  • the gradient of the direction, the vector of this gradient can be expressed as:
  • the direction of the gradient is the fastest changing direction of the function f(x, y).
  • f(x, y) When there are edges in the image, there must be a larger gradient value. On the contrary, when there are relatively smooth parts in the image, the gray value changes less , The corresponding gradient is also small.
  • the mode of the gradient is referred to as gradient, and the image composed of image gradient is called gradient image.
  • first image feature including the features of brightness, color, direction, and gradient is not the only embodiment of the present disclosure.
  • the features included in the first image feature can be adjusted as needed, such as adding Other features or deletion of features, etc.
  • Step 123 Calculate the first correlation coefficient according to the first image feature of the label template image and the shelf image, and generate a label saliency map.
  • calculating the first correlation coefficient according to the first image feature of the label template image and the shelf image includes:
  • Step 1231 On the shelf image, move the label template image in pixels to traverse the shelf image;
  • Step 1232 Calculate the first correlation coefficient between the label template image and the shelf image covered by each movement, that is, calculate the label template image and the shelf covered by each movement The first correlation coefficient between images.
  • the first correlation coefficient between the label template image and the shelf image covered by it is calculated once, so that the calculation is performed at each position.
  • a first correlation coefficient is obtained, all the first correlation coefficients are combined, and the position on the shelf image moved by the center point of the label template image corresponding to the first correlation coefficient is combined to generate a label saliency map.
  • Step 124 Perform adaptive threshold segmentation on the label saliency map to obtain a set of center points of the undetermined label area.
  • Step 125 Determine the pending label area in the shelf image according to the central point set of the pending label area.
  • the tag saliency map is generated based on the first correlation coefficient and the position of the center point of the tag template image corresponding to the first correlation coefficient that moves to the shelf image, that is, the plane coordinates of the points of the tag saliency map are the first
  • the center point of the label template image corresponding to the correlation coefficient is moved to the position on the shelf image.
  • the points on the label saliency map obtained by adaptive threshold segmentation are a collection of discrete points, and these points
  • the area whose center point is the size of the label template image is the undetermined label area.
  • performing adaptive threshold segmentation on the label saliency map to obtain a set of center points of the undecided label region includes:
  • Binary segmentation is performed on the label saliency map using an adaptive threshold segmentation algorithm (such as OTSU, also known as the Otsu method or the maximum between-class variance method), where the foreground area is the set of center points of the pending label area.
  • an adaptive threshold segmentation algorithm such as OTSU, also known as the Otsu method or the maximum between-class variance method
  • Step 126 Extract the second image feature of the pending label area and the label template image.
  • the step of extracting the second image feature of the pending label area may also be obtained by processing the entire shelf image (which contains the pending label area) in advance, and may be processed in advance (that is, at the beginning Extracting the second image feature from the shelf image, instead of extracting it after obtaining the pending label area), is not limited to only extracting the second image feature from the pending label area.
  • these two second image feature extraction methods can be applied to the present disclosure, and are not specifically limited here.
  • the second image feature is a texture feature including at least one of angular second moment feature, contrast feature, inverse moment feature, correlation feature, and entropy feature.
  • the method of extracting the texture feature includes:
  • the Gray Level Co-occurrence Matrix refers to a common method for describing texture by studying the spatial correlation characteristics of gray levels. Since the texture is formed by the repeated occurrence of grayscale distribution in space, there will be a certain grayscale relationship between two pixels separated by a certain distance in the image space, that is, the spatial correlation characteristics of the grayscale in the image.
  • the gray-level histogram is the statistical result of a single pixel on the image with a certain gray-level, while the gray-level co-occurrence matrix is obtained by statistically calculating the status of two pixels that maintain a certain distance on the image with a certain gray-level.
  • the gray level co-occurrence matrix generation is briefly introduced as follows:
  • the distance difference value (a, b) takes different numerical combinations to obtain the joint probability matrix in different situations.
  • the value of (a, b) should be selected according to the characteristics of the texture period distribution. For finer textures, small difference values such as (1, 0), (1, 1), (2, 0) are selected.
  • the probability of two pixel gray levels occurring at the same time transforms the spatial coordinates of (x, y) into the description of "gray pair" (g1, g2), forming a gray level co-occurrence matrix.
  • the diagonal elements of the gray-level co-occurrence matrix will have relatively large values; if the gray values of the image pixels change locally, they will deviate from the diagonal The elements of the line will have larger values.
  • some scalars can be used to characterize the characteristics of the gray-level co-occurrence matrix.
  • G represent the common features of the gray-level co-occurrence matrix:
  • the ASM has a larger Value
  • the value distribution in G is more uniform (such as an image with severe noise)
  • the angular second-order moment is the sum of the squares of the element values of the gray-level co-occurrence matrix, so it is also called energy, which reflects the uniformity of the image grayscale distribution and the thickness of the texture.
  • energy which reflects the uniformity of the image grayscale distribution and the thickness of the texture.
  • the ASM value is small; on the contrary, if some of the values are large and other values are small, the ASM value is large.
  • the elements in the co-occurrence matrix are concentratedly distributed, the ASM value is large at this time.
  • a large ASM value indicates a more uniform and regular texture pattern.
  • Contrast reflects the sharpness of the image and the depth of texture grooves. The deeper the texture groove, the greater the contrast, and the clearer the visual effect; on the contrary, the lower the contrast, the shallower the groove and the blurry effect.
  • the inverse error moment reflects the homogeneity of the image texture and measures how much the image texture changes locally.
  • the deficit moment reflects the clarity and regularity of the texture. The texture is clear, the regularity is strong, and it is easy to describe, and the value is large; the messy, difficult to describe, the value is small. A large value indicates that the image texture lacks changes between different regions, and the local is very uniform.
  • Correlation reflects the consistency of image texture and is used to measure the degree of similarity of image gray levels in the row or column direction. Therefore, the value of the value reflects the local gray correlation. The larger the value, the greater the correlation. If there are horizontal textures in the image, the COR of the horizontal matrix is greater than the COR values of the remaining matrices. It measures the degree of similarity of spatial gray-level co-occurrence matrix elements in the row or column direction. Therefore, the correlation value reflects the local gray-level correlation in the image. When the matrix element values are uniformly equal, the correlation value is large; on the contrary, if the matrix pixel values differ greatly, the correlation value is small.
  • the entropy will have a larger value.
  • Entropy is a measure of the amount of information the image has. Texture information also belongs to the information of the image. It is a measure of randomness. When all elements in the co-occurrence matrix have the greatest randomness and all values in the spatial co-occurrence matrix are almost equal, the co-occurrence matrix When the middle elements are dispersed, the entropy is larger. It represents the degree of non-uniformity or complexity of the texture in the image.
  • a feature vector can be used to integrate the above features.
  • the integrated feature vector can be regarded as a description of the image texture, which can be further used for classification, identification, retrieval, etc.
  • Step 127 Calculate a second correlation coefficient according to the second image feature of the pending label area and the label template image.
  • Step 128 Determine that the pending label area where the second correlation coefficient is greater than the preset coefficient threshold is a label.
  • the determining that the undetermined label region where the second correlation coefficient is greater than the preset coefficient threshold is a label includes:
  • Step 1281 Sort the regions to be determined according to their first correlation coefficients in descending order
  • Step 1282 According to the arrangement order, sequentially calculate a second correlation coefficient between each pending label area and the second image feature of the label template image;
  • Step 1283 Determine the undetermined label region where the second correlation coefficient is greater than the preset coefficient threshold as a label, and stop the calculation of the second correlation coefficient when the second correlation coefficient is less than the preset coefficient threshold. In this way, calculation time can be saved and calculation efficiency improved.
  • the preset coefficient threshold can be set as required, such as 0.8, but it is not specifically limited here.
  • the first correlation coefficient is calculated, and the label saliency map is generated, and then the pending label area is obtained according to the label saliency map, and then the difference between the pending label area and the label template is extracted Second image features and calculate the second correlation coefficient of the two, and finally determine the pending label area where the second correlation coefficient is greater than the preset coefficient threshold as a label.
  • a more accurate label on the shelf image can be obtained Position, which can realize the segmentation of the shelf image according to the label position, which is conducive to the subsequent image comparison, in order to calculate a more accurate shelf vacancy rate.
  • Step 13 Obtain shelf partition information according to the label backplane information and label information.
  • obtaining shelf partition information according to the label backplane information and label information includes:
  • Step 131 Obtain shelf layering information according to the label backplane information
  • Step 132 According to the label information, combine the shelf layering information to obtain shelf partition information.
  • the step of using the label template image and the shelf image to obtain shelf partition information can be performed offline, the display of the shelf goods and the position of label placement are usually unchanged for a period of time, and the shelf partition information can be used continuously for a period of time.
  • Step 14 Detect the cargo change area of the shelf.
  • detecting the goods change area of the shelf includes:
  • the goods change area is detected.
  • the reference image 200 ′ is an image of the shelf in a full state after the goods are normally placed and is used to compare with the shelf image 200 collected in real time to obtain the goods change area, that is, the rough change of the goods.
  • the step of obtaining the reference image 200' may be performed at the same time as the step of obtaining the shelf image 200 to improve processing efficiency.
  • the detected goods change area according to the shelf image 200 and the reference image 200' includes:
  • Step 141 Extract third image features (such as color, texture, etc.) of the shelf image 200 and the reference image 200';
  • Step 142 Perform image change detection based on the third image feature, and determine the cargo change area based on the detected image change area.
  • the image change detection technology uses feature-level change detection technology.
  • Feature-level change detection uses a certain algorithm to first extract feature information from the original image, such as edges, shapes, contours, textures, etc., and then synthesize these feature information Analysis and change detection. Because feature-level change detection performs correlation processing on features and classifies features into meaningful combinations, it has higher credibility and accuracy in judging feature attributes. According to the different character description methods, different methods can be used to compare the two sets of characteristics.
  • the details are as follows: (1) When using numerical features to describe the detection object, statistical pattern recognition can be used to judge the similarity of the two groups of features and determine the change information of the detection object; (2) When using structural features to describe the detection object At the same time, the method of structural pattern recognition can be used to judge the similarity of the two groups of features and determine the change information of the detection object.
  • image change detection can also be pixel-based change detection.
  • the advantages of the pixel-based image change detection method are: the method is simple, fast, and easy to obtain the change area, but the type and nature of the image change cannot be determined. Its specific algorithms are: difference method, ratio method, correlation coefficient method, regression analysis method, etc.
  • the detection of the goods change area of the shelf can also be performed by using deep learning to perform image recognition on the acquired shelf image.
  • the area where the goods are not recognized in the shelf area is the out of stock area, that is, the goods change area. .
  • Step 15 Compare the cargo change area with the shelf partition information to obtain shelf change position information.
  • the goods change area characterizes the position where the change occurs on the shelf, and the shelf partition information distinguishes the position of the goods on the shelf based on the label backplane and the label, so that when the change position matches a certain partition of the shelf At the time of loading, it means that the goods placed in the zone have changed, so that the information of the changed goods on the shelf can be accurately obtained, that is, the information of the changing position of the shelf.
  • the method for determining shelf status further includes step 16: Pushing the shelf change position information to a designated user.
  • the designated user may be any person preset to receive change information, such as a supermarket administrator, a replenisher, and so on.
  • the shelf change position information includes shelf out-of-stock position information, which can directly reflect the shelf out-of-stock status, so that relevant personnel can be vigilant to replenish goods as soon as possible.
  • the shelf status determination method uses the label backplane and the label position to partition the shelf, and then compares the shelf partition information with the change area of the goods to obtain the shelf change position information, thereby
  • the change position can be calculated more accurately, and it is more convenient for the user to know the specific position of the shelf change, so that the goods that need to be adjusted according to the specific position can be confirmed, which is more convenient to use.
  • a shelf state determination device which can calculate more accurate shelf changes.
  • the shelf state determination device is shown in the form of a functional module in the embodiment of FIG. 4, the actual hardware structure is not limited to this. In fact, it can also adopt the hardware architecture of processor plus memory as shown in FIG. 5. In other words, the processor shown in FIG. 5 can execute the instructions stored in the memory to enable the processor to perform the functions of the modules shown in FIG. 4.
  • the shelf state determination device includes:
  • the obtaining module 21 is used to obtain shelf images
  • the partition information calculation module 22 is used to perform label backplane detection and label detection on the shelf image to obtain label backplane information and label information of the shelf; and, according to the label backplane information and label information, obtain the shelf Partition information;
  • the change area detection module 23 is used to detect the goods change area of the shelf
  • the change information calculation module 24 is used to compare the goods change area with the shelf partition information to obtain shelf change location information.
  • the shelf state determination device may further include a pushing module 25 for pushing the shelf change position information to a designated user.
  • the shelf change position information includes shelf out-of-stock position information.
  • the shelf status determination device uses the label backplane and the label position to partition the shelf, and then compares the shelf partition information with the goods change area to obtain the shelf change position information, thereby
  • the change position can be calculated more accurately, and it is more convenient for the user to know the specific position of the shelf change, so that the goods that need to be adjusted according to the specific position can be confirmed, which is more convenient to use.
  • the partition information calculation module 22 is configured to:
  • shelf partition information is obtained.
  • the partition information calculation module 22 is configured to:
  • the false label backplane edge straight line that is falsely detected in the straight line detection result is removed, and the broken label backplane edge straight line is connected to obtain the label backplane information of the shelf.
  • the partition information calculation module 22 is configured to:
  • the pending label area where the second correlation coefficient is greater than the preset coefficient threshold is a label.
  • the first image feature is an image feature including at least one of a brightness feature, a color feature, a direction feature, and a gradient feature.
  • the second image feature is a texture feature including at least one of angular second-order moment feature, contrast feature, inverse moment feature, correlation feature, and entropy feature.
  • the acquiring module 21 is also used to acquire a reference image
  • the change area detection module 23 is used to detect the change area of the goods according to the shelf image and the reference image.
  • the change area detection module 23 is configured to:
  • Each embodiment of the device for determining a shelf state has basically the same effect as the foregoing method for determining a shelf state, and will not be repeated here.
  • the third aspect of the embodiments of the present disclosure proposes an embodiment of a device for executing the method for determining shelf status.
  • FIG. 5 it is a schematic diagram of the hardware structure of an embodiment of the apparatus for executing the method for determining shelf status provided by the present disclosure.
  • the device includes:
  • One or more processors 31 and a memory 32 are taken as an example in FIG. 5.
  • the device for executing the method for determining the shelf state may further include: an input device 33 and an output device 34.
  • the processor 31, the memory 32, the input device 33, and the output device 34 may be connected by a bus or in other ways.
  • the connection by a bus is taken as an example.
  • the memory 32 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, as described in the shelf state determination method in the embodiment of the present application.
  • Program instructions/modules for example, the acquisition module 21, the partition information calculation module 22, the change area detection module 23, and the change information calculation module 24 shown in FIG. 4).
  • the processor 31 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 32, that is, implements the shelf state determination method of the foregoing method embodiment.
  • the memory 32 may include a storage program area and a storage data area.
  • the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the shelf state determination device.
  • the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 32 may optionally include a memory remotely provided with respect to the processor 31, and these remote memories may be connected to the member user behavior monitoring device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 33 can receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the shelf state determining device.
  • the output device 34 may include a display device such as a display screen. In some embodiments, one or both of the input device 33 and the output device 34 may be optional. In some embodiments, the input device 33 and the output device 34 may be at least partially the same hardware.
  • the one or more modules are stored in the memory 32, and when executed by the one or more processors 31, the shelf state determination method in any of the foregoing method embodiments is executed.
  • the technical effect of the embodiment of the device for executing the method for determining the shelf status is the same as or similar to any of the foregoing method embodiments.
  • An embodiment of the present application provides a non-transitory computer storage medium that stores computer-executable instructions, and the computer-executable instructions can execute the processing method of the list item operation in any of the foregoing method embodiments.
  • the technical effect of the embodiment of the non-transitory computer storage medium is the same as or similar to any of the foregoing method embodiments.
  • the programs can be stored in a computer readable storage.
  • the medium when the program is executed, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
  • the embodiment of the computer program has the same or similar technical effect as any of the foregoing method embodiments.
  • the devices, devices, etc. described in the present disclosure may be various electronic terminal devices, such as mobile phones, personal digital assistants (PDA), tablet computers (PAD), smart TVs, etc., or large-scale terminal devices, such as Servers, etc., therefore, the protection scope of the present disclosure should not be limited to a specific type of device or equipment.
  • the client described in the present disclosure may be applied to any of the above electronic terminal devices in the form of electronic hardware, computer software or a combination of both.
  • the method according to the present disclosure may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium.
  • the computer program executes the above-mentioned functions defined in the method of the present disclosure.
  • the above method steps and modules can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
  • non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory Memory.
  • Volatile memory can include random access memory (RAM), which can act as external cache memory.
  • RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous link DRAM (SLDRAM) and direct RambusRAM (DRRAM).
  • DRAM synchronous RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM Synchronous link DRAM
  • DRRAM direct Rambus RAM
  • the storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
  • DSP digital signal processors
  • ASIC dedicated Integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
  • the processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.
  • the steps of the method or algorithm described in combination with the disclosure herein may be directly included in hardware, a software module executed by a processor, or a combination of the two.
  • the software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor such that the processor can read information from or write information to the storage medium.
  • the storage medium may be integrated with the processor.
  • the processor and the storage medium may reside in the ASIC.
  • the ASIC can reside in the user terminal.
  • the processor and the storage medium may reside as discrete components in the user terminal.
  • the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted through the computer-readable medium.
  • Computer-readable media include computer storage media and communication media, including any media that facilitates the transfer of a computer program from one location to another.
  • a storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
  • the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or may be used for carrying or storing instructions in the form of Or any other medium that can be accessed by a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave to send software from a website, server, or other remote source
  • coaxial cable Cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are all included in the definition of media.
  • magnetic disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVD), floppy disks, and Blu-ray disks. Disks generally reproduce data magnetically, while optical disks use lasers to optically reproduce data .
  • the combination of the above content should also be included in the scope of computer-readable media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

一种货架状态确定方法、装置、电子设备和存储介质,该方法包括:获取货架图像(200)(11);对所述货架图像(200)进行标签背板(220)检测和标签(230)检测,得到所述货架的标签背板信息和标签信息(12);根据所述标签背板信息和标签信息,得到货架分区信息(13);检测所述货架的货物变化区域(14);比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息(250)(15)。

Description

货架状态确定方法及装置、存储介质
交叉引用
本申请要求于2019年3月29日提交的题为“货架状态确定方法及装置、电子设备、存储介质”的中国专利申请(申请号:CN201910249985.4)的优先权,在此以全文引用的方式将其并入本文中。
技术领域
本公开涉及图像处理技术领域,特别是指一种货架状态确定方法及装置、存储介质。
背景技术
现在,商超、仓库等货架通常需要人员进行货物清点以找出空置货架并补货。这种过程费时费力,浪费了人力资源。相关技术中的空置货架计算方法,通常是采用货架图像与货架模板图像进行直接比对而得出空置位置,但这种计算方法并不能准确得出货架的具体空缺位置,容易产生误差。
发明内容
有鉴于此,本公开实施例的目的之一在于,提出一种货架状态确定方法及装置、存储介质,能够计算得到较为准确的货架变化情况。
基于上述目的,本公开实施例的第一个方面,提供了一种货架状态确定方法,包括:
获取货架图像;
对所述货架图像进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息;
根据所述标签背板信息和标签信息,得到货架分区信息;
检测所述货架的货物变化区域;
比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息。
在一些实施例中,所述货架状态确定方法,还包括:
将所述货架变化位置信息推送给指定用户。
在一些实施例中,所述货架变化位置信息包括货架缺货位置信息。
在一些实施例中,根据所述标签背板信息和标签信息,得到货架分区信息,包括:
根据所述标签背板信息,得到货架分层信息;
根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
在一些实施例中,对所述货架图像进行标签背板检测,包括:
对所述货架图像进行直线检测,得到直线检测结果;
基于标签背板的边缘特性和形状特性,去除所述直线检测结果中误检测到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,以得到所述货架的标签背板信息。
在一些实施例中,对所述货架图像进行标签检测,包括:
获取标签模板图像;
提取所述标签模板图像和所述货架图像的第一图像特征;
根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图;
对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合;
根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域;
提取所述待定标签区域与所述标签模板图像的第二图像特征;
根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二相关系数;
确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
在一些实施例中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征。
在一些实施例中,所述第二图像特征为包含角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项在内的纹理特征。
在一些实施例中,检测所述货架的货物变化区域,包括:
获取参考图像;
根据所述货架图像和参考图像,检测得到货物变化区域。
在一些实施例中,根据所述货架图像和参考图像,检测得到货物变化区域,包括:
提取所述货架图像和参考图像的第三图像特征;
根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
本公开实施例的第二个方面,提供了一种货架状态确定装置,包括:
处理器;
存储器,存储有能被所述处理器执行的指令,所述指令在被所述处理器执行时使所述处理器:
获取货架图像;
对所述货架图像进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息;以及,根据所述标签背板信息和标签信息,得到货架分区信息;
检测所述货架的货物变化区域;
比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:将所述货架变化位置信息推送给指定用户。
在一些实施例中,所述货架变化位置信息包括货架缺货位置信息。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:
根据所述标签背板信息,得到货架分层信息;
根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:
对所述货架图像进行直线检测,得到直线检测结果;
基于标签背板的边缘特性和形状特性,去除所述直线检测结果中误检测到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,以得到所述货架的标签背板信息。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:
获取标签模板图像;
提取所述标签模板图像和所述货架图像的第一图像特征;
根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图;
对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合;
根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域;
提取所述待定标签区域与所述标签模板图像的第二图像特征;
根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二相关系数;
确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
在一些实施例中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征。
在一些实施例中,所述第二图像特征为包含角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项在内的纹理特征。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:
获取参考图像;
根据所述货架图像和参考图像,检测得到货物变化区域。
在一些实施例中,所述指令在被所述处理器执行时还使所述处理器:
提取所述货架图像和参考图像的第三图像特征;
根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
本公开实施例的第三个方面,提供了一种存储有计算机程序的计算机可读存储介质,其中,所述计算机程序在由处理器执行时实现所述货架状态确定方法的步骤。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例的附图作简单地介绍,显而易见地,下面描述中的附图仅仅涉及本公开的一些实施例,而非对本公开的限制。
图1为本公开实施例提供的货架状态确定方法的流程示意图;
图2A为本公开实施例中货架图像的示意图;
图2B为本公开实施例中标签模板图像的示意图;
图2C为本公开实施例中参考图像的示意图;
图2D为本公开实施例中检测标签背板的边缘直线时的示意图;
图3A为本公开实施例中检测标签的流程示意图;
图3B为本公开实施例中计算第一相关系数的流程示意图;
图3C为本公开实施例中确定标签的步骤的具体流程示意图;
图3D为本公开实施例中计算货架分区信息的流程示意图;
图3E为本公开实施例中检测货物变化区域的流程示意图;
图4为本公开实施例提供的货架状态确定装置的功能模块示意图;
图5为本公开实施例提供的执行所述货架状态确定方法的装置的硬件结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例的附图,对本公开实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于所描述的本公开的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
除非另外定义,本公开使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,“一个”、“一”或者“该”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。“上”、“下”、“左”、“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。
本公开实施例的第一个方面,提出了一种货架状态确定方法,能够计算得到较为准确的货架变化情况。
所述货架状态确定方法,包括:
步骤11:获取货架图像,参考图2A所示。
所述货架图像200可以通过设置在货架前方的相机进行实时拍摄,拍摄 得到的货架图像200则可以通过相应的有线或无线传输方式而获取得到。对于输入的货架图像200,还可以首先进行去除噪声、图像增强等预处理。此外,在另一些实施例中,货架图像200也可以通过其他方式获取,例如从远程服务器、在虚拟现实(VR)环境中实时生成、通过便携式存储设备复制等。如图2A所示,货架图像200中的货架可以包括货架的侧面支架210、标签背板220、标签230以及货物240。此外,附图标记250指示了货架图像200中的部分缺货货物的位置。
步骤12:对所述货架图像200进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息。
标签背板220为两层货架间放置标签的长方形区域,标签背板区域220与货架其它区域有一定的区分度。标签背板检测的输入为货架图像200,输出为标签背板220的4个边缘线段信息。
这里的标签230指的是记载每种货物240的货物信息的标签,在商超场景下,标签通常可以为价签,价签中除了货物信息可能还有价格信息等,在货仓场景下,标签则通常只记载货物相关的信息而不包括商品价格信息。
在一些实施例中,对所述货架图像200进行标签背板检测,可包括以下步骤:
对所述货架图像200进行直线检测,得到直线检测结果;在一些实施例中,这里的直线检测方法可以采用Canny算法、Sobel算子,Laplacian算子、霍夫变换算法等算法来实现;
基于标签背板220的边缘特性和形状特性对直线检测结果进行后处理,去除所述直线检测结果中误检到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,最终得到标签背板信息。在一些实施例中,在进行直线检测之后,可能得到如图2D所示的标签背板220的线图。如图2D所示,线图中可包括例如检测到的标签背板220的实际边缘直线260、被漏检的边缘直线的断裂部分270、和/或被误检测到的非边缘直线280。导致边缘直线的误检和/或漏检的原因多种多样,包括(但不限于):光线变化、障碍物遮挡、图像过度预处理等等。
在一些实施例中,去除误检到的伪标签背板边缘直线的方法可以包括(但不限于)例如判断其线条长度,并将其或其相对于货架图像的宽度(或高度)的比例与预定阈值进行比较,当小于预定阈值时,可将其视为误检测 到的伪标签背板边缘直线。这是因为,通常标签背板是例如横贯整个货架图像的,因此标签背板的边缘直线的长度或其相对于货架图像的比例应当足够大。此外,在另一些实施例中,由于标签背板通常是矩形形状的(或由于图像畸变而如图2A、图2C和图2D所示为梯形形状的),因此如果某条边缘直线无法与其他边缘直线构成矩形(或梯形)形状,则其可以被视为是误检测到的伪标签背板边缘直线。需要注意的是:判断是否是伪标签背板边缘直线的方法不限于上述实施例。此外,在另一些实施例中,如果将两条边缘直线判断为在大体上一条直线上出现少于阈值长度的断开,则可以将其视为边缘直线漏检,并将其自动连接为一条直线。
在一些实施例中,如图3A所示,对所述货架图像进行标签检测,包括:
步骤121:获取标签模板图像,参考图2B所示。
这里,所述标签模板图像可以根据实际使用的货物标签的图样进行事先采集。图2B中示出了一种超市中商品的标签图像的示例,所述标签模板图像可以将其中的具体文字以符号替代而得到。对于同一种类型标签,可由上到下提取货架上不同层的标签模板图像。
步骤122:提取所述标签模板图像和所述货架图像的第一图像特征。
在一些实施例中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征。
在一些实施例中,对于图像亮度而言,如果是灰度图像,则亮度与图像的灰度值有关,灰度值越高则图像越亮,因此,提取所述亮度特征的方法,包括:
若所述标签模板图像和所述货架图像为彩色图像,则计算红绿蓝(RGB)3个颜色通道的灰度均值并生成灰度图像,并将所述灰度图像进行归一化,即将图像像素值都除以图像像素最大值,得到亮度特征图像;
若所述标签模板图像和所述货架图像为灰度图像,则将所述灰度图像进行归一化,即可得到亮度特征。
在一些实施例中,提取所述颜色特征的方法,包括:
若所述标签模板图像和所述货架图像为彩色图像,对于像素点(x,y),其中x为行值,y为列值,标记图像的红色通道在像素点(x,y)的像素值为r、绿色通道在像素点(x,y)的像素值为g、蓝色通道在像素点(x,y)的像素值为b,提取像素点(x,y)以下4个维度的颜色特征:
Figure PCTCN2020075805-appb-000001
Figure PCTCN2020075805-appb-000002
Figure PCTCN2020075805-appb-000003
Y=r+g-2(|r-g|+b)
对图像中所有像素点进行上述操作,生成对应的4个颜色特征图像,分别对上述4个颜色特征图像进行归一化,得到颜色特征。
若所述标签模板图像和所述货架图像为灰度图像,则不提取这些颜色特征。
在一些实施例中,提取所述方向特征的方法,包括:
采用伽柏(Gabor)小波变换分别提取所述标签模板图像和所述货架图像的0度、35度、90度、135度共4个方向的特征,并进行归一化,得到方向特征。
在一些实施例中,提取所述梯度特征的方法包括:
若所述标签模板图像和所述货架图像为彩色图像,则将图像灰度化为灰度图像;提取灰度图像的梯度幅值特征,并进行归一化,得到梯度特征;
若所述标签模板图像和所述货架图像为灰度图像,则直接提取灰度图像的梯度特征,并进行归一化,得到梯度特征。
具体地,图像函数f(x,y)在点(x,y)的梯度是一个具有大小和方向的矢量,用G x和G y分别表示图像函数f(x,y)在x方向和y方向的梯度,这个梯度的矢量可以表示为:
Figure PCTCN2020075805-appb-000004
梯度的方向是函数f(x,y)变化最快的方向,当图像中存在边缘时,一定有较大的梯度值,相反,当图像中有比较平滑的部分时,灰度值变化较小,则相应的梯度也较小,图像处理中把梯度的模简称为梯度,由图像梯度构成的图像称为梯度图像。
至此,计算得到亮度、颜色、方向和梯度等特征,各归一化特征组成的一个特征向量,用于后续计算相关系数。
需要说明的是,前述的包含亮度、颜色、方向和梯度各特征的第一图像特征并不是本公开唯一的实施例,实际上,可以根据需要调整第一图像特征 中所包含的特征,例如增加其他特征或对其中的特征进行删减等等。
步骤123:根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图。
在一些实施例中,如图3B所示,根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,包括:
步骤1231:在所述货架图像上,将所述标签模板图像以像素为单位移动,以遍历所述货架图像;
步骤1232:计算每次移动后所述标签模板图像与其所覆盖的所述货架图像之间的所述第一相关系数,即每移动一次,计算一次所述标签模板图像与其所覆盖的所述货架图像之间的第一相关系数。
根据前述的第一相关系数的计算方法,即标签模板图像每移动一次,计算一次所述标签模板图像与其所覆盖的所述货架图像之间的第一相关系数,这样,在每个位置分别计算得到一个第一相关系数,将所有第一相关系数组合起来,结合第一相关系数对应的所述标签模板图像的中心点所移动到货架图像上的位置,即生成标签显著图。所述标签显著图的某一位置的第一相关系数值越大,表征以该位置为中心点的标签所占区域为真实标签的可能性越大。
步骤124:对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合。
步骤125:根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域。
这里,标签显著图是根据第一相关系数以及第一相关系数对应的所述标签模板图像的中心点所移动到货架图像上的位置而生成的,即标签显著图的点的平面坐标为第一相关系数对应的所述标签模板图像的中心点所移动到货架图像上的位置,这样,通过自适应阈值分割筛选得到的标签显著图上的点即为一些离散的点的集合,而以这些点为中心点且以标签模板图像的尺寸为大小的区域即为待定标签区域。
在一些实施例中,对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合,包括:
对所述标签显著图利用自适应阈值分割算法(如OTSU,亦称大津法或最大类间方差法)进行二值分割,其中前景区域为所述待定标签区域的中心 点集合。
步骤126:提取所述待定标签区域与所述标签模板图像的第二图像特征。
需要说明的是,这里提取所述待定标签区域的第二图像特征的步骤,也可以是提前对整个货架图像(其中含有待定标签区域)处理得到的,并且可以预先进行处理(即在一开始就对货架图像提取第二图像特征,而不是在得到待定标签区域以后再提取),而不仅仅限于仅对待定标签区域进行第二图像特征的提取。当然这两种第二图像特征提取方式均可应用于本公开,这里并不进行具体限定。
在一些实施例中,所述第二图像特征为包含角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项在内的纹理特征。
在一些实施例中,提取所述纹理特征的方法包括:
根据图像生成灰度共生矩阵;
从所述灰度共生矩阵中提取角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项,并进行归一化,得到所述纹理特征。
具体地,灰度共生矩阵(GLCM),指的是一种通过研究灰度的空间相关特性来描述纹理的常用方法。由于纹理是由灰度分布在空间位置上反复出现而形成的,因而在图像空间中相隔某距离的两像素之间会存在一定的灰度关系,即图像中灰度的空间相关特性。
灰度直方图是对图像上单个像素具有某个灰度进行统计的结果,而灰度共生矩阵是对图像上保持某距离的两像素分别具有某灰度的状况进行统计得到的。灰度共生矩阵生成简要介绍如下:
取图像(N×N)中任意一点(x,y)及偏离它的另一点(x+a,y+b),设该点对的灰度值为(g1,g2)。令点(x,y)在整个画面上移动,则会得到各种(g1,g2)值,设灰度值的级数为k,则(g1,g2)的组合共有k的平方种。对于整个画面,统计出每一种(g1,g2)值出现的次数,然后排列成一个方阵,再用(g1,g2)出现的总次数将它们归一化为出现的概率P(g1,g2),这样的方阵称为灰度共生矩阵。距离差分值(a,b)取不同的数值组合,可以得到不同情况下的联合概率矩阵。(a,b)取值要根据纹理周期分布的特性来选择,对于较细的纹理,选取(1,0)、(1,1)、(2,0)等小的差分值。
当a=1,b=0时,像素对是水平的,即0度扫描;当a=0,b=1时,像素对是垂直的,即90度扫描;当a=1,b=1时,像素对是右对角线的,即45 度扫描;当a=-1,b=1时,像素对是左对角线,即135度扫描。
这样,两个象素灰度级同时发生的概率,就将(x,y)的空间坐标转化为“灰度对”(g1,g2)的描述,形成了灰度共生矩阵。
直觉上来说,如果图像的是由具有相似灰度值的像素块构成,则灰度共生矩阵的对角元素会有比较大的值;如果图像像素灰度值在局部有变化,那么偏离对角线的元素会有比较大的值。
通常可以用一些标量来表征灰度共生矩阵的特征,令G表示灰度共生矩阵常用的特征有:
角二阶矩(angular second moment,ASM):
Figure PCTCN2020075805-appb-000005
也即每个矩阵元素的平方和。
如果灰度共生矩阵中的值集中在某一块(比如对连续灰度值图像,值集中在对角线;对结构化的图像,值集中在偏离对角线的位置),则ASM有较大值,若G中的值分布较均匀(如噪声严重的图像),则ASM有较小的值。
角二阶矩是灰度共生矩阵元素值的平方和,所以也称能量,反映了图像灰度分布均匀程度和纹理粗细度,当图像纹理较细致、灰度分布均匀时,能量值较大,反之,较小。如果共生矩阵的所有值均相等,则ASM值小;相反,如果其中一些值大而其它值小,则ASM值大。当共生矩阵中元素集中分布时,此时ASM值大。ASM值大表明一种较均一和规则变化的纹理模式。
对比度(contrast):
Figure PCTCN2020075805-appb-000006
直接反映了某个像素值及其邻域像素值的亮度的对比情况。如果偏离对角线的元素有较大值,即图像亮度值变化很快,则CON会有较大取值,这也符合对比度的定义。对比度反映了图像的清晰度和纹理沟纹深浅的程度。纹理沟纹越深,其对比度越大,视觉效果越清晰;反之,对比度小,则沟纹浅,效果模糊。
逆差矩(inverse difference moment,IDM):
Figure PCTCN2020075805-appb-000007
如果灰度共生矩阵对角元素有较大值,IDM就会取较大的值。因此连续灰度的图像会有较大IDM值。逆差矩反映图像纹理的同质性,度量图像纹理局部变化的多少。逆差矩反映了纹理的清晰程度和规则程度,纹理清晰、规 律性较强、易于描述的,值较大;杂乱无章的,难于描述的,值较小。其值大则说明图像纹理的不同区域间缺少变化,局部非常均匀。
相关性(correlation):
Figure PCTCN2020075805-appb-000008
其中,
Figure PCTCN2020075805-appb-000009
Figure PCTCN2020075805-appb-000010
Figure PCTCN2020075805-appb-000011
Figure PCTCN2020075805-appb-000012
相关性反应了图像纹理的一致性,用来度量图像的灰度级在行或列方向上的相似程度,因此值的大小反应了局部灰度相关性,值越大,相关性也越大。如果图像中有水平方向纹理,则水平方向矩阵的COR大于其余矩阵的COR值。它度量空间灰度共生矩阵元素在行或列方向上的相似程度,因此,相关值大小反映了图像中局部灰度相关性。当矩阵元素值均匀相等时,相关值就大;相反,如果矩阵像元值相差很大则相关值小。
熵(entropy):
Figure PCTCN2020075805-appb-000013
若灰度共生矩阵值分布均匀,也即图像近于随机或噪声很大,熵会有较大值。
熵是图像所具有的信息量的度量,纹理信息也属于图像的信息,是一个随机性的度量,当共生矩阵中所有元素有最大的随机性、空间共生矩阵中所有值几乎相等时,共生矩阵中元素分散分布时,熵较大。它表示了图像中纹理的非均匀程度或复杂程度。
最后,可以用一个特征向量将以上特征综合在一起,综合后的特征向量就可以看做是对图像纹理的一种描述,可以进一步用来分类、识别、检索等。
需要说明的是,前述纹理特征所选择的具体特征可以根据需要进行调整、增删,并不局限于前述实施例中所提供的方案。
步骤127:根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二相关系数。
步骤128:确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
在一些实施例中,如图3C所示,所述确定所述第二相关系数大于预设系数阈值的待定标签区域为标签,包括:
步骤1281:对待定标签区域按其第一相关系数由大到小进行排序;
步骤1282:按照排列顺序,依次计算每个待定标签区域与所述标签模板图像的第二图像特征之间的第二相关系数;
步骤1283:将所述第二相关系数大于预设系数阈值的待定标签区域确定为标签,当所述第二相关系数小于所述预设系数阈值,则停止第二相关系数的计算。这样,可以节省计算时间,提高计算效率。
这里,需要说明的是,所述预设系数阈值可以根据需要进行设定,例如0.8,但在此并不做具体限定。
这样,通过提取标签模板和货架图像的第一图像特征,以计算第一相关系数,并生成标签显著图,再根据标签显著图得到的待定标签区域,然后提取待定标签区域与所述标签模板的第二图像特征并计算二者的第二相关系数,最后将第二相关系数大于预设系数阈值的待定标签区域确定为标签,采用这样的标签检测方法,能够得到较为准确的货架图像上的标签位置,从而能够根据标签位置实现货架图像的分割,有利于后续的图像比对,以期计算出更准确的货架空置率。
步骤13:根据所述标签背板信息和标签信息,得到货架分区信息。
在一些实施例中,如图3D所示,根据所述标签背板信息和标签信息,得到货架分区信息,包括:
步骤131:根据所述标签背板信息,得到货架分层信息;
步骤132:根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
这样,根据标签背板检测结果可进行货架不同层的分割,再结合标签检测结果可实现同层货架不同货物分区的分割,从而得到货架上不同货物分区信息,实现货架分割。
这里,利用标签模板图像和货架图像获取货架分区信息的步骤可离线进行,货架货物的陈列和标签放置的位置在一段时间内通常是不变的,货架分区信息可在一段时间内持续使用。
步骤14:检测所述货架的货物变化区域。
在一些实施例中,检测所述货架的货物变化区域,包括:
获取参考图像200′,参考图2C所示;
根据所述货架图像200和参考图像200′,检测得到货物变化区域。
所述参考图像200′为货架正常摆放完成货物以后的满货状态下的图像,用于与实时采集的货架图像200进行比对,以得到货物变化区域,即货物的大致变化情况。这里,获取参考图像200′的步骤可以与获取货架图像200的步骤同时进行,以提高处理效率。
在一些实施例中,如图3E所示,根据所述货架图像200和参考图像200′,检测得到货物变化区域,包括:
步骤141:提取所述货架图像200和参考图像200′的第三图像特征(例如彩色、纹理等特征);
步骤142:根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
这里,图像变化检测技术利用的是特征级变化检测技术,特征级变化检测是采用一定的算法先从原始图像中提取特征信息,如边缘、形状、轮廓、纹理等,然后对这些特征信息进行综合分析与变化检测。由于特征级的变化检测对特征进行关联处理,把特征分类成有意义的组合,因而它对特征属性的判断具有更高的可信度和准确性。根据特征描述方法的不同,可采用不同的方法来比较两组特征。具体如下:(1)当采用数值特征来描述检测对象时,可采用统计模式识别的方法来判断两组特征的相似程度及确定检测对象的变化信息;(2)当采用结构特征来描述检测对象时,可采用结构模式识别的方法判断两组特征的相似程度及确定检测对象的变化信息。
当然,可以知道的是,图像变化检测,除了特征级变化检测外,还可以是基于像素的变化检测。基于像素的影像变化检测方法的优点为:方法简单、速度快,容易获得变化区域,但不能确定影像变化类型和性质。它的具体算法有:差值法、比值法、相关系数法、回归分析法等。
在本公开的一些实施例中,检测货架的货物变化区域也可以通过对获取到的货架图像利用深度学习进行图像识别,在货架区域内未识别到货物的区域则为缺货区域即货物变化区域。
步骤15:比对所述货物变化区域和所述货架分区信息,得到货架变化位 置信息。
所述货物变化区域表征的是货架上出现变化的位置,而所述货架分区信息则是基于标签背板和标签对货架上的货物放置位置进行了区分,从而当变化位置与货架某一分区匹配上时,则说明该分区所放置的货物出现了变化情况,从而能准确得到货架上变化货物的信息,即货架变化位置信息。
在一些实施例中,所述货架状态确定方法,还包括步骤16:将所述货架变化位置信息推送给指定用户。这样,通过推送变化信息,使得用户能够及时补货或者及时了解到货物的变化情况。所述指定用户,可以是预先设定的任何需要接收变化信息的人,如超市管理员、补货员等等。
在一些实施例中,所述货架变化位置信息包括货架缺货位置信息,从而能够直接反映货架缺货状态,使相关人员产生警惕以尽早补货。
从上述实施例可以看出,本公开实施例提供的货架状态确定方法,利用标签背板和标签位置进行货架分区,再将货架分区信息与货物变化区域进行比对,得到货架变化位置信息,从而能够较为准确地计算出变化位置,更方便用户知道货架变化的具体位置,从而能够根据该具体位置确认需要调整储货量的货物,使用起来更为方便。
本公开实施例的第二个方面,提出了一种货架状态确定装置,能够计算得到较为准确的货架变化情况。需要注意的是:尽管在图4的实施例中以功能模块的形式来示出了货架状态确定装置,然而其实际硬件结构不限于此。事实上,其也可以采用例如图5所示的处理器加存储器的硬件架构。换言之,可以通过让图5所示的处理器执行存储器中存储的指令来使得处理器能够执行如图4所示的各个模块的功能。
如图4所示,所述货架状态确定装置,包括:
获取模块21,用于获取货架图像;
分区信息计算模块22,用于对所述货架图像进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息;以及,根据所述标签背板信息和标签信息,得到货架分区信息;
变化区域检测模块23,用于检测所述货架的货物变化区域;
变化信息计算模块24,用于比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息。
在一些实施例中,所述货架状态确定装置,还可包括推送模块25,用于将所述货架变化位置信息推送给指定用户。
在一些实施例中,所述货架变化位置信息包括货架缺货位置信息。
从上述实施例可以看出,本公开实施例提供的货架状态确定装置,利用标签背板和标签位置进行货架分区,再将货架分区信息与货物变化区域进行比对,得到货架变化位置信息,从而能够较为准确地计算出变化位置,更方便用户知道货架变化的具体位置,从而能够根据该具体位置确认需要调整储货量的货物,使用起来更为方便。
在一些可选实施方式中,所述分区信息计算模块22,用于:
根据所述标签背板信息,得到货架分层信息;
根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
在一些可选实施方式中,所述分区信息计算模块22,用于:
对所述货架图像进行直线检测,得到直线检测结果;
基于标签背板的边缘特性和形状特性,去除所述直线检测结果中误检到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,以得到货架的标签背板信息。
在一些可选实施方式中,所述分区信息计算模块22,用于:
获取标签模板图像;
提取所述标签模板图像和所述货架图像的第一图像特征;
根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图;
对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合;
根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域;
提取所述待定标签区域与所述标签模板图像的第二图像特征;
根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二相关系数;
确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
在一些可选实施方式中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征。
在一些可选实施方式中,所述第二图像特征为包含角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项在内的纹理特征。
在一些可选实施方式中,所述获取模块21,还用于获取参考图像;
所述变化区域检测模块23,用于根据所述货架图像和参考图像,检测得到货物变化区域。
在一些可选实施方式中,所述变化区域检测模块23,用于:
提取所述货架图像和参考图像的第三图像特征;
根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
上述货架状态确定装置的各实施例与前述的货架状态确定方法的效果基本相同,在此不再赘述。
基于上述目的,本公开实施例的第三个方面,提出了一种执行所述货架状态确定方法的装置的一个实施例。如图5所示,为本公开提供的执行所述货架状态确定方法的装置的一个实施例的硬件结构示意图。
如图5所示,所述装置包括:
一个或多个处理器31以及存储器32,图5中以一个处理器31为例。
所述执行所述货架状态确定方法的装置还可以包括:输入装置33和输出装置34。
处理器31、存储器32、输入装置33和输出装置34可以通过总线或者其他方式连接,图5中以通过总线连接为例。
存储器32作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的所述货架状态确定方法对应的程序指令/模块(例如,附图4所示的获取模块21、分区信息计算模块22、变化区域检测模块23和变化信息计算模块24)。处理器31通过运行存储在存储器32中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的货架状态确定方法。
存储器32可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据货架状态确定装置的使用所创建的数据等。此外,存储器32可以包括高速随机存取 存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器32可选包括相对于处理器31远程设置的存储器,这些远程存储器可以通过网络连接至会员用户行为监控装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置33可接收输入的数字或字符信息,以及产生与货架状态确定装置的用户设置以及功能控制有关的键信号输入。输出装置34可包括显示屏等显示设备。在一些实施例中,输入装置33和输出装置34中的一者或二者可以是可选的。在一些实施例中,输入装置33和输出装置34可以至少部分地是同一硬件。
所述一个或者多个模块存储在所述存储器32中,当被所述一个或者多个处理器31执行时,执行上述任意方法实施例中的货架状态确定方法。所述执行所述货架状态确定方法的装置的实施例,其技术效果与前述任意方法实施例相同或者类似。
本申请实施例提供了一种非暂态计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的列表项操作的处理方法。所述非暂态计算机存储介质的实施例,其技术效果与前述任意方法实施例相同或者类似。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。所述计算机程序的实施例,其技术效果与前述任意方法实施例相同或者类似。
此外,典型地,本公开所述的装置、设备等可为各种电子终端设备,例如手机、个人数字助理(PDA)、平板电脑(PAD)、智能电视等,也可以是大型终端设备,如服务器等,因此本公开的保护范围不应限定为某种特定类型的装置、设备。本公开所述的客户端可以是以电子硬件、计算机软件或两者的组合形式应用于上述任意一种电子终端设备中。
此外,根据本公开的方法还可以被实现为由CPU执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被CPU执行时,执行本公开的方法中限定的上述功能。
此外,上述方法步骤以及模块也可以利用控制器以及用于存储使得控制器实现上述步骤或单元功能的计算机程序的计算机可读存储介质实现。
此外,应该明白的是,本文所述的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)以及直接RambusRAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现所述的功能,但是这种实现决定不应被解释为导致脱离本公开的范围。
结合这里的公开所描述的各种示例性逻辑块、模块和电路可以利用被设计成用于执行这里所述功能的下列部件来实现或执行:通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合。通用处理器可以是微处理器,但是可替换地,处理器可以是任何传统处理器、控制器、微控制器或状态机。处理器也可以被实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、一个或多个微处理器结合DSP核、或任何其它这种配置。
结合这里的公开所描述的方法或算法的步骤可以直接包含在硬件中、由处理器执行的软件模块中或这两者的组合中。软件模块可以驻留在RAM存储器、快闪存储器、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动盘、CD-ROM、或本领域已知的任何其它形式的存储介质中。示例性的存储介质被耦合到处理器,使得处理器能够从该存储介质中读取信息或向该存储介质写入信息。在一个替换方案中,所述存储介质可以与处理器集成在一起。处理器和存储介质可以驻留在ASIC中。ASIC可以驻留在用户终端中。在一个替换方案中,处理器和存储介质可以作为分立组件驻留在用户终端中。
在一个或多个示例性设计中,所述功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将所述功能作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质来传送。计算机可读介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者是可以用于携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外先、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在计算机可读介质的范围内。
公开的示例性实施例,但是应当注公开的示例性实施例,但是应当注意,在不背离权利要求限定的本公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本公开的元素可以以个体形式描述或要求,但是也可以设想多个,除非明确限制为单数。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”(“a”、“an”、“the”)旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本公开的范围(包括权利要求)被限于这些例子;在本公开实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上所述的本公开实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本公开实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本公开实施例的保护范围之内。

Claims (19)

  1. 一种货架状态确定方法,包括:
    获取货架图像;
    对所述货架图像进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息;
    根据所述标签背板信息和标签信息,得到货架分区信息;
    检测所述货架的货物变化区域;
    比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息。
  2. 根据权利要求1所述的方法,其中,根据所述标签背板信息和标签信息,得到货架分区信息,包括:
    根据所述标签背板信息,得到货架分层信息;
    根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
  3. 根据权利要求1所述的方法,其中,对所述货架图像进行标签背板检测,包括:
    对所述货架图像进行直线检测,得到直线检测结果;
    基于标签背板的边缘特性和形状特性,去除所述直线检测结果中误检到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,以得到所述货架的标签背板信息。
  4. 根据权利要求1所述的方法,其中,对所述货架图像进行标签检测,包括:
    获取标签模板图像;
    提取所述标签模板图像和所述货架图像的第一图像特征;
    根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图;
    对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合;
    根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域;
    提取所述待定标签区域与所述标签模板图像的第二图像特征;
    根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二 相关系数;
    确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
  5. 根据权利要求4所述的方法,其中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征;和/或,所述第二图像特征为包含灰度共生矩阵的角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征纹理特征中至少一项在内的纹理特征。
  6. 根据权利要求1所述的方法,其中,检测所述货架的货物变化区域,包括:
    获取参考图像;
    根据所述货架图像和参考图像,检测得到货物变化区域。
  7. 根据权利要求6所述的方法,其中,根据所述货架图像和参考图像,检测得到货物变化区域,包括:
    提取所述货架图像和参考图像的第三图像特征;
    根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
  8. 根据权利要求1所述的方法,还包括:
    将所述货架变化位置信息推送给指定用户。
  9. 根据权利要求1或8所述的方法,其中,所述货架变化位置信息包括货架缺货位置信息。
  10. 一种货架状态确定装置,包括:
    处理器;
    存储器,存储有能被所述处理器执行的指令,所述指令在被所述处理器执行时使所述处理器:
    获取货架图像;
    对所述货架图像进行标签背板检测和标签检测,得到所述货架的标签背板信息和标签信息;以及,根据所述标签背板信息和标签信息,得到货架分区信息;
    检测所述货架的货物变化区域;
    比对所述货物变化区域和所述货架分区信息,得到货架变化位置信息。
  11. 根据权利要求10所述的装置,其中,所述指令在被所述处理器执行 时还使所述处理器:
    根据所述标签背板信息,得到货架分层信息;
    根据所述标签信息,结合所述货架分层信息,得到货架分区信息。
  12. 根据权利要求10所述的装置,其中,所述指令在被所述处理器执行时还使所述处理器:
    对所述货架图像进行直线检测,得到直线检测结果;
    基于标签背板的边缘特性和形状特性,去除所述直线检测结果中误检到的伪标签背板边缘直线,并连接断裂的标签背板边缘直线,以得到所述货架的标签背板信息。
  13. 根据权利要求10所述的装置,其中,所述指令在被所述处理器执行时还使所述处理器:
    获取标签模板图像;
    提取所述标签模板图像和所述货架图像的第一图像特征;
    根据所述标签模板图像和所述货架图像的第一图像特征,计算第一相关系数,并生成标签显著图;
    对所述标签显著图进行自适应阈值分割,得到待定标签区域的中心点集合;
    根据所述待定标签区域的中心点集合,确定所述货架图像中的待定标签区域;
    提取所述待定标签区域与所述标签模板图像的第二图像特征;
    根据所述待定标签区域与所述标签模板图像的第二图像特征,计算第二相关系数;
    确定所述第二相关系数大于预设系数阈值的待定标签区域为标签。
  14. 根据权利要求13所述的装置,其中,所述第一图像特征为包含亮度特征、颜色特征、方向特征和梯度特征中至少一项在内的图像特征;和/或,所述第二图像特征为包含角二阶矩特征、对比度特征、逆差矩特征、相关性特征、熵特征中至少一项在内的纹理特征。
  15. 根据权利要求10所述的装置,其中,所述指令在被所述处理器执行时还使所述处理器:
    获取参考图像;
    根据所述货架图像和参考图像,检测得到货物变化区域。
  16. 根据权利要求15所述的装置,其中,所述指令在被所述处理器执行时还使所述处理器:
    提取所述货架图像和参考图像的第三图像特征;
    根据所述第三图像特征,进行图像变化检测,根据检测得到的图像变化区域确定所述货物变化区域。
  17. 根据权利要求10所述的装置,其中,所述指令在被所述处理器执行时还使所述处理器:将所述货架变化位置信息推送给指定用户。
  18. 根据权利要求10或17所述的装置,其中,所述货架变化位置信息包括货架缺货位置信息。
  19. 一种存储有计算机程序的计算机可读存储介质,其中,所述计算机程序在由处理器执行时实现权利要求1-9中任一项所述的方法的步骤。
PCT/CN2020/075805 2019-03-29 2020-02-19 货架状态确定方法及装置、存储介质 WO2020199775A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910249985.4 2019-03-29
CN201910249985.4A CN109961101B (zh) 2019-03-29 2019-03-29 货架状态确定方法及装置、电子设备、存储介质

Publications (1)

Publication Number Publication Date
WO2020199775A1 true WO2020199775A1 (zh) 2020-10-08

Family

ID=67025345

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075805 WO2020199775A1 (zh) 2019-03-29 2020-02-19 货架状态确定方法及装置、存储介质

Country Status (2)

Country Link
CN (1) CN109961101B (zh)
WO (1) WO2020199775A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883955A (zh) * 2021-03-10 2021-06-01 洛伦兹(北京)科技有限公司 货架布局检测方法、装置及计算机可读存储介质
CN113762701A (zh) * 2021-03-26 2021-12-07 北京京东拓先科技有限公司 物品补货方法、装置以及存储介质
CN114955355A (zh) * 2022-07-07 2022-08-30 中轻长泰(长沙)智能科技股份有限公司 堆垛机认址方法、装置、设备及存储介质
CN116758578A (zh) * 2023-08-18 2023-09-15 上海楷领科技有限公司 机械制图信息提取方法、装置、系统及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109961101B (zh) * 2019-03-29 2021-04-27 京东方科技集团股份有限公司 货架状态确定方法及装置、电子设备、存储介质
CN110472486B (zh) * 2019-07-03 2021-05-11 北京三快在线科技有限公司 一种货架障碍物识别方法、装置、设备及可读存储介质
CN110472515B (zh) * 2019-07-23 2021-04-13 创新先进技术有限公司 货架商品检测方法及系统
US11069073B2 (en) 2019-07-23 2021-07-20 Advanced New Technologies Co., Ltd. On-shelf commodity detection method and system
CN113128813A (zh) * 2019-12-31 2021-07-16 杭州海康机器人技术有限公司 调度货架的方法、装置、仓库系统及存储介质
CN111340078B (zh) * 2020-02-18 2024-03-01 平安科技(深圳)有限公司 证件信息自动归类的方法、装置、介质及电子设备
CN111462125B (zh) * 2020-04-03 2021-08-20 杭州恒生数字设备科技有限公司 一种增强活体检测图像处理系统
CN111832454A (zh) * 2020-06-30 2020-10-27 苏州罗伯特木牛流马物流技术有限公司 利用工业相机视觉识别实现地面货位管理的系统和方法
CN111985559A (zh) * 2020-08-19 2020-11-24 合肥工业大学 一种基于边界特性的轮胎花纹结构相似性检测方法
CN112836578B (zh) * 2020-12-31 2022-09-23 广西慧云信息技术有限公司 一种基于表观特征的货架缺货检测方法
CN113674336A (zh) * 2021-07-27 2021-11-19 浙江大华技术股份有限公司 货架空置信息确定方法、计算机设备及存储装置
CN114708291A (zh) * 2022-04-02 2022-07-05 北京京东乾石科技有限公司 图像处理方法、装置、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732253A (zh) * 2013-12-20 2015-06-24 中国移动通信集团湖北有限公司 基于无源rfid的定位识别方法与系统及装置及中间件
US20170278056A1 (en) * 2014-09-30 2017-09-28 Nec Corporation Information processing apparatus, control method, and program
CN108846401A (zh) * 2018-05-30 2018-11-20 京东方科技集团股份有限公司 商品检测终端、方法、系统以及计算机设备、可读介质
CN109330284A (zh) * 2018-09-21 2019-02-15 京东方科技集团股份有限公司 一种货架系统
CN109961101A (zh) * 2019-03-29 2019-07-02 京东方科技集团股份有限公司 货架状态确定方法及装置、电子设备、存储介质

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112216A (zh) * 2013-04-22 2014-10-22 学思行数位行销股份有限公司 存货管理与行销的图像辨识方法
US9158988B2 (en) * 2013-06-12 2015-10-13 Symbol Technclogies, LLC Method for detecting a plurality of instances of an object
CN203733140U (zh) * 2014-01-21 2014-07-23 北京迪吉特展览展示有限公司 一种零售店铺产品推介多媒体系统及应用其的货架
US9811754B2 (en) * 2014-12-10 2017-11-07 Ricoh Co., Ltd. Realogram scene analysis of images: shelf and label finding
US9524486B2 (en) * 2015-03-04 2016-12-20 Xerox Corporation System and method for retail store promotional price tag detection and maintenance via heuristic classifiers
CN105787930B (zh) * 2016-02-17 2019-01-18 上海文广科技(集团)有限公司 基于锐利度的针对虚化图像的显著性检测方法及系统
US11087272B2 (en) * 2016-03-29 2021-08-10 Bossa Nova Robotics Ip, Inc. System and method for locating, identifying and counting items
CN106446993A (zh) * 2016-11-10 2017-02-22 李锐渊 一种智能实时盘点货架系统
CN108345893B (zh) * 2018-03-15 2021-01-26 京东方科技集团股份有限公司 一种直线检测方法、装置、计算机存储介质及终端
CN208172900U (zh) * 2018-04-08 2018-11-30 上海小亦网络科技有限公司 一种智能售货柜
CN108564557B (zh) * 2018-05-31 2020-08-25 京东方科技集团股份有限公司 图像校正方法及装置
CN208188867U (zh) * 2018-06-01 2018-12-04 西安未来鲜森智能信息技术有限公司 一种用于无人自动售货的商品识别系统
CN109040539B (zh) * 2018-07-10 2020-12-01 京东方科技集团股份有限公司 图像采集装置、货架及图像识别方法
CN108937366A (zh) * 2018-07-18 2018-12-07 广州凌翔网络科技有限公司 一种商品的分类存放架
CN109377550A (zh) * 2018-10-11 2019-02-22 泉州市宏恩新能源汽车科技有限公司 一种三维立体无人超市

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732253A (zh) * 2013-12-20 2015-06-24 中国移动通信集团湖北有限公司 基于无源rfid的定位识别方法与系统及装置及中间件
US20170278056A1 (en) * 2014-09-30 2017-09-28 Nec Corporation Information processing apparatus, control method, and program
CN108846401A (zh) * 2018-05-30 2018-11-20 京东方科技集团股份有限公司 商品检测终端、方法、系统以及计算机设备、可读介质
CN109330284A (zh) * 2018-09-21 2019-02-15 京东方科技集团股份有限公司 一种货架系统
CN109961101A (zh) * 2019-03-29 2019-07-02 京东方科技集团股份有限公司 货架状态确定方法及装置、电子设备、存储介质

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883955A (zh) * 2021-03-10 2021-06-01 洛伦兹(北京)科技有限公司 货架布局检测方法、装置及计算机可读存储介质
CN112883955B (zh) * 2021-03-10 2024-02-02 洛伦兹(北京)科技有限公司 货架布局检测方法、装置及计算机可读存储介质
CN113762701A (zh) * 2021-03-26 2021-12-07 北京京东拓先科技有限公司 物品补货方法、装置以及存储介质
CN114955355A (zh) * 2022-07-07 2022-08-30 中轻长泰(长沙)智能科技股份有限公司 堆垛机认址方法、装置、设备及存储介质
CN114955355B (zh) * 2022-07-07 2023-09-26 中轻长泰(长沙)智能科技股份有限公司 堆垛机认址方法、装置、设备及存储介质
CN116758578A (zh) * 2023-08-18 2023-09-15 上海楷领科技有限公司 机械制图信息提取方法、装置、系统及存储介质
CN116758578B (zh) * 2023-08-18 2023-11-07 上海楷领科技有限公司 机械制图信息提取方法、装置、系统及存储介质

Also Published As

Publication number Publication date
CN109961101A (zh) 2019-07-02
CN109961101B (zh) 2021-04-27

Similar Documents

Publication Publication Date Title
WO2020199775A1 (zh) 货架状态确定方法及装置、存储介质
WO2020199776A1 (zh) 货架空置率计算方法及装置、存储介质
US20210334574A1 (en) Commodity detection terminal, commodity detection method, system, computer device, and computer readable medium
US9576210B1 (en) Sharpness-based frame selection for OCR
WO2020199777A1 (zh) 价签检测方法及装置、存储介质
US9418316B1 (en) Sharpness-based frame selection for OCR
CN105701519A (zh) 基于超像素的图像的实际货架图景象分析
WO2020052270A1 (zh) 一种视频审核的方法、装置和设备
US10169673B2 (en) Region-of-interest detection apparatus, region-of-interest detection method, and recording medium
CN108985190B (zh) 目标识别方法和装置、电子设备、存储介质
US11816946B2 (en) Image based novelty detection of material samples
CN111784675A (zh) 物品纹理信息处理的方法、装置、存储介质及电子设备
Ngoc et al. Saliency-based detection of identy documents captured by smartphones
CN108960247B (zh) 图像显著性检测方法、装置以及电子设备
Devadethan et al. Face detection and facial feature extraction based on a fusion of knowledge based method and morphological image processing
WO2022121021A1 (zh) 一种身份证号码检测方法、装置、可读存储介质和终端
WO2024016632A1 (zh) 亮点定位方法、亮点定位装置、电子设备及存储介质
CN111402177A (zh) 一种清晰度检测方法、系统、设备和介质
US20150030240A1 (en) System and method for enhancing the legibility of images
CN113239738B (zh) 一种图像的模糊检测方法及模糊检测装置
CN115456988A (zh) 一种缺陷检测方法、终端设备及存储介质
CN110276260B (zh) 一种基于深度摄像头的商品检测方法
CN113840135A (zh) 色偏检测方法、装置、设备及存储介质
Wang et al. Database of human segmented images and its application in boundary detection
KR20220067363A (ko) 이미지 분석 서버, 이미지 분석 서버를 이용한 객체 카운팅 방법 및 객체 카운팅 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20784282

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20784282

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/02/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20784282

Country of ref document: EP

Kind code of ref document: A1