CN113763311B - Image recognition method and device and automatic sorting robot - Google Patents
Image recognition method and device and automatic sorting robot Download PDFInfo
- Publication number
- CN113763311B CN113763311B CN202110010444.3A CN202110010444A CN113763311B CN 113763311 B CN113763311 B CN 113763311B CN 202110010444 A CN202110010444 A CN 202110010444A CN 113763311 B CN113763311 B CN 113763311B
- Authority
- CN
- China
- Prior art keywords
- image
- images
- definition
- distribution
- present disclosure
- 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.)
- Active
Links
Classifications
-
- 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
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
- B07C5/36—Sorting apparatus characterised by the means used for distribution
- B07C5/361—Processing or control devices therefor, e.g. escort memory
- B07C5/362—Separating or distributor mechanisms
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C2501/00—Sorting according to a characteristic or feature of the articles or material to be sorted
- B07C2501/0063—Using robots
-
- 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/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
本公开提供了一种图像识别方法。所述方法包括:获取第一图像;获得所述第一图像的清晰度;以及当所述第一图像的清晰度大于模糊阈值时,确定所述第一图像为清晰图像;其中,所述模糊阈值为基于M个第二图像的清晰度的分布情况确定的;其中,M个所述第二图像与所述第一图像为针对同一场景拍摄的图像。本公开还提供了一种图像识别装置、一种自动分拣机器人、一种电子设备、以及一种计算机可读存储介质。
The present disclosure provides an image recognition method. The method includes: acquiring a first image; obtaining the clarity of the first image; and when the clarity of the first image is greater than a blur threshold, determining that the first image is a clear image; wherein the blur threshold is determined based on the distribution of the clarity of M second images; wherein the M second images and the first image are images taken for the same scene. The present disclosure also provides an image recognition device, an automatic sorting robot, an electronic device, and a computer-readable storage medium.
Description
技术领域Technical Field
本公开涉及图像处理技术领域,更具体地,涉及一种图像识别方法和装置、一种自动分拣机器人、一种电子设备、以及一种计算机可读存储介质。The present disclosure relates to the field of image processing technology, and more specifically, to an image recognition method and device, an automatic sorting robot, an electronic device, and a computer-readable storage medium.
背景技术Background technique
自动分拣机器人进行货物分拣时,需要通过自动分拣机器人的摄像头采集图像,实现自动分拣机器人对被拾取物体的视觉识别。要想实现物体的精确拾取,必须要把自动分拣机器人的机械臂的坐标系和机器视觉的坐标系统一的非常精准。然而,实际中通常会由于拾取机械手的干扰、机械震动导致采集图像模糊等问题。When the automatic sorting robot is sorting goods, it needs to collect images through the camera of the automatic sorting robot to realize the visual recognition of the picked objects. In order to achieve accurate picking of objects, the coordinate system of the automatic sorting robot's mechanical arm and the coordinate system of the machine vision must be very accurate. However, in practice, the collected images are usually blurred due to interference from the picking robot and mechanical vibration.
现有对于拾取物体检测相机获取图像的清洗工作多为人工直接筛选,通过人眼逐张识别每张照片是否符合标准。然而通过人工筛选照片,耗费大量人力,人工成本较高,且工作不能复用。长时间关注高亮度屏幕进行图片筛选工作,对人员的身体健康也造成损害。Currently, the cleaning work of images obtained by object detection cameras is mostly done by direct manual screening, where the human eye identifies each photo one by one to see if it meets the standards. However, manual screening of photos consumes a lot of manpower, has high labor costs, and the work cannot be reused. Focusing on the high-brightness screen for a long time to screen images also causes damage to the health of personnel.
学术界存在使用检测图片在进行快速傅里叶变换后的高频分量和低频分量的分布情况来判别图像是否模糊的方法。但是对于场景单一、图像相似程度大的机械臂拾取场景中,图像在进行快速傅里叶变化后并不能有效区分出高频分量与低频分量分布的区别,因此并不适用。In academia, there is a method to determine whether an image is blurred by detecting the distribution of high-frequency and low-frequency components of an image after fast Fourier transformation. However, for a robot picking scene with a single scene and a high degree of image similarity, the image cannot effectively distinguish the difference between the distribution of high-frequency and low-frequency components after fast Fourier transformation, so it is not applicable.
发明内容Summary of the invention
有鉴于此,本公开实施例提供了一种对拍摄的同一场景下、相似程度较大的图像进行自动识别的图像识别方法和装置、电子设备、计算机可读存储介质、以及自动分拣机器人。In view of this, the embodiments of the present disclosure provide an image recognition method and device, an electronic device, a computer-readable storage medium, and an automatic sorting robot for automatically identifying images taken in the same scene with a high degree of similarity.
本公开实施例的一个方面提供了一种图像识别方法。所述方法包括:获取第一图像;获得所述第一图像的清晰度;以及当所述第一图像的清晰度大于模糊阈值时,确定所述第一图像为清晰图像;其中,所述模糊阈值为基于M个第二图像的清晰度的分布情况确定的;其中,M为大于1的整数,M个所述第二图像与所述第一图像为针对同一场景拍摄的图像。One aspect of an embodiment of the present disclosure provides an image recognition method. The method includes: acquiring a first image; obtaining the clarity of the first image; and when the clarity of the first image is greater than a blur threshold, determining that the first image is a clear image; wherein the blur threshold is determined based on the distribution of the clarity of M second images; wherein M is an integer greater than 1, and the M second images and the first image are images taken for the same scene.
根据本公开的实施例,所述方法还包括:获取M个所述第二图像;获得每个所述第二图像的清晰度;以及基于M个所述第二图像的清晰度的分布情况确定所述模糊阈值。According to an embodiment of the present disclosure, the method further includes: acquiring M second images; obtaining the clarity of each second image; and determining the blur threshold based on the distribution of the clarity of the M second images.
根据本公开的实施例,所述基于M个所述第二图像的清晰度的分布情况确定所述模糊阈值包括:以将M个所述第二图像的清晰度的分布划分为两个不同的正态分布的清晰度值作为所述模糊阈值。According to an embodiment of the present disclosure, determining the blur threshold based on the distribution of the clarity of the M second images includes: dividing the distribution of the clarity of the M second images into two different normally distributed clarity values as the blur threshold.
根据本公开的实施例,所述基于M个所述第二图像的清晰度的分布情况确定所述模糊阈值包括:生成M个所述第二图像的清晰度的分布直方图;对所述分布直方图进行梯度检测,确定波谷的位置;以及以所述波谷的位置对应的清晰度值,作为所述模糊阈值。According to an embodiment of the present disclosure, determining the blur threshold based on the distribution of clarity of the M second images includes: generating a distribution histogram of the clarity of the M second images; performing gradient detection on the distribution histogram to determine the position of the trough; and using the clarity value corresponding to the position of the trough as the blur threshold.
根据本公开的实施例,在所述获取M个所述第二图像之前,所述方法还包括将所述第一图像作为一个所述第二图像,以扩充M个所述第二图像。According to an embodiment of the present disclosure, before acquiring the M second images, the method further includes taking the first image as a second image to expand the M second images.
根据本公开的实施例,所述第一图像和M个所述第二图像中的每个图像的清晰度是通过如下方式获得的:对所述图像进行拉普拉斯变换,得到所述图像对应的像素矩阵;计算组成所述像素矩阵的所有元素的方差;以及以所述方差作为所述图像的清晰度。According to an embodiment of the present disclosure, the clarity of the first image and each of the M second images is obtained in the following manner: performing Laplace transform on the image to obtain a pixel matrix corresponding to the image; calculating the variance of all elements constituting the pixel matrix; and using the variance as the clarity of the image.
根据本公开的实施例,获得每个图像的清晰度还包括,在对所述图像进行拉普拉斯变换之前,对所述图像进行高斯滤波,和/或将所述图像转换为灰度图像。According to an embodiment of the present disclosure, obtaining the clarity of each image further includes, before performing Laplace transform on the image, performing Gaussian filtering on the image, and/or converting the image into a grayscale image.
本公开实施例的另一方面,提供了一种图像识别装置。所述装置包括图像获取模块、清晰度获得模块、以及第一确定模块。图像获取模块用于获取第一图像。清晰度获得模块用于获得所述第一图像的清晰度。第一确定模块用于当所述第一图像的清晰度大于模糊阈值时,确定所述第一图像为清晰图像;其中,所述模糊阈值为基于M个第二图像的清晰度的分布情况确定的;其中,M为大于1的整数,M个所述第二图像与所述第一图像为针对同一场景拍摄的图像。In another aspect of the embodiments of the present disclosure, an image recognition device is provided. The device includes an image acquisition module, a clarity acquisition module, and a first determination module. The image acquisition module is used to acquire a first image. The clarity acquisition module is used to obtain the clarity of the first image. The first determination module is used to determine that the first image is a clear image when the clarity of the first image is greater than a blur threshold; wherein the blur threshold is determined based on the distribution of the clarity of M second images; wherein M is an integer greater than 1, and the M second images and the first image are images taken for the same scene.
根据本公开的实施例,所述装置还包括第二确定模块。所述图像获取模块还用于获取M个所述第二图像。所述清晰度获得模块还用于获得每个所述第二图像的清晰度。所述第二确定模块用于基于M个所述第二图像的清晰度的分布情况确定所述模糊阈值。According to an embodiment of the present disclosure, the device further includes a second determination module. The image acquisition module is further used to acquire M second images. The clarity acquisition module is further used to obtain the clarity of each second image. The second determination module is used to determine the blur threshold based on the distribution of the clarity of the M second images.
根据本公开的实施例,所述第二确定模块包括分布直方图生成子模块、梯度检测子模块、以及阈值确定子模块。分布直方图生成子模块用于生成M个所述第二图像的清晰度的分布直方图。梯度检测子模块用于对所述分布直方图进行梯度检测,确定波谷的位置。阈值确定子模块用于以所述波谷的位置对应的清晰度值,作为所述模糊阈值。According to an embodiment of the present disclosure, the second determination module includes a distribution histogram generation submodule, a gradient detection submodule, and a threshold determination submodule. The distribution histogram generation submodule is used to generate a distribution histogram of the clarity of the M second images. The gradient detection submodule is used to perform gradient detection on the distribution histogram to determine the position of the trough. The threshold determination submodule is used to use the clarity value corresponding to the position of the trough as the blur threshold.
根据本公开的实施例,所述清晰度获得模块用于通过如下方式获得的所述第一图像和M个所述第二图像中的每个图像的清晰度:对所述图像进行拉普拉斯变换,得到所述图像对应的像素矩阵;计算组成所述像素矩阵的所有元素的方差;以及以所述方差作为所述图像的清晰度。According to an embodiment of the present disclosure, the clarity acquisition module is used to obtain the clarity of the first image and each of M second images in the following manner: performing Laplace transform on the image to obtain a pixel matrix corresponding to the image; calculating the variance of all elements constituting the pixel matrix; and using the variance as the clarity of the image.
根据本公开的实施例,所述清晰度获得模块还用于在对所述图像进行拉普拉斯变换之前,对所述图像进行高斯滤波,和/或将所述图像转换为灰度图像。According to an embodiment of the present disclosure, the clarity acquisition module is further used to perform Gaussian filtering on the image and/or convert the image into a grayscale image before performing Laplace transform on the image.
本公开实施例的另一方面,提供了一种自动分拣机器人。所述自动分拣机器人包括摄像头、处理器、以及分拣单元。所述摄像头用于采集第一图像。所述分拣单元用于进行货物分拣。所述处理器用于:获得所述第一图像的清晰度:当所述第一图像的清晰度大于模糊阈值时,确定所述第一图像为清晰图像,其中,所述模糊阈值为基于M个第二图像的清晰度的分布情况确定的,其中,M为大于1的整数,M个所述第二图像与所述第一图像为针对同一场景拍摄的图像;以及基于确定为清晰图像的所述第一图像控制所述分拣单元进行货物分拣。Another aspect of the embodiments of the present disclosure provides an automatic sorting robot. The automatic sorting robot includes a camera, a processor, and a sorting unit. The camera is used to capture a first image. The sorting unit is used to sort goods. The processor is used to: obtain the clarity of the first image: when the clarity of the first image is greater than a blur threshold, determine that the first image is a clear image, wherein the blur threshold is determined based on the distribution of the clarity of M second images, wherein M is an integer greater than 1, and the M second images and the first image are images taken for the same scene; and control the sorting unit to sort goods based on the first image determined to be a clear image.
根据本公开的实施例,所述处理器还用于当所述第一图像的清晰度小于或等于模糊阈值时,确定所述第一图像为模糊图像,并控制所述摄像头重新采集所述第一图像。According to an embodiment of the present disclosure, the processor is further used to determine that the first image is a blurred image when the clarity of the first image is less than or equal to a blur threshold, and control the camera to re-capture the first image.
本公开实施例的另一方面提供了一种电子设备。所述电子设备包括一个或多个处理器、以及一个或多个存储器。所述一个或多个存储器用于存储一个或多个程序。其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上所述的方法。Another aspect of the present disclosure provides an electronic device. The electronic device includes one or more processors and one or more memories. The one or more memories are used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
本公开实施例的另一方面提供了一种计算机可读存储介质,存储有计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.
本公开实施例的另一方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of an embodiment of the present disclosure provides a computer program, wherein the computer program includes computer executable instructions, and the instructions are used to implement the method described above when executed.
上述一个或多个实施例具有如下优点或益效果:可以根据拍摄的同一场景下、相似程度较大的大量图像的清晰度分布情况,得到区分图像是清晰图像还是模糊图像的模糊阈值,以此可以有效的识别图像是否为清晰图像,提供了一种有效的识别图像是否清晰的手段。One or more of the above-mentioned embodiments have the following advantages or beneficial effects: according to the clarity distribution of a large number of images with a high degree of similarity taken in the same scene, a blur threshold for distinguishing whether an image is a clear image or a blurred image can be obtained, thereby effectively identifying whether the image is a clear image, providing an effective means for identifying whether an image is clear.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过以下参照附图对本公开实施例的描述,本公开的上述以及其他目的、特征和优点将更为清楚,在附图中:The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
图1示意性示出了根据本公开实施例的自动分拣机器人的结构框图;FIG1 schematically shows a structural block diagram of an automatic sorting robot according to an embodiment of the present disclosure;
图2示意性示出了根据本公开一实施例的图像识别方法的流程图;FIG2 schematically shows a flow chart of an image recognition method according to an embodiment of the present disclosure;
图3示意性示出了根据本公开另一实施例的图像识别方法的流程图;FIG3 schematically shows a flow chart of an image recognition method according to another embodiment of the present disclosure;
图4示意性示出了根据本公开再一实施例的图像识别方法中确定模糊阈值的流程图;FIG4 schematically shows a flow chart of determining a blur threshold in an image recognition method according to yet another embodiment of the present disclosure;
图5示意性示出了根据本公开实施例的图像识别方法的一个应用实例;FIG5 schematically shows an application example of the image recognition method according to an embodiment of the present disclosure;
图6示意性示出了根据本公开实施例的图像识别装置的框图;以及FIG6 schematically shows a block diagram of an image recognition device according to an embodiment of the present disclosure; and
图7示意性示出了适于实现根据本公开实施例的图像识别方法的电子设备的方框图。FIG. 7 schematically shows a block diagram of an electronic device suitable for implementing the image recognition method according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "include", "comprising", etc. used herein indicate the existence of the features, steps, operations and/or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and/or A, B, C, etc.).
本公开的实施例提供了一种对拍摄的同一场景下、相似程度较大的图像进行自动识别的图像识别方法和装置、电子设备、计算机可读存储介质,以及应用该图像识别方法的自动分拣机器人。在该图像识别方法中,首先获取待识别的第一图像,然后获得第一图像的清晰度,接下来当第一图像的清晰度大于模糊阈值时,确定第一图像为清晰图像。其中,模糊阈值为基于M个第二图像的清晰度的分布情况确定的,其中,其中,M为大于1的整数,M个第二图像与第一图像为针对同一场景拍摄的图像。The embodiments of the present disclosure provide an image recognition method and device, an electronic device, a computer-readable storage medium, and an automatic sorting robot using the image recognition method for automatically identifying images that are taken in the same scene and have a high degree of similarity. In the image recognition method, a first image to be recognized is first acquired, and then the clarity of the first image is obtained. Next, when the clarity of the first image is greater than a blur threshold, the first image is determined to be a clear image. The blur threshold is determined based on the distribution of the clarity of M second images, wherein M is an integer greater than 1, and the M second images and the first image are images taken for the same scene.
该模糊阈值可以是将M个第二图像的清晰度的分布情况划分为两个不同的分布的清晰度的取值。即,该模糊阈值可以在清晰度维度上,使正常清晰图像和模糊图像有效地被区分为两个不同的分布。The blur threshold may be a value of clarity that divides the distribution of the clarity of the M second images into two different distributions. That is, the blur threshold may effectively distinguish a normal clear image and a blurry image into two different distributions in the clarity dimension.
根据本公开的一个实施例,在计算图像的清晰度时可以通过对图像进行拉普拉斯Laplacian变换,以Laplacian变换后所得的像素矩阵中的组成元素的方差作为清晰度。Laplacian算子可用来衡量图像的二阶导,能够强调图像中密度快速变化的区域,也就是边界,故可用于边界检测。在正常清晰图像中边界比较清晰,因此计算得到的方差会比较大;而在模糊图像中包含的边界信息很少,所以计算得到的方差会较小。从而可以根据大量图像的清晰度分布情况,从中选择可以将整体分布划分为两个不同分布的清晰度值作为模糊阈值。以此方式,可以对同一场景下、相似程度较大的图像清晰与否进行有效判别。According to one embodiment of the present disclosure, when calculating the clarity of an image, the image can be subjected to Laplace Laplacian transformation, and the variance of the constituent elements in the pixel matrix obtained after the Laplacian transformation can be used as the clarity. The Laplacian operator can be used to measure the second-order derivative of an image, and can emphasize the area in the image where the density changes rapidly, that is, the boundary, so it can be used for boundary detection. In a normal clear image, the boundary is relatively clear, so the calculated variance will be relatively large; while in a blurred image, there is little boundary information contained, so the calculated variance will be relatively small. Therefore, based on the clarity distribution of a large number of images, a clarity value that can divide the overall distribution into two different distributions can be selected as a blur threshold. In this way, the clarity of images with a large degree of similarity in the same scene can be effectively judged.
本公开实施例的图像识别方法可以应用于自动分拣机器人,也可以应用于任何需要对拍摄的同一场景下、相似程度较大的图像进行自动识别的设备或场景,对此本公开不予限定。The image recognition method of the embodiment of the present disclosure can be applied to an automatic sorting robot, and can also be applied to any device or scene that requires automatic recognition of images with a high degree of similarity taken in the same scene, and the present disclosure is not limited to this.
图1示意性示出了根据本公开实施例的自动分拣机器人100的结构框图。FIG1 schematically shows a structural block diagram of an automatic sorting robot 100 according to an embodiment of the present disclosure.
如图1所示,该自动分拣机器人100可以包括摄像头110、处理器120、以及分拣单元130。As shown in FIG. 1 , the automatic sorting robot 100 may include a camera 110 , a processor 120 , and a sorting unit 130 .
摄像头110用于采集第一图像,并将第一图像传输给处理器120。其中,自动分拣机器人100一般工作内容高度精细化,拍摄的图像场景比较单一且相似。The camera 110 is used to capture the first image and transmit the first image to the processor 120. The automatic sorting robot 100 generally has highly refined work content, and the image scenes captured are relatively simple and similar.
分拣单元130例如可以是机械臂。The sorting unit 130 may be, for example, a robot arm.
处理器120可以执行根据本公开实施例的图像识别方法,来识别第一图像是否为清晰图像。其中,在确定第一图像为清晰图像时控制分拣单元130进行货物分拣;或者在确定第一图像不是清晰图像时,控制摄像头110重新采集第一图像。以此方式,可以有效识别摄像头110采集的图像是否为正常的清晰图像,从而提到自动分拣机器人100分拣货物的效率。The processor 120 can execute the image recognition method according to the embodiment of the present disclosure to identify whether the first image is a clear image. When the first image is determined to be a clear image, the sorting unit 130 is controlled to sort the goods; or when the first image is determined not to be a clear image, the camera 110 is controlled to re-capture the first image. In this way, it is possible to effectively identify whether the image captured by the camera 110 is a normal clear image, thereby improving the efficiency of the automatic sorting robot 100 in sorting goods.
处理器120可以执行根据本公开实施例的图像识别方法。首先获取第一图像。然后通过对第一图像的处理获得第一图像的清晰度。接着当第一图像的清晰度大于模糊阈值时,确定第一图像为清晰图像;或者,当第一图像的清晰度小于或等于模糊阈值时,确定第一图像为模糊图像其中。其中,模糊阈值为基于M个第二图像的清晰度的分布情况确定的。其中,M个第二图像与第一图像为针对同一场景拍摄的图像,例如,该M个第二图像是摄像头110在一段历史时期内在货物分拣过程中拍摄所得的所有图像。。The processor 120 may execute the image recognition method according to the embodiment of the present disclosure. First, a first image is acquired. Then, the clarity of the first image is obtained by processing the first image. Then, when the clarity of the first image is greater than a blur threshold, the first image is determined to be a clear image; or, when the clarity of the first image is less than or equal to the blur threshold, the first image is determined to be a blur image. The blur threshold is determined based on the distribution of the clarity of the M second images. The M second images and the first image are images taken for the same scene. For example, the M second images are all images taken by the camera 110 during the cargo sorting process within a historical period.
图2示意性示出了根据本公开一实施例的图像识别方法200的流程图。FIG. 2 schematically shows a flow chart of an image recognition method 200 according to an embodiment of the present disclosure.
如图2所示,该图像识别方法200可以包括操作S210~操作S230。As shown in FIG. 2 , the image recognition method 200 may include operations S210 to S230 .
在操作S210,获取第一图像。例如摄像头110采集第一图像;或者,例如从数据库或者云端下载第一图像。In operation S210, a first image is acquired. For example, the camera 110 captures the first image; or, for example, the first image is downloaded from a database or a cloud.
在操作S220,获得第一图像的清晰度。In operation S220, the definition of the first image is obtained.
在操作S230,当第一图像的清晰度大于模糊阈值时,确定第一图像为清晰图像;其中,模糊阈值为基于M个第二图像的清晰度的分布情况确定的;其中,M个第二图像与第一图像为针对同一场景拍摄的图像,M为大于1的整数。In operation S230, when the clarity of the first image is greater than a blur threshold, the first image is determined to be a clear image; wherein the blur threshold is determined based on the distribution of the clarity of M second images; wherein the M second images and the first image are images taken for the same scene, and M is an integer greater than 1.
根据本公开的实施例,在获取M个第二图像之前,可以将第一图像作为一个第二图像,以扩充M个第二图像。例如,在自动分拣机器人100通过摄像头110采集到第一图像后,可以将第一图像实时更新到M个第二图像中,从而可以实时统计摄像头采集的图像的清晰度分布,从而可以实时更新该模糊阈值。According to an embodiment of the present disclosure, before acquiring the M second images, the first image can be used as a second image to expand the M second images. For example, after the automatic sorting robot 100 acquires the first image through the camera 110, the first image can be updated to the M second images in real time, so that the clarity distribution of the image acquired by the camera can be counted in real time, and the blur threshold can be updated in real time.
图像的清晰度计算可以通过诸如Brenner梯度函数、灰度方差函数、熵函数等任意算法计算得到。The image clarity can be calculated using any algorithm such as Brenner gradient function, grayscale variance function, entropy function, etc.
根据本公开一实施例,可以使用图像像素矩阵进行拉普拉斯变化后的方差作为指标,衡量图像的清晰度。According to an embodiment of the present disclosure, the variance of the image pixel matrix after Laplace transformation can be used as an indicator to measure the clarity of the image.
具体地,第一图像和M个第二图像中的每个图像的清晰度是通过如下方式获得的:对图像进行拉普拉斯变换,得到图像对应的像素矩阵;计算组成像素矩阵的所有元素的方差;以及以方差作为图像的清晰度。Specifically, the clarity of the first image and each of the M second images is obtained by: performing Laplace transform on the image to obtain a pixel matrix corresponding to the image; calculating the variance of all elements constituting the pixel matrix; and using the variance as the clarity of the image.
例如,对于图像中任意一个位置(x,y)的像素值可以表示为离散函数f(x,y)。通过Laplacian变换,可以得到图像中(x,y)位置处的二阶导数,如式(1):For example, the pixel value at any position (x, y) in the image can be expressed as a discrete function f(x, y). Through Laplacian transformation, the second-order derivative at the position (x, y) in the image can be obtained, as shown in formula (1):
对于图像中除了边缘像素外的任意位置(x,y),都可以通过式(1)变换得到该位置的二阶导数值。从而,相应得到该图像对应的像素矩阵,其中该像素矩阵可以不包含图像的边缘像素的二阶导。For any position (x, y) in the image except for edge pixels, the second-order derivative value of the position can be obtained by transformation using formula (1). Thus, the pixel matrix corresponding to the image is obtained, wherein the pixel matrix may not contain the second-order derivative of the edge pixels of the image.
根据本公开的实施例,可以在按照式(1)对图像进行拉普拉斯变化前,对图像进行高斯滤波,和/或将图像转换为灰度图像,可以减少计算对图像处理过程的计算量。According to an embodiment of the present disclosure, before performing Laplace transform on the image according to equation (1), Gaussian filtering can be performed on the image, and/or the image can be converted into a grayscale image, which can reduce the amount of calculation for the image processing process.
根据本公开的实施例,可以根据拍摄的同一场景下、相似程度较大的大量图像的清晰度分布情况,得到区分图像是清晰图像还是模糊图像的模糊阈值,以此可以有效的识别图像是否为清晰图像,提供了一种有效的识别图像是否清晰的手段。According to the embodiments of the present disclosure, a blur threshold for distinguishing whether an image is a clear image or a blurred image can be obtained based on the clarity distribution of a large number of images with a high degree of similarity taken in the same scene. This can effectively identify whether the image is a clear image, providing an effective means for identifying whether an image is clear.
图3示意性示出了根据本公开另一实施例的图像识别方法300的流程图。FIG3 schematically shows a flow chart of an image recognition method 300 according to another embodiment of the present disclosure.
如图3所示,结合图2,根据本公开实施例的图像识别方法300是在方法200的基础上,进一步包括操作S340~操作S360,其中,通过操作S340~操作S360确定出模糊阈值。As shown in FIG. 3 , in combination with FIG. 2 , the image recognition method 300 according to the embodiment of the present disclosure is based on the method 200 and further includes operations S340 to S360 , wherein the blur threshold is determined through operations S340 to S360 .
在操作S340,获取M个第二图像。例如,获取摄像头110在一段历史时期内采集的所有图像。In operation S340 , M second images are acquired. For example, all images collected by the camera 110 within a historical period are acquired.
在操作S350,获得每个第二图像的清晰度。清晰度的计算参考上述内容,此处不再赘述。In operation S350, the definition of each second image is obtained. The calculation of the definition is referred to above and will not be repeated here.
在操作S360,基于M个第二图像的清晰度的分布情况确定模糊阈值。In operation S360, a blur threshold is determined based on a distribution of the sharpness of the M second images.
理论而言,模糊图像和清晰图像都可以认为以各自的清晰度均值为中心呈正态分布,从而可以以将M个第二图像的清晰度的分布划分为两个不同的正态分布的清晰度值作为模糊阈值。Theoretically, both the blurred image and the clear image can be considered to be normally distributed with their respective clarity means as the center, so the clarity distribution of the M second images can be divided into two different normally distributed clarity values as blur thresholds.
图4示意性示出了根据本公开再一实施例的图像识别方法中确定模糊阈值的流程图。FIG. 4 schematically shows a flow chart of determining a blur threshold in an image recognition method according to yet another embodiment of the present disclosure.
如图4所示,结合图3,根据本公开实施例的图像识别方法400是在方法300的基础上,将操作S360进一步实现为操作S461~操作S463。As shown in FIG. 4 , in combination with FIG. 3 , the image recognition method 400 according to the embodiment of the present disclosure is based on the method 300 , and operation S360 is further implemented as operations S461 to S463 .
在操作S461,生成M个第二图像的清晰度的分布直方图。分布直方图横轴是每个图像的清晰度的值,例如,将清晰度从最小到最大形成横轴。纵轴是清晰度的各个取值的出现频次或频率。理论上来说,模糊图像和清晰图像会以各自的清晰度均值为中心服从正态分布,从而分布直方图会呈现双峰特性,即具有两个波峰。In operation S461, a distribution histogram of the sharpness of the M second images is generated. The horizontal axis of the distribution histogram is the value of the sharpness of each image, for example, the sharpness is formed from the minimum to the maximum. The vertical axis is the frequency of occurrence or frequency of each value of the sharpness. In theory, the blurred image and the sharp image will follow a normal distribution with their respective sharpness means as the center, so that the distribution histogram will show a bimodal characteristic, that is, it has two peaks.
在操作S462,对分布直方图进行梯度检测,确定波谷的位置。波谷的梯度逼近零,波谷的左侧梯度为负,波谷的右侧梯度为正值,以此确定出波谷位置。In operation S462, the distribution histogram is subjected to gradient detection to determine the position of the trough. The gradient of the trough approaches zero, the gradient on the left side of the trough is negative, and the gradient on the right side of the trough is positive, thereby determining the position of the trough.
在操作S463,以波谷的位置对应的清晰度值,作为模糊阈值。In operation S463, the clarity value corresponding to the position of the trough is used as a blur threshold.
例如,若是以清晰度从最小到最大形成横轴,那么在分布直方图中波谷位置左侧为模糊图像的清晰度分布,波谷位置右侧为正常清晰图像的清晰度分布。从而通过波谷位置对应的清晰度,可以将模糊图像和正常清晰图像区分为两个不同的分布。For example, if the horizontal axis is formed by the clarity from minimum to maximum, then the left side of the trough position in the distribution histogram is the clarity distribution of the blurred image, and the right side of the trough position is the clarity distribution of the normal clear image. Therefore, the blurred image and the normal clear image can be distinguished as two different distributions through the clarity corresponding to the trough position.
图5示意性示出了根据本公开实施例的图像识别方法的一个应用实例500。FIG. 5 schematically shows an application example 500 of the image recognition method according to an embodiment of the present disclosure.
如图5所示,该应用实例500可以包括步骤S501~步骤S508。As shown in FIG. 5 , the application example 500 may include steps S501 to S508 .
步骤S501,收集自动分拣机器人100拾取物体时摄像头110采集的图像。Step S501 , collecting images captured by the camera 110 when the automatic sorting robot 100 picks up an object.
步骤S502,固定将待检测图像(即,本文中的第一图像)固定为像素数为742*742。图像的像素数与摄像头以及后续数据处理有关,此处的742*742仅为示例。Step S502: fix the pixel number of the image to be detected (ie, the first image in this article) to 742*742. The pixel number of the image is related to the camera and subsequent data processing, and 742*742 here is only an example.
步骤S503,通过高斯滤波等处理方法,除去待检测图像的高斯噪声。Step S503: remove Gaussian noise of the image to be detected by using a processing method such as Gaussian filtering.
步骤S504,将待检测图像转换成灰度图像,以减小每张图片在检测过程中的计算量。Step S504: convert the image to be detected into a grayscale image to reduce the amount of calculation for each image during the detection process.
步骤S505,对待检测图像进行拉普拉斯Laplacian变换,得到新的像素矩阵。并计算该像素矩阵的方差,以该方差记为图像的清晰度。Step S505: Perform Laplace transformation on the image to be detected to obtain a new pixel matrix, and calculate the variance of the pixel matrix, which is recorded as the clarity of the image.
步骤S506,计算收集的同一场景下的大量图像(即,本文中的M个第二图像)的清晰度,并生成具有双峰特性的分布直方图。Step S506, calculating the clarity of a large number of images (ie, M second images in this article) collected under the same scene, and generating a distribution histogram with a bimodal characteristic.
步骤S507,对分布直方图进行梯度检测,确定波谷的位置,并设为该组图像的模糊阈值。其中,波谷的梯度逼近零,波谷的左侧梯度为负,波谷的右侧梯度为正值。Step S507, perform gradient detection on the distribution histogram, determine the position of the trough, and set it as the blur threshold of the group of images. The gradient of the trough is close to zero, the gradient on the left side of the trough is negative, and the gradient on the right side of the trough is positive.
步骤S508,对待检测图像的清晰度进行判断。如果待检测图像的清晰度大于模糊阈值,则判定为清晰合格图像,否则按照模糊虚化图像处理。Step S508, the clarity of the image to be detected is judged. If the clarity of the image to be detected is greater than the blur threshold, it is judged as a clear qualified image, otherwise it is processed as a blurred image.
图6示意性示出了根据本公开实施例的图像识别装置600的框图。FIG. 6 schematically shows a block diagram of an image recognition device 600 according to an embodiment of the present disclosure.
如图6所示,根据本公开实施例的图像识别装置600包括图像获取模块610、清晰度获得模块620、以及第一确定模块630。根据本公开另一实施例,该图像识别装置600还可以进一步包括第二确定模块640。该装置600可以实现参考图2~图5所描述的图像识别方法。该装置600可以设置于自动分拣机器人100中;例如,设置于处理器120中;或者部分设置于处理器120、以及部分设置于摄像头110中。As shown in FIG6 , the image recognition device 600 according to an embodiment of the present disclosure includes an image acquisition module 610, a clarity acquisition module 620, and a first determination module 630. According to another embodiment of the present disclosure, the image recognition device 600 may further include a second determination module 640. The device 600 may implement the image recognition method described with reference to FIGS. 2 to 5 . The device 600 may be disposed in the automatic sorting robot 100; for example, disposed in the processor 120; or partially disposed in the processor 120 and partially disposed in the camera 110.
图像获取模块610用于获取第一图像。The image acquisition module 610 is used to acquire a first image.
清晰度获得模块620用于获得第一图像的清晰度。根据本公开一实施例,清晰度获得模块620用于通过如下方式获得的第一图像和M个第二图像中的每个图像的清晰度;首先对图像进行拉普拉斯变换,得到图像对应的像素矩阵;然后计算组成像素矩阵的所有元素的方差;最后以方差作为图像的清晰度。根据本公开另一实施例,清晰度获得模块620还用于在对图像进行拉普拉斯变换之前,对图像进行高斯滤波,和/或将图像转换为灰度图像。The clarity acquisition module 620 is used to obtain the clarity of the first image. According to one embodiment of the present disclosure, the clarity acquisition module 620 is used to obtain the clarity of each of the first image and the M second images in the following manner: first, Laplace transform the image to obtain the pixel matrix corresponding to the image; then calculate the variance of all elements constituting the pixel matrix; and finally use the variance as the clarity of the image. According to another embodiment of the present disclosure, the clarity acquisition module 620 is also used to perform Gaussian filtering on the image before performing Laplace transform on the image, and/or convert the image into a grayscale image.
第一确定模块630用于当第一图像的清晰度大于模糊阈值时,确定第一图像为清晰图像;其中,模糊阈值为基于M个第二图像的清晰度的分布情况确定的;其中,M个第二图像与第一图像为针对同一场景拍摄的图像。The first determination module 630 is used to determine that the first image is a clear image when the clarity of the first image is greater than a blur threshold; wherein the blur threshold is determined based on the distribution of the clarity of M second images; wherein the M second images and the first image are images taken for the same scene.
根据本公开一实施例,图像获取模块610还用于获取M个第二图像。According to an embodiment of the present disclosure, the image acquisition module 610 is further configured to acquire M second images.
清晰度获得模块620还用于获得每个第二图像的清晰度。The definition obtaining module 620 is further used to obtain the definition of each second image.
第二确定模块640用于基于M个第二图像的清晰度的分布情况确定模糊阈值。The second determination module 640 is used to determine a blur threshold based on the distribution of the sharpness of the M second images.
根据本公开一实施例,第二确定模块640包括分布直方图生成子模块641、梯度检测子模块642、以及阈值确定子模块643。According to an embodiment of the present disclosure, the second determination module 640 includes a distribution histogram generation submodule 641 , a gradient detection submodule 642 , and a threshold determination submodule 643 .
分布直方图生成子模块641用于生成M个第二图像的清晰度的分布直方图。The distribution histogram generation submodule 641 is used to generate a distribution histogram of the sharpness of the M second images.
梯度检测子模块642用于对分布直方图进行梯度检测,确定波谷的位置。The gradient detection submodule 642 is used to perform gradient detection on the distribution histogram to determine the location of the trough.
阈值确定子模块643用于以波谷的位置对应的清晰度值,作为模糊阈值。The threshold determination submodule 643 is used to use the clarity value corresponding to the position of the trough as the blur threshold.
根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
例如,图像获取模块610、清晰度获得模块620、第一确定模块630、第二确定模块640、分布直方图生成子模块641、梯度检测子模块642、以及阈值确定子模块643中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,图像获取模块610、清晰度获得模块620、第一确定模块630、第二确定模块640、分布直方图生成子模块641、梯度检测子模块642、以及阈值确定子模块643中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,图像获取模块610、清晰度获得模块620、第一确定模块630、第二确定模块640、分布直方图生成子模块641、梯度检测子模块642、以及阈值确定子模块643中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。For example, any multiple of the image acquisition module 610, the clarity acquisition module 620, the first determination module 630, the second determination module 640, the distribution histogram generation submodule 641, the gradient detection submodule 642, and the threshold determination submodule 643 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the image acquisition module 610, the clarity acquisition module 620, the first determination module 630, the second determination module 640, the distribution histogram generation submodule 641, the gradient detection submodule 642, and the threshold determination submodule 643 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the image acquisition module 610, the clarity acquisition module 620, the first determination module 630, the second determination module 640, the distribution histogram generation submodule 641, the gradient detection submodule 642, and the threshold determination submodule 643 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
图7示意性示出了适于实现根据本公开实施例的图像识别方法的电子设备700的方框图。图7示出的电子设备700仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Fig. 7 schematically shows a block diagram of an electronic device 700 suitable for implementing the image recognition method according to an embodiment of the present disclosure. The electronic device 700 shown in Fig. 7 is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
如图7所示,根据本公开实施例的电子设备700包括处理器701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。处理器701例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器701还可以包括用于缓存用途的板载存储器。处理器701可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG7 , the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and/or a related chipset and/or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
在RAM 703中,存储有电子设备700操作所需的各种程序和数据。处理器701、ROM702以及RAM 703通过总线704彼此相连。处理器701通过执行ROM 702和/或RAM 703中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 702和RAM 703以外的一个或多个存储器中。处理器701也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and/or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
根据本公开的实施例,电子设备700还可以包括输入/输出(I/O)接口705,输入/输出(I/O)接口705也连接至总线704。电子设备700还可以包括连接至I/O接口705的以下部件中的一项或多项:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。According to an embodiment of the present disclosure, the electronic device 700 may further include an input/output (I/O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读存储介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被处理器701执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and/or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium, which may be included in the device/apparatus/system described in the above embodiments; or may exist independently without being assembled into the device/apparatus/system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算机可读存储介质可以包括上文描述的ROM 702和/或RAM 703和/或ROM 702和RAM 703以外的一个或多个存储器。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or RAM 703 described above and/or one or more memories other than ROM 702 and RAM 703.
本公开的实施例还包括一种计算机程序产品,其包括计算机程序,该计算机程序包含用于执行本公开实施例所提供的方法的程序代码,当计算机程序产品在电子设备上运行时,该程序代码用于使电子设备实现本公开实施例所提供的图像识别方法。An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the image recognition method provided by the embodiment of the present disclosure.
在该计算机程序被处理器701执行时,执行本公开实施例的系统/装置中限定的上述功能。根据本公开的实施例,上文描述的系统、装置、模块、单元等可以通过计算机程序模块来实现。When the computer program is executed by the processor 701, the above functions defined in the system/device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
在一种实施例中,该计算机程序可以依托于光存储器件、磁存储器件等有形存储介质。在另一种实施例中,该计算机程序也可以在网络介质上以信号的形式进行传输、分发,并通过通信部分709被下载和安装,和/或从可拆卸介质711被安装。该计算机程序包含的程序代码可以用任何适当的网络介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and/or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
根据本公开的实施例,可以以一种或多种程序设计语言的任意组合来编写用于执行本公开实施例提供的计算机程序的程序代码,具体地,可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。程序设计语言包括但不限于诸如Java,C++,python,“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。It will be appreciated by those skilled in the art that the features described in the various embodiments and/or claims of the present disclosure may be combined and/or combined in a variety of ways, even if such combinations and/or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and/or claims of the present disclosure may be combined and/or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and/or combinations fall within the scope of the present disclosure.
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure are described above. However, these embodiments are only for the purpose of illustration and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110010444.3A CN113763311B (en) | 2021-01-05 | 2021-01-05 | Image recognition method and device and automatic sorting robot |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110010444.3A CN113763311B (en) | 2021-01-05 | 2021-01-05 | Image recognition method and device and automatic sorting robot |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113763311A CN113763311A (en) | 2021-12-07 |
| CN113763311B true CN113763311B (en) | 2024-07-23 |
Family
ID=78786268
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110010444.3A Active CN113763311B (en) | 2021-01-05 | 2021-01-05 | Image recognition method and device and automatic sorting robot |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113763311B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114723721B (en) * | 2022-04-18 | 2025-10-03 | 贝壳找房(北京)科技有限公司 | Image clarity determination method, system and image uploading method |
| CN115100059A (en) * | 2022-06-23 | 2022-09-23 | 国网山东省电力公司青岛供电公司 | A clear image acquisition method and system for visual monitoring of power transmission |
| CN118918109B (en) * | 2024-10-10 | 2024-12-27 | 杭州希诺智能医学有限公司 | Image definition data processing method and device and electronic equipment |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106570028A (en) * | 2015-10-10 | 2017-04-19 | 比亚迪股份有限公司 | Mobile terminal, fuzzy image deletion method and fuzzy picture deletion device |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8532421B2 (en) * | 2010-11-12 | 2013-09-10 | Adobe Systems Incorporated | Methods and apparatus for de-blurring images using lucky frames |
| US20140307950A1 (en) * | 2013-04-13 | 2014-10-16 | Microsoft Corporation | Image deblurring |
| CN107240078A (en) * | 2017-06-06 | 2017-10-10 | 广州优创电子有限公司 | Lens articulation Method for Checking, device and electronic equipment |
| CN107493432B (en) * | 2017-08-31 | 2020-01-10 | Oppo广东移动通信有限公司 | Image processing method, image processing device, mobile terminal and computer readable storage medium |
| CN111131688B (en) * | 2018-10-31 | 2021-04-23 | Tcl科技集团股份有限公司 | Image processing method and device and mobile terminal |
| CN110705511A (en) * | 2019-10-16 | 2020-01-17 | 北京字节跳动网络技术有限公司 | Blurred image recognition method, device, equipment and storage medium |
| CN111080665B (en) * | 2019-12-31 | 2023-06-09 | 歌尔光学科技有限公司 | Image frame recognition method, device, equipment and computer storage medium |
-
2021
- 2021-01-05 CN CN202110010444.3A patent/CN113763311B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106570028A (en) * | 2015-10-10 | 2017-04-19 | 比亚迪股份有限公司 | Mobile terminal, fuzzy image deletion method and fuzzy picture deletion device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113763311A (en) | 2021-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113763311B (en) | Image recognition method and device and automatic sorting robot | |
| Ahmed | Comparative study among Sobel, Prewitt and Canny edge detection operators used in image processing | |
| CN111008961B (en) | A transmission line equipment defect detection method and system, equipment and medium thereof | |
| CN109241985B (en) | An image recognition method and device | |
| CN107507173B (en) | A no-reference sharpness assessment method and system for whole slice images | |
| CN113095438B (en) | Wafer defect classification method and device, system, electronic equipment and storage medium thereof | |
| JP7274885B2 (en) | Display device defect identification system and method | |
| Yu et al. | Efficient patch-wise non-uniform deblurring for a single image | |
| CN114169381A (en) | Image annotation method, device, terminal device and storage medium | |
| Selvakumar et al. | The performance analysis of edge detection algorithms for image processing | |
| WO2017120796A1 (en) | Pavement distress detection method and apparatus, and electronic device | |
| CN111767915A (en) | License plate detection method, device, equipment and storage medium | |
| CN114596210A (en) | Noise estimation method, device, terminal equipment and computer readable storage medium | |
| CN112991374A (en) | Canny algorithm-based edge enhancement method, device, equipment and storage medium | |
| CN114943649A (en) | Image deblurring method, device and computer readable storage medium | |
| CN116402852A (en) | Dynamic high-speed target tracking method and device based on event camera | |
| CN108229583B (en) | Method and device for fast template matching based on main direction difference characteristics | |
| CN112233119A (en) | Workpiece defect quality inspection method, device and system | |
| CN115841632A (en) | Power transmission line extraction method and device and binocular ranging method | |
| CN114140481A (en) | Edge detection method and device based on infrared image | |
| CN117690120B (en) | Vehicle monitoring method and system for mobile equipment snapshot license plate | |
| CN108805033A (en) | Shooting image preferred method and device based on partial gradient distribution | |
| CN111213372B (en) | Evaluation of dynamic range of imaging device | |
| Weli et al. | Digital Image Noise Reduction Based on Proposed Smoothing and Sharpening Filters | |
| CN114677649A (en) | Image recognition method, apparatus, device and 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 |