CN118691676A - Object offset detection method, device, equipment, storage medium and computer product - Google Patents
Object offset detection method, device, equipment, storage medium and computer product Download PDFInfo
- Publication number
- CN118691676A CN118691676A CN202410942146.1A CN202410942146A CN118691676A CN 118691676 A CN118691676 A CN 118691676A CN 202410942146 A CN202410942146 A CN 202410942146A CN 118691676 A CN118691676 A CN 118691676A
- Authority
- CN
- China
- Prior art keywords
- tray
- detected
- area
- determining
- image
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B66—HOISTING; LIFTING; HAULING
- B66F—HOISTING, LIFTING, HAULING OR PUSHING, NOT OTHERWISE PROVIDED FOR, e.g. DEVICES WHICH APPLY A LIFTING OR PUSHING FORCE DIRECTLY TO THE SURFACE OF A LOAD
- B66F9/00—Devices for lifting or lowering bulky or heavy goods for loading or unloading purposes
- B66F9/06—Devices for lifting or lowering bulky or heavy goods for loading or unloading purposes movable, with their loads, on wheels or the like, e.g. fork-lift trucks
- B66F9/075—Constructional features or details
- B66F9/0755—Position control; Position detectors
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30248—Vehicle exterior or interior
- G06T2207/30252—Vehicle exterior; Vicinity of vehicle
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Structural Engineering (AREA)
- Transportation (AREA)
- Mechanical Engineering (AREA)
- Quality & Reliability (AREA)
- Geology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Civil Engineering (AREA)
- Image Analysis (AREA)
Abstract
本申请涉及一种物体偏移检测方法、装置、设备、存储介质和计算机产品。该方法包括:获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。采用本方法能够对运输物体进行偏移检测,为后续无人叉车的搬运提供坐标和角度数据,可以提高无人叉车运输货物的可靠性和工作效率。
The present application relates to an object offset detection method, device, equipment, storage medium and computer product. The method comprises: obtaining an initial image of an object to be detected, the initial image also comprising an object pallet for placing the object to be detected; determining a characteristic area corresponding to the object pallet in the initial image, and determining the pallet position of the object pallet according to the characteristic area; wherein the characteristic area is used to characterize the target end face of the object pallet; determining the target position of the object to be detected according to the pallet position, and determining the offset state of the object to be detected according to the target position. The present method can detect the offset of transported objects, provide coordinate and angle data for subsequent unmanned forklift handling, and improve the reliability and work efficiency of unmanned forklifts in transporting goods.
Description
技术领域Technical Field
本申请涉及货物检测技术领域,特别是涉及一种物体偏移检测方法、装置、设备、存储介质和计算机产品。The present application relates to the technical field of cargo detection, and in particular to an object deviation detection method, device, equipment, storage medium and computer product.
背景技术Background Art
工业智能化给仓库的管理提供了一种智能化的工作模式。通过智能化的运输使货物可以在仓库内高效移动,并根据库存需求自动调整货物存放位置,优化仓库空间的利用率,减少了人力成本。Industrial intelligence provides an intelligent working mode for warehouse management. Through intelligent transportation, goods can be efficiently moved within the warehouse, and the storage location of goods can be automatically adjusted according to inventory needs, optimizing the utilization of warehouse space and reducing labor costs.
在智能化运输时,无人叉车替代人工驾驶实现对货物的运输,以提高货物运输效率。然而,仓库中货物的摆放位置或摆放姿态会导致无人叉车无法有效的运送货物,影响无人叉车工作的可靠性和工作效率。In intelligent transportation, unmanned forklifts replace manual driving to transport goods to improve the efficiency of goods transportation. However, the placement or posture of goods in the warehouse will cause the unmanned forklift to be unable to effectively transport goods, affecting the reliability and work efficiency of the unmanned forklift.
发明内容Summary of the invention
基于此,有必要针对上述技术问题,提供一种物体偏移检测方法、装置、设备、存储介质和计算机产品,通过该方法的偏移检测可以提高无人叉车运送货物的可靠性和工作效率。Based on this, it is necessary to provide an object offset detection method, device, equipment, storage medium and computer product to address the above technical problems. The offset detection of this method can improve the reliability and work efficiency of unmanned forklifts in transporting goods.
第一方面,本申请提供了一种物体偏移检测方法,该方法包括:In a first aspect, the present application provides an object offset detection method, the method comprising:
获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;Acquire an initial image of the object to be detected, the initial image also including an object tray for placing the object to be detected;
在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;Determine a feature region corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the feature region; wherein the feature region is used to characterize a target end face of the object tray;
根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The target position of the object to be detected is determined according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
在其中一个实施例中,在初始图像中确定物体托盘对应的特征区域,包括:In one embodiment, determining a feature area corresponding to the object tray in the initial image includes:
对初始图像进行图像分割,得到多个分割区域,并确定各分割区域对应的区域属性;Performing image segmentation on the initial image to obtain multiple segmented regions, and determining the region attributes corresponding to each segmented region;
根据区域属性对各分割区域进行图像分析,得到特征区域。Image analysis is performed on each segmented area according to the area attributes to obtain the feature area.
在其中一个实施例中,托盘位置包括托盘角度和托盘坐标,根据特征区域确定物体托盘的托盘位置,包括:In one embodiment, the pallet position includes a pallet angle and a pallet coordinate, and determining the pallet position of the object pallet according to the feature area includes:
确定外接该特征区域的第一矩形,根据第一矩形与标准正矩形的角度确定托盘角度;Determine a first rectangle circumscribing the characteristic area, and determine the angle of the tray according to the angle between the first rectangle and the standard regular rectangle;
根据托盘角度和待检测物体的坐标确定托盘坐标。The pallet coordinates are determined based on the pallet angle and the coordinates of the object to be detected.
在其中一个实施例中,根据托盘位置确定待检测物体的目标位置,包括:In one embodiment, determining a target position of an object to be detected according to a position of a pallet includes:
根据托盘位置确定物体托盘的托盘边长;Determine a pallet side length of the object pallet based on the pallet position;
获取待检测物体对应放置区域的区域边长,根据区域边长和托盘边长确定物体托盘外边框的禁入区域;Obtain the side length of the area corresponding to the placement area of the object to be detected, and determine the prohibited area of the outer frame of the object tray according to the side length of the area and the side length of the tray;
将禁入区域与放置区域重叠区域作为待检测物体的非偏移区域,根据非偏移区域确定目标位置,以根据目标位置确定待检测物体的偏移状态。The overlapping area between the forbidden area and the placement area is used as the non-offset area of the object to be detected, and the target position is determined according to the non-offset area, so as to determine the offset state of the object to be detected according to the target position.
在其中一个实施例中,该方法还包括:In one embodiment, the method further comprises:
确定图像获取装置与待检测物体的检测距离;Determining a detection distance between the image acquisition device and the object to be detected;
基于检测距离对托盘位置进行校正,得到校正后的托盘位置;Correcting the pallet position based on the detection distance to obtain a corrected pallet position;
根据托盘位置确定待检测物体的目标位置,包括:Determine the target position of the object to be detected based on the position of the pallet, including:
根据校正后的托盘位置确定待检测物体的目标位置。The target position of the object to be detected is determined according to the corrected pallet position.
在其中一个实施例中,获取待检测物体的初始图像,包括:In one embodiment, obtaining an initial image of an object to be detected includes:
获取物体放置区域的原始图像,确定原始图像的目标区域;Acquire the original image of the area where the object is placed, and determine the target area of the original image;
对目标区域进行图像识别,若目标区域包括待检测物体,则将目标区域作为初始图像。Perform image recognition on the target area. If the target area includes the object to be detected, the target area is used as the initial image.
第二方面,本申请提供了一种物体偏移检测装置,该装置包括:In a second aspect, the present application provides an object offset detection device, the device comprising:
获取模块,用于获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;An acquisition module, used for acquiring an initial image of the object to be detected, wherein the initial image also includes an object tray for placing the object to be detected;
处理模块,用于在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;A processing module, used to determine a feature area corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the feature area; wherein the feature area is used to characterize a target end face of the object tray;
检测模块,用于根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The detection module is used to determine the target position of the object to be detected according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
第三方面,本申请提供了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;Acquire an initial image of the object to be detected, the initial image also including an object tray for placing the object to be detected;
在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;Determine a feature region corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the feature region; wherein the feature region is used to characterize a target end face of the object tray;
根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The target position of the object to be detected is determined according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
第四方面,本申请提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;Acquire an initial image of the object to be detected, the initial image also including an object tray for placing the object to be detected;
在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;Determine a feature region corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the feature region; wherein the feature region is used to characterize a target end face of the object tray;
根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The target position of the object to be detected is determined according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
第五方面,本申请提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;Acquire an initial image of the object to be detected, the initial image also including an object tray for placing the object to be detected;
在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;Determine a feature region corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the feature region; wherein the feature region is used to characterize a target end face of the object tray;
根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The target position of the object to be detected is determined according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
上述物体偏移检测方法、装置、设备、存储介质和计算机产品,获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;在初始图像中确定物体托盘对应的特征区域,该特征区域用于表征物体托盘的目标端面,根据特征区域确定物体托盘的托盘位置;再根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。本申请根据应用场景的特征,获取的初始图像除了包括待检测物体的图像之外,还包括用于放置待检测物体的物体托盘,并将物体托盘的目标端面作为初始图像的特征区域。通过对特征区域的分析和处理,得到物体托盘的托盘位置。再基于物体托盘的位置得到待检测物体的目标位置,通过目标位置确定待检测物体的偏移状态。进而为无人叉车的物体搬运提供坐标和角度等位置数据,提高无人叉车运输货物的可靠性和工作效率。The object offset detection method, device, equipment, storage medium and computer product described above acquire an initial image of the object to be detected, wherein the initial image also includes an object tray for placing the object to be detected; determine a feature area corresponding to the object tray in the initial image, wherein the feature area is used to characterize the target end face of the object tray, and determine the tray position of the object tray according to the feature area; then determine the target position of the object to be detected according to the tray position, so as to determine the offset state of the object to be detected according to the target position. According to the characteristics of the application scenario, the initial image acquired by the present application includes, in addition to the image of the object to be detected, an object tray for placing the object to be detected, and uses the target end face of the object tray as the feature area of the initial image. The tray position of the object tray is obtained by analyzing and processing the feature area. Then, the target position of the object to be detected is obtained based on the position of the object tray, and the offset state of the object to be detected is determined by the target position. In addition, position data such as coordinates and angles are provided for the object handling of the unmanned forklift, thereby improving the reliability and work efficiency of the unmanned forklift in transporting goods.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
图1为一个实施例中物体偏移检测方法的流程示意图;FIG1 is a schematic flow chart of an object offset detection method in one embodiment;
图2为一个实施例中图像畸变示意图;FIG2 is a schematic diagram of image distortion in one embodiment;
图3为一个实施例中图像获取装置与待检测物体之间的位置示意图;FIG3 is a schematic diagram of the position between an image acquisition device and an object to be detected in one embodiment;
图4为一个实施例中非偏移区域的示意图;FIG4 is a schematic diagram of a non-offset region in one embodiment;
图5为另一个实施例中物体偏移检测方法的流程示意图;FIG5 is a schematic flow chart of an object offset detection method in another embodiment;
图6为一个实施例中物体偏移检测装置的结构框图;FIG6 is a block diagram of a device for detecting object deviation in one embodiment;
图7为一个实施例中计算机设备的内部结构图。FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment.
具体实施方式DETAILED DESCRIPTION
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
在一个示例性的实施例中,如图1所示,提供了一种物体偏移检测方法,包括以下步骤102至步骤106。其中:In an exemplary embodiment, as shown in FIG1 , a method for detecting object offset is provided, comprising the following steps 102 to 106. In which:
步骤102,获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘。Step 102: Acquire an initial image of the object to be detected, where the initial image also includes an object tray for placing the object to be detected.
当无人叉车需要进行物品运输时,需要先对货物的摆放状态进行实时检测,以确保可以实现运输。传统方式的偏移检测在待检测物体的上方设置图像获取装置,以确定待检测物体的偏移状态。然而该方式限制图像获取装置的安装位置,通用性不够。When an unmanned forklift needs to transport items, it is necessary to first detect the placement status of the goods in real time to ensure that the transportation can be achieved. The traditional offset detection method sets an image acquisition device above the object to be detected to determine the offset status of the object to be detected. However, this method limits the installation position of the image acquisition device and is not universal enough.
当使用叉车运输货物时,为了保证货物不被损坏,提高货物的运输效率和装箱效率,会在货物下方设置托盘。本申请将待检测物体和物体托盘作为整体获取初始图像,进而可以通过对物体托盘的位置计算得到待检测物体的位置。When using a forklift to transport goods, in order to ensure that the goods are not damaged and to improve the transportation efficiency and packing efficiency of the goods, a pallet will be placed under the goods. This application obtains an initial image of the object to be detected and the object pallet as a whole, and then the position of the object to be detected can be calculated by calculating the position of the object pallet.
步骤104,在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面。Step 104 , determining a feature region corresponding to the object tray in the initial image, and determining a tray position of the object tray according to the feature region; wherein the feature region is used to characterize a target end face of the object tray.
物体托盘是用于装载、搬运、堆放待检测物体的托盘。托盘的四周为矩形端面。特征区域即表示初始图形中的物体托盘的区域,根据初始图像中待检测物体的状态,在物体托盘的四周选择一个端面作为目标端面,将该目标端面的区域表示为特征区域。例如,若初始图像主要为待检测物体的左侧面,则将待检测物体的左端的端面作为目标端面。The object tray is a tray used for loading, transporting, and stacking the objects to be detected. The four sides of the tray are rectangular end faces. The feature area represents the area of the object tray in the initial image. According to the state of the object to be detected in the initial image, an end face is selected from the four sides of the object tray as the target end face, and the area of the target end face is represented as the feature area. For example, if the initial image is mainly the left side of the object to be detected, the end face of the left end of the object to be detected is used as the target end face.
步骤106,根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。Step 106 : determining a target position of the object to be detected according to the position of the tray, so as to determine a deviation state of the object to be detected according to the target position.
由于物体托盘的形状固定,且设置在待检测物体的下方,通过物体托盘的托盘位置可以对应得到待检测物体的目标位置。进而通过对待检测物体以及物体托盘位置的分析,可以得到待检测物体的偏移状态,确定待检测物体是否产生偏移,实现对待检测物体的偏移检测,对无人叉车的搬运提供数据支持。Since the object tray has a fixed shape and is set below the object to be detected, the target position of the object to be detected can be obtained by the tray position of the object tray. Then, by analyzing the object to be detected and the position of the object tray, the offset state of the object to be detected can be obtained, and whether the object to be detected is offset can be determined, so as to realize the offset detection of the object to be detected and provide data support for the handling of unmanned forklifts.
上述物体偏移检测中,获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;在初始图像中确定物体托盘对应的特征区域,该特征区域用于表征物体托盘的目标端面,根据特征区域确定物体托盘的托盘位置;再根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。本申请根据应用场景的特征,获取的初始图像除了包括待检测物体的图像之外,还包括用于放置待检测物体的物体托盘,并将物体托盘的目标端面作为初始图像的特征区域。通过对特征区域的分析和处理,得到物体托盘的托盘位置。再基于物体托盘的位置得到待检测物体的目标位置,通过目标位置确定待检测物体的偏移状态。进而为无人叉车的物体搬运提供坐标和角度等位置数据,提高无人叉车运输货物的可靠性和工作效率。In the above object offset detection, an initial image of the object to be detected is obtained, and the initial image also includes an object pallet for placing the object to be detected; a feature area corresponding to the object pallet is determined in the initial image, and the feature area is used to characterize the target end face of the object pallet, and the pallet position of the object pallet is determined according to the feature area; then the target position of the object to be detected is determined according to the pallet position, so as to determine the offset state of the object to be detected according to the target position. According to the characteristics of the application scenario, the initial image acquired by the present application includes, in addition to the image of the object to be detected, an object pallet for placing the object to be detected, and the target end face of the object pallet is used as the feature area of the initial image. The pallet position of the object pallet is obtained by analyzing and processing the feature area. Then, the target position of the object to be detected is obtained based on the position of the object pallet, and the offset state of the object to be detected is determined by the target position. In addition, position data such as coordinates and angles are provided for the object handling of the unmanned forklift, thereby improving the reliability and work efficiency of the unmanned forklift in transporting goods.
在一个实施例中,获取待检测物体的初始图像,包括:获取物体放置区域的原始图像,确定原始图像的目标区域;对目标区域进行图像识别,若目标区域包括待检测物体,则将目标区域作为初始图像。In one embodiment, obtaining an initial image of the object to be detected includes: obtaining an original image of the area where the object is placed, and determining a target area of the original image; performing image recognition on the target area, and if the target area includes the object to be detected, using the target area as the initial image.
在对待检测物体进行偏移检测时,先确定待检测物体的物体放置区域。通过图像获取装置获取该物体放置区域的原始图像,并通过对原始图像的处理和分析,得到感兴趣区域(Region of Interest,简称ROI),将这个感兴趣区域作为检测待检测物体偏移状态的目标区域。对目标区域根据是否包括待检测物体进行图像识别,将包括待检测物体的目标区域作为本实施例的初始图像。When performing offset detection on an object to be detected, the object placement area of the object to be detected is first determined. The original image of the object placement area is obtained by an image acquisition device, and a region of interest (ROI) is obtained by processing and analyzing the original image. This region of interest is used as a target area for detecting the offset state of the object to be detected. Image recognition is performed on the target area based on whether it includes the object to be detected, and the target area including the object to be detected is used as the initial image of this embodiment.
为提高图像获取装置的获取效率,将图像获取装置设置在物体放置区域之外,以获取更多的待检测物体的图像。例如,将图像获取装置设置在物体放置区域的中线上,从物体放置区域的外部可以通过侧面可以同时对多个待检测物体进行图像获取。In order to improve the acquisition efficiency of the image acquisition device, the image acquisition device is set outside the object placement area to acquire images of more objects to be detected. For example, the image acquisition device is set on the midline of the object placement area, and images of multiple objects to be detected can be acquired from the side outside the object placement area at the same time.
在对待检测物体进行偏移检测前,先获取一张没有不包括待检测物体的基准图像,并根据该基准图像划分目标区域。目标区域的划分可以通过历史数据中与待检测物体相关的信息确定,或者根据图像获取装置设置的位置确定。Before performing offset detection on the object to be detected, a reference image without the object to be detected is first obtained, and the target area is divided according to the reference image. The division of the target area can be determined by information related to the object to be detected in historical data, or by the location where the image acquisition device is set.
当需要对待检测物体进行偏移检测时,对原始图像中各目标区域根据是否存在待检测物体进行图像识别。若某个目标区域存在待检测物体,则将该目标区域作为初始图像,以实现进一步的偏移检测。若某个目标区域不存在待检测物体,则不对该待检测物体进行数据处理。When it is necessary to perform offset detection on the object to be detected, image recognition is performed on each target area in the original image according to whether there is an object to be detected. If there is an object to be detected in a certain target area, the target area is used as the initial image to achieve further offset detection. If there is no object to be detected in a certain target area, data processing is not performed on the object to be detected.
示例性的,可以通过深度学习算法对目标区域进行图像分类识别。在图像处理前先对目标区域的图像进行预处理,得到尺寸相同的区域图像。基于图像分类算法对预处理后的区域图像进行图像分类。如采用逐排检测的方法对目标区域进行检测,即先对第一排的目标区域进行检测,若第一排没有待检测物体,则继续检测第二排,直到检测到目标区域的最后一排为止。逐排检测的结果包括是否存在物体,以及对应的置信度。Exemplarily, the target area can be classified and identified by a deep learning algorithm. The image of the target area is preprocessed before image processing to obtain an area image of the same size. The preprocessed area image is classified based on the image classification algorithm. For example, the target area is detected by a row-by-row detection method, that is, the target area of the first row is detected first. If there is no object to be detected in the first row, the second row is detected until the last row of the target area is detected. The results of the row-by-row detection include whether there is an object and the corresponding confidence level.
本实施例对使用的图像分类识别方法没有限制,实际应用中可根据需求自定义图像分类模型,例如基于PaddleClas的PPLCNet模型。This embodiment has no restriction on the image classification and recognition method used. In practical applications, the image classification model can be customized according to needs, such as the PPLCNet model based on PaddleClas.
上述示例提到的对图像的预处理用于得到统一尺寸的区域图像。例如,先通过掩码截取目标区域内的图像,将目标区域以外的图像进行统一的灰度处理,如将灰度值填充为零。再对截取过的目标区域通过拉伸的方式统一尺寸,以得到尺寸相同的区域图像,并剔除与待检测物体无关的干扰信息。The image preprocessing mentioned in the above example is used to obtain a uniform-sized regional image. For example, the image within the target area is first intercepted by a mask, and the image outside the target area is uniformly grayed, such as filling the gray value with zero. The intercepted target area is then stretched to unify the size to obtain a regional image of the same size, and interference information irrelevant to the object to be detected is eliminated.
需要说明的是,由于在对图像分类识别时对原始图像进行了预处理以统一目标区域的大小,在对图像进行分类处理后,需要将处理后的图像还原至原始大小,以便于后续的处理操作。It should be noted that, since the original image is preprocessed to unify the size of the target area during image classification and recognition, after the image is classified, the processed image needs to be restored to its original size to facilitate subsequent processing operations.
在一个进一步的实施例中,在初始图像中确定物体托盘对应的特征区域,包括:对初始图像进行图像分割,得到多个分割区域,并确定各分割区域对应的区域属性;根据区域属性对各分割区域进行图像分析,得到特征区域。In a further embodiment, determining a characteristic region corresponding to the object tray in the initial image includes: performing image segmentation on the initial image to obtain multiple segmented regions, and determining region attributes corresponding to each segmented region; performing image analysis on each segmented region according to the region attributes to obtain a characteristic region.
若目标区域存在待检测物体,则将目标区域作为初始图像,继续对目标区域对应的初始图像进行图像处理,得到用于表征物体托盘的特征区域。If there is an object to be detected in the target area, the target area is taken as the initial image, and image processing is continued on the initial image corresponding to the target area to obtain a feature area for characterizing the object tray.
示例性的,在对初始图像进行分析时,先对初始图像进行预处理,例如,通过掩码截取初始图像,将掩码以外的图像进行统一的灰度处理,如将灰度值填充为零。再对截取过的初始图像通过拉伸的方式统一尺寸,以得到尺寸相同的初始图像,并剔除初始图像周边的干扰信息。Exemplarily, when analyzing the initial image, the initial image is first preprocessed, for example, the initial image is intercepted by a mask, and the image outside the mask is uniformly grayscaled, such as filling the grayscale value with zero. The intercepted initial image is then stretched to unify the size to obtain an initial image of the same size, and interference information around the initial image is removed.
基于语义分割模型对初始图像进行图像分割,得到多个分割区域。各分割区域还包括对应的掩码、外接正矩形框、置信度等区域属性数据。基于各分割区域的属性数据对分割区域进行形态学分析,以各分割区域外接正矩形的面积进行排序,将外接正矩形面积最大的分割区域作为特征区域。The initial image is segmented based on the semantic segmentation model to obtain multiple segmented regions. Each segmented region also includes corresponding mask, circumscribed rectangular frame, confidence and other regional attribute data. Based on the attribute data of each segmented region, the segmented regions are morphologically analyzed and sorted by the area of the circumscribed rectangular frame of each segmented region. The segmented region with the largest circumscribed rectangular area is taken as the feature region.
本实施例对图像分割的方法没有限制,实际应用中可根据需求自定义图像分割模型,例如基于PaddleSeg的pp_liteseg_stdc1模型。This embodiment has no restriction on the image segmentation method. In practical applications, the image segmentation model can be customized according to needs, such as the pp_liteseg_stdc1 model based on PaddleSeg.
需要说明的是,由于在对图像分割时对初始图像进行了预处理以统一初始图像的大小,在对图像进行分割处理后,需要将处理后的图像还原至原始大小,以便于后续的处理操作。It should be noted that, since the initial image is preprocessed to unify the size of the initial image during image segmentation, after the image is segmented, the processed image needs to be restored to its original size to facilitate subsequent processing operations.
在另一个实施例中,托盘位置包括托盘角度和托盘坐标,根据特征区域确定物体托盘的托盘位置,包括:确定外接特征区域的第一矩形,根据第一矩形与标准正矩形的角度确定托盘角度;根据托盘角度和待检测物体的坐标确定托盘坐标。In another embodiment, the pallet position includes a pallet angle and a pallet coordinate, and determining the pallet position of the object pallet according to the feature area includes: determining a first rectangle of the circumscribed feature area, determining the pallet angle according to the angle between the first rectangle and a standard regular rectangle; and determining the pallet coordinates according to the pallet angle and the coordinates of the object to be detected.
预设待检测物体及物体托盘的基准角度。托盘角度即物体托盘与该基准角度之间的偏移。可以理解,若物体托盘或待检测物体的角度与基准角度存在较大偏移,则会影响无人叉车的运输效率。托盘坐标用于表示物体托盘与图像获取装置之间的距离。The reference angles of the object to be detected and the object pallet are preset. The pallet angle is the offset between the object pallet and the reference angle. It can be understood that if the angle of the object pallet or the object to be detected is greatly offset from the reference angle, it will affect the transportation efficiency of the unmanned forklift. The pallet coordinates are used to represent the distance between the object pallet and the image acquisition device.
示例性的,在特征区域中,将物体托盘目标端面的外接斜矩形作为第一矩形。标准正矩形是根据图像获取装置构建的基准坐标系确定的标准正矩形,基准坐标系的XY轴与水平面平行,Z轴与水平面垂直。该第一矩形的角度即初始图像中物体托盘的角度。根据图像获取装置与待检测物体之间的水平距离和垂直距离,得到物体托盘的托盘坐标。Exemplarily, in the feature area, the oblique rectangle circumscribed by the target end face of the object tray is used as the first rectangle. The standard rectangle is a standard rectangle determined according to the reference coordinate system constructed by the image acquisition device, and the XY axis of the reference coordinate system is parallel to the horizontal plane, and the Z axis is perpendicular to the horizontal plane. The angle of the first rectangle is the angle of the object tray in the initial image. The tray coordinates of the object tray are obtained according to the horizontal distance and vertical distance between the image acquisition device and the object to be detected.
在一个进一步的实施例中,该方法还包括:确定图像获取装置与待检测物体的检测距离;基于检测距离对托盘位置进行校正,得到校正后的托盘位置;根据托盘位置确定待检测物体的目标位置,包括:根据校正后的托盘位置确定待检测物体的目标位置。In a further embodiment, the method also includes: determining a detection distance between the image acquisition device and the object to be detected; correcting the pallet position based on the detection distance to obtain a corrected pallet position; determining a target position of the object to be detected according to the pallet position, including: determining the target position of the object to be detected according to the corrected pallet position.
由于图像获取装置获取的原始图像受到拍摄角度的影响,使得待检测物体在图像中呈现的角度等信息与实际位置存在偏移。为了确保对物体偏移检测的准确性,根据图像获取装置与待检测物体之间的距离对托盘位置进行校正,以得到更新后的托盘位置。此时,更新后的托盘位置即真实的托盘位置。Since the original image acquired by the image acquisition device is affected by the shooting angle, the angle and other information of the object to be detected in the image are offset from the actual position. In order to ensure the accuracy of object offset detection, the pallet position is corrected according to the distance between the image acquisition device and the object to be detected to obtain an updated pallet position. At this time, the updated pallet position is the real pallet position.
示例性的,请参照图2所示的图像获取装置获取的图像畸变的示意图,以及图3所示图像获取装置与待检测物体之间的位置示意图,根据投影原理,得到初始图像中物体托盘的角度与实际物体托盘角度的映射关系,该映射关系可以表示为:For example, please refer to the schematic diagram of image distortion acquired by the image acquisition device shown in FIG2 and the schematic diagram of the position between the image acquisition device and the object to be detected shown in FIG3. According to the projection principle, the mapping relationship between the angle of the object tray in the initial image and the actual object tray angle is obtained. The mapping relationship can be expressed as:
式中,b可由以下映射关系得到:In the formula, b can be obtained by the following mapping relationship:
式中:Where:
其中,α表示实际物体偏移的角度,a和c分别表示图像中货物偏移角对应的两个直角边,d表示图像获取装置到货物的水平距离,h表示图像获取装置的垂直高度。Wherein, α represents the angle of deviation of the actual object, a and c represent the two right-angled sides corresponding to the deviation angle of the cargo in the image, d represents the horizontal distance from the image acquisition device to the cargo, and h represents the vertical height of the image acquisition device.
结合图2和图3所示,由于图像获取装置在采集图像时存在倾角,会导致获取的图像发生畸变。以图2为例,图像获取装置以x轴为旋转中心进行旋转,会导致y方向的尺寸发生畸变,进而导致货物实际偏移角度α畸变为图像中的β。而由于x方向的a未发生变化,可以通过b和c的映射关系来还原α。As shown in Figures 2 and 3, the image acquisition device has an inclination when collecting images, which will cause the acquired image to be distorted. Taking Figure 2 as an example, the image acquisition device rotates around the x-axis, which will cause the size in the y direction to be distorted, and then cause the actual offset angle α of the goods to be distorted to β in the image. Since a in the x-direction has not changed, α can be restored through the mapping relationship between b and c.
由图2可以得出:From Figure 2, we can conclude that:
由图3可以得出:From Figure 3 we can conclude that:
根据三角形的相似关系,可以得出:According to the similarity relationship of triangles, we can conclude that:
又因为:And because:
带入可得出:Substituting in, we get:
又因为:And because:
代入可以得出c与b的映射关系:Substituting in, we can get the mapping relationship between c and b:
根据上述c与b映射关系的公式可以实现对物体托盘的角度位置进行校正,得到物体托盘的实际角度位置。According to the above formula of the mapping relationship between c and b, the angular position of the object tray can be corrected to obtain the actual angular position of the object tray.
在另一个实施例中,根据托盘位置确定待检测物体的目标位置,包括:根据托盘位置确定物体托盘的托盘边长;获取待检测物体对应放置区域的区域边长,根据区域边长和托盘边长确定物体托盘外边框的禁入区域;将禁入区域与放置区域重叠区域作为待检测物体的非偏移区域,根据非偏移区域确定目标位置,以根据目标位置确定待检测物体的偏移状态。In another embodiment, the target position of the object to be detected is determined according to the position of the tray, including: determining the tray side length of the object tray according to the tray position; obtaining the area side length of the placement area corresponding to the object to be detected, and determining the forbidden area of the outer frame of the object tray according to the area side length and the tray side length; taking the overlapping area of the forbidden area and the placement area as the non-offset area of the object to be detected, determining the target position according to the non-offset area, so as to determine the offset state of the object to be detected according to the target position.
请参照图4所述的非偏移区域的示意图。本实施例通过物体偏移算法判断待检测物体的偏移状态。基于投影原理,得到物体托盘的实际位置。获取待检测物体放置区域的区域边长,表示为a。获取物体托盘的托盘边长,表示为b。边长a、b之间的关系满足约束条件: Please refer to the schematic diagram of the non-offset area described in FIG4. This embodiment determines the offset state of the object to be detected by the object offset algorithm. Based on the projection principle, the actual position of the object tray is obtained. The area side length of the area where the object to be detected is placed is obtained, denoted as a. The tray side length of the object tray is obtained, denoted as b. The relationship between the side lengths a and b satisfies the constraint condition:
由于物体放置区域需完整的仿真物体托盘。因此,如图4所示,可以根据托盘边长和区域边长计算物体托盘外边框的禁入区域,该禁入区域的边长c表示为:Since the object placement area requires a complete simulated object tray, as shown in Figure 4, the forbidden area of the outer frame of the object tray can be calculated based on the side length of the tray and the side length of the area. The side length c of the forbidden area is expressed as:
其中,in,
请参照图4,根据勾股定理可得:Please refer to Figure 4. According to the Pythagorean theorem, we can get:
b2=d2+e2 b2 = d2 + e2
又有a=d+e,化简得:We also have a=d+e, simplifying to get:
所以可得:So we can get:
同样的,根据勾股定理可得:Similarly, according to the Pythagorean theorem:
c2=g2+f2 c 2 = g 2 + f 2
又有There are
b=g+fb=g+f
带入得:Bring in:
将两个区域进行且运算,即获取禁入区域与放置区域的重叠区域,得到待检测物体的非偏移区域。通过非偏移区域进一步确定待检测物体的目标位置,并根据目标位置确定待检测物体的偏移状态。The two areas are ANDed to obtain the overlapping area of the forbidden area and the placement area, and the non-offset area of the object to be detected is obtained. The target position of the object to be detected is further determined by the non-offset area, and the offset state of the object to be detected is determined according to the target position.
在一个具体的实施例中,如图5所示,提供了一种物体偏移检测方法,包括以下步骤502至步骤512。其中:In a specific embodiment, as shown in FIG5 , a method for detecting object offset is provided, including the following steps 502 to 512 . Among them:
步骤502,获取物体放置区域的原始图像,确定原始图像的目标区域。Step 502: Acquire the original image of the object placement area and determine the target area of the original image.
图像获取装置设置在待检测物体放置区域的外部中线上,通过侧面获取待检测物体的原始图像。对原始图像进行分析,确定原始图像中的若干目标区域。The image acquisition device is arranged on the outer midline of the area where the object to be detected is placed, and acquires the original image of the object to be detected from the side, analyzes the original image, and determines several target areas in the original image.
步骤504,对目标区域进行图像识别,若目标区域包括待检测物体,则将目标区域作为初始图像。Step 504: perform image recognition on the target area. If the target area includes the object to be detected, the target area is used as the initial image.
对各目标区域进行图像分类识别,根据存在待检测物体的目标区域得到初始图像。该初始图像还包括用于放置待检测物体的物体托盘。Image classification and recognition are performed on each target area, and an initial image is obtained according to the target area where the object to be detected exists. The initial image also includes an object tray for placing the object to be detected.
步骤506,对初始图像进行图像分割,得到多个分割区域,并确定各分割区域对应的区域属性;根据区域属性对各分割区域进行图像分析,得到特征区域。Step 506, performing image segmentation on the initial image to obtain a plurality of segmented regions, and determining the region attribute corresponding to each segmented region; performing image analysis on each segmented region according to the region attribute to obtain a feature region.
对初始图像进行图像分割处理,确定初始图像中用于表征物体托盘的特征区域。The initial image is subjected to image segmentation processing to determine a feature region in the initial image for representing the object tray.
步骤508,确定外接该特征区域的第一矩形,根据第一矩形与标准正矩形的角度确定托盘角度;根据托盘角度和待检测物体的坐标确定托盘坐标。Step 508, determining a first rectangle circumscribing the feature area, determining the angle of the tray according to the angle between the first rectangle and the standard regular rectangle; and determining the coordinates of the tray according to the angle of the tray and the coordinates of the object to be detected.
在特征区域中,将物体托盘目标端面的外接斜矩形作为第一矩形。标准正矩形是根据图像获取装置构建的基准坐标系确定的标准正矩形,基准坐标系的XY轴与水平面平行,Z轴与水平面垂直。该第一矩形的角度即初始图像中物体托盘的角度。根据图像获取装置与待检测物体之间的水平距离和垂直距离,得到物体托盘的托盘坐标。In the feature area, the oblique rectangle circumscribed by the target end face of the object tray is taken as the first rectangle. The standard rectangle is a standard rectangle determined according to the reference coordinate system constructed by the image acquisition device, and the XY axis of the reference coordinate system is parallel to the horizontal plane, and the Z axis is perpendicular to the horizontal plane. The angle of the first rectangle is the angle of the object tray in the initial image. The tray coordinates of the object tray are obtained according to the horizontal distance and vertical distance between the image acquisition device and the object to be detected.
步骤510,确定图像获取装置与待检测物体的检测距离;基于检测距离对托盘位置进行校正,得到校正后的托盘位置。Step 510, determining the detection distance between the image acquisition device and the object to be detected; and correcting the tray position based on the detection distance to obtain a corrected tray position.
由于图像获取装置获取的原始图像受到拍摄角度的影响,使得待检测物体在图像中呈现的角度等信息与实际位置存在偏移。为了确保对物体偏移检测的准确性,根据图像获取装置与待检测物体之间的距离对托盘位置进行校正,以得到更新后的托盘位置。此时,更新后的托盘位置即真实的托盘位置。Since the original image acquired by the image acquisition device is affected by the shooting angle, the angle and other information of the object to be detected in the image are offset from the actual position. In order to ensure the accuracy of object offset detection, the pallet position is corrected according to the distance between the image acquisition device and the object to be detected to obtain an updated pallet position. At this time, the updated pallet position is the real pallet position.
步骤512,根据托盘位置确定物体托盘的托盘边长;获取待检测物体对应放置区域的区域边长,根据区域边长和托盘边长确定物体托盘外边框的禁入区域;将禁入区域与放置区域重叠区域作为待检测物体的非偏移区域,根据非偏移区域确定目标位置,以根据目标位置确定待检测物体的偏移状态。Step 512, determine the tray side length of the object tray according to the tray position; obtain the area side length of the placement area corresponding to the object to be detected, and determine the forbidden area of the outer frame of the object tray according to the area side length and the tray side length; use the overlapping area of the forbidden area and the placement area as the non-offset area of the object to be detected, determine the target position according to the non-offset area, and determine the offset state of the object to be detected according to the target position.
本实施例提出的物体偏移检测方法,支持图像获取装置从待检测物体的侧面采集图像,可以提高获取图像的视野,一次性对更多的货物进行偏移检测,由于适用于受到高度限制无法从正上方获取物体放置区域图像的场景。本实施例以物体托盘为基准进行图像识别和坐标转换,确定待检测物体的目标位置,实现对待检测物体的偏移检测,可提高无人叉车运送货物的可靠性和工作效率。The object offset detection method proposed in this embodiment supports the image acquisition device to collect images from the side of the object to be detected, which can improve the field of view of the acquired image and perform offset detection on more goods at one time. It is suitable for scenes where the image of the object placement area cannot be obtained from directly above due to height restrictions. This embodiment uses the object pallet as a reference to perform image recognition and coordinate conversion, determine the target position of the object to be detected, and realize offset detection of the object to be detected, which can improve the reliability and work efficiency of unmanned forklifts in transporting goods.
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的物体偏移检测方法的物体偏移检测装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个物体偏移检测装置实施例中的具体限定可以参见上文中对于物体偏移检测方法的限定,在此不再赘述。Based on the same inventive concept, the embodiment of the present application also provides an object offset detection device for implementing the object offset detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more object offset detection device embodiments provided below can refer to the limitations of the object offset detection method above, and will not be repeated here.
在一个示例性的实施例中,如图6所示,提供了一种物体偏移检测装置,包括:获取模块602、处理模块604和检测模块606,其中:In an exemplary embodiment, as shown in FIG6 , an object offset detection device is provided, including: an acquisition module 602 , a processing module 604 and a detection module 606 , wherein:
获取模块602,用于获取待检测物体的初始图像,初始图像还包括用于放置待检测物体的物体托盘;An acquisition module 602 is used to acquire an initial image of the object to be detected, wherein the initial image also includes an object tray for placing the object to be detected;
处理模块604,用于在初始图像中确定物体托盘对应的特征区域,根据特征区域确定物体托盘的托盘位置;其中,特征区域用于表征物体托盘的目标端面;Processing module 604, used to determine the characteristic region corresponding to the object tray in the initial image, and determine the tray position of the object tray according to the characteristic region; wherein the characteristic region is used to characterize the target end face of the object tray;
检测模块606,用于根据托盘位置确定待检测物体的目标位置,以根据目标位置确定待检测物体的偏移状态。The detection module 606 is used to determine the target position of the object to be detected according to the position of the tray, so as to determine the offset state of the object to be detected according to the target position.
在一个实施例中,处理模块604还用于:对初始图像进行图像分割,得到多个分割区域,并确定各分割区域对应的区域属性;根据区域属性对各分割区域进行图像分析,得到特征区域。In one embodiment, the processing module 604 is further used to: perform image segmentation on the initial image to obtain multiple segmented regions, and determine the region attribute corresponding to each segmented region; perform image analysis on each segmented region according to the region attribute to obtain a feature region.
在一个实施例中,托盘位置包括托盘角度和托盘坐标,处理模块604还用于:确定外接特征区域的第一矩形,根据第一矩形与标准正矩形的角度确定托盘角度;根据托盘角度和待检测物体的坐标确定托盘坐标。In one embodiment, the pallet position includes the pallet angle and the pallet coordinates, and the processing module 604 is further used to: determine a first rectangle of the circumscribed feature area, determine the pallet angle according to the angle between the first rectangle and the standard regular rectangle; determine the pallet coordinates according to the pallet angle and the coordinates of the object to be detected.
在一个实施例中,检测模块606还用于:根据托盘位置确定物体托盘的托盘边长;获取待检测物体对应放置区域的区域边长,根据区域边长和托盘边长确定物体托盘外边框的禁入区域;将禁入区域与放置区域重叠区域作为待检测物体的非偏移区域,根据非偏移区域确定目标位置,以根据目标位置确定待检测物体的偏移状态。In one embodiment, the detection module 606 is also used to: determine the tray side length of the object tray according to the tray position; obtain the area side length of the placement area corresponding to the object to be detected, and determine the forbidden area of the outer frame of the object tray according to the area side length and the tray side length; use the overlapping area of the forbidden area and the placement area as the non-offset area of the object to be detected, determine the target position according to the non-offset area, and determine the offset state of the object to be detected according to the target position.
在一个实施例中,处理模块604还用于:确定图像获取装置与待检测物体的检测距离;基于检测距离对托盘位置进行校正,得到校正后的托盘位置;根据托盘位置确定待检测物体的目标位置,包括:根据校正后的托盘位置确定待检测物体的目标位置。In one embodiment, the processing module 604 is also used to: determine the detection distance between the image acquisition device and the object to be detected; correct the tray position based on the detection distance to obtain a corrected tray position; determine the target position of the object to be detected according to the tray position, including: determining the target position of the object to be detected according to the corrected tray position.
在一个实施例中,获取模块还用于:获取物体放置区域的原始图像,确定原始图像的目标区域;对目标区域进行图像识别,若目标区域包括待检测物体,则将目标区域作为初始图像。In one embodiment, the acquisition module is further used to: acquire an original image of the object placement area, determine a target area of the original image; perform image recognition on the target area, and if the target area includes the object to be detected, use the target area as the initial image.
上述物体偏移检测装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned object offset detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
在一个示例性的实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图7所示。该计算机设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质和内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的输入/输出接口用于处理器与外部设备之间交换信息。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种物体偏移检测方法。该计算机设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置。显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input/output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input/output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input/output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an object offset detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
在一个示例性的实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410942146.1A CN118691676A (en) | 2024-07-15 | 2024-07-15 | Object offset detection method, device, equipment, storage medium and computer product |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410942146.1A CN118691676A (en) | 2024-07-15 | 2024-07-15 | Object offset detection method, device, equipment, storage medium and computer product |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN118691676A true CN118691676A (en) | 2024-09-24 |
Family
ID=92774390
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410942146.1A Pending CN118691676A (en) | 2024-07-15 | 2024-07-15 | Object offset detection method, device, equipment, storage medium and computer product |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118691676A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121475013A (en) * | 2026-01-09 | 2026-02-06 | 潍柴动力股份有限公司 | Engine positioning methods and devices in production lines |
-
2024
- 2024-07-15 CN CN202410942146.1A patent/CN118691676A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121475013A (en) * | 2026-01-09 | 2026-02-06 | 潍柴动力股份有限公司 | Engine positioning methods and devices in production lines |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114819821B (en) | Cargo delivery verification method, cargo delivery verification device, computer equipment and storage medium | |
| JP2023092446A (en) | Cargo counting method and device, computer device, and storage medium | |
| CN112002015B (en) | Method, device, equipment and medium for generating grid data structure by using disordered point cloud | |
| WO2023130717A1 (en) | Image positioning method and apparatus, computer device and storage medium | |
| CN111553914A (en) | Vision-based goods detection method and device, terminal and readable storage medium | |
| CN115546300A (en) | Method and device for identifying pose of tray placed tightly, computer equipment and medium | |
| CN119445250B (en) | Multi-model voting surface defect detection methods, apparatus, equipment, and storage media | |
| CN111310800A (en) | Image classification model generation method and device, computer equipment and storage medium | |
| CN116453061A (en) | Remote pig selling supervision method, device and equipment based on image recognition | |
| CN119540134A (en) | Wafer defect detection method, device, computer equipment and medium | |
| KR102902016B1 (en) | Method and device for cargo inventorying and storage medium | |
| CN118864822A (en) | Target detection method, device, equipment and storage medium | |
| WO2022052893A1 (en) | 5d texture grid data structure | |
| CN120218813A (en) | A warehouse management method and system based on AGV robot | |
| CN116188573B (en) | Object pose recognition methods, devices, computer equipment, storage media and products | |
| CN114742704B (en) | Image augmentation methods and image augmentation-based model training methods | |
| CN119273658A (en) | Workpiece defect detection method, device, computer equipment and storage medium | |
| CN119445078A (en) | Target detection method, device, equipment and readable medium | |
| CN115526873A (en) | Cargo detection method and device, computer equipment and storage medium | |
| CN117485783A (en) | Storage status detection methods, devices, storage media and equipment for warehouse locations | |
| CN114092781B (en) | Shelf line testing methods, devices, computer equipment and storage media | |
| CN115705683A (en) | Article package damage detection method, article package damage detection device, computer device, and storage medium | |
| CN116934856B (en) | Object recognition method, device, equipment and storage medium based on three-dimensional data | |
| KR102938967B1 (en) | Method for recognition working space using camera | |
| CN114841949B (en) | Pallet access method, device, computer 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 |