CN111382726A - Engineering work detection method and related device - Google Patents

Engineering work detection method and related device Download PDF

Info

Publication number
CN111382726A
CN111382726A CN202010251987.XA CN202010251987A CN111382726A CN 111382726 A CN111382726 A CN 111382726A CN 202010251987 A CN202010251987 A CN 202010251987A CN 111382726 A CN111382726 A CN 111382726A
Authority
CN
China
Prior art keywords
image
target
pixel
pixel value
preset
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010251987.XA
Other languages
Chinese (zh)
Other versions
CN111382726B (en
Inventor
孙玉玮
马青山
陈宇
朱建宝
施烨
俞鑫春
邓伟超
叶超
郭伟
任馨怡
王枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nantong Huayuan Technology Development Co ltd
Zhejiang Dahua Technology Co Ltd
Nantong Power Supply Co of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
Nantong Huayuan Technology Development Co ltd
Zhejiang Dahua Technology Co Ltd
Nantong Power Supply Co of State Grid Jiangsu Electric Power Co Ltd
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 Nantong Huayuan Technology Development Co ltd, Zhejiang Dahua Technology Co Ltd, Nantong Power Supply Co of State Grid Jiangsu Electric Power Co Ltd filed Critical Nantong Huayuan Technology Development Co ltd
Priority to CN202010251987.XA priority Critical patent/CN111382726B/en
Publication of CN111382726A publication Critical patent/CN111382726A/en
Application granted granted Critical
Publication of CN111382726B publication Critical patent/CN111382726B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/20Scenes; Scene-specific elements in augmented reality scenes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses an engineering operation detection method and a related device, wherein the engineering operation detection method comprises the following steps: acquiring an original image shot by a camera device on a working site, wherein the original image comprises a preset detection area; carrying out target detection on the original image, and acquiring a target area corresponding to a target object in the original image, wherein the target object is used for realizing warning; and determining whether the operation site meets the operation specification or not based on the position relation between the preset detection area and the target area. By the scheme, the engineering operation detection quality can be improved.

Description

工程作业检测方法以及相关装置Engineering work detection method and related device

技术领域technical field

本申请涉及图像处理技术领域,特别是涉及一种工程作业检测方法以及相关装置。The present application relates to the technical field of image processing, and in particular, to a method for detecting engineering work and a related device.

背景技术Background technique

在工程作业中,为了在作业现场警示作业人员,避免作业人员误入危险区域,以保障作业安全,通常会在作业现场的危险区域附近设置诸如警示标语等警示物。以电力检修为例,由于开关设备“五防”功能不全或作业人员精力分散等因素影响,有可能发生作业人员误入带电间隔、误分误合开关等危险现象。因此,在倒闸操作或检修操作中,普遍使用红布幔警示作业人员,以使作业人员明显区分停电检修屏柜和相邻带电非检修屏柜。由此可见,诸如红布幔、警示标语等警示物在保障作业安全中具有十分重要的作用。In engineering operations, in order to warn the operators on the job site and avoid them from entering the dangerous area by mistake, so as to ensure the safety of the operation, warning objects such as warning signs are usually set near the dangerous area on the job site. Taking power maintenance as an example, due to the insufficiency of the "five-proof" function of the switchgear or the distraction of the operator's energy, dangerous phenomena such as the operator's mistaken entry into the live interval, the wrong switch and the wrong switch may occur. Therefore, in the switching operation or maintenance operation, the red cloth curtain is generally used to warn the operator, so that the operator can clearly distinguish the power failure maintenance panel cabinet and the adjacent live non-maintenance panel cabinet. It can be seen that warning objects such as red cloth curtains and warning signs play a very important role in ensuring operational safety.

目前,仍然采用人工检查的方式确定上述警示物是否规范使用,因此,存在效率低下的问题。此外,受限于人力资源、检查人员精力等因素,人工检查难免会发生疏漏。如此种种,均降低了工程作业检测质量。有鉴于此,如何提高工程作业检测质量成为亟待解决的问题。At present, manual inspection is still used to determine whether the above-mentioned warning objects are used in a standardized manner, and therefore, there is a problem of low efficiency. In addition, limited by factors such as human resources and the energy of inspectors, manual inspections will inevitably lead to omissions. All these have reduced the inspection quality of engineering operations. In view of this, how to improve the inspection quality of engineering operations has become an urgent problem to be solved.

发明内容SUMMARY OF THE INVENTION

本申请主要解决的技术问题是提供一种工程作业检测方法以及相关装置,能够提高工程作业检测质量。The main technical problem to be solved by the present application is to provide an engineering operation detection method and a related device, which can improve the engineering operation detection quality.

为了解决上述问题,本申请第一方面提供了一种工程作业检测方法,包括:获取摄像器件对作业现场拍摄的原始图像,其中,原始图像中包含预设检测区域;对原始图像进行目标检测,获取原始图像中与目标对象对应的目标区域,其中,目标对象用于实现警示;基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范。In order to solve the above problem, a first aspect of the present application provides an engineering work detection method, which includes: acquiring an original image captured by a camera device on a work site, wherein the original image includes a preset detection area; performing target detection on the original image, The target area corresponding to the target object in the original image is acquired, wherein the target object is used to realize the warning; based on the positional relationship between the preset detection area and the target area, it is determined whether the operation site conforms to the operation specification.

为了解决上述问题,本申请第二方面提供了一种工程作业检测装置,包括相互耦接的存储器处理器,处理器用于执行存储器中存储的程序指令,以实现上述第一方面中的工程作业检测方法。In order to solve the above problem, a second aspect of the present application provides a device for detecting engineering work, including a memory processor coupled to each other, and the processor is configured to execute program instructions stored in the memory, so as to realize the engineering work detection in the first aspect. method.

为了解决上述问题,本申请第三方面提供了一种存储装置,存储有能够被处理器运行的程序指令,程序指令用于实现上述第一方面中的工程作业检测方法。In order to solve the above problem, a third aspect of the present application provides a storage device that stores program instructions that can be run by a processor, and the program instructions are used to implement the engineering work detection method in the first aspect.

上述方案,通过获取摄像器件对作业现场拍摄的原始图像,且原始图像中包含预设检测区域,从而对原始图像进行目标检测,获取原始图像中与用于实现警示的目标对象对应的目标区域,进而基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范,从而能够基于摄像器件对作业现场所拍摄的原始图像对作业现场是否符合作业规范进行检测,而无需依靠人工检查作业现场,从而能够提高检测效率,降低发生疏漏的概率,进而能够提高工程作业检测质量。In the above scheme, the original image captured by the camera device on the job site is obtained, and the original image includes a preset detection area, so as to perform target detection on the original image, and obtain the target area in the original image corresponding to the target object used for realizing the warning, Then, based on the positional relationship between the preset detection area and the target area, it is determined whether the job site complies with the job specification, so that whether the job site complies with the job specification can be detected based on the original image captured by the camera device on the job site without relying on manual labor. By inspecting the operation site, the inspection efficiency can be improved, the probability of omissions can be reduced, and the inspection quality of the engineering operation can be improved.

附图说明Description of drawings

图1是本申请工程作业检测方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of an engineering work detection method of the present application;

图2是图1中步骤S12一实施例的流程示意图;FIG. 2 is a schematic flowchart of an embodiment of step S12 in FIG. 1;

图3是图2中第一积分图的获取过程一实施例的示意图;3 is a schematic diagram of an embodiment of an acquisition process of the first integral graph in FIG. 2;

图4是图2中形态学处理一实施例的示意图;4 is a schematic diagram of an embodiment of morphological processing in FIG. 2;

图5是图2中步骤S123一实施例的流程示意图;FIG. 5 is a schematic flowchart of an embodiment of step S123 in FIG. 2;

图6是本申请工程作业检测装置一实施例的框架示意图;6 is a schematic diagram of a framework of an embodiment of the engineering work detection device of the present application;

图7是本申请工程作用检测装置另一实施例的框架示意图;FIG. 7 is a schematic frame diagram of another embodiment of the engineering action detection device of the present application;

图8是本申请存储装置一实施例的框架示意图。FIG. 8 is a schematic diagram of a framework of an embodiment of a storage device of the present application.

具体实施方式Detailed ways

下面结合说明书附图,对本申请实施例的方案进行详细说明。The solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、接口、技术之类的具体细节,以便透彻理解本申请。In the following description, for purposes of illustration and not limitation, specific details such as specific system structures, interfaces, techniques, etc. are set forth in order to provide a thorough understanding of the present application.

本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。此外,本文中的“多”表示两个或者多于两个。The terms "system" and "network" are often used interchangeably herein. The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the character "/" in this document generally indicates that the related objects are an "or" relationship. Also, "multiple" herein means two or more than two.

请参阅图1,图1是本申请工程作业检测方法一实施例的流程示意图。具体而言,可以包括如下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of an embodiment of the engineering operation detection method of the present application. Specifically, the following steps can be included:

步骤S11:获取摄像器件对作业现场拍摄的原始图像,其中,原始图像中包含预设检测区域。Step S11: Acquire an original image captured by the camera device on the job site, wherein the original image includes a preset detection area.

本实施例中,摄像器件可以包括球机、卡片机等监控摄像机,本实施例在此不做具体限制。在实际应用时,作业现场可能存在多个需要检测的区域,在此情况下,为了使摄像器件自动对作业现场中多个需要检测的区域进行拍摄,可以获取用户对摄像器件设置的位姿参数,从而为摄像器件设置多个预置位,使得摄像器件在多个预置位对作业现场进行拍摄,从而覆盖到整个作业现场。以电力检修为例,摄像器件可以设置在电力机房的东北角,而检测时,需要对电力机房的东南区域、西北区域、西南区域进行拍摄,因此,可以为摄像器件设置三个预置位,使得摄像器件在工程作业检测过程中,分别朝电力机房的东南区域、西南区域、西北区域进行拍摄,从而能够覆盖作业现场。In this embodiment, the camera device may include a surveillance camera such as a ball camera, a card camera, etc., which is not specifically limited in this embodiment. In practical applications, there may be multiple areas to be detected on the job site. In this case, in order to enable the camera device to automatically photograph multiple areas to be detected on the job site, the pose parameters set by the user on the camera device can be obtained. , so that multiple preset positions are set for the camera device, so that the camera device can photograph the job site at multiple preset positions, thereby covering the entire job site. Taking power maintenance as an example, the camera device can be set in the northeast corner of the power machine room, and during inspection, it is necessary to take pictures of the southeast, northwest and southwest regions of the power machine room. Therefore, three preset positions can be set for the camera device. In the process of engineering operation detection, the camera device is made to shoot respectively toward the southeast area, southwest area, and northwest area of the power machine room, so as to cover the operation site.

本实施例中,预设检测区域是用户预先设置的需要进行工程作业检测的区域,具体地,预设检测区域可以设置为一矩形区域,用户设置时,可以设置矩形区域在图像中的坐标。在一个具体的实施场景中,当摄像器件设置有多个预置位时,预设检测区域也可以设置有多个,且与预置位一一对应。仍以电力检修为例,当摄像器件分别设有上述三个预置位,以使摄像器件在工程作业检测过程中,分别朝电力机房的东南区域、西南区域、西北区域进行拍摄时,可以分别对上述三个预置位设置带电区域,从而能够基于后续检测得到的目标对象与预先设置的带电区域之间的位置关系,确定电力检修现场是否符合作业规范。In this embodiment, the preset detection area is an area preset by the user for engineering work detection. Specifically, the preset detection area can be set as a rectangular area, and the user can set the coordinates of the rectangular area in the image when setting. In a specific implementation scenario, when the imaging device is set with multiple preset positions, multiple preset detection areas may also be set, and correspond to the preset positions one-to-one. Still taking the power maintenance as an example, when the camera devices are respectively equipped with the above three preset positions, so that the camera devices can be respectively photographed towards the southeast, southwest and northwest areas of the power room during the inspection process of the project. The live areas are set for the above three preset positions, so that it can be determined whether the power maintenance site conforms to the operation specification based on the positional relationship between the target object obtained by subsequent detection and the preset live areas.

此外,在建筑工程、通信工程等其他工程应用中也可以进行类似的设置,本实施例在此不再一一举例。In addition, similar settings can also be performed in other engineering applications such as construction engineering and communication engineering, which will not be illustrated one by one in this embodiment.

步骤S12:对原始图像进行目标检测,获取原始图像中与目标对象对应的目标区域。Step S12: Perform target detection on the original image, and obtain a target area corresponding to the target object in the original image.

本实施例中,目标对象用于实现警示,以电力检修为例,目标对象可以是红布幔。在其他工程作业中,目标对象还可以是其他警示物,例如,在建筑工程中,目标对象还可以是警戒线等;在通信工程中,目标对象还可以是警示标语等,本实施例在此不再一一举例。In this embodiment, the target object is used to realize the warning. Taking power maintenance as an example, the target object may be a red cloth curtain. In other engineering operations, the target object may also be other warning objects. For example, in a construction project, the target object may also be a warning line, etc.; in a communication project, the target object may also be a warning slogan, etc. No more examples.

本实施例中,目标检测的具体方式可以是基于神经网络的检测方式。例如,采用标注有目标对象的训练图像对预设神经网络进行训练,得到经训练的预设神经网络,再利用经训练的预设神经网络对原始图像进行检测,以得到与目标对象对应的目标区域。或者,目标检测的具体方式还可以是基于传统的图像分析的检测方法,例如,对原始图像中各个像素点的颜色特征进行分析,获得与目标对象的颜色特征相似的像素点,再对这些像素点进行降噪等处理,最后将经降噪等处理之后的像素点的最小外接矩形作为与目标对象对应的目标区域。本实施例在此不做具体限制。In this embodiment, the specific method of target detection may be a detection method based on a neural network. For example, training a preset neural network with a training image marked with a target object to obtain a trained preset neural network, and then using the trained preset neural network to detect the original image to obtain a target corresponding to the target object area. Alternatively, the specific method of target detection can also be a detection method based on traditional image analysis. For example, the color features of each pixel in the original image are analyzed to obtain pixels similar to the color features of the target object, and then these pixels are analyzed. The point is subjected to noise reduction and other processing, and finally the minimum circumscribed rectangle of the pixel point after the noise reduction and other processing is used as the target area corresponding to the target object. There is no specific limitation in this embodiment.

步骤S13:基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范。Step S13: Based on the positional relationship between the preset detection area and the target area, determine whether the job site complies with the job specification.

在一个实施场景中,当预设检测区域与目标区域之间存在重合区域时,即可认为预设检测区域内设置有目标对象,则确定作业现场符合作业规范,否则,确定作业现场不符合作业规范。In an implementation scenario, when there is an overlapping area between the preset detection area and the target area, it can be considered that a target object is set in the preset detection area, and it is determined that the job site complies with the job specification; otherwise, it is determined that the job site does not meet the job specification. specification.

在另一个实施场景中,当预设检测区域完全包含目标区域时,才可认为预设检测区域内设置有目标对象,则确定作业现场符合作业规范,否则,确定作业现场不符合作业规范。In another implementation scenario, when the preset detection area completely includes the target area, it can be considered that a target object is set in the preset detection area, and it is determined that the job site conforms to the operation specification; otherwise, it is determined that the operation site does not conform to the operation specification.

在又一个实施场景中,当预设检测区域与目标区域之间交并比(Intersectionover Union,IoU)大于一预设交并比阈值(例如:0.5)时,才可认为预设检测区域内设置有目标对象,则确定作业现场符合作业规范,否则,确定作业现场不符合作业规范。In yet another implementation scenario, only when the IoU (Intersectionover Union, IoU) between the preset detection area and the target area is greater than a preset intersection over union ratio threshold (for example: 0.5) can it be considered that the preset detection area is set If there is a target object, it is determined that the job site conforms to the operation specification; otherwise, it is determined that the operation site does not conform to the operation specification.

在一个具体的实施场景中,当确定作业现场不符合作业规范时,还可以输出预设报警信息。此外,当确定作业现场符合作业规范时,也可以输出预设安全信息,或者,不输出任何信息。上述预设报警信息、预设安全信息可以包括但不限于:文字、声音、图像等等,本实施例在此不再一一举例。此外,当对原始图像进行目标检测,而未检测到与目标对象对应的目标区域时,可以直接输出预设报警信息,从而实现警示作业现场不符合作业规范。In a specific implementation scenario, when it is determined that the job site does not meet the job specification, preset alarm information can also be output. In addition, when it is determined that the work site complies with the work specification, preset safety information may be output, or no information may be output. The above-mentioned preset alarm information and preset security information may include, but are not limited to, text, sound, image, etc., which will not be exemplified one by one in this embodiment. In addition, when the target detection is performed on the original image, but the target area corresponding to the target object is not detected, the preset alarm information can be directly output, so as to realize the warning that the operation site does not meet the operation specification.

上述方案,通过获取摄像器件对作业现场拍摄的原始图像,且原始图像中包含预设检测区域,从而对原始图像进行目标检测,获取原始图像中与用于实现警示的目标对象对应的目标区域,进而基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范,从而能够基于摄像器件对作业现场所拍摄的原始图像对作业现场是否符合作业规范进行检测,而无需依靠人工检查作业现场,从而能够提高检测效率,降低发生疏漏的概率,进而能够提高工程作业检测质量。In the above scheme, the original image captured by the camera device on the job site is obtained, and the original image includes a preset detection area, so as to perform target detection on the original image, and obtain the target area in the original image corresponding to the target object used for realizing the warning, Then, based on the positional relationship between the preset detection area and the target area, it is determined whether the job site complies with the job specification, so that whether the job site complies with the job specification can be detected based on the original image captured by the camera device on the job site without relying on manual labor. By inspecting the operation site, the inspection efficiency can be improved, the probability of omissions can be reduced, and the inspection quality of the engineering operation can be improved.

请参阅图2,图2是图1中步骤S12一实施例的流程示意图。具体包括如下步骤:Please refer to FIG. 2 , which is a schematic flowchart of an embodiment of step S12 in FIG. 1 . Specifically include the following steps:

步骤S121:利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像。Step S121: Using a preset threshold value related to the color feature of the target object, perform threshold segmentation on the original image to obtain an image to be detected.

在一个具体的实施场景中,以电力检修为例,目标对象为红布幔,则可以采用与红布幔的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像。在其他应用场景中,可以以此类推,本实施例在此不再一一举例。In a specific implementation scenario, taking power maintenance as an example, and the target object is a red cloth curtain, a preset threshold related to the color characteristics of the red cloth curtain can be used to perform threshold segmentation on the original image to obtain an image to be detected. In other application scenarios, it can be deduced by analogy, and this embodiment will not give examples one by one here.

此外,由于RGB(Red Green Blue,红绿蓝)颜色空间与人眼感知差异很大,为了使颜色距离的定义符合人的视觉特征,本实施例在进行阈值分割之前,还可以将原始图像的颜色空间映射到HSV(Hue Saturation Value,色调/饱和度/亮度)颜色空间。在一个具体的实施场景中,当原始图像的颜色空间为RGB颜色空间时,可以通过下式将原始图像的颜色空间映射到HSV颜色空间:In addition, since the RGB (Red Green Blue, red green blue) color space is very different from the perception of human eyes, in order to make the definition of color distance conform to human visual characteristics, in this embodiment, before performing threshold segmentation, the original image can also be The color space is mapped to the HSV (Hue Saturation Value, Hue/Saturation/Brightness) color space. In a specific implementation scenario, when the color space of the original image is the RGB color space, the color space of the original image can be mapped to the HSV color space by the following formula:

Figure BDA0002435832270000051
Figure BDA0002435832270000051

Figure BDA0002435832270000061
Figure BDA0002435832270000061

Figure BDA0002435832270000062
Figure BDA0002435832270000062

Figure BDA0002435832270000063
Figure BDA0002435832270000063

上式中,(R,G,B)表示原始图像中某一像素点的R通道像素值、G通道像素值、B通道像素值。In the above formula, (R, G, B) represents the R channel pixel value, G channel pixel value, and B channel pixel value of a certain pixel in the original image.

此外,进一步地,还可以将上述(H,S,V)映射到0~255区间内,本实施例在此不再赘述。在一个具体的实施场景中,上述预设阈值可以包括:预设H通道阈值区间(例如:156~180)、预设S通道阈值区间(例如:80~255),以及预设V通道阈值区间(例如:50~255),在其他实施场景中,上述取值可以是其他数值,本实施例在此不做具体限制。利用上述预设阈值,可以依序判断映射到HSV颜色空间的原始图像中各个像素点是否满足以下条件:H通道像素值是否在预设H通道阈值区间内,且S通道像素值是否在预设S通道阈值区间内,且V通道像素值是否在预设V通道阈值区间内,若满足,则将待检测图像中对应像素点的像素值设置为第一像素值(例如:255),否则,将待检测图像中对应像素点的像素值设置为第二像素值(例如:0)。具体地,待检测图像中与目标对象的颜色特征相关的像素点的像素值为第一像素值,与目标对象的颜色特征无关的像素点的像素值为第二像素值。In addition, further, the above-mentioned (H, S, V) may also be mapped to an interval of 0 to 255, which is not repeated in this embodiment. In a specific implementation scenario, the above-mentioned preset thresholds may include: a preset H channel threshold interval (for example: 156-180), a preset S channel threshold interval (for example: 80-255), and a preset V channel threshold interval (For example: 50 to 255), in other implementation scenarios, the above value may be other values, which are not specifically limited in this embodiment. Using the above preset thresholds, it is possible to sequentially determine whether each pixel in the original image mapped to the HSV color space satisfies the following conditions: whether the pixel value of the H channel is within the preset H channel threshold range, and whether the pixel value of the S channel is within the preset Within the S channel threshold range, and whether the V channel pixel value is within the preset V channel threshold range, if so, set the pixel value of the corresponding pixel in the image to be detected as the first pixel value (for example: 255), otherwise, Set the pixel value of the corresponding pixel in the image to be detected as the second pixel value (for example: 0). Specifically, the pixel value of the pixel point related to the color feature of the target object in the image to be detected is the first pixel value, and the pixel value of the pixel point unrelated to the color feature of the target object is the second pixel value.

步骤S122:统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值。Step S122: Count the sum of the pixel values of all pixel points in the upper left area of each pixel point in the image to be detected, as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected.

请结合参阅图3,图3是图2中第一积分图的获取过程一实施例的示意图。如图3所示,P1是待检测图像,P1(i,j)是位于待检测图像第i行、第j列的像素点的像素值,Q1是第一积分图像,Q1(i,j)是位于第一积分图像第i行、第j列的像素点的像素值。通过下式,可以基于待检测图像获得第一积分图像:Please refer to FIG. 3 , which is a schematic diagram of an embodiment of an acquisition process of the first integral graph in FIG. 2 . As shown in Figure 3, P 1 is the image to be detected, P 1 (i, j) is the pixel value of the pixel at the i-th row and the j-th column of the to-be-detected image, Q 1 is the first integral image, Q 1 ( i,j) is the pixel value of the pixel located in the i-th row and the j-th column of the first integral image. The first integral image can be obtained based on the image to be detected by the following formula:

Figure BDA0002435832270000071
Figure BDA0002435832270000071

步骤S123:利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域。Step S123: Perform morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain a target area corresponding to the target object in the original image.

本实施例中的预设结构元素为一个二维矩阵,其矩阵元素的值为1,其尺寸大小可以为15*15,也可以为13*13,或者11*11,或者9*9,本实施例在此不做具体限制。The preset structural element in this embodiment is a two-dimensional matrix, the value of the matrix element is 1, and the size may be 15*15, or 13*13, or 11*11, or 9*9. The embodiments are not specifically limited herein.

在一个实施场景中,利用预设结构元素可以直接对待处理图像进行形态学处理。例如,利用预设结构元素在对待处理图像进行腐蚀形态学处理时,可以利用预设结构元素的原子(即中心点)遍历待处理图像中像素值为第一像素值的目标像素点,当预设结构元素的尺寸大小区域内其他像素点的像素值与目标像素点的像素值相同,即其他像素点的像素值均为第一像素值,则保留目标像素点的像素值,否则,将目标像素点的像素值设置为第二像素值。请结合参阅图4,图4是图2中形态学处理一实施例的示意图,具体地,图4是采用预设结构元素进行腐蚀形态学处理一实施例的示意图,如图4所示,预设结构元素的尺寸大小为k*k,待检测图像的尺寸大小为w*h,经腐蚀形态学处理之后的待检测图像如图4所示,其中,斜线阴影像素点表示像素值为第一像素值的目标像素点,如图4所示,经过腐蚀形态学处理,能够消除待处理图像中的毛刺。然而,通过上述直接采用预设结构元素对待处理图像进行腐蚀形态学处理的算法复杂度为O(w*h*k*k),复杂度较高,处理负荷和资源开销较大。In one implementation scenario, the image to be processed can be directly morphologically processed by using preset structural elements. For example, when using a preset structural element to perform corrosion morphological processing on an image to be processed, the atoms (ie, the center point) of the preset structural element can be used to traverse the target pixel point in the image to be processed whose pixel value is the first pixel value. Assume that the pixel value of other pixels in the size area of the structural element is the same as the pixel value of the target pixel, that is, the pixel value of other pixels is the first pixel value, then the pixel value of the target pixel is retained, otherwise, the target pixel value is The pixel value of the pixel point is set to the second pixel value. Please refer to FIG. 4. FIG. 4 is a schematic diagram of an embodiment of morphological processing in FIG. 2. Specifically, FIG. 4 is a schematic diagram of an embodiment of etching morphological processing using preset structural elements. As shown in FIG. Suppose the size of the structural element is k*k, the size of the image to be detected is w*h, and the image to be detected after the corrosion morphological processing is shown in Figure 4, where the slashed shaded pixels indicate that the pixel value is the first A target pixel of one pixel value, as shown in Figure 4, undergoes corrosion morphological processing, which can eliminate burrs in the image to be processed. However, the above-mentioned algorithm complexity of directly using the preset structural elements to perform corrosion morphological processing on the image to be processed is O(w*h*k*k), the complexity is high, and the processing load and resource overhead are high.

在另一个实施场景中,为了降低算法复杂度,减轻处理负荷,降低资源开销,可以采用上述第一积分图像对待处理图像进行形态学处理。具体地,请结合参阅图5,图5是图2中步骤S123一实施例的流程示意图,具体可以包括:In another implementation scenario, in order to reduce algorithm complexity, reduce processing load, and reduce resource overhead, the above-mentioned first integral image may be used to perform morphological processing on the image to be processed. Specifically, please refer to FIG. 5 , which is a schematic flowchart of an embodiment of step S123 in FIG. 2 , which may specifically include:

步骤S1231:利用预设结构元素和第一积分图像对待检测图像进行腐蚀形态学处理,得到第一处理图像。Step S1231 : perform corrosion morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain a first processed image.

具体可以确定待检测图像中像素值为第一像素值的第一目标像素点,并确定第一积分图像中与第一目标像素点对应的第二目标像素点,基于第二目标像素点和预设元素结构的尺寸大小,确定第一积分图像中的第三目标像素点,然后利用第三目标像素点的像素值,计算第一目标像素点周围尺寸大小范围内所有像素点的像素值之和,如果计算得到的像素值之和与尺寸大小之商为第一像素值,则可以认为第一目标像素点并非毛刺/噪点,则将第一目标像素点的像素值保持为第一像素值,如果像素值之和与尺寸大小之商不为第一像素值,则可以认为第一目标像素点为毛刺/噪点,则将第一目标像素点的像素值重置为第二像素值。Specifically, the first target pixel with the pixel value of the first pixel value in the image to be detected can be determined, and the second target pixel corresponding to the first target pixel in the first integral image can be determined, based on the second target pixel and the pre- Set the size of the element structure, determine the third target pixel in the first integral image, and then use the pixel value of the third target pixel to calculate the sum of the pixel values of all pixels within the size range around the first target pixel , if the quotient of the calculated sum of pixel values and the size is the first pixel value, it can be considered that the first target pixel is not a burr/noise, then the pixel value of the first target pixel is kept as the first pixel value, If the quotient of the sum of the pixel values and the size is not the first pixel value, it can be considered that the first target pixel is a burr/noise, and the pixel value of the first target pixel is reset to the second pixel value.

在一个具体的实施场景中,请继续结合参阅图3,如图3所示,待检测图像P1中,像素点(i,j)为第一目标像素点,对应地,第一积分图像Q1中,像素点(i,j)为与第一目标像素点对应的第二目标像素点,粗线黑框区域为预设结构元素的尺寸大小(k*k)区域,为了计算待检测图像P1中预设结构元素的尺寸大小区域内像素点的像素值之和,可以利用第一积分图像Q1进行计算,在计算时,可以首先利用预设结构元素的尺寸大小,确定第一积分图像Q1中的第三目标像素点,首先可以将第一积分图像Q1的预设结构元素的尺寸大小区域的右下角的像素点

Figure BDA0002435832270000081
确定第一个第三目标像素点,其像素值为
Figure BDA0002435832270000082
表示像素点
Figure BDA0002435832270000083
左上角区域内所有像素点的像素值之和,再确定另外三个第三目标像素点
Figure BDA0002435832270000084
Figure BDA0002435832270000085
故第一目标像素点(i,j)周围尺寸大小(k*k)范围内所有像素点的像素值之和可以表示为:In a specific implementation scenario, please continue to refer to FIG. 3. As shown in FIG. 3 , in the image to be detected P1, the pixel point (i, j) is the first target pixel point, correspondingly, the first integral image Q In 1 , the pixel point (i, j) is the second target pixel point corresponding to the first target pixel point, and the thick black frame area is the size (k*k) area of the preset structural element, in order to calculate the image to be detected. The sum of the pixel values of the pixel points in the size area of the preset structural element in P 1 can be calculated by using the first integral image Q 1. During the calculation, the size of the preset structural element can be used first to determine the first integral For the third target pixel point in the image Q 1 , firstly, the pixel point in the lower right corner of the size area of the preset structural element of the first integral image Q 1 can be
Figure BDA0002435832270000081
Determine the first and third target pixel, whose pixel value is
Figure BDA0002435832270000082
Represents a pixel
Figure BDA0002435832270000083
The sum of the pixel values of all pixels in the upper left area, and then determine the other three third target pixels
Figure BDA0002435832270000084
Figure BDA0002435832270000085
Therefore, the sum of the pixel values of all pixels in the range of the size (k*k) around the first target pixel (i, j) can be expressed as:

Figure BDA0002435832270000086
Figure BDA0002435832270000086

Figure BDA0002435832270000087
Figure BDA0002435832270000087

在计算得到第一目标像素点(i,j)周围尺寸大小(k*k)范围内所有像素点的像素值之和S之后,可以进一步计算像素值之和S与尺寸大小(k*k)之商(即

Figure BDA0002435832270000088
),若商为第一像素值,则说明待检测图像P1在第一目标像素点(i,j)尺寸大小(k*k)范围内所有像素点的像素值均为第一像素值,第一目标像素点(i,j)可以认为并非毛刺/噪点,此时可以保持待检测图像P1中第一目标像素点(i,j)的像素值不变,否则,说明第一目标像素点(i,j)为毛刺/噪点,并将待检测图像P1中第一目标像素点(i,j)的像素值重置为第二像素值。After calculating the sum S of pixel values of all pixels in the range of size (k*k) around the first target pixel (i, j), the sum S of pixel values and the size (k*k) can be further calculated. quotient (ie
Figure BDA0002435832270000088
), if the quotient is the first pixel value, it means that the pixel values of all the pixel points of the image to be detected P1 in the range of the size (k*k) of the first target pixel point (i, j) are the first pixel value, The first target pixel point (i, j) can be considered as not a burr/noise point, at this time, the pixel value of the first target pixel point (i, j) in the image P 1 to be detected can be kept unchanged, otherwise, it is explained that the first target pixel point Point (i, j) is a burr/noise point, and the pixel value of the first target pixel point (i, j) in the image P 1 to be detected is reset to the second pixel value.

通过利用积分图进行腐蚀形态学处理,能够将算法复杂度降低至O(w*h),算法复杂度得到显著降低。By using the integral graph for corrosion morphology processing, the algorithm complexity can be reduced to O(w*h), and the algorithm complexity is significantly reduced.

步骤S1232:统计第一处理图像中各个像素点的左上区域内所有像素点的像素值之和,作为与第一处理图像对应的第二积分图像中对应像素点的像素值。Step S1232: Count the sum of the pixel values of all pixel points in the upper left area of each pixel point in the first processed image as the pixel value of the corresponding pixel point in the second integral image corresponding to the first processed image.

在一个实施场景中,在将待处理图像经过腐蚀形态学处理之后,还可以进一步继续进行膨胀形态学处理,与上述步骤类似地,可以统计第一处理图像中各个像素点的左上区域内所有像素点的像素值之和,作为与第一处理图像对应的第二积分图像中对应像素点的像素值。具体可以参考本实施例中上述相关步骤,在此不再赘述。In one implementation scenario, after the image to be processed is subjected to erosion morphological processing, dilation morphological processing may be further continued. Similar to the above steps, all pixels in the upper left area of each pixel in the first processed image may be counted The sum of the pixel values of the points is taken as the pixel value of the corresponding pixel point in the second integral image corresponding to the first processed image. For details, reference may be made to the above-mentioned relevant steps in this embodiment, which will not be repeated here.

步骤S1233:利用预设结构元素和第二积分图像对第一处理图像进行膨胀形态学处理,得到第二处理图像。Step S1233 : performing dilation morphological processing on the first processed image by using the preset structural element and the second integral image to obtain a second processed image.

具体地,可以依次将第一处理图像中的各个像素点作为第四目标像素点,并确定第二积分图像中与第四目标像素点对应的第五目标像素点,基于第五目标像素点和预设结构元素的尺寸大小,确定第二积分图像中的第六目标像素点,并利用第六目标像素点的像素值,计算第四目标像素点周围尺寸大小范围内所有像素点的像素值之和,若像素值之和与尺寸大小之商为第二像素值,则将第四目标像素点的像素值设置为第二像素值,若像素值之和与尺寸大小之商不为第二像素值,则将第四目标像素点的像素值设置为第一像素值。其中,基于第五目标像素点和预设结构元素的尺寸大小,确定第二积分图像中的第六目标像素点,以及利用第六目标像素点的像素值,计算第四目标像素点周围尺寸大小范围内所有像素点的像素值之和的具体方式可以参考本实施例中上述步骤S1231,在此不再赘述。与腐蚀形态学处理不同是,膨胀形态学处理的目的是扩展边缘,并填充空洞,故只要在预设结构元素的尺寸大小范围内存在像素值为第一像素值的像素点,即只要像素值之和与尺寸大小之商不为第二像素值,就将第四目标像素点的像素值设置为第一像素值,否则,如果在预设结构元素的尺寸大小范围内都是像素值为第一像素值的像素点,即如果像素值之和与尺寸大小之商为第二像素值,则将第四目标像素点的像素值设置为第二像素值,通过这种方式能够显著扩充边缘,并填充内部空洞。Specifically, each pixel in the first processed image can be used as the fourth target pixel in turn, and the fifth target pixel corresponding to the fourth target pixel in the second integral image can be determined, based on the fifth target pixel and The size of the preset structural element is determined, the sixth target pixel in the second integral image is determined, and the pixel value of the sixth target pixel is used to calculate the sum of the pixel values of all the pixels within the size range around the fourth target pixel. and, if the quotient of the sum of the pixel values and the size is the second pixel value, set the pixel value of the fourth target pixel to the second pixel value, if the quotient of the sum of the pixel values and the size is not the second pixel value, the pixel value of the fourth target pixel is set to the first pixel value. Wherein, based on the size of the fifth target pixel point and the preset structural element, the sixth target pixel point in the second integral image is determined, and the pixel value of the sixth target pixel point is used to calculate the size around the fourth target pixel point For the specific manner of the sum of the pixel values of all the pixel points within the range, reference may be made to the foregoing step S1231 in this embodiment, which will not be repeated here. Different from erosion morphological processing, the purpose of dilation morphological processing is to expand edges and fill holes, so as long as there are pixels with a pixel value of the first pixel value within the size range of the preset structural element, that is, as long as the pixel value The quotient of the sum and the size is not the second pixel value, then the pixel value of the fourth target pixel is set to the first pixel value, otherwise, if the pixel value is the first pixel value within the size range of the preset structural element A pixel of one pixel value, that is, if the quotient of the sum of the pixel values and the size is the second pixel value, then the pixel value of the fourth target pixel is set to the second pixel value. In this way, the edge can be significantly expanded, and fill the voids inside.

步骤S1234:确定第二处理图像中各个像素点的像素值为第一像素值的目标连通域。Step S1234: Determine the pixel value of each pixel in the second processed image as a target connected domain of the first pixel value.

在待处理图像经过腐蚀形态学处理,以及膨胀形态处理之后,得到第二处理图像,此时,如果第二处理图像中某一像素点的像素值及其邻域像素点的像素值均为第一像素值,则将该像素点和其邻域像素点划分至同一连通域,遍历第二处理图像中所有像素点,能够得到至少一个目标连通域。After the to-be-processed image is subjected to corrosion morphological processing and dilation morphological processing, a second processed image is obtained. At this time, if the pixel value of a certain pixel in the second processed image and the pixel value of its neighboring pixels are the first If the pixel value is one pixel, the pixel and its neighboring pixels are divided into the same connected domain, and all the pixels in the second processed image are traversed to obtain at least one target connected domain.

步骤S1235:获取目标连通域的最小外接矩形,作为目标区域。Step S1235: Obtain the minimum circumscribed rectangle of the target connected domain as the target area.

将目标连通域的最小外接矩形作为目标区域。Take the minimum enclosing rectangle of the target connected domain as the target area.

区别于前述实施例,利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像,并统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值,从而利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域,能够降低算法复杂度,缩短处理时间,从而加快目标检测的速度,有利于实时检测工程作业是否规范,并在不规范时,及时报警。Different from the foregoing embodiments, the original image is subjected to threshold segmentation by using a preset threshold related to the color characteristics of the target object to obtain the image to be detected, and the pixel values of all pixels in the upper left area of each pixel in the image to be detected are counted. The sum is taken as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected, so that the image to be detected is morphologically processed by using the preset structural element and the first integral image to obtain the corresponding pixel value of the target object in the original image. The target area can reduce the complexity of the algorithm and shorten the processing time, thereby speeding up the speed of target detection, which is conducive to real-time detection of whether the engineering operation is standardized, and timely alarm when it is not standardized.

请参阅图6,图6是本申请工程作业检测装置60一实施例的框架示意图。工程作业检测装置60包括获取模块61、检测模块62和确定模块63,获取模块61用于获取摄像器件对作业现场拍摄的原始图像,其中,原始图像中包含预设检测区域,检测模块62用于对原始图像进行目标检测,获取原始图像中与目标对象对应的目标区域,其中,目标对象用于实现警示,确定模块63用于基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范。Please refer to FIG. 6 . FIG. 6 is a schematic diagram of a framework of an embodiment of the engineering operation detection device 60 of the present application. The engineering work detection device 60 includes an acquisition module 61, a detection module 62 and a determination module 63. The acquisition module 61 is used to acquire the original image captured by the camera device on the work site, wherein the original image includes a preset detection area, and the detection module 62 is used for Perform target detection on the original image, and obtain the target area corresponding to the target object in the original image, wherein the target object is used to realize the warning, and the determination module 63 is used to determine the job site based on the positional relationship between the preset detection area and the target area Compliance with work specifications.

上述方案,通过获取摄像器件对作业现场拍摄的原始图像,且原始图像中包含预设检测区域,从而对原始图像进行目标检测,获取原始图像中与用于实现警示的目标对象对应的目标区域,进而基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范,从而能够基于摄像器件对作业现场所拍摄的原始图像对作业现场是否符合作业规范进行检测,而无需依靠人工检查作业现场,从而能够提高检测效率,降低发生疏漏的概率,进而能够提高工程作业检测质量。In the above scheme, the original image captured by the camera device on the job site is obtained, and the original image includes a preset detection area, so as to perform target detection on the original image, and obtain the target area in the original image corresponding to the target object used for realizing the warning, Then, based on the positional relationship between the preset detection area and the target area, it is determined whether the job site complies with the job specification, so that whether the job site complies with the job specification can be detected based on the original image captured by the camera device on the job site without relying on manual labor. By inspecting the operation site, the inspection efficiency can be improved, the probability of omissions can be reduced, and the inspection quality of the engineering operation can be improved.

在一些实施例中,检测模块62包括阈值分割子模块,用于利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像,检测模块62还包括积分统计子模块,用于统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值,检测模块62还包括形态学处理子模块,用于利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域。In some embodiments, the detection module 62 includes a threshold segmentation sub-module for performing threshold segmentation on the original image by using a preset threshold related to the color feature of the target object to obtain an image to be detected, and the detection module 62 further includes an integral statistics sub-module The module is used to count the sum of the pixel values of all pixels in the upper left area of each pixel in the image to be detected, as the pixel value of the corresponding pixel in the first integral image corresponding to the image to be detected. The detection module 62 also includes a form The morphological processing sub-module is used to perform morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain the target area corresponding to the target object in the original image.

区别于前述实施例,利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像,并统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值,从而利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域,能够降低算法复杂度,缩短处理时间,从而加快目标检测的速度,有利于实时检测工程作业是否规范,并在不规范时,及时报警。Different from the foregoing embodiments, the original image is subjected to threshold segmentation by using a preset threshold related to the color characteristics of the target object to obtain the image to be detected, and the pixel values of all pixels in the upper left area of each pixel in the image to be detected are counted. The sum is taken as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected, so that the image to be detected is morphologically processed by using the preset structural element and the first integral image to obtain the corresponding pixel value of the target object in the original image. The target area can reduce the complexity of the algorithm and shorten the processing time, thereby speeding up the speed of target detection, which is conducive to real-time detection of whether the engineering operation is standardized, and timely alarm when it is not standardized.

在一些实施例中,待检测图像中与目标对象的颜色特征相关的像素点的像素值为第一像素值,与目标对象的颜色特征无关的像素点的像素值为第二像素值,形态学处理子模块包括腐蚀处理单元,用于利用预设结构元素和第一积分图像对待检测图像进行腐蚀形态学处理,得到第一处理图像,积分统计子模块还用于统计第一处理图像中各个像素点的左上区域内所有像素点的像素值之和,作为与第一处理图像对应的第二积分图像中对应像素点的像素值,形态学处理子模块还包括膨胀处理单元,用于利用预设结构元素和第二积分图像对第一处理图像进行膨胀形态学处理,得到第二处理图像,形态学处理子模块还包括连通域确定单元,用于确定第二处理图像中各个像素点的像素值为第一像素值的目标连通域,形态学处理子模块还包括目标区域确定单元,用于获取目标连通域的最小外接矩形,作为目标区域。In some embodiments, the pixel value of the pixel point related to the color feature of the target object in the image to be detected is the first pixel value, and the pixel value of the pixel point unrelated to the color feature of the target object is the second pixel value. The processing sub-module includes a corrosion processing unit, which is used to perform corrosion morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain the first processed image, and the integral statistics sub-module is also used to count each pixel in the first processed image. The sum of the pixel values of all pixel points in the upper left area of the point is taken as the pixel value of the corresponding pixel point in the second integral image corresponding to the first processed image, and the morphological processing sub-module also includes an expansion processing unit for using the preset The structural element and the second integral image perform dilation morphological processing on the first processed image to obtain a second processed image. The morphological processing sub-module further includes a connected domain determination unit, which is used to determine the pixel value of each pixel in the second processed image. is the target connected domain of the first pixel value, and the morphological processing sub-module further includes a target area determination unit, which is used for obtaining the minimum circumscribed rectangle of the target connected domain as the target area.

在一些实施例中,腐蚀处理单元具体用于确定待检测图像中像素值为第一像素值的第一目标像素点,并确定第一积分图像中与第一目标像素点对应的第二目标像素点,基于第二目标像素点和预设元素结构的尺寸大小,确定第一积分图像中的第三目标像素点,利用第三目标像素点的像素值,计算第一目标像素点周围尺寸大小范围内所有像素点的像素值之和,若像素值之和与尺寸大小之商为第一像素值,则将第一目标像素点的像素值保持为第一像素值,若像素值之和与尺寸大小之商不为第一像素值,则将第一目标像素点的像素值重置为第二像素值。In some embodiments, the corrosion processing unit is specifically configured to determine a first target pixel with a pixel value of a first pixel value in the image to be detected, and to determine a second target pixel corresponding to the first target pixel in the first integral image point, based on the size of the second target pixel point and the preset element structure, determine the third target pixel point in the first integral image, and use the pixel value of the third target pixel point to calculate the size range around the first target pixel point The sum of the pixel values of all the pixels within, if the quotient of the sum of the pixel values and the size is the first pixel value, the pixel value of the first target pixel is kept as the first pixel value, if the sum of the pixel values and the size If the size quotient is not the first pixel value, the pixel value of the first target pixel is reset to the second pixel value.

在一些实施例中,膨胀处理单元具体用于依次将第一处理图像中的各个像素点作为第四目标像素点,并确定第二积分图像中与第四目标像素点对应的第五目标像素点,基于第五目标像素点和预设结构元素的尺寸大小,确定第二积分图像中的第六目标像素点,利用第六目标像素点的像素值,计算第四目标像素点周围尺寸大小范围内所有像素点的像素值之和,若像素值之和与尺寸大小之商为第二像素值,则将第四目标像素点的像素值设置为第二像素值,若像素值之和与尺寸大小之商不为第二像素值,则将第四目标像素点的像素值设置为第一像素值。In some embodiments, the expansion processing unit is specifically configured to sequentially take each pixel in the first processed image as the fourth target pixel, and determine the fifth target pixel corresponding to the fourth target pixel in the second integral image , based on the size of the fifth target pixel point and the preset structural element, determine the sixth target pixel point in the second integral image, and use the pixel value of the sixth target pixel point to calculate the size range around the fourth target pixel point The sum of the pixel values of all pixels, if the quotient of the sum of the pixel values and the size is the second pixel value, then the pixel value of the fourth target pixel is set to the second pixel value, if the sum of the pixel values and the size If the quotient is not the second pixel value, the pixel value of the fourth target pixel is set as the first pixel value.

在一些实施例中,检测模块62还包括颜色空间映射子模块,用于将原始图像的颜色空间映射到HSV颜色空间,预设阈值包括:预设H通道阈值区间、预设S通道阈值区间和预设V通道阈值区间,阈值分割子模块包括判断单元,用于依序判断映射到HSV颜色空间的原始图像中各个像素点是否满足以下条件:H通道像素值在预设H通道阈值区间内,且S通道像素值在预设S通道阈值区间内,且V通道像素值在预设V通道阈值区间内,阈值分割子模块还包括像素值设置单元,用于在判断单元判断满足条件时,将待检测图像中对应像素点的像素值设置为第一像素值,像素值设置单元还用于在判断单元判断不满足条件时,将待检测图像中对应像素点的像素值设置为第二像素值。In some embodiments, the detection module 62 further includes a color space mapping sub-module for mapping the color space of the original image to the HSV color space, and the preset thresholds include: a preset H channel threshold interval, a preset S channel threshold interval, and Preset the V channel threshold interval, the threshold segmentation sub-module includes a judgment unit, used to sequentially determine whether each pixel in the original image mapped to the HSV color space satisfies the following conditions: the H channel pixel value is within the preset H channel threshold interval, And the pixel value of the S channel is within the preset S channel threshold value range, and the V channel pixel value is within the preset V channel threshold value range, the threshold segmentation sub-module further includes a pixel value setting unit, for when the judgment unit judges that the condition is satisfied, the The pixel value of the corresponding pixel in the image to be detected is set as the first pixel value, and the pixel value setting unit is further configured to set the pixel value of the corresponding pixel in the image to be detected as the second pixel value when the judgment unit determines that the condition is not satisfied .

在一些实施例中,确定模块63包括重合区域判断子模块,用于判断预设检测区域和目标区域之间是否存在重合区域,确定模块63还包括作业确定子模块,用于在重合区域判断子模块判断存在重合区域时,确定作业现场符合作业规范,作业确定子模块还用于在重合区域判断子模块判断不存在重合区域时,确定作业现场不符合作业规范。In some embodiments, the determination module 63 includes a coincidence area judging submodule for judging whether there is a coincidence area between the preset detection area and the target area, and the determination module 63 further includes a job determination submodule for judging the submodule in the coincidence area. When the module judges that there is an overlapping area, it determines that the job site complies with the operation specification, and the operation determination sub-module is also used to determine that the operation site does not meet the operation specification when the overlapping area judging sub-module judges that there is no overlapping area.

在一些实施例中,确定模块63还包括信息输出子模块,用于在作业确定子模块确定作业现场不符合作业规范时,输出预设报警信息,信息输出子模块还用于在作业确定子模块确定作业现场符合作业规范时,输出预设安全信息。In some embodiments, the determination module 63 further includes an information output sub-module, configured to output preset alarm information when the job determination sub-module determines that the job site does not meet the job specification, and the information output sub-module is further configured to output the information in the job determination sub-module When it is determined that the job site complies with the job specification, preset safety information is output.

在一些实施例中,工程作业检测装置60还包括设置模块,用于获取用户对摄像器件设置的位姿参数,其中,位姿参数用于控制摄像器件对作业现场进行拍摄。In some embodiments, the engineering work detection apparatus 60 further includes a setting module for acquiring pose parameters set by the user on the camera device, wherein the pose parameters are used to control the camera device to photograph the work site.

请参阅图7,图7是本申请工程作业检测装置70一实施例的框架示意图。工程作业检测装置70可以包括相互耦接的存储器71和处理器72;处理器72用于执行存储器71存储的程序指令,以实现上述任一工程作业检测方法实施例中的步骤。Please refer to FIG. 7 . FIG. 7 is a schematic diagram of a framework of an embodiment of the engineering operation detection device 70 of the present application. The engineering work detection device 70 may include a mutually coupled memory 71 and a processor 72; the processor 72 is configured to execute program instructions stored in the memory 71, so as to implement the steps in any of the foregoing engineering work detection method embodiments.

具体而言,处理器72用于控制其自身以及存储器71以实现上述任一工程作业检测方法实施例中的步骤。处理器72还可以称为CPU(Central Processing Unit,中央处理单元)。处理器72可能是一种集成电路芯片,具有信号的处理能力。处理器72还可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(ApplicationSpecific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。另外,处理器72可以由多个集成电路芯片共同实现。Specifically, the processor 72 is used to control itself and the memory 71 to implement the steps in any of the above-mentioned embodiments of the engineering work detection method. The processor 72 may also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 72 may be an integrated circuit chip with signal processing capability. The processor 72 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable Logic devices, discrete gate or transistor logic devices, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 72 may be implemented jointly by a plurality of integrated circuit chips.

本实施例中,处理器72用于获取摄像器件对作业现场拍摄的原始图像,其中,原始图像中包含预设检测区域,处理器72还用于对原始图像进行目标检测,获取原始图像中与目标对象对应的目标区域,其中,目标对象用于实现警示,处理器72还用于基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范。In this embodiment, the processor 72 is configured to acquire the original image captured by the camera device on the job site, wherein the original image includes a preset detection area, and the processor 72 is further configured to perform target detection on the original image, and obtain the The target area corresponding to the target object, wherein the target object is used to realize the warning, and the processor 72 is further configured to determine whether the job site conforms to the job specification based on the positional relationship between the preset detection area and the target area.

上述方案,通过获取摄像器件对作业现场拍摄的原始图像,且原始图像中包含预设检测区域,从而对原始图像进行目标检测,获取原始图像中与用于实现警示的目标对象对应的目标区域,进而基于预设检测区域与目标区域之间的位置关系,确定作业现场是否符合作业规范,从而能够基于摄像器件对作业现场所拍摄的原始图像对作业现场是否符合作业规范进行检测,而无需依靠人工检查作业现场,从而能够提高检测效率,降低发生疏漏的概率,进而能够提高工程作业检测质量。In the above scheme, the original image captured by the camera device on the job site is obtained, and the original image includes a preset detection area, so as to perform target detection on the original image, and obtain the target area in the original image corresponding to the target object used for realizing the warning, Then, based on the positional relationship between the preset detection area and the target area, it is determined whether the job site complies with the job specification, so that whether the job site complies with the job specification can be detected based on the original image captured by the camera device on the job site without relying on manual labor. By inspecting the operation site, the inspection efficiency can be improved, the probability of omissions can be reduced, and the inspection quality of the engineering operation can be improved.

在一些实施例中,处理器72还用于利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像,处理器72还用于统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值,处理器72还用于利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域。In some embodiments, the processor 72 is further configured to perform threshold segmentation on the original image by using a preset threshold related to the color feature of the target object to obtain an image to be detected, and the processor 72 is further configured to count each pixel in the image to be detected The sum of the pixel values of all the pixel points in the upper left area of the point is used as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected, and the processor 72 is also used to use the preset structural element and the first integral image to treat Morphological processing is performed on the detected image to obtain the target area corresponding to the target object in the original image.

区别于前述实施例,利用与目标对象的颜色特征相关的预设阈值,对原始图像进行阈值分割,得到待检测图像,并统计待检测图像中各个像素点的左上区域内所有像素点的像素值之和,作为与待检测图像对应的第一积分图像中对应像素点的像素值,从而利用预设结构元素和第一积分图像对待检测图像进行形态学处理,得到原始图像中与目标对象对应的目标区域,能够降低算法复杂度,缩短处理时间,从而加快目标检测的速度,有利于实时检测工程作业是否规范,并在不规范时,及时报警。Different from the foregoing embodiments, the original image is subjected to threshold segmentation by using a preset threshold related to the color characteristics of the target object to obtain the image to be detected, and the pixel values of all pixels in the upper left area of each pixel in the image to be detected are counted. The sum is taken as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected, so that the image to be detected is morphologically processed by using the preset structural element and the first integral image to obtain the corresponding pixel value of the target object in the original image. The target area can reduce the complexity of the algorithm and shorten the processing time, thereby speeding up the speed of target detection, which is conducive to real-time detection of whether the engineering operation is standardized, and timely alarm when it is not standardized.

在一些实施例中,待检测图像中与目标对象的颜色特征相关的像素点的像素值为第一像素值,与目标对象的颜色特征无关的像素点的像素值为第二像素值,处理器72还用于利用预设结构元素和第一积分图像对待检测图像进行腐蚀形态学处理,得到第一处理图像,处理器72还用于统计第一处理图像中各个像素点的左上区域内所有像素点的像素值之和,作为与第一处理图像对应的第二积分图像中对应像素点的像素值,处理器72还用于利用预设结构元素和第二积分图像对第一处理图像进行膨胀形态学处理,得到第二处理图像,处理器72还用于确定第二处理图像中各个像素点的像素值为第一像素值的目标连通域,处理器72还用于获取目标连通域的最小外接矩形,作为目标区域。In some embodiments, the pixel value of the pixel point related to the color feature of the target object in the image to be detected is the first pixel value, the pixel value of the pixel point unrelated to the color feature of the target object is the second pixel value, and the processor 72 is also used to perform corrosion morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain a first processed image, and the processor 72 is also used to count all the pixels in the upper left area of each pixel in the first processed image The sum of the pixel values of the points, as the pixel value of the corresponding pixel point in the second integral image corresponding to the first processed image, the processor 72 is further configured to expand the first processed image by using the preset structural element and the second integral image Morphological processing to obtain a second processed image, the processor 72 is also used to determine the target connected domain whose pixel value of each pixel in the second processed image is the first pixel value, and the processor 72 is also used to obtain the minimum value of the target connected domain. The enclosing rectangle is used as the target area.

在一些实施例中,处理器72还用于确定待检测图像中像素值为第一像素值的第一目标像素点,并确定第一积分图像中与第一目标像素点对应的第二目标像素点,处理器72还用于基于第二目标像素点和预设元素结构的尺寸大小,确定第一积分图像中的第三目标像素点,处理器72还用于利用第三目标像素点的像素值,计算第一目标像素点周围尺寸大小范围内所有像素点的像素值之和,处理器72还用于在像素值之和与尺寸大小之商为第一像素值时,将第一目标像素点的像素值保持为第一像素值,处理器72还用于在像素值之和与尺寸大小之商不为第一像素值时,将第一目标像素点的像素值重置为第二像素值。In some embodiments, the processor 72 is further configured to determine a first target pixel whose pixel value is the first pixel value in the image to be detected, and determine a second target pixel corresponding to the first target pixel in the first integral image point, the processor 72 is further configured to determine the third target pixel point in the first integral image based on the size of the second target pixel point and the preset element structure, and the processor 72 is further configured to utilize the pixels of the third target pixel point value, calculate the sum of the pixel values of all the pixel points in the size range around the first target pixel point, the processor 72 is further configured to calculate the first target pixel value when the quotient of the sum of the pixel values and the size is the first pixel value The pixel value of the point remains the first pixel value, and the processor 72 is further configured to reset the pixel value of the first target pixel point to the second pixel when the quotient of the sum of the pixel values and the size is not the first pixel value value.

在一些实施例中,处理器72还用于依次将第一处理图像中的各个像素点作为第四目标像素点,并确定第二积分图像中与第四目标像素点对应的第五目标像素点,处理器72还用于基于第五目标像素点和预设结构元素的尺寸大小,确定第二积分图像中的第六目标像素点,处理器72还用于利用第六目标像素点的像素值,计算第四目标像素点周围尺寸大小范围内所有像素点的像素值之和,处理器72还用于在像素值之和与尺寸大小之商为第二像素值时,将第四目标像素点的像素值设置为第二像素值,处理器72还用于在像素值之和与尺寸大小之商不为第二像素值时,将第四目标像素点的像素值设置为第一像素值。In some embodiments, the processor 72 is further configured to sequentially use each pixel in the first processed image as the fourth target pixel, and determine a fifth target pixel corresponding to the fourth target pixel in the second integral image , the processor 72 is further configured to determine the sixth target pixel in the second integral image based on the size of the fifth target pixel and the preset structural element, and the processor 72 is further configured to utilize the pixel value of the sixth target pixel , calculate the sum of the pixel values of all the pixel points in the size range around the fourth target pixel point, and the processor 72 is further configured to calculate the fourth target pixel point when the quotient of the sum of the pixel values and the size is the second pixel value The pixel value of the pixel is set as the second pixel value, and the processor 72 is further configured to set the pixel value of the fourth target pixel as the first pixel value when the quotient of the sum of the pixel values and the size is not the second pixel value.

在一些实施例中,处理器72还用于将原始图像的颜色空间映射到HSV颜色空间,预设阈值包括:预设H通道阈值区间、预设S通道阈值区间和预设V通道阈值区间,处理器72还用于依序判断映射到HSV颜色空间的原始图像中各个像素点是否满足以下条件:H通道像素值在预设H通道阈值区间内,且S通道像素值在预设S通道阈值区间内,且V通道像素值在预设V通道阈值区间内,处理器72还用于在满足条件时,将待检测图像中对应像素点的像素值设置为第一像素值,处理器72还用于在不满足条件时,将待检测图像中对应像素点的像素值设置为第二像素值。In some embodiments, the processor 72 is further configured to map the color space of the original image to the HSV color space, and the preset thresholds include: a preset H channel threshold interval, a preset S channel threshold interval, and a preset V channel threshold interval, The processor 72 is further configured to sequentially determine whether each pixel in the original image mapped to the HSV color space satisfies the following conditions: the pixel value of the H channel is within the preset H channel threshold interval, and the pixel value of the S channel is within the preset S channel threshold range, and the V channel pixel value is within the preset V channel threshold value range, the processor 72 is further configured to set the pixel value of the corresponding pixel point in the image to be detected as the first pixel value when the condition is met, and the processor 72 is further When the condition is not satisfied, the pixel value of the corresponding pixel in the image to be detected is set as the second pixel value.

在一些实施例中,处理器72还用于判断预设检测区域和目标区域之间是否存在重合区域,处理器72还用于在判断为是时,确定作业现场符合作业规范,处理器72还用于在判断为否时,确定作业现场不符合作业规范。In some embodiments, the processor 72 is further configured to determine whether there is an overlapping area between the preset detection area and the target area, and when the determination is yes, the processor 72 is further configured to determine that the job site complies with the job specification, and the processor 72 is further configured to It is used to determine that the work site does not meet the work specification when the judgment is no.

在一些实施例中,工程作业检测装置70还包括人机交互电路,用于在处理器72确定作业现场不符合作业规范时,输出预设报警信息。人机交互电路还用于在处理器72确定作业现场符合作业规范时,输出预设安全信息。In some embodiments, the engineering work detection device 70 further includes a human-computer interaction circuit for outputting preset alarm information when the processor 72 determines that the work site does not meet the work specification. The human-computer interaction circuit is further configured to output preset safety information when the processor 72 determines that the job site conforms to the job specification.

在一些实施例中,处理器72还用于控制人机交互电路获取用户对摄像器件设置的位姿参数,其中,位姿参数用于控制摄像器件对作业现场进行拍摄。In some embodiments, the processor 72 is further configured to control the human-computer interaction circuit to obtain pose parameters set by the user on the camera device, wherein the pose parameters are used to control the camera device to photograph the job site.

在一些实施例中,工程作业检测装置70还包括摄像器件,用于对作业现场进行拍摄得到原始图像。In some embodiments, the engineering work detection device 70 further includes a camera device, which is used for photographing the work site to obtain original images.

请参阅图8,图8为本申请存储装置80一实施例的框架示意图。存储装置80存储有能够被处理器运行的程序指令81,程序指令81用于实现上述任工程作业检测方法实施例中的步骤。Please refer to FIG. 8 , which is a schematic diagram of a framework of an embodiment of a storage device 80 of the present application. The storage device 80 stores program instructions 81 that can be executed by the processor, and the program instructions 81 are used to implement the steps in the foregoing embodiments of the method for detecting any engineering work.

上述方案,能够基于摄像器件对作业现场所拍摄的原始图像对作业现场是否符合作业规范进行检测,而无需依靠人工检查作业现场,从而能够提高检测效率,降低发生疏漏的概率,进而能够提高工程作业检测质量。The above solution can detect whether the job site complies with the operation specifications based on the original image captured by the camera device on the job site, without relying on manual inspection of the job site, thereby improving the detection efficiency, reducing the probability of omissions, and improving engineering operations. Check quality.

在本申请所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性、机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus implementations described above are only illustrative, for example, the division of modules or units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.

作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this implementation manner.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Claims (12)

1. An engineering operation detection method is characterized by comprising the following steps:
acquiring an original image shot by a camera device on a working site, wherein the original image comprises a preset detection area;
performing target detection on the original image, and acquiring a target area corresponding to a target object in the original image, wherein the target object is used for realizing warning;
and determining whether the operation site meets the operation specification or not based on the position relation between the preset detection area and the target area.
2. The project work detection method according to claim 1, wherein the performing the target detection on the original image and acquiring the target area corresponding to the target object in the original image comprises:
performing threshold segmentation on the original image by using a preset threshold related to the color feature of the target object to obtain an image to be detected;
counting the sum of pixel values of all pixel points in the upper left area of each pixel point in the image to be detected, and taking the sum as the pixel value of the corresponding pixel point in the first integral image corresponding to the image to be detected;
and performing morphological processing on the image to be detected by using a preset structural element and the first integral image to obtain a target area corresponding to the target object in the original image.
3. The engineering work detection method according to claim 2, wherein a pixel value of a pixel point related to the color feature of the target object in the image to be detected is a first pixel value, and a pixel value of a pixel point unrelated to the color feature of the target object is a second pixel value;
the morphological processing of the image to be detected by using a preset structural element and the first integral image to obtain a target area corresponding to the target object in the original image comprises the following steps:
carrying out corrosion morphological processing on the image to be detected by utilizing the preset structural element and the first integral image to obtain a first processed image;
counting the sum of pixel values of all pixel points in the upper left area of each pixel point in the first processed image, and taking the sum as the pixel value of the corresponding pixel point in the second integral image corresponding to the first processed image;
performing dilation morphological processing on the first processed image by using the preset structural element and the second integral image to obtain a second processed image;
determining the pixel value of each pixel point in the second processed image as a target connected domain of the first pixel value;
and acquiring the minimum circumscribed rectangle of the target connected domain as the target area.
4. The engineering work detection method according to claim 3, wherein the performing corrosion morphological processing on the image to be detected by using the preset structural element and the first integral image to obtain a first processed image comprises:
determining a first target pixel point of which the pixel value in the image to be detected is the first pixel value, and determining a second target pixel point corresponding to the first target pixel point in the first integral image;
determining a third target pixel point in the first integral image based on the second target pixel point and the size of the preset element structure;
calculating the sum of the pixel values of all the pixels in the size range around the first target pixel point by using the pixel value of the third target pixel point;
if the quotient of the sum of the pixel values and the size is the first pixel value, keeping the pixel value of the first target pixel point as the first pixel value;
if the quotient of the sum of the pixel values and the size is not the first pixel value, the pixel value of the first target pixel point is reset to the second pixel value.
5. The engineering work detection method according to claim 3, wherein the performing the dilation morphology on the first processed image using the preset structural element and the second integrated image to obtain a second processed image comprises:
sequentially taking each pixel point in the first processed image as a fourth target pixel point, and determining a fifth target pixel point corresponding to the fourth target pixel point in the second integral image;
determining a sixth target pixel point in the second integral image based on the size of the fifth target pixel point and the size of the preset structural element;
calculating the sum of the pixel values of all the pixels in the size range around the fourth target pixel point by using the pixel value of the sixth target pixel point;
setting the pixel value of the fourth target pixel as the second pixel value if the quotient of the sum of the pixel values and the size is the second pixel value;
and if the quotient of the sum of the pixel values and the size is not the second pixel value, setting the pixel value of the fourth target pixel point as the first pixel value.
6. The method for detecting engineering works according to claim 2, wherein before the threshold segmentation is performed on the original image by using the preset threshold related to the color feature of the target object to obtain the image to be detected, the method further comprises:
mapping the color space of the original image to an HSV color space;
the preset threshold includes: presetting an H channel threshold interval, an S channel threshold interval and a V channel threshold interval; the threshold segmentation is carried out on the original image by using a preset threshold related to the color feature of the target object to obtain an image to be detected, and the method comprises the following steps:
whether each pixel point in the original image mapped to the HSV color space meets the following conditions is sequentially judged: the H channel pixel value is within the preset H channel threshold interval, the S channel pixel value is within the preset S channel threshold interval, and the V channel pixel value is within the preset V channel threshold interval;
if so, setting the pixel value of the corresponding pixel point in the image to be detected as a first pixel value;
and if not, setting the pixel value of the corresponding pixel point in the image to be detected as a second pixel value.
7. The project work detection method according to claim 1, wherein the determining whether the work site meets a work specification based on the positional relationship between the preset detection area and the target area comprises:
judging whether a coincidence region exists between the preset detection region and the target region;
if so, determining that the operation site meets the operation specification;
if not, determining that the operation site does not meet the operation specification.
8. The project work detection method of claim 7, wherein after said determining that said work site is not compliant with a work specification, said method further comprises:
outputting preset alarm information;
and/or, after determining that the job site meets a job specification, the method further comprises:
preset security information is output, or no information is output.
9. The work order detection method according to claim 1, wherein before the obtaining of the original image taken of the work site by the imaging device, the method comprises:
and acquiring pose parameters set by a user on the camera device, wherein the pose parameters are used for controlling the camera device to shoot the operation site.
10. An engineering work detection device, comprising mutually coupled memory processors for executing program instructions stored in the memories to implement the engineering work detection method according to any one of claims 1 to 9.
11. The work detection apparatus of claim 10, further comprising an imaging device for capturing an original image of the work site.
12. A storage device storing program instructions executable by a processor to implement the method of any one of claims 1 to 9.
CN202010251987.XA 2020-04-01 2020-04-01 Engineering operation detection method and related device Active CN111382726B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010251987.XA CN111382726B (en) 2020-04-01 2020-04-01 Engineering operation detection method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010251987.XA CN111382726B (en) 2020-04-01 2020-04-01 Engineering operation detection method and related device

Publications (2)

Publication Number Publication Date
CN111382726A true CN111382726A (en) 2020-07-07
CN111382726B CN111382726B (en) 2023-09-01

Family

ID=71217739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010251987.XA Active CN111382726B (en) 2020-04-01 2020-04-01 Engineering operation detection method and related device

Country Status (1)

Country Link
CN (1) CN111382726B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239896A (en) * 2021-06-15 2021-08-10 创优数字科技(广东)有限公司 Image detection method and device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070030375A1 (en) * 2005-08-05 2007-02-08 Canon Kabushiki Kaisha Image processing method, imaging apparatus, and storage medium storing control program of image processing method executable by computer
JP2016225720A (en) * 2015-05-28 2016-12-28 住友電気工業株式会社 Monitoring device, monitoring method and monitoring program
CN106446926A (en) * 2016-07-12 2017-02-22 重庆大学 Transformer station worker helmet wear detection method based on video analysis
CN107895138A (en) * 2017-10-13 2018-04-10 西安艾润物联网技术服务有限责任公司 Spatial obstacle object detecting method, device and computer-readable recording medium
CN108345819A (en) * 2017-01-23 2018-07-31 杭州海康威视数字技术股份有限公司 A kind of method and apparatus sending warning message
CN109035629A (en) * 2018-07-09 2018-12-18 深圳码隆科技有限公司 A kind of shopping settlement method and device based on open automatic vending machine
CN109034124A (en) * 2018-08-30 2018-12-18 成都考拉悠然科技有限公司 A kind of intelligent control method and system
CN110472623A (en) * 2019-06-29 2019-11-19 华为技术有限公司 Image detecting method, equipment and system
WO2020006907A1 (en) * 2018-07-05 2020-01-09 平安科技(深圳)有限公司 Photographing control method, terminal, and computer readable storage medium
US20200034657A1 (en) * 2017-07-27 2020-01-30 Tencent Technology (Shenzhen) Company Limited Method and apparatus for occlusion detection on target object, electronic device, and storage medium
CN110807393A (en) * 2019-10-25 2020-02-18 深圳市商汤科技有限公司 Early warning method and device based on video analysis, electronic equipment and storage medium
CN110889403A (en) * 2019-11-05 2020-03-17 浙江大华技术股份有限公司 Text detection method and related device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070030375A1 (en) * 2005-08-05 2007-02-08 Canon Kabushiki Kaisha Image processing method, imaging apparatus, and storage medium storing control program of image processing method executable by computer
JP2016225720A (en) * 2015-05-28 2016-12-28 住友電気工業株式会社 Monitoring device, monitoring method and monitoring program
CN106446926A (en) * 2016-07-12 2017-02-22 重庆大学 Transformer station worker helmet wear detection method based on video analysis
CN108345819A (en) * 2017-01-23 2018-07-31 杭州海康威视数字技术股份有限公司 A kind of method and apparatus sending warning message
US20200034657A1 (en) * 2017-07-27 2020-01-30 Tencent Technology (Shenzhen) Company Limited Method and apparatus for occlusion detection on target object, electronic device, and storage medium
CN107895138A (en) * 2017-10-13 2018-04-10 西安艾润物联网技术服务有限责任公司 Spatial obstacle object detecting method, device and computer-readable recording medium
WO2020006907A1 (en) * 2018-07-05 2020-01-09 平安科技(深圳)有限公司 Photographing control method, terminal, and computer readable storage medium
CN109035629A (en) * 2018-07-09 2018-12-18 深圳码隆科技有限公司 A kind of shopping settlement method and device based on open automatic vending machine
CN109034124A (en) * 2018-08-30 2018-12-18 成都考拉悠然科技有限公司 A kind of intelligent control method and system
CN110472623A (en) * 2019-06-29 2019-11-19 华为技术有限公司 Image detecting method, equipment and system
CN110807393A (en) * 2019-10-25 2020-02-18 深圳市商汤科技有限公司 Early warning method and device based on video analysis, electronic equipment and storage medium
CN110889403A (en) * 2019-11-05 2020-03-17 浙江大华技术股份有限公司 Text detection method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239896A (en) * 2021-06-15 2021-08-10 创优数字科技(广东)有限公司 Image detection method and device

Also Published As

Publication number Publication date
CN111382726B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
JP6710426B2 (en) Obstacle detection method and device
CA2867365C (en) Method, system and computer storage medium for face detection
CN108629343B (en) License plate positioning method and system based on edge detection and improved Harris corner detection
Dutta et al. A color edge detection algorithm in RGB color space
TWI489395B (en) Apparatus and method for foreground detection
WO2015070723A1 (en) Eye image processing method and apparatus
CN101599175B (en) Detection method for determining alteration of shooting background and image processing device
JP2014192700A (en) Tracking processing apparatus, tracking processing system with the same, and tracking processing method
KR20140095333A (en) Method and apparratus of tracing object on image
CN111882568B (en) Fire image edge extraction processing method, terminal and system
CN111368819B (en) Light spot detection method and device
WO2017128646A1 (en) Image processing method and device
CN111967345A (en) Method for judging shielding state of camera in real time
CN112651953A (en) Image similarity calculation method and device, computer equipment and storage medium
CN103810696A (en) Method for detecting image of target object and device thereof
CN112883762A (en) Living body detection method, device, system and storage medium
JP6432296B2 (en) Device and method for detecting zebra crossings in images
JP2020077165A (en) Image processing device, image processing method, and program
CN111382726B (en) Engineering operation detection method and related device
JP2016144049A (en) Image processing apparatus, image processing method, and program
WO2018058573A1 (en) Object detection method, object detection apparatus and electronic device
JP2018063675A (en) Image processor and control method
JPWO2014033885A1 (en) Image processing apparatus, image processing method, and image processing program
CN111695374B (en) Method, system, medium and equipment for segmenting zebra crossing area in monitoring perspective
CN114677319A (en) Stem cell distribution determination method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant