WO2020151530A1 - Method, apparatus and device for counting clothing by number of pieces - Google Patents

Method, apparatus and device for counting clothing by number of pieces Download PDF

Info

Publication number
WO2020151530A1
WO2020151530A1 PCT/CN2020/071926 CN2020071926W WO2020151530A1 WO 2020151530 A1 WO2020151530 A1 WO 2020151530A1 CN 2020071926 W CN2020071926 W CN 2020071926W WO 2020151530 A1 WO2020151530 A1 WO 2020151530A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
moving object
clothing
pixel
working area
Prior art date
Application number
PCT/CN2020/071926
Other languages
French (fr)
Chinese (zh)
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 WO2020151530A1 publication Critical patent/WO2020151530A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M7/00Counting of objects carried by a conveyor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

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

Abstract

Provided are a method, apparatus and device for counting clothing by number of pieces. The method comprises: acquiring at least one frame of image data for a quality inspection operation performed on clothing; identifying a moving object in the image data and a working area where the moving object is located; and performing, according to the moving object and the working area, a piece counting operation on the clothing subjected to quality inspection. By means of acquiring at least one frame of image data for a quality inspection operation performed on clothing, identifying a moving object in the image data and a working area where the moving object is located, and performing, according to the moving object and the working area, a piece counting operation on the clothing subjected to quality inspection, the method effectively ensures the piece counting of the clothing subjected to the quality inspection operation, reduces the production management cost of clothing piece counting, ensures the efficiency and accuracy of clothing piece counting, and also facilitates the production management of a factory and improves the management efficiency of the factory; furthermore, the method can enable a user to acquire production process data at any time and understand the progress of order production, thereby finally achieving efficient sales and operation planning.

Description

服装的计件方法、装置及设备Piece counting method, device and equipment for clothing
本申请要求2019年01月23日递交的申请号为201910063798.7、发明名称为“服装的计件方法、装置及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 201910063798.7 filed on January 23, 2019, and the invention title of "Piece Counting Method, Apparatus and Equipment for Clothing", the entire content of which is incorporated into this application by reference.
技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种服装的计件方法、装置及设备。The present invention relates to the field of computer technology, in particular to a method, device and equipment for piece counting of clothing.
背景技术Background technique
在生产加工服装时,工厂的加工过程主要包括:裁布、流水线/整件、后道三个流程。目前,在后道环节中,可以对服装计件操作,实现计件操作的具体方式包括:采用的都是传统侵入式的条码枪、无线射频识别RFID技术或者直接派专门的计件人员进行人工数据录入操作。In the production and processing of garments, the processing process of the factory mainly includes three processes: cloth cutting, assembly line/complete, and later. At present, in the subsequent links, garment piece counting operations can be performed. The specific methods for achieving piece counting operations include: using traditional intrusive bar code guns, radio frequency identification RFID technology or directly assigning specialized piece counting personnel to perform manual data entry operations .
然而,采用条码枪、无线射频识别RFID技术的方式对服装进行计件操作,需要增加工人的操作和学习时间成本,极大地提高了工厂加工衣服的成本;而采用人工统计的方式对服装进行计件操作,不仅效率低,并且还增加了人力成本,进而降低了工厂对服装的管理效率。However, the use of barcode guns and radio frequency identification RFID technology to perform piece-counting operations on clothing requires increased operation and learning time costs for workers, which greatly increases the cost of processing clothes in the factory; while manual statistics are used to perform piece-counting operations on clothing. , Not only low efficiency, but also increased labor costs, thereby reducing the efficiency of the factory's clothing management.
发明内容Summary of the invention
本发明实施例提供了一种服装的计件方法、装置及设备,用以降低对服装计件的成本,保证服装计件的效率,进而提高工厂对服装的管理效率。The embodiment of the present invention provides a garment piece counting method, device and equipment, which are used to reduce the cost of garment piece counting, ensure the efficiency of garment piece counting, and thereby improve the management efficiency of garments in factories.
第一方面,本发明实施例提供一种服装的计件方法,包括:In the first aspect, an embodiment of the present invention provides a garment piece counting method, including:
获取对服装进行质检操作的至少一帧图像数据;Acquiring at least one frame of image data for performing quality inspection operations on clothing;
识别所述图像数据中的运动对象以及运动对象所在的工作区域;Identifying a moving object in the image data and a working area where the moving object is located;
根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作。Perform a piece counting operation on the clothing after quality inspection according to the moving object and the working area.
第二方面,本发明实施例提供一种服装的计件装置,其包括:In a second aspect, an embodiment of the present invention provides a piece counting device for clothing, which includes:
获取模块,用于获取对服装进行质检的至少一帧图像数据;The acquisition module is used to acquire at least one frame of image data for quality inspection of clothing;
识别模块,用于识别所述图像数据中的运动对象以及运动对象所在的工作区域;Recognition module for recognizing the moving object in the image data and the working area where the moving object is located;
计件模块,用于根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作。The piece-counting module is used to perform piece-counting operations on the clothing after quality inspection according to the moving object and the working area.
第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第一方面中的服装的计件方法。In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are processed by the The garment piece counting method in the first aspect mentioned above is realized when the device is executed.
第四方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第一方面中的服装的计件方法。In a fourth aspect, an embodiment of the present invention provides a computer storage medium for storing a computer program that enables the computer to implement the garment piece counting method in the first aspect when executed by a computer.
通过获取对服装进行质检操作的至少一帧图像数据,识别所述图像数据中的运动对象以及运动对象所在的工作区域,并根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作,有效地保证了对进行质检操作的服装的计件统计,并且降低了对服装计件的生产管理成本,保证了服装计件的效率和准确率,也便于工厂进行生产管理,提升了工厂的管理效率;同时可以使得用户可以随时获取生产过程数据、了解订单生产进度,最终实现了高效的产销协同。By acquiring at least one frame of image data for performing quality inspection operations on clothing, the moving object in the image data and the working area where the moving object is located are identified, and the quality-inspected image data is compared according to the moving object and the working area. The garment piece counting operation effectively ensures the piece counting statistics of the garments undergoing quality inspection operations, and reduces the production management cost of the garment piece counting, ensures the efficiency and accuracy of the garment piece counting, and facilitates the production management of the factory. The management efficiency of the factory; at the same time, users can obtain production process data and understand the order production progress at any time, and finally realize efficient production and sales collaboration.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本发明实施例提供的一种服装的计件方法的流程图;FIG. 1 is a flowchart of a method for counting pieces of clothing provided by an embodiment of the present invention;
图2为本发明实施例提供的识别所述图像数据中的运动对象的流程图;FIG. 2 is a flowchart of identifying moving objects in the image data provided by an embodiment of the present invention;
图3为本发明实施例提供的根据至少一帧所述图像数据和所述背景模型图像识别每帧所述图像数据中的运动对象的流程图;3 is a flowchart of identifying a moving object in each frame of the image data according to at least one frame of the image data and the background model image according to an embodiment of the present invention;
图4为本发明实施例提供的根据所述第一像素值和所述第二像素值确定所述图像数据中的运动对象的流程图;4 is a flowchart of determining a moving object in the image data according to the first pixel value and the second pixel value according to an embodiment of the present invention;
图5为本发明实施例提供的识别所述图像数据中运动对象所在的工作区域的流程图;FIG. 5 is a flowchart of identifying a working area where a moving object in the image data is located according to an embodiment of the present invention;
图6为本发明实施例提供的建立用于体现所述运动对象的动作变化频率的统计矩阵的流程图;6 is a flowchart of establishing a statistical matrix for reflecting the frequency of movement changes of the moving object provided by an embodiment of the present invention;
图7为本发明实施例提供的根据所述统计矩阵确定所述运动对象所在的工作区域的流程图;FIG. 7 is a flowchart of determining the working area where the moving object is located according to the statistical matrix according to an embodiment of the present invention;
图8为本发明实施例提供的对所述统计矩阵进行更新的流程图;FIG. 8 is a flowchart of updating the statistical matrix according to an embodiment of the present invention;
图9为本发明实施例提供的根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作的流程图;9 is a flowchart of a piece counting operation performed on the garment after quality inspection according to the moving object and the work area provided by an embodiment of the present invention;
图10为本发明实施例提供的一种服装的计件装置的结构示意图;10 is a schematic structural diagram of a piece counting device for clothing provided by an embodiment of the present invention;
图11为与图10所示实施例提供的服装的计件装置对应的电子设备的结构示意图。Fig. 11 is a schematic structural diagram of an electronic device corresponding to the piece counting device for clothing provided by the embodiment shown in Fig. 10.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms of "a", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, "multiple" Generally, at least two are included, but the inclusion of at least one is not excluded.
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that the term "and/or" used in this text is only an association relationship describing associated objects, indicating that there can be three types of relationships. For example, A and/or B can mean that there is A alone, and both A and B, there are three cases of B alone. In addition, the character "/" in this text generally indicates that the associated objects before and after are in an "or" relationship.
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the words "if" and "if" as used herein can be interpreted as "when" or "when" or "in response to determination" or "in response to detection". Similarly, depending on the context, the phrase "if determined" or "if detected (statement or event)" can be interpreted as "when determined" or "in response to determination" or "when detected (statement or event) )" or "in response to detection (statement or event)".
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a commodity or system including a series of elements not only includes those elements, but also includes those elements that are not explicitly listed Other elements of, or also include elements inherent to this commodity or system. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the commodity or system that includes the element.
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。In addition, the sequence of steps in the following method embodiments is only an example, and is not strictly limited.
图1为本发明实施例提供的一种服装的计件方法的流程图;参考附图1所示,本实 施例提供了一种服装的计件方法,该计件方法的执行主体为计件装置,在计件装置执行该计件方法时,可以在生产加工服装的后道流程中,实现对进行质检操作的服装进行计件统计。具体的,该计件方法可以包括:Fig. 1 is a flowchart of a method for counting pieces of clothing provided by an embodiment of the present invention; referring to Fig. 1, this embodiment provides a method for counting pieces of clothing. The main body of the method is a piece counting device. When the device executes the piece counting method, it can realize the piece counting statistics of the garments undergoing quality inspection operations in the subsequent process of producing and processing garments. Specifically, the piece counting method may include:
S101:获取对服装进行质检操作的至少一帧图像数据。S101: Acquire at least one frame of image data for performing quality inspection operations on clothing.
其中,本实施例中的图像数据可以为实时获取的,例如:在对服装进行质检操作时,可以在预设的位置处安装图像采集装置,图像采集装置可以为摄像头,此时,通过图像采集装置可以实时获取到对服装进行质检操作的图像数据。或者,本实施例中的图像数据也可以是非实时获取的,此时,图像数据可以通过预设的图像采集装置采集,并存储在预设的存储区域,通过访问该存储区域可以获得图像数据;或者,图像数据也可以为图像采集装置主动或者被动发送的,此时,该图像数据可以存储在图像采集装置的预设区域上。当然的,本领域技术人员还可以根据具体的设计需求和应用场景选择其他的方式来获取对服装进行质检操作的图像数据,只要能够保证图像数据获取的准确可靠性即可,在此不再赘述。Among them, the image data in this embodiment can be acquired in real time. For example, when performing quality inspection operations on clothing, an image acquisition device can be installed at a preset position. The image acquisition device can be a camera. The acquisition device can acquire real-time image data for quality inspection operations on clothing. Alternatively, the image data in this embodiment may also be acquired in non-real time. In this case, the image data may be acquired by a preset image acquisition device and stored in a preset storage area, and the image data can be obtained by accessing the storage area; Alternatively, the image data may also be actively or passively sent by the image acquisition device. In this case, the image data may be stored in a preset area of the image acquisition device. Of course, those skilled in the art can also choose other ways to obtain image data for quality inspection operations on clothing according to specific design requirements and application scenarios, as long as the accuracy and reliability of image data acquisition can be guaranteed. Repeat.
可选地,在获取对服装进行质检的至少一帧图像数据之后,为了保证对图像数据进行处理的质量和效率,本实施例中的方法还可以包括:调整至少一帧图像数据的分辨率,使得图像数据的分辨率满足预设标准。Optionally, after acquiring at least one frame of image data for quality inspection of clothing, in order to ensure the quality and efficiency of processing the image data, the method in this embodiment may further include: adjusting the resolution of at least one frame of image data , So that the resolution of the image data meets the preset standard.
其中,预设标准为预先设置的,本领域技术人员可以根据具体的应用需求来设置不同的分辨率标准,例如:预设标准可以是指图像数据的分辨率为320*240dpi;或者,预设标准可以是指图像数据的分辨率为640*480dpi等等。需要说明的是,图像数据的分辨率满足预设标准可以保证对图像数据进行分析识别的准确可靠性,因此,在获取到图像数据之后,可以先获取图像数据的分辨率,在图像数据的分辨率大于预设标准时,则说明此时的图像数据为大分辨率图像,在对图像数据进行处理时,计算的数据量较大,因此,为了保证对图像数据处理的质量和效率,可以降低图像数据的分辨率,以降低对图像数据进行处理的计算量,从而保证了对图像数据处理的实时性和可靠性。在图像数据的分辨率小于预设标准时,则说明此时的图像数据为小分辨率图像,在进行处理时,为了保证对图像数据中运动对象和工作区域进行识别的准确性,可以提高图像数据的分辨率。Among them, the preset standard is preset, and those skilled in the art can set different resolution standards according to specific application requirements. For example, the preset standard may mean that the resolution of the image data is 320*240dpi; or, the preset The standard may mean that the resolution of the image data is 640*480dpi and so on. It should be noted that if the resolution of the image data meets the preset standard, the accuracy and reliability of the analysis and recognition of the image data can be guaranteed. Therefore, after the image data is obtained, the resolution of the image data can be obtained first. When the rate is greater than the preset standard, it means that the image data at this time is a large-resolution image. When the image data is processed, the amount of calculated data is relatively large. Therefore, in order to ensure the quality and efficiency of image data processing, the image can be reduced The resolution of the data can reduce the amount of calculation for processing the image data, thereby ensuring the real-time and reliability of the image data processing. When the resolution of the image data is less than the preset standard, it means that the image data at this time is a small resolution image. During processing, in order to ensure the accuracy of identifying the moving objects and working areas in the image data, the image data can be improved Resolution.
举例来说:以320*240dpi作为预设标准的分辨率,当所获取的图像数据的分辨率为1280*720dpi,该分辨率大于预设标准,因此,可以对当前的图像数据进行降采样处理,使得图像数据的分辨率由1280*720dpi调整为320*240dpi,从而降低了对图像数据进行 处理的计算量,保证对图像数据进行处理的实时性和可靠性,并且也可以获取到准确的处理结果。当所获取的图像数据的分辨率为160*120dpi时,该分辨率小于预设标准,因此,可以对当前的图像数据进行调整,使得图像数据的分辨率由160*120dpi调整为320*240dpi,这样可以有效地保证对图像数据识别的准确度,从而可以获得准确的处理结果。For example: 320*240dpi is used as the preset standard resolution. When the resolution of the acquired image data is 1280*720dpi, the resolution is greater than the preset standard. Therefore, the current image data can be downsampled. The resolution of image data is adjusted from 1280*720dpi to 320*240dpi, thereby reducing the amount of calculation for processing image data, ensuring the real-time and reliability of image data processing, and obtaining accurate processing results . When the resolution of the acquired image data is 160*120dpi, the resolution is less than the preset standard. Therefore, the current image data can be adjusted so that the resolution of the image data is adjusted from 160*120dpi to 320*240dpi, so It can effectively ensure the accuracy of image data recognition, so that accurate processing results can be obtained.
可选地,在识别图像数据中的运动对象以及运动对象所在的工作区域之前,本实施例中的方法还可以包括:对至少一帧图像数据进行滤波去噪处理。Optionally, before identifying the moving object in the image data and the working area where the moving object is located, the method in this embodiment may further include: filtering and denoising processing on at least one frame of image data.
在获取图像数据时,由于运动对象的工作环境以及其他因素的影响,所获取的图像数据可能会存在较多的噪声,为了提高对图像数据处理的准确性,可以采用高斯模型对至少一帧图像数据进行滤波去噪处理,从而消除图像中混入的噪声,获取比较清晰的图像数据。When acquiring image data, due to the influence of the working environment of the moving object and other factors, the acquired image data may have a lot of noise. In order to improve the accuracy of image data processing, a Gaussian model can be used for at least one frame of image The data undergoes filtering and denoising processing to eliminate the noise mixed in the image and obtain clearer image data.
S102:识别图像数据中的运动对象以及运动对象所在的工作区域。S102: Identify a moving object in the image data and a working area where the moving object is located.
在获取到图像数据之后,可以对图像数据进行分析处理,从而识别出图像数据中的运动对象和运动对象所在的工作区域。其中,运动对象是指对服装进行质检操作的工作人员,运动对象所在的工作区域是指工作人员对服装进行质检操作所在的区域。After the image data is acquired, the image data can be analyzed and processed to identify the moving object in the image data and the working area where the moving object is located. Among them, the moving object refers to the staff who performs the quality inspection operation on the clothing, and the working area where the moving object is located refers to the area where the staff performs the quality inspection operation on the clothing.
其中,本实施例对于识别运动对象和工作区域的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求和应用场景来选择不同的实现方式,例如:在识别图像数据中的运动对象和运动对象所在的工作区域时,可以先获取图像数据中所有对象的轮廓信息,将所有对象的轮廓信息与预先设置的标准轮廓信息进行分析比较,其中,标准轮廓信息为预先存储的与工作人员相对应的轮廓信息,可以理解的是,标准轮廓信息可以为一个或多个;将与至少一个标准轮廓信息相匹配的轮廓信息所对应的对象确定为运动对象;而后,获取运动对象处于图像数据中所有区域的时间信息,将时间信息大于或等于预设的时间阈值的区域确定为运动对象所在的工作区域。当然的,本领域技术人员还可以采用其他的方式来识别运动对象和工作区域,只要能够保证运动对象和工作区域获取的准确性即可,在此不再赘述。Among them, this embodiment does not limit the specific implementation process of recognizing moving objects and working areas. Those skilled in the art can choose different implementation methods according to specific design requirements and application scenarios, for example: recognizing moving objects in image data When using the working area where the moving object is located, the contour information of all objects in the image data can be obtained first, and the contour information of all objects can be analyzed and compared with the pre-set standard contour information. The standard contour information is pre-stored with the staff Corresponding contour information, it can be understood that the standard contour information can be one or more; the object corresponding to the contour information matching at least one standard contour information is determined as a moving object; then, the moving object is acquired in the image data For the time information of all areas in the, the area whose time information is greater than or equal to the preset time threshold is determined as the working area where the moving object is located. Of course, those skilled in the art can also use other methods to identify the moving object and the working area, as long as the accuracy of acquiring the moving object and the working area can be ensured, which will not be repeated here.
S103:根据运动对象和工作区域对质检后的服装进行计件操作。S103: Perform a piece counting operation on the clothing after quality inspection according to the moving object and the work area.
在获取到运动对象和工作区域之后,可以对运动对象和工作区域进行分析处理,并根据分析处理结果来实现是否对服装进行计件操作;具体的,参考附图9所示,本实施例中的根据运动对象和工作区域对质检后的服装进行计件操作可以包括:After acquiring the moving object and the working area, the moving object and the working area can be analyzed and processed, and whether to perform piece counting operations on the clothing can be realized according to the analysis and processing results; specifically, refer to FIG. 9 as shown in FIG. According to the moving object and work area, the piece counting operation of the clothing after quality inspection can include:
S1031:检测运动对象是否位于工作区域内。S1031: Detect whether the moving object is located in the work area.
对于运动对象是否位于工作区域内而言,一种可实现的方式为:运动对象是否位于工作区域内可以是指运动对象所在的位置是否位于工作区域内,此时,在检测运动对象是否位于工作区域内时,可以先获取运动对象所在的当前位置信息,判断当前位置信息是否位于工作区域内,若当前位置信息位于工作区域内,则可以确定运动对象位于工作区域内;若当前位置信息不在工作区域内,则可以确定运动对象不在工作区域内。Regarding whether the moving object is located in the working area, one achievable way is: whether the moving object is located in the working area can refer to whether the position of the moving object is located in the working area. In the area, the current position information of the moving object can be obtained first to determine whether the current position information is in the working area. If the current position information is in the working area, it can be determined that the moving object is located in the working area; if the current position information is not working In the area, it can be determined that the moving object is not in the work area.
对于运动对象是否位于工作区域内而言,另一种可实现的方式为:运动对象是否位于工作区域内可以是指运动对象的动作变化幅度是否位于工作区域内,此时,在检测运动对象是否位于工作区域内时,可以先获取运动对象的动作变化幅度,判断动作变化幅度是否超出工作区域,若动作变化幅度未超出工作区域,则可以确定运动对象位于工作区域内;若动作变化幅度超出工作区域,则可以确定运动对象不在工作区域内。As to whether the moving object is located in the working area, another achievable way is: whether the moving object is located in the working area can refer to whether the motion change range of the moving object is located in the working area. When it is in the working area, you can first obtain the motion change range of the moving object to determine whether the motion change range exceeds the work area. If the motion change range does not exceed the work area, you can determine that the moving object is located in the work area; if the motion change range exceeds the work area Area, you can determine that the moving object is not in the work area.
当然的,本领域技术人员也可以根据具体的应用场景和设计需求采用其他的方式来检测运动对象是否位于工作区域内,只要能够保证检测的准确可靠性即可,在此不再赘述。Of course, those skilled in the art can also use other methods to detect whether the moving object is located in the working area according to specific application scenarios and design requirements, as long as the accuracy and reliability of the detection can be ensured, which will not be repeated here.
S1032:若运动对象不在工作区域内,则对质检后的服装进行计件操作。S1032: If the moving object is not in the work area, perform a piece counting operation on the clothing after quality inspection.
其中,由于运动对象质检完放置衣服的行为频次明显低于运动对象对服装进行质检时反复查看衣服的行为频次,基于此规律特性,可以对质检完的服装的放置行为进行识别检测,当运动对象超出工作区域时,则说明此时的运动对象正在对质检完毕后的服装进行放置操作,进而可以对质检后的服装进行计件操作,从而可以获取到经过质检操作后的服装件数。Among them, since the frequency of the behavior of moving objects to place clothes after quality inspection is significantly lower than the frequency of behaviors of moving objects to repeatedly check clothes during quality inspection of clothes, based on this regular feature, the placement behavior of clothes after quality inspection can be identified and tested. When the moving object exceeds the working area, it means that the moving object at this time is placing the clothing after the quality inspection is completed, and then the piece-counting operation can be performed on the clothing after the quality inspection, so that the clothing after the quality inspection operation can be obtained Number of pieces.
可以理解的是,本实施例中的方法还可以包括:若运动对象在工作区域内,则不执行计件操作。It is understandable that the method in this embodiment may further include: if the moving object is in the working area, no piece counting operation is performed.
进一步的,在运动对象不在工作区域内之后,本实施例中的方法还可以包括:Further, after the moving object is not in the working area, the method in this embodiment may further include:
S1033:若运动对象位于预设的第一区域内,则对质检后的合格服装进行计件操作。S1033: If the moving object is located in the preset first area, perform a piece counting operation on qualified clothing after quality inspection.
其中,预设的第一区域用于放置质检结果为合格的服装,该第一区域可以位于工作区域的预设位置处,例如,第一区域可以位于工作区域的左侧或者右侧;在运动对象不再工作区域,且位于第一区域时,则说明运动对象已完成对服装的质检操作,并且该服装的质检结果为合格,因此,运动对象正在执行将合格的服装放置在第一区域的操作,此时,在可以对合格服装进行计件操作。Wherein, the preset first area is used to place the clothing whose quality inspection results are qualified, and the first area may be located at a preset position of the work area, for example, the first area may be located on the left or right side of the work area; When the moving object is no longer in the working area and is located in the first area, it means that the moving object has completed the quality inspection operation of the clothing, and the quality inspection result of the clothing is qualified. Therefore, the moving object is executing the placement of qualified clothing in the first area. For the operation in one area, at this time, the qualified garment can be counted.
S1034:若运动对象位于预设的第二区域内,则对质检后的不合格服装进行计件操作。S1034: If the moving object is located in the preset second area, perform a piece counting operation on the unqualified clothing after quality inspection.
其中,预设的第二区域用于放置质检结果为不合格的服装,该第二区域可以位于工 作区域的预设位置处,需要注意的是,第二区域与第一区域的设置位置不同;例如,第一区域位于工作区域的左侧时,第二区域可以位于工作区域的右侧;在第一区域位于工作区域的右侧时,第二区域可以位于工作区域的左侧;在运动对象不再工作区域,且位于第二区域时,则说明运动对象已完成对服装的质检操作,并且该服装的质检结果为不合格,因此,运动对象正在执行将不合格的服装放置在第二区域的操作,此时,在可以对不合格服装进行计件操作。Among them, the preset second area is used to place the clothes whose quality inspection results are unqualified. The second area can be located at the preset position of the working area. It should be noted that the second area and the first area have different settings. ; For example, when the first area is located on the left side of the working area, the second area can be located on the right side of the working area; when the first area is located on the right side of the working area, the second area can be located on the left side of the working area; When the object is no longer in the working area and is located in the second area, it means that the moving object has completed the quality inspection operation of the clothing, and the quality inspection result of the clothing is unqualified. Therefore, the moving object is executing the unqualified clothing placement The operation in the second area, at this time, can perform piece counting operations on unqualified garments.
需要注意的是,本实施例中的计件操作可以包括三种计件操作:(1)对完成质检操作的服装进行计件P;(2)对质检合格的服装进行计件P1;(3)对质检不合格的服装进行计件P2;可以理解的是,一般情况下,P=P1+P2。It should be noted that the piece-counting operation in this embodiment can include three piece-counting operations: (1) Perform piece-counting P for garments that have completed the quality inspection operation; (2) Perform piece-counting P1 for garments that have passed the quality inspection; (3) Pair The unqualified clothing shall be subjected to piece counting P2; it is understandable that, in general, P=P1+P2.
在检测结果为运动对象位于工作区域内时,则说明此时的运动对象正在对服装进行质检操作,因此,不执行对服装的计件操作。When the detection result is that the moving object is located in the work area, it means that the moving object at this time is performing quality inspection operations on the clothing, and therefore, the piece counting operation on the clothing is not performed.
可选地,本实施例中的方法还可以包括:Optionally, the method in this embodiment may further include:
S104:存储至少一帧运动对象对服装进行质检操作的图像数据。S104: Store at least one frame of image data of the moving object performing quality inspection operations on the clothing.
在对质检操作的服装进行计件统计时,可以针对每件服装存储一相对应的图像数据,以便于用户随时查看或者调取有关计件的相关记录。When performing piece counting statistics on clothing for quality inspection operations, a corresponding image data can be stored for each piece of clothing, so that users can view or retrieve relevant piece counting records at any time.
可以理解的是,本实施例中的方法还可以包括:It is understandable that the method in this embodiment may further include:
S105:存储至少一帧运动对象放置合格服装的图像数据。S105: Store image data of at least one frame of qualified clothing placed on the moving object.
S106:存储至少一帧运动对象放置不合格服装的图像数据。S106: Store at least one frame of image data of unqualified clothing placed on the moving object.
相类似的,在对进行质检操作后的服装进行放置时,可以针对所放置的不同质检结果的质检结果的服装进行统计,并且可以存储每个服装进行统计时相对应的图像数据,以便于用户随时查看或者调取有关计件的相关记录。Similarly, when placing clothes after quality inspection operations, statistics can be performed on the clothes placed with different quality inspection results and quality inspection results, and the corresponding image data for each garment when statistics are stored can be stored. So that users can view or retrieve relevant records of piece counting at any time.
本实施例提供的服装的计件方法,通过获取对服装进行质检操作的至少一帧图像数据,识别图像数据中的运动对象以及运动对象所在的工作区域,并根据运动对象和工作区域对质检后的服装进行计件操作,有效地保证了对进行质检操作的服装的计件统计,并且降低了对服装计件的生产管理成本,保证了服装计件的效率和准确率,也便于工厂进行生产管理,提升了工厂的管理效率;同时可以使得用户可以随时获取生产过程数据、了解订单生产进度,最终实现了高效的产销协同。The clothing piece counting method provided in this embodiment uses at least one frame of image data for performing quality inspection operations on clothing to identify the moving object in the image data and the working area where the moving object is located, and perform quality inspection based on the moving object and the working area. The piece-counting operation of the later garments effectively guarantees the piece-counting statistics of the garments undergoing quality inspection operations, and reduces the production and management cost of the garment piece-counting, ensuring the efficiency and accuracy of the garment piece-counting, and also facilitates the production management of the factory. The management efficiency of the factory is improved; at the same time, users can obtain production process data and understand the order production progress at any time, and finally realize efficient production and sales collaboration.
图2为本发明实施例提供的识别图像数据中的运动对象的流程图;图3为本发明实施例提供的根据至少一帧图像数据和背景模型图像识别每帧图像数据中的运动对象的流程图;图4为本发明实施例提供的根据第一像素值和第二像素值确定图像数据中的运动 对象的流程图;在上述实施例的基础上,继续参考附图2-图4可知,本实施例对于识别图像数据中的运动对象的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求进行设置,较为优选的,本实施例中的识别图像数据中的运动对象可以包括:Fig. 2 is a flow chart of identifying moving objects in image data provided by an embodiment of the present invention; Fig. 3 is a process of identifying moving objects in each frame of image data according to at least one frame of image data and a background model image provided by an embodiment of the present invention Figure 4 is a flowchart of determining a moving object in image data according to the first pixel value and the second pixel value provided by an embodiment of the present invention; on the basis of the above embodiment, continue to refer to Figures 2 to 4, This embodiment does not limit the specific implementation process of recognizing moving objects in image data. Those skilled in the art can set according to specific design requirements. Preferably, recognizing moving objects in image data in this embodiment may include :
S1021:基于至少一帧图像数据建立一背景模型图像。S1021: Create a background model image based on at least one frame of image data.
其中,可以采用高斯混合背景建模方法对所获取的至少一帧图像数据建立背景模型图像,该背景模型图像包括运动对象的工作环境。具体的,可以基于所有的图像数据建立一背景模型图像;或者,也可以基于至少一帧图像数据建立至少一个背景模型图像,即:可以基于至少一帧图像数据中的部分图像数据建立一个背景模型图像,基于至少一帧图像数据中的其他图像数据建立其他的背景模型图像,较为优选的,可以基于所有的图像数据建立一背景模型图像。Wherein, a Gaussian mixture background modeling method may be used to establish a background model image of the acquired at least one frame of image data, and the background model image includes a working environment of a moving object. Specifically, a background model image can be established based on all image data; alternatively, at least one background model image can be established based on at least one frame of image data, that is, a background model can be established based on part of the image data in at least one frame of image data For the image, another background model image is established based on other image data in at least one frame of image data. Preferably, a background model image can be established based on all the image data.
另外,所建立的背景模型图像的大小与图像数据的大小相同。举例来说,现有1000帧图像数据,基于1000帧图像数据可以建立一相对应的背景模型图像,所建立的背景模型图像的大小与图像数据的大小相同;或者,也可以基于1000帧图像数据可以相对应的第一背景模型图像和第二背景模型图像,其中,第一背景模型图像的大小与所对应的图像数据的大小相同;第二背景模型图像的大小与所对应的图像数据的大小相同。In addition, the size of the established background model image is the same as the size of the image data. For example, in the existing 1000 frames of image data, a corresponding background model image can be created based on 1000 frames of image data, and the size of the created background model image is the same as the size of the image data; alternatively, it can also be based on 1000 frames of image data Corresponding first background model image and second background model image, wherein the size of the first background model image is the same as the size of the corresponding image data; the size of the second background model image is the same as the size of the corresponding image data the same.
S1022:根据至少一帧图像数据和背景模型图像识别每帧图像数据中的运动对象。S1022: Identify a moving object in each frame of image data according to at least one frame of image data and a background model image.
在建立背景模型图像之后,可以将每帧图像数据与背景模型图像进行分析对比,从而识别出每帧图像数据中的运动对象。具体的,根据至少一帧图像数据和背景模型图像识别每帧图像数据中的运动对象可以包括:After the background model image is established, each frame of image data can be analyzed and compared with the background model image, so as to identify the moving object in each frame of image data. Specifically, identifying a moving object in each frame of image data according to at least one frame of image data and a background model image may include:
S10221:获取至少一帧图像数据中每个像素点的第一像素值和背景模型图像中相同像素点的第二像素值。S10221: Obtain the first pixel value of each pixel in at least one frame of image data and the second pixel value of the same pixel in the background model image.
由于背景模型图像与图像数据的大小相同,因此,对于图像数据中每个像素点而言,在背景模型图像中均存在有对应的像素点。为了可以识别出运动对象,可以获取图像数据中每个像素点的第一像素值,并获取背景模型图像中对应像素点的第二像素值,具体的,可以采用现有技术中的方式来获取像素值,在此不再说明。Since the background model image and the image data have the same size, for each pixel in the image data, there is a corresponding pixel in the background model image. In order to identify the moving object, the first pixel value of each pixel in the image data can be obtained, and the second pixel value of the corresponding pixel in the background model image can be obtained. Specifically, the method in the prior art can be used to obtain The pixel value will not be explained here.
S10222:根据第一像素值和第二像素值确定图像数据中的运动对象。S10222: Determine a moving object in the image data according to the first pixel value and the second pixel value.
在获取第一像素值和第二像素值之后,可以对第一像素值和第二像素值进行分析处理,从而根据分析处理结果来确定图像数据中的运动对象。具体的,根据第一像素值和第二像素值确定图像数据中的运动对象可以包括:After acquiring the first pixel value and the second pixel value, the first pixel value and the second pixel value may be analyzed and processed, so as to determine the moving object in the image data according to the analysis and processing result. Specifically, determining the moving object in the image data according to the first pixel value and the second pixel value may include:
S102221:获取第一像素值与第二像素值的差异值。S102221: Obtain a difference value between the first pixel value and the second pixel value.
其中,差异值为第一像素值与第二像素值的差异程度,具体的,差异值可以为第一像素值与第二像素值的差值,或者,差异值还可以为第一像素值与第二像素值的比值;当然的,本领域技术人员也可以采用其他的方式来体现第一像素值与第二像素值的差异值,在此不再赘述。Wherein, the difference value is the degree of difference between the first pixel value and the second pixel value. Specifically, the difference value may be the difference between the first pixel value and the second pixel value, or the difference value may also be the difference between the first pixel value and the second pixel value. The ratio of the second pixel value; of course, those skilled in the art can also adopt other ways to reflect the difference value between the first pixel value and the second pixel value, which will not be repeated here.
S102222:在图像数据中查找差异值大于或等于预设的像素阈值的所有像素点,其中,所有像素点构成图像数据中的运动对象。S102222: Search for all pixels with a difference value greater than or equal to a preset pixel threshold in the image data, where all the pixels constitute a moving object in the image data.
对于每个图像数据而言,图像数据包括动态区域和静态区域,其中,动态区域为图像数据中像素点可以发生变化的区域,也即:动态区域是有动态像素点构成;静态区域为图像数据中像素点基本不会发生变化的区域,也即:静态区域是有静态像素点构成。由上可知,运动对象所在的区域即为图像数据中的动态区域,进而,在第一像素值与第二像素值的差异值大于或等于像素阈值时,则说明图像数据中的像素点与背景模型图像中相对应的像素点的差异较大,可以确定该像素点为动态像素点,从而可以获取到图像数据中所有的动态像素点,此时,所有的动态像素点即构成图像数据中的运动对象。For each image data, the image data includes a dynamic area and a static area. The dynamic area is the area where the pixels in the image data can change, that is: the dynamic area is composed of dynamic pixels; the static area is the image data The area in which the pixels basically do not change, that is, the static area is composed of static pixels. It can be seen from the above that the area where the moving object is located is the dynamic area in the image data. Furthermore, when the difference between the first pixel value and the second pixel value is greater than or equal to the pixel threshold, it indicates that the pixels in the image data and the background The corresponding pixels in the model image have a large difference. The pixel can be determined to be a dynamic pixel, so that all the dynamic pixels in the image data can be obtained. At this time, all the dynamic pixels constitute the image data. Moving objects.
另外,本实施例中的像素阈值为预先设置的,本领域技术人员可以根据具体的设计需求和应用场景来确定像素阈值的具体数值范围,可以理解的是,不同的差异值可以对应有不同的像素阈值;举例一:当差异值为第一像素值与第二像素值的差值时,相对应的像素阈值可以为TH1,进而可以按照如下公式来确定图像数据中的运动对象:In addition, the pixel threshold value in this embodiment is preset. Those skilled in the art can determine the specific value range of the pixel threshold value according to specific design requirements and application scenarios. It is understood that different difference values may correspond to different values. Pixel threshold; Example 1: When the difference value is the difference between the first pixel value and the second pixel value, the corresponding pixel threshold can be TH1, and then the moving object in the image data can be determined according to the following formula:
Figure PCTCN2020071926-appb-000001
Figure PCTCN2020071926-appb-000001
其中,Currentground(i,j)为某一帧图像数据中像素点的第一像素值,Background(i,j)为背景模型图像中对应像素点的第二像素值,Foreground(i,j)为图像数据相对于背景模型图像的差异区域,该差异区域即为图像数据中的运动对象。Among them, Currentground (i, j) is the first pixel value of a pixel in a certain frame of image data, Background (i, j) is the second pixel value of the corresponding pixel in the background model image, Foreground (i, j) is The difference area of the image data relative to the background model image, and the difference area is the moving object in the image data.
举例二:当差异值为第一像素值与第二像素值的比值时,相对应的像素阈值可以为TH2,进而可以按照如下公式来确定图像数据中的运动对象:Example 2: When the difference value is the ratio of the first pixel value to the second pixel value, the corresponding pixel threshold can be TH2, and the moving object in the image data can be determined according to the following formula:
Figure PCTCN2020071926-appb-000002
Figure PCTCN2020071926-appb-000002
其中,Currentground(i,j)为某一帧图像数据中像素点的第一像素值,Background(i,j)为背景模型图像中对应像素点的第二像素值,Foreground(i,j)为图像数据相对于背景模型图像的差异区域,该差异区域即为图像数据中的运动对象。Among them, Currentground (i, j) is the first pixel value of a pixel in a certain frame of image data, Background (i, j) is the second pixel value of the corresponding pixel in the background model image, Foreground (i, j) is The difference area of the image data relative to the background model image, and the difference area is the moving object in the image data.
通过上述方式识别图像数据中的运动对象,有效地保证了对每帧图像数据中运动对 象识别的准确可靠性,从而保证了对服装进行计件操作的精确程度。Recognizing the moving objects in the image data in the above manner effectively ensures the accuracy and reliability of the recognition of the moving objects in each frame of image data, thereby ensuring the accuracy of the piece-counting operation of the clothing.
图5为本发明实施例提供的识别图像数据中运动对象所在的工作区域的流程图;图6为本发明实施例提供的建立用于体现运动对象的动作变化频率的统计矩阵的流程图;图7为本发明实施例提供的根据统计矩阵确定运动对象所在的工作区域的流程图;在上述实施例的基础上,继续参考附图5-图7可知,本实施例对于识别图像数据中运动对象所在的工作区域的具体实现过程不做限定,本领域技术人员可以根据具体的设计需求进行设置,较为优选的,本实施例中的识别图像数据中运动对象所在的工作区域可以包括:FIG. 5 is a flowchart of identifying the working area of a moving object in image data provided by an embodiment of the present invention; FIG. 6 is a flowchart of establishing a statistical matrix used to reflect the frequency of motion changes of moving objects provided by an embodiment of the present invention; 7 is a flow chart of determining the working area of the moving object based on the statistical matrix provided by the embodiment of the present invention; on the basis of the above embodiment, continuing to refer to Figures 5 to 7, it can be seen that this embodiment is useful for identifying moving objects in image data. The specific implementation process of the working area is not limited, and those skilled in the art can set according to specific design requirements. Preferably, the working area where the moving object in the recognition image data is located in this embodiment may include:
S1023:建立用于体现运动对象的动作变化频率的统计矩阵,统计矩阵的大小与图像数据的大小相同。S1023: Establish a statistical matrix for reflecting the motion change frequency of the moving object, and the size of the statistical matrix is the same as the size of the image data.
其中,参考附图6所示,建立用于体现运动对象的动作变化频率的统计矩阵可以包括:Wherein, referring to FIG. 6, the establishment of a statistical matrix used to reflect the motion change frequency of a moving object may include:
S10231:获得与至少一帧图像数据中的每个像素点相对应的统计数值。S10231: Obtain a statistical value corresponding to each pixel in at least one frame of image data.
S10232:基于统计数值建立统计矩阵。S10232: Establish a statistical matrix based on statistical values.
其中,统计数值可以是基于每一帧图像数据中的每个像素点的运动特性所确定的,由于每个图像数据中包括动态区域和静态区域,动态区域中的像素点可以为动态像素点,静态区域中的像素点可以为静态像素点,而像素点的运动特性即该像素点是动态像素点还是静态像素点;在像素点为动态像素点时,可以对应一预设的统计数值;在像素点为静态像素点时,可以对应另一个预设的统计数值。在获取到多个统计数值之后,可以基于统计数值建立统计矩阵,所建立的统计矩阵的大小与图像数据的大小相同。Among them, the statistical value can be determined based on the motion characteristics of each pixel in each frame of image data. Since each image data includes a dynamic area and a static area, the pixels in the dynamic area can be dynamic pixels. The pixel in the static area can be a static pixel, and the motion characteristic of the pixel is whether the pixel is a dynamic pixel or a static pixel; when the pixel is a dynamic pixel, it can correspond to a preset statistical value; When the pixel is a static pixel, it can correspond to another preset statistical value. After obtaining multiple statistical values, a statistical matrix can be established based on the statistical values, and the size of the established statistical matrix is the same as the size of the image data.
举例来说,现有500帧图像数据,每个图像数据的大小为320X240dpi,因此,可以先建立大小为320*240的初始统计矩阵,假设初始统计矩阵中的每个元素均为0,也即:每个元素预设的初始统计数值为0。在识别第一帧图像数据中像素点A的运动特性时,确定该像素点A为动态像素点,此时,则可以将初始统计矩阵中对应像素点A的元素进行加1操作,从而获取到与像素点A对应的统计数值为1;在识别第二帧图像数据中像素点A的运动特性时,发现该像素点A为静态像素点,此时,可以使得初始统计矩阵与对应像素点A的元素保持不变,在第一针图像数据的基础上,可以将初始统计矩阵中与该像素点A所对应的统计数值确定为1。在识别第一帧图像数据中像素点B的运动特性时,发现该像素点B为动态像素点,此时,则可以将初始统计矩阵中对应像素点B的元素进行加1操作,从而获取到与像素点B对应的统计数值为1;在识别第二帧图像数据中像素点B的运动特性时,发现该像素点B为动态像素点,此时,则可以将统计矩阵中 像素点B所对应的统计数值确定2;具体的,统计矩阵中的统计数值满足以下关系式:For example, in the existing 500 frames of image data, the size of each image data is 320X240dpi. Therefore, an initial statistical matrix with a size of 320*240 can be established first, assuming that each element in the initial statistical matrix is 0, that is, : The default initial statistical value of each element is 0. When identifying the motion characteristics of pixel A in the first frame of image data, determine that pixel A is a dynamic pixel. At this time, you can add 1 to the element corresponding to pixel A in the initial statistical matrix to obtain The statistical value corresponding to pixel A is 1. When identifying the motion characteristics of pixel A in the second frame of image data, it is found that the pixel A is a static pixel. At this time, the initial statistical matrix can be made to correspond to pixel A The element of is kept unchanged. Based on the first stitch image data, the statistical value corresponding to the pixel A in the initial statistical matrix can be determined as 1. When identifying the motion characteristics of the pixel B in the first frame of image data, it is found that the pixel B is a dynamic pixel. At this time, you can add 1 to the element corresponding to the pixel B in the initial statistical matrix to obtain The statistical value corresponding to pixel B is 1. When identifying the motion characteristics of pixel B in the second frame of image data, it is found that the pixel B is a dynamic pixel. At this time, the pixel B in the statistical matrix can be The corresponding statistical value is determined 2; specifically, the statistical value in the statistical matrix satisfies the following relationship:
Figure PCTCN2020071926-appb-000003
Figure PCTCN2020071926-appb-000003
其中,Motionground(i,j)为统计矩阵中预设的统计数值,Foreground(i,j)为图像数据中每个像素点的运动特性,在Foreground(i,j)=0时,则说明此时的像素点为静态像素点,在Foreground(i,j)=255时,则说明此时的像素点为动态像素点。Among them, Motionground (i, j) is the preset statistical value in the statistical matrix, Foreground (i, j) is the motion characteristic of each pixel in the image data, when Foreground (i, j) = 0, it means this The pixels at time are static pixels. When Foreground(i,j)=255, it means that the pixels at this time are dynamic pixels.
按照上述关系式对所有的图像数据中的像素点进行分析处理后,可以获取到所有图像数据中像素点所对应的统计数值,基于该统计数值即可以建立统计矩阵。After analyzing and processing the pixels in all the image data according to the above relational expressions, the statistical values corresponding to the pixels in all the image data can be obtained, and the statistical matrix can be established based on the statistical values.
S1024:根据统计矩阵确定运动对象所在的工作区域。S1024: Determine the working area where the moving object is located according to the statistical matrix.
在获取到统计矩阵之后,可以利用统计矩阵来确定工作区域,具体的,根据统计矩阵确定运动对象所在的工作区域可以包括:After the statistical matrix is obtained, the statistical matrix can be used to determine the working area. Specifically, determining the working area of the moving object according to the statistical matrix can include:
S10241:对统计矩阵进行归一化处理,获得与统计矩阵中每个统计数值相对应的像素灰度值。S10241: Perform normalization processing on the statistical matrix to obtain a pixel gray value corresponding to each statistical value in the statistical matrix.
S10242:在像素灰度值大于或等于预设的灰度阈值时,则将像素灰度值所对应的像素区域确定为运动对象所在的工作区域。S10242: When the pixel grayscale value is greater than or equal to the preset grayscale threshold, determine the pixel area corresponding to the pixel grayscale value as the working area where the moving object is located.
其中,灰度阈值为预先设置的限值,本实施例对于其具体的数值范围不做限定,本领域技术人员可以根据具体的设计需求来进行任意设置,例如:灰度阈值可以为20、30或者40等等。在对统计矩阵进行归一化处理之后,可以将统计矩阵以图像的方式进行显示出来,图像中每个像素点的灰度值为0-255,在像素灰度值大于或等于灰度阈值时,则说明该像素灰度值所对应的像素区域变化频率较高,进而可以将该像素灰度值所对应的像素区域确定为运动对象所在的工作区域。Among them, the gray threshold is a preset limit. This embodiment does not limit its specific numerical range. Those skilled in the art can set it arbitrarily according to specific design requirements. For example, the gray threshold can be 20, 30 Or 40 and so on. After normalizing the statistical matrix, the statistical matrix can be displayed as an image. The gray value of each pixel in the image is 0-255. When the pixel gray value is greater than or equal to the gray threshold , It means that the pixel area corresponding to the gray value of the pixel changes frequently, and the pixel area corresponding to the gray value of the pixel can be determined as the working area where the moving object is located.
通过统计矩阵来识别运动对象所在的工作区域,具体的,通过统计矩阵来分析图像数据中哪些像素区域的动作变化比较频繁,哪些像素区域基本没有变化,基于上述动作变化频率来估计运动对象进行正常质检的工作区域范围;具体的,识别出动作变化频率比较高的区域,该区域即为运动对象进行质检操作的工作区域,从而有效地保证了工作区域识别的准确可靠性,进一步提高了该计件方法使用的精确度。The statistical matrix is used to identify the working area where the moving object is located. Specifically, the statistical matrix is used to analyze which pixel areas in the image data change frequently and which pixel areas basically do not change. Based on the above-mentioned frequency of movement changes, it is estimated that the moving object is performing normally. The scope of the work area of quality inspection; specifically, the area where the movement frequency is relatively high is identified, and this area is the work area for the moving object to perform the quality inspection operation, thus effectively ensuring the accuracy and reliability of the work area recognition, and further improving The precision used by this piece counting method.
在具体应用时,统计矩阵的数值不能无限制的增大,若统计矩阵的数值元素增大一定的程度,会影响到对图像数据进行处理的精确度;并且,在运动对象对服装进行质检操作时,运动对象所在的工作区域并不是一成不变的,其是可以根据运动对象的变化而随时进行改变的,因此,为了保证对工作区域进行识别的准确性,可以周期性地对统计 矩阵进行更新。具体的,本实施例中的方法还可以包括:In specific applications, the numerical value of the statistical matrix cannot be increased indefinitely. If the numerical elements of the statistical matrix increase to a certain degree, it will affect the accuracy of processing the image data; and the quality of clothing is inspected on the moving objects. During operation, the working area where the moving object is located is not static. It can be changed at any time according to the change of the moving object. Therefore, in order to ensure the accuracy of identifying the working area, the statistical matrix can be updated periodically . Specifically, the method in this embodiment may further include:
S201:对统计矩阵进行更新。S201: Update the statistical matrix.
其中,参考附图8所示,对统计矩阵进行更新可以包括:Wherein, referring to FIG. 8, updating the statistical matrix may include:
S2011:获取预设的更新系数,其中,更新系数为小于1的正数。S2011: Obtain a preset update coefficient, where the update coefficient is a positive number less than 1.
其中,更新系数为预先设置的,本实施例对于其具体的数值范围不做限定,本领域技术人员可以根据具体的应用需求对其进行任意设置,只要能够保证更新系数满足上述要求即可,也即:更新系数可以为满足上述条件的任意数值,例如:0.1、0.2、0.3、0.5、0.8等等,为了便于说明,以下内容以更新系数为0.5为例进行说明。Among them, the update coefficient is preset, and this embodiment does not limit its specific numerical range. Those skilled in the art can set it arbitrarily according to specific application requirements, as long as it can ensure that the update coefficient meets the above requirements. That is, the update coefficient can be any value that satisfies the above conditions, for example: 0.1, 0.2, 0.3, 0.5, 0.8, etc. For ease of description, the following content is described with an update coefficient of 0.5 as an example.
S2012:将统计矩阵中包括的所有统计数值分别与更新系数做乘法运算,获得更新后数值。S2012: Multiply all the statistical values included in the statistical matrix with the update coefficients to obtain the updated values.
S2013:基于更新后数值获得更新后的统计矩阵。S2013: Obtain the updated statistical matrix based on the updated values.
在获取到更新系数之后,可以将统计矩阵中的统计数值按照所获取的更新系数进行调整,以降低统计数值中的数值元素,即Motionground(A)=0.5*Motionground(B);其中,Motionground(A)为调整后的所有统计数值,Motionground(B)为调整前的所有统计数值,0.5为更新系数。After the update coefficient is obtained, the statistical values in the statistical matrix can be adjusted according to the obtained update coefficients to reduce the numerical elements in the statistical values, namely Motionground(A)=0.5*Motionground(B); where, Motionground( A) is all the statistical values after adjustment, Motionground(B) is all the statistical values before adjustment, and 0.5 is the update coefficient.
在对统计矩阵进行更新时,可以按照预设的周期或者预设的固定帧数对统计矩阵进行更新,从而实现了对统计矩阵的整体数值按照预设的更新系数进行更新操作,从而可以利用更新后的统计矩阵识别工作区域,实现了自适应地估计运动对象的工作区域,有效地保证了工作区域确定的准确可靠性。When updating the statistical matrix, the statistical matrix can be updated according to the preset period or the preset fixed number of frames, so that the overall value of the statistical matrix is updated according to the preset update coefficient, so that the update can be used The latter statistical matrix recognizes the work area, realizes the adaptive estimation of the work area of the moving object, and effectively ensures the accuracy and reliability of the work area determination.
具体应用时,可以在工厂的预设位置处安装摄像头,该摄像头可以实时采集运动对象对服装进行质检操作的图像数据,在获取到图像数据之后,可以通过高斯滤波方法对所获取的图像数据进行滤波去噪处理;而后,采用高斯混合背景建模的方式基于运动对象所处的工作环境进行背景建模图像,依据建立的背景模型图像来确定图像数据中的运动对象。继而,根据运动对象的动作变化频率,来识别出动作变化频率比较高的区域,即为对服装进行质检的正常工作区域。由于对服装进行质检完放置衣服的行为频次明显低于质检时运动对象对服装进行反复查看的行为频次,基于此规律特性,可以判断运动对象对服装的质检状态,在对服装进行质检完毕后,可以对服装进行计件操作,并保存进行质检操作的图像数据。For specific applications, a camera can be installed at a preset position in the factory. The camera can collect real-time image data of a moving object performing quality inspection operations on clothing. After the image data is obtained, the obtained image data can be obtained by Gaussian filtering. Perform filtering and denoising processing; then, use Gaussian mixture background modeling method to perform background modeling image based on the working environment of the moving object, and determine the moving object in the image data according to the established background model image. Then, according to the movement change frequency of the moving object, the area with a relatively high movement change frequency is identified, that is, the normal working area for quality inspection of clothing. Since the frequency of the behavior of placing clothes after the quality inspection on the clothing is significantly lower than the behavior frequency of the sports object repeatedly checking the clothing during the quality inspection, based on this regular characteristic, the quality inspection status of the sports object can be judged, and the quality of the clothing can be judged. After the inspection is completed, the garment can be counted, and the image data for the quality inspection operation can be saved.
本应用实施例提供的方法,可以有效降低了工厂数字化转型的成本和改造难度,具有轻量化部署、可复制性强的特性,在不改变工人原有工作方式的情况下,可以实时获 取得到工厂衣服加工的实时进度,将其同步到生产者、平台方、消费者,从而达到高效的产销协同,并有利于对工人的工作情况进行精准匹配、优化及提升。The method provided by this application embodiment can effectively reduce the cost and difficulty of digital transformation of the factory, and has the characteristics of lightweight deployment and strong reproducibility. The factory can be obtained in real time without changing the original working methods of workers. The real-time progress of clothing processing is synchronized to producers, platforms, and consumers, so as to achieve efficient production and sales synergy, and it is conducive to accurate matching, optimization and improvement of workers' working conditions.
图10为本发明实施例提供的一种服装的计件装置的结构示意图;参考附图10所示,本实施例提供了一种服装的计件装置,该计件装置可以执行上述的服装的计件方法,具体的,该计件装置可以包括:FIG. 10 is a schematic structural diagram of a piece counting device for clothing provided by an embodiment of the present invention; referring to FIG. 10, this embodiment provides a piece counting device for clothing, which can perform the above-mentioned clothing piece counting method. Specifically, the piece counting device may include:
获取模块11,用于获取对服装进行质检的至少一帧图像数据;The obtaining module 11 is used to obtain at least one frame of image data for quality inspection of clothing;
识别模块12,用于识别图像数据中的运动对象以及运动对象所在的工作区域;The recognition module 12 is used to recognize a moving object in the image data and a working area where the moving object is located;
计件模块13,用于根据运动对象和工作区域对质检后的服装进行计件操作。The piece-counting module 13 is used to perform piece-counting operations on the garments after quality inspection according to the moving objects and the working area.
其中,在识别模块12识别图像数据中的运动对象时,该识别模块12可以用于执行:基于至少一帧图像数据建立一背景模型图像;根据至少一帧图像数据和背景模型图像识别每帧图像数据中的运动对象。Wherein, when the recognition module 12 recognizes a moving object in the image data, the recognition module 12 can be used to perform: establish a background model image based on at least one frame of image data; recognize each frame of image based on at least one frame of image data and the background model image The moving objects in the data.
可选地,在识别模块12根据至少一帧图像数据和背景模型图像识别每帧图像数据中的运动对象时,该识别模块12可以用于执行:获取至少一帧图像数据中每个像素点的第一像素值和背景模型图像中相同像素点的第二像素值;根据第一像素值和第二像素值确定图像数据中的运动对象。Optionally, when the recognition module 12 recognizes a moving object in each frame of image data based on at least one frame of image data and a background model image, the recognition module 12 may be used to perform: obtain the information of each pixel in at least one frame of image data The first pixel value and the second pixel value of the same pixel in the background model image; the moving object in the image data is determined according to the first pixel value and the second pixel value.
可选地,在识别模块12根据第一像素值和第二像素值确定图像数据中的运动对象时,该识别模块12可以用于执行:获取第一像素值与第二像素值的差异值;在图像数据中查找差异值大于或等于预设的像素阈值的所有像素点,其中,所有像素点构成图像数据中的运动对象。Optionally, when the identification module 12 determines the moving object in the image data according to the first pixel value and the second pixel value, the identification module 12 may be used to perform: obtain the difference value between the first pixel value and the second pixel value; Find all pixels with a difference value greater than or equal to a preset pixel threshold in the image data, where all the pixels constitute a moving object in the image data.
可选地,在识别模块12识别图像数据中运动对象所在的工作区域时,该识别模块12可以用于执行:建立用于体现运动对象的动作变化频率的统计矩阵,统计矩阵的大小与图像数据的大小相同;根据统计矩阵确定运动对象所在的工作区域。Optionally, when the recognition module 12 recognizes the working area of the moving object in the image data, the recognition module 12 can be used to perform: establish a statistical matrix for reflecting the movement frequency of the moving object, and the size of the statistical matrix and the image data The size is the same; according to the statistical matrix to determine the working area where the moving object is located.
其中,在识别模块12建立用于体现运动对象的动作变化频率的统计矩阵时,该识别模块12可以用于执行:获得与至少一帧图像数据中的每个像素点相对应的统计数值;基于统计数值建立统计矩阵。Wherein, when the identification module 12 establishes a statistical matrix for reflecting the frequency of motion changes of the moving object, the identification module 12 can be used to perform: obtain a statistical value corresponding to each pixel in at least one frame of image data; Statistic values create a statistical matrix.
另外,在识别模块12根据统计矩阵确定运动对象所在的工作区域时,该识别模块12可以用于执行:对统计矩阵进行归一化处理,获得与统计矩阵中每个统计数值相对应的像素灰度值;在像素灰度值大于或等于预设的灰度阈值时,则将像素灰度值所对应的像素区域确定为运动对象所在的工作区域。In addition, when the identification module 12 determines the working area where the moving object is located according to the statistical matrix, the identification module 12 can be used to perform: normalize the statistical matrix to obtain the pixel gray corresponding to each statistical value in the statistical matrix. Degree value; when the pixel gray value is greater than or equal to the preset gray threshold, the pixel area corresponding to the pixel gray value is determined as the working area where the moving object is located.
可选地,本实施例中的识别模块12还用于执行:对统计矩阵进行更新。Optionally, the identification module 12 in this embodiment is also used to perform: update the statistical matrix.
具体的,在识别模块12对统计矩阵进行更新时,该识别模块12可以用于执行:获取预设的更新系数,其中,更新系数为小于1的正数;将统计矩阵中包括的所有统计数值分别与更新系数做乘法运算,获得更新后数值;基于更新后数值获得更新后的统计矩阵。Specifically, when the identification module 12 updates the statistical matrix, the identification module 12 can be used to perform: obtain a preset update coefficient, where the update coefficient is a positive number less than 1; and all statistical values included in the statistical matrix Multiply with the updated coefficients to obtain the updated value; obtain the updated statistical matrix based on the updated value.
可选地,在计件模块13根据运动对象和工作区域对质检后的服装进行计件操作时,该计件模块13可以用于执行:检测运动对象是否位于工作区域内;若运动对象不在工作区域内,则对质检后的服装进行计件操作。Optionally, when the piece-counting module 13 performs a piece-counting operation on the clothes after quality inspection according to the moving object and the working area, the piece-counting module 13 can be used to perform: detecting whether the moving object is located in the working area; if the moving object is not in the working area , Then perform piece counting operations on the garments after quality inspection.
可选地,在运动对象不在工作区域内之后,本实施例中的计件模块13还可以用于执行:若运动对象位于预设的第一区域内,则对质检后的合格服装进行计件操作;或者,若运动对象位于预设的第二区域内,则对质检后的不合格服装进行计件操作。Optionally, after the moving object is not in the working area, the piece counting module 13 in this embodiment can also be used to perform: if the moving object is located in the preset first area, perform a piece counting operation on qualified clothing after quality inspection ; Or, if the moving object is located in the preset second area, perform a piece counting operation on the unqualified clothing after quality inspection.
可选地,本实施例中的获取模块11还用于在获取对服装进行质检的至少一帧图像数据之后,调整至少一帧图像数据的分辨率,使得图像数据的分辨率满足预设标准。Optionally, the acquiring module 11 in this embodiment is further configured to adjust the resolution of the at least one frame of image data after acquiring at least one frame of image data for quality inspection of the clothing, so that the resolution of the image data meets a preset standard .
可选地,本实施例中的获取模块11还用于在识别图像数据中的运动对象以及运动对象所在的工作区域之前,对至少一帧图像数据进行滤波去噪处理。Optionally, the acquisition module 11 in this embodiment is further configured to perform filtering and denoising processing on at least one frame of image data before identifying the moving object in the image data and the working area where the moving object is located.
可选地,本实施例中的计件模块13还用于执行:存储至少一帧运动对象对服装进行质检操作的图像数据。Optionally, the piece counting module 13 in this embodiment is further configured to perform: storing at least one frame of image data of a moving object performing a quality inspection operation on clothing.
图10所示装置可以执行图1-图9所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图9所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图9所示实施例中的描述,在此不再赘述。The device shown in FIG. 10 can execute the method of the embodiment shown in FIG. 1 to FIG. 9. For parts that are not described in detail in this embodiment, please refer to the related description of the embodiment shown in FIG. 1 to FIG. 9. For the implementation process and technical effects of this technical solution, please refer to the description in the embodiment shown in FIG. 1 to FIG. 9, and will not be repeated here.
在一个可能的设计中,图10所示服装的计件装置的结构可实现为一电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图11所示,该电子设备可以包括:处理器21和存储器22。其中,存储器22用于存储支持电子设备执行上述图1-图9所示实施例中提供的服装的计件方法的程序,处理器21被配置为用于执行存储器22中存储的程序。In a possible design, the structure of the piece counting device for clothing shown in FIG. 10 can be implemented as an electronic device, which can be various devices such as a mobile phone, a tablet computer, and a server. As shown in FIG. 11, the electronic device may include a processor 21 and a memory 22. The memory 22 is used to store a program that supports the electronic device to execute the clothing piece counting method provided in the embodiments shown in FIGS. 1 to 9 above, and the processor 21 is configured to execute the program stored in the memory 22.
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被处理器21执行时能够实现如下步骤:The program includes one or more computer instructions, where one or more computer instructions can implement the following steps when executed by the processor 21:
获取对服装进行质检操作的至少一帧图像数据;Acquiring at least one frame of image data for performing quality inspection operations on clothing;
识别图像数据中的运动对象以及运动对象所在的工作区域;Identify the moving objects in the image data and the working area where the moving objects are located;
根据运动对象和工作区域对质检后的服装进行计件操作。According to the moving objects and work area, the garments after quality inspection are counted.
可选地,处理器21还用于执行前述图1-图9所示实施例中的全部或部分步骤。Optionally, the processor 21 is further configured to execute all or part of the steps in the embodiments shown in FIGS. 1 to 9 above.
其中,电子设备的结构中还可以包括通信接口23,用于电子设备与其他设备或通信 网络通信。The structure of the electronic device may also include a communication interface 23 for the electronic device to communicate with other devices or a communication network.
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图1-图9所示方法实施例中服装的计件方法所涉及的程序。In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes programs for executing the garment piece counting method in the method embodiments shown in FIGS. 1-9. .
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments. Those of ordinary skill in the art can understand and implement without creative work.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, it can also be implemented by a combination of hardware and software. Based on this understanding, the above technical solutions essentially or the part that contributes to the prior art can be embodied in the form of computer products, and the present invention can be used in one or more computer usable storage containing computer usable program codes. The form of a computer program product implemented on a medium (including but not limited to disk storage, CD-ROM, optical storage, etc.).
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable devices are generated for realizing the process Figure a process or multiple processes and/or a block diagram of a device with functions specified in one block or multiple blocks.
这些计算机程序指令也可存储在能引导计算机或其他可编程设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device, and the instruction device implements A function specified in a flow or multiple flows in a flowchart and/or a block or multiple blocks in a block diagram.
这些计算机程序指令也可装载到计算机或其他可编程设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so that the instructions executed on the computer or other programmable equipment provide Steps used to implement the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网 络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。The memory may include non-permanent memory in a computer readable medium, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer readable media.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (16)

  1. 一种服装的计件方法,其特征在于,包括:A piece counting method for clothing, characterized in that it comprises:
    获取对服装进行质检操作的至少一帧图像数据;Acquiring at least one frame of image data for performing quality inspection operations on clothing;
    识别所述图像数据中的运动对象以及运动对象所在的工作区域;Identifying a moving object in the image data and a working area where the moving object is located;
    根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作。Perform a piece counting operation on the clothing after quality inspection according to the moving object and the working area.
  2. 根据权利要求1所述的方法,其特征在于,识别所述图像数据中的运动对象,包括:The method according to claim 1, wherein identifying a moving object in the image data comprises:
    基于至少一帧所述图像数据建立一背景模型图像;Establishing a background model image based on at least one frame of the image data;
    根据至少一帧所述图像数据和所述背景模型图像识别每帧所述图像数据中的运动对象。Recognizing a moving object in each frame of the image data according to at least one frame of the image data and the background model image.
  3. 根据权利要求2所述的方法,其特征在于,根据至少一帧所述图像数据和所述背景模型图像识别每帧所述图像数据中的运动对象,包括:The method according to claim 2, wherein identifying a moving object in each frame of the image data according to at least one frame of the image data and the background model image comprises:
    获取至少一帧所述图像数据中每个像素点的第一像素值和所述背景模型图像中相同像素点的第二像素值;Acquiring a first pixel value of each pixel in at least one frame of the image data and a second pixel value of the same pixel in the background model image;
    根据所述第一像素值和所述第二像素值确定所述图像数据中的运动对象。The moving object in the image data is determined according to the first pixel value and the second pixel value.
  4. 根据权利要求3所述的方法,其特征在于,根据所述第一像素值和所述第二像素值确定所述图像数据中的运动对象,包括:The method according to claim 3, wherein determining the moving object in the image data according to the first pixel value and the second pixel value comprises:
    获取所述第一像素值与所述第二像素值的差异值;Obtaining a difference value between the first pixel value and the second pixel value;
    在所述图像数据中查找所述差异值大于或等于预设的像素阈值的所有像素点,其中,所有像素点构成所述图像数据中的运动对象。Searching for all pixels with the difference value greater than or equal to a preset pixel threshold in the image data, where all the pixels constitute a moving object in the image data.
  5. 根据权利要求1所述的方法,其特征在于,识别所述图像数据中运动对象所在的工作区域,包括:The method according to claim 1, wherein identifying a working area where a moving object in the image data is located comprises:
    建立用于体现所述运动对象的动作变化频率的统计矩阵,所述统计矩阵的大小与所述图像数据的大小相同;Establishing a statistical matrix for reflecting the frequency of motion changes of the moving object, the size of the statistical matrix being the same as the size of the image data;
    根据所述统计矩阵确定所述运动对象所在的工作区域。Determine the working area where the moving object is located according to the statistical matrix.
  6. 根据权利要求5所述的方法,其特征在于,建立用于体现所述运动对象的动作变化频率的统计矩阵,包括:The method according to claim 5, wherein establishing a statistical matrix for reflecting the frequency of movement changes of the moving object comprises:
    获得与至少一帧所述图像数据中的每个像素点相对应的统计数值;Obtaining a statistical value corresponding to each pixel in at least one frame of the image data;
    基于所述统计数值建立统计矩阵。A statistical matrix is established based on the statistical values.
  7. 根据权利要求5所述的方法,其特征在于,根据所述统计矩阵确定所述运动对象 所在的工作区域,包括:The method according to claim 5, wherein determining the working area where the moving object is located according to the statistical matrix comprises:
    对所述统计矩阵进行归一化处理,获得与所述统计矩阵中每个统计数值相对应的像素灰度值;Performing normalization processing on the statistical matrix to obtain a pixel gray value corresponding to each statistical value in the statistical matrix;
    在所述像素灰度值大于或等于预设的灰度阈值时,则将所述像素灰度值所对应的像素区域确定为所述运动对象所在的工作区域。When the pixel gray value is greater than or equal to a preset gray threshold value, the pixel area corresponding to the pixel gray value is determined as the working area where the moving object is located.
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    对所述统计矩阵进行更新。The statistical matrix is updated.
  9. 根据权利要求8所述的方法,其特征在于,对所述统计矩阵进行更新,包括:The method according to claim 8, wherein updating the statistical matrix comprises:
    获取预设的更新系数,其中,所述更新系数为小于1的正数;Obtaining a preset update coefficient, where the update coefficient is a positive number less than 1;
    将所述统计矩阵中包括的所有统计数值分别与所述更新系数做乘法运算,获得更新后数值;Multiply all the statistical values included in the statistical matrix with the update coefficients to obtain updated values;
    基于更新后数值获得更新后的统计矩阵。The updated statistical matrix is obtained based on the updated values.
  10. 根据权利要求1-9中任意一项所述的方法,其特征在于,根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作,包括:The method according to any one of claims 1-9, wherein performing a piece counting operation on the garment after quality inspection according to the moving object and the work area comprises:
    检测所述运动对象是否位于所述工作区域内;Detecting whether the moving object is located in the working area;
    若所述运动对象不在所述工作区域内,则对质检后的所述服装进行计件操作。If the moving object is not in the working area, a piece counting operation is performed on the clothing after quality inspection.
  11. 根据权利要求10所述的方法,其特征在于,在所述运动对象不在所述工作区域内之后,所述方法还包括:The method according to claim 10, wherein after the moving object is not in the working area, the method further comprises:
    若所述运动对象位于预设的第一区域内,则对质检后的合格服装进行计件操作;或者,If the moving object is located in the preset first area, perform a piece counting operation on qualified clothing after quality inspection; or,
    若所述运动对象位于预设的第二区域内,则对质检后的不合格服装进行计件操作。If the moving object is located in the preset second area, a piece counting operation is performed on the unqualified clothing after quality inspection.
  12. 根据权利要求1-9中任意一项所述的方法,其特征在于,在获取对服装进行质检的至少一帧图像数据之后,所述方法还包括:The method according to any one of claims 1-9, wherein after acquiring at least one frame of image data for quality inspection of clothing, the method further comprises:
    调整至少一帧所述图像数据的分辨率,使得所述图像数据的分辨率满足预设标准。The resolution of at least one frame of the image data is adjusted so that the resolution of the image data meets a preset standard.
  13. 根据权利要求1-9中任意一项所述的方法,其特征在于,在识别所述图像数据中的运动对象以及运动对象所在的工作区域之前,所述方法还包括:The method according to any one of claims 1-9, characterized in that, before identifying the moving object in the image data and the working area where the moving object is located, the method further comprises:
    对至少一帧所述图像数据进行滤波去噪处理。Perform filtering and denoising processing on at least one frame of the image data.
  14. 根据权利要求1-9中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-9, wherein the method further comprises:
    存储至少一帧所述运动对象对服装进行质检操作的图像数据。At least one frame of image data in which the moving object performs a quality inspection operation on the clothing is stored.
  15. 一种服装的计件装置,其特征在于,包括:A piece counting device for clothing, characterized in that it comprises:
    获取模块,用于获取对服装进行质检的至少一帧图像数据;The acquisition module is used to acquire at least one frame of image data for quality inspection of clothing;
    识别模块,用于识别所述图像数据中的运动对象以及运动对象所在的工作区域;Recognition module for recognizing the moving object in the image data and the working area where the moving object is located;
    计件模块,用于根据所述运动对象和所述工作区域对质检后的所述服装进行计件操作。The piece-counting module is used to perform piece-counting operations on the clothing after quality inspection according to the moving object and the working area.
  16. 一种电子设备,其特征在于,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如权利要求1至14中任一项所述的服装的计件方法。An electronic device, characterized by comprising: a memory and a processor; wherein the memory is used to store one or more computer instructions, where the one or more computer instructions are executed by the processor to achieve The garment piece counting method according to any one of claims 1 to 14.
PCT/CN2020/071926 2019-01-23 2020-01-14 Method, apparatus and device for counting clothing by number of pieces WO2020151530A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910063798.7A CN111476336B (en) 2019-01-23 2019-01-23 Method, device and equipment for counting clothes
CN201910063798.7 2019-01-23

Publications (1)

Publication Number Publication Date
WO2020151530A1 true WO2020151530A1 (en) 2020-07-30

Family

ID=71736310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/071926 WO2020151530A1 (en) 2019-01-23 2020-01-14 Method, apparatus and device for counting clothing by number of pieces

Country Status (3)

Country Link
CN (1) CN111476336B (en)
TW (1) TW202030641A (en)
WO (1) WO2020151530A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640753A (en) * 2022-04-01 2022-06-17 北京市疾病预防控制中心 Nematode pharyngeal pump movement frequency automatic identification method based on experimental video processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325690A (en) * 2007-06-12 2008-12-17 上海正电科技发展有限公司 Method and system for detecting human flow analysis and crowd accumulation process of monitoring video flow
CN102930279A (en) * 2012-09-29 2013-02-13 广西工学院 Image identification method for detecting product quantity
JP2014157524A (en) * 2013-02-18 2014-08-28 Nippon Telegr & Teleph Corp <Ntt> Image display system, server device, information processing terminal and control method
CN108345842A (en) * 2018-01-24 2018-07-31 成都鼎智汇科技有限公司 A kind of processing method based on big data

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013075295A1 (en) * 2011-11-23 2013-05-30 浙江晨鹰科技有限公司 Clothing identification method and system for low-resolution video
CN102609689B (en) * 2012-02-03 2016-12-28 江苏科海智能系统有限公司 A kind of video track background modeling method based on multiframe statistics
CN104616290A (en) * 2015-01-14 2015-05-13 合肥工业大学 Target detection algorithm in combination of statistical matrix model and adaptive threshold
CN104899557B (en) * 2015-05-25 2017-12-29 浙江工业大学 A kind of intersection background image extracting method based on video
US9662084B2 (en) * 2015-06-18 2017-05-30 Toshiba Medical Systems Corporation Method and apparatus for iteratively reconstructing tomographic images from electrocardiographic-gated projection data
JP6490121B2 (en) * 2017-02-17 2019-03-27 ファナック株式会社 Robot system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325690A (en) * 2007-06-12 2008-12-17 上海正电科技发展有限公司 Method and system for detecting human flow analysis and crowd accumulation process of monitoring video flow
CN102930279A (en) * 2012-09-29 2013-02-13 广西工学院 Image identification method for detecting product quantity
JP2014157524A (en) * 2013-02-18 2014-08-28 Nippon Telegr & Teleph Corp <Ntt> Image display system, server device, information processing terminal and control method
CN108345842A (en) * 2018-01-24 2018-07-31 成都鼎智汇科技有限公司 A kind of processing method based on big data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ALEJANDRO MARTÍNEZ-SALA, SÁNCHEZ-AARTNOUTSE JUAN, EGEA-LÓPEZ ESTEBAN: "Garment Counting in a Textile Warehouse by Means of a Laser Imaging System", SENSORS, vol. 13, no. 5, 29 April 2013 (2013-04-29), pages 5630 - 5648, XP055723637, ISSN: 1424-8220, DOI: 10.3390/s130505630 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114640753A (en) * 2022-04-01 2022-06-17 北京市疾病预防控制中心 Nematode pharyngeal pump movement frequency automatic identification method based on experimental video processing
CN114640753B (en) * 2022-04-01 2023-10-27 北京市疾病预防控制中心 Nematode pharyngeal pump movement frequency automatic identification method based on experimental video processing

Also Published As

Publication number Publication date
CN111476336A (en) 2020-07-31
CN111476336B (en) 2023-06-20
TW202030641A (en) 2020-08-16

Similar Documents

Publication Publication Date Title
CN106557778B (en) General object detection method and device, data processing device and terminal equipment
WO2021121128A1 (en) Artificial intelligence-based sample evaluation method, apparatus, device, and storage medium
AU2016328959A1 (en) Updating attribute data structures to indicate trends in attribute data provided to automated modeling systems
US20140114609A1 (en) Adaptive analysis of signals
US20150227784A1 (en) Object detection system and method
CN110363084A (en) A kind of class state detection method, device, storage medium and electronics
CN108230016B (en) Agricultural product market price transmission analysis method and analysis device
CN113065614B (en) Training method of classification model and method for classifying target object
CN109962789B (en) Method and device for constructing Internet of things application label system based on network data
CN111079638A (en) Target detection model training method, device and medium based on convolutional neural network
CN108228684B (en) Method and device for training clustering model, electronic equipment and computer storage medium
US20220351398A1 (en) Depth detection method, method for training depth estimation branch network, electronic device, and storage medium
CN112801132B (en) Image processing method and device
CN112231592A (en) Network community discovery method, device, equipment and storage medium based on graph
WO2019091401A1 (en) Network model compression method and apparatus for deep neural network, and computer device
EP3620982A1 (en) Sample processing method and device
WO2018006631A1 (en) User level automatic segmentation method and system
WO2016148713A1 (en) Automatic detection of outliers in multivariate data
US11599561B2 (en) Data stream analytics
CN114882321A (en) Deep learning model training method, target object detection method and device
WO2020151530A1 (en) Method, apparatus and device for counting clothing by number of pieces
CN114564345A (en) Server abnormity detection method, device, equipment and storage medium
CN109978855A (en) A kind of method for detecting change of remote sensing image and device
CN107977980B (en) Target tracking method, device and readable medium
CN116310356B (en) Training method, target detection method, device and equipment of deep learning model

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: 20745830

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: 20745830

Country of ref document: EP

Kind code of ref document: A1