WO2018053763A1 - Image identification method and device - Google Patents

Image identification method and device Download PDF

Info

Publication number
WO2018053763A1
WO2018053763A1 PCT/CN2016/099757 CN2016099757W WO2018053763A1 WO 2018053763 A1 WO2018053763 A1 WO 2018053763A1 CN 2016099757 W CN2016099757 W CN 2016099757W WO 2018053763 A1 WO2018053763 A1 WO 2018053763A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
value
pixel point
point
Prior art date
Application number
PCT/CN2016/099757
Other languages
French (fr)
Chinese (zh)
Inventor
张勇
刘磊
陈泽虹
赵东宁
陈剑勇
李岩山
Original Assignee
深圳大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳大学 filed Critical 深圳大学
Priority to PCT/CN2016/099757 priority Critical patent/WO2018053763A1/en
Publication of WO2018053763A1 publication Critical patent/WO2018053763A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Definitions

  • the invention belongs to the field of image recognition, and in particular relates to an image recognition method and device.
  • the number of people will use the head recognition technology to count the head after the identification.
  • the existing head recognition technology uses a color model to identify the head.
  • a large number of head samples need to be collected for learning, such as wearing, dressing, hairstyle, hat, and head ornament type.
  • the existing head recognition technology uses a color model to recognize the head image, such as colors that appear in the head or different dresses and hairstyles, which may lead to misjudgment and low accuracy of image recognition.
  • the invention provides an image recognition method and device, aiming at solving the problem of low image recognition accuracy.
  • An image recognition method includes: acquiring pixel points in an image to be recognized, when a pixel value of the pixel point is less than or equal to a plurality of pixel points in a preset area. Determining, in the pixel value, the pixel point as a target pixel point, wherein the preset area is an area centered on the pixel point, and the determined target pixel point constitutes a head in the image to be recognized The image of the area.
  • An image recognition apparatus includes: an acquisition module, a determination module, and a constituent module;
  • the determining module determines that the pixel is the target pixel, where
  • the preset area is an area centered on the pixel, and the constituent module forms an image of the head area in the image to be identified by the determined target pixel.
  • the present invention has the beneficial effects that: the present invention obtains a pixel point in an image to be identified, and when the pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area, determining the pixel The point is a target pixel, wherein the preset area is an area centered on the pixel point, and the determined target pixel point constitutes an image of the head area in the image to be recognized.
  • the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
  • FIG. 1 is a schematic flowchart of an implementation of an image recognition method according to a first embodiment of the present invention
  • FIG. 2 is a schematic flowchart showing an implementation of an image recognition method according to a second embodiment of the present invention
  • FIG. 5 is a schematic diagram of an image recognition apparatus according to a third embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an image recognition method according to a fourth embodiment of the present invention.
  • the head region image recognition method provided by the embodiment of the present invention can be applied to all terminals having a display function such as a camera, a television, a display imaging device, and the like.
  • FIG. 1 is a schematic flowchart of an image recognition method according to a first embodiment of the present invention, which can be applied to all display image devices having a display function.
  • the image processing method shown in FIG. 1 mainly includes the following steps:
  • the image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
  • the target pixel is a pixel in the head region.
  • the preset area is an area centered on the pixel, and the preset area may be a regular pattern such as a circle, a square or an ellipse, or may be a circular circumference, a square side length or an elliptical circumference.
  • the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object.
  • the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identifies the pixel values of other areas displayed in the image.
  • the pixel point in the image to be identified is obtained.
  • the pixel point is determined as the target pixel point, where
  • the preset area is an area centered on the pixel point, and the determined target pixel point constitutes an image of the head area in the image to be recognized.
  • the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
  • FIG. 2 is a schematic flowchart of an implementation of an image recognition method according to a second embodiment of the present invention, which can be applied to all display image devices having a display function.
  • the image recognition method shown in FIG. 2 mainly includes the following steps:
  • the image to be recognized is an image captured by a depth camera or a somatosensory camera for recognizing a head region, and the image may be a certain frame image in the video captured by the depth camera.
  • the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object. Since the head area is closest to the camera when standing, the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identifies the pixel values of other areas displayed in the image.
  • FIG. 3 is an image to be recognized, wherein the pixel points in the line segment AD shown in FIG. 3 include pixel points in the head region image and the shoulder region image, that is, the pixel points in the line segment AB and the line segment CD are shoulder regions.
  • the pixel in the line segment BC is the pixel point in the head region.
  • Fig. 4 shows a pixel value variation curve of pixel points in the line segment AD in the image to be recognized, wherein A', B', C', D' correspond to A, B, C, D, respectively.
  • the pixel points in the line segment BC are the pixel points in the head region
  • the pixel points in the line segment AB and the line segment CD are the shoulder region pixel points.
  • the pixel values of the pixel points in the line segment B'C' are smaller than the pixel values of the pixel points in the line segment A'B' and the line segment C'D'.
  • point K be any pixel point acquired in the image to be recognized.
  • a preset number of pixel points are respectively selected at both ends of the point K to form a first pixel point set and a second pixel point set.
  • This preset number can be customized.
  • the line segment length value of the pixel points in the first pixel point set or the second pixel point set is a value of an adult head radius.
  • the position of the pixel point that is, the position in the line segment AD of the point K, as shown in FIG. 3, can be determined.
  • the magnitude of the absolute value of the difference and the position of the point K are analyzed as follows:
  • the preset value can be customized according to the above calculated absolute value, ensuring that point K is in line segment B'C' or near point B' or point C', when point K is in line segment B'C' or in In the vicinity of the point B' or the point C', it is determined that the point K is the center point of the preset area, so that, on the one hand, the calculation amount of the pixel value of the pixel point and the pixel value of the pixel point in the preset area can be reduced; On the other hand, the determination range of the target pixel point can be narrowed, and the recognition efficiency can be improved.
  • S205 detects a diameter of a head region in the acquired plurality of image samples
  • the diameter of the head region in the plurality of image samples is detected by an image processing tool such as AutoCAD or Photoshop.
  • the circular area is used as the preset area.
  • the target pixel is the pixel of the overhead image. Specifically, when the pixel value of the pixel is less than or equal to the pixel value of the plurality of pixels in the circular area, the pixel is determined to be the target pixel, wherein the number of the plurality of pixels can be customized. Preferably, when the pixel value of the pixel point is less than or equal to the pixel value of the plurality of pixel points in the circumference of the circular area, determining the pixel point as the target pixel point,
  • FIG. 4 is taken as an example.
  • the pixel value of the pixel where the point K is located is less than or equal to the pixel value of the pixel in the circle, and when the point K is When the line segment A'D' or the line segment C'D', the circumference and the line segment B' C' has an intersection point.
  • the pixel value of the pixel at which the point K is located is larger than the pixel value of the pixel at which the intersection is located. In this way, it is only necessary to determine that the pixel value of K is smaller than the pixel value of a plurality of pixels in the circumference, and it can be determined that the pixel point where the point K is located is the target pixel point.
  • S2010 Form, by the determined target pixel, an image of a head region in the image to be identified.
  • an image containing a plurality of head regions in the image to be identified may appear, and the images are identified according to the methods of steps S201-S209, and combined according to the determined target pixel points, images of the plurality of head regions may appear. And the statistics of the identified head area image are obtained, and finally the number of people can be obtained.
  • the pixel points in the image to be identified are obtained, and according to the arrangement order of the pixel points in the image to be identified, a preset number of pixel points are respectively selected on both sides of the pixel point to form a first pixel point set.
  • a second pixel point set the pixel average value of the pixel point in the first pixel point set and the pixel average value of the pixel point in the second pixel point set are subtracted to obtain a difference, if the difference is If the absolute value is less than the preset value, determining that the pixel point is the center point of the preset area, detecting the diameter of the head region in the acquired plurality of image samples, calculating an average value of the diameter, and using the average value as a preset Length, taking the pixel as a center, determining a circular area by using a preset length as a radius, and using the circular area as the preset area, when the pixel value of the pixel is less than or equal to a plurality of pixels in the preset area
  • the pixel point is determined as a target pixel point, and the determined target pixel point constitutes an image of the head region in the image to be recognized.
  • FIG. 5 is a schematic structural diagram of an image recognition apparatus according to a third embodiment of the present invention.
  • the image recognition device illustrated in FIG. 5 may be an execution body of the image recognition method provided by the foregoing embodiments shown in FIGS. 1 and 2, and may be one of the image recognition device or the image recognition device.
  • the image recognition apparatus illustrated in FIG. 5 mainly includes an acquisition module 31, a determination module 32, and a constituent module 33. The above functional modules are described in detail as follows:
  • An obtaining module 31 configured to acquire a pixel in the image to be identified
  • the image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
  • the determining module 32 is configured to determine that the pixel point is a target pixel point when a pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area;
  • the target pixel is a pixel in the head region.
  • the preset area is an area centered on the pixel, and the preset area may be a regular pattern such as a circle, a square, or an ellipse.
  • the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object.
  • the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identify pixel values of other parts displayed in the image.
  • the constituting module 33 is configured to form an image of the head region in the image to be identified by the determined target pixel.
  • the obtaining module 31 acquires a pixel in the image to be identified.
  • the determining module 32 determines the pixel. And being a target pixel, wherein the preset area is an area centered on the pixel, and the forming module 33 forms an image of the head area in the image to be identified by the determined target pixel.
  • the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
  • FIG. 6 is a schematic structural diagram of an image recognition apparatus according to a fourth embodiment of the present invention.
  • the image recognition device illustrated in FIG. 6 may be an execution body of the image recognition method provided by the foregoing embodiment shown in FIGS. 1 and 2, and may be a control module of the image recognition device or the image recognition device.
  • the image recognition apparatus illustrated in FIG. 6 mainly includes an acquisition module 41, a formation module 42, a calculation module 43, a detection module 44, a determination module 45, and a configuration module 46.
  • the above functional modules are described in detail as follows:
  • An obtaining module 41 configured to acquire a pixel point in the image to be identified
  • the image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
  • the forming module 42 is configured to select a preset number of pixel points on both sides of the pixel point according to an arrangement order of the pixel points in the image to be identified, to form a first pixel point set and a second pixel point set;
  • the calculating module 43 is configured to perform subtraction between the pixel average value of the pixel point in the first pixel point set and the pixel average value of the pixel point in the second pixel point set to obtain a difference value;
  • a detecting module 44 configured to detect a diameter of a head region in the acquired plurality of image samples
  • the calculating module 43 is configured to calculate an average value of the diameter, and use the average value as a preset length;
  • a determining module 45 configured to determine that the pixel point is a target pixel point when a pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area;
  • the preset area is a preset area centered on the pixel.
  • the target pixel is the pixel of the overhead image.
  • the determining unit 45 is further configured to: if the absolute value of the difference is less than a preset value, determine that the pixel point is a center point of the preset area;
  • the determining module 45 is further configured to determine a circular area by using the pixel as a center and a preset length as a radius;
  • the determining module 45 is further configured to use the circular area as the preset area.
  • the constituting module 46 is configured to form an image of the head region in the image to be identified by the determined target pixel.
  • the acquiring module 41 acquires the pixel points in the image to be identified, and the forming module 42 selects a preset number of pixel points on both sides of the pixel according to the order of the pixels in the image to be recognized. Forming a first set of pixel points and a second set of pixel points, and the calculating module 43 performs a subtraction between a pixel average value of the pixel points in the first pixel point set and a pixel average value of the pixel points in the second pixel point set, Obtaining a difference.
  • the determining module 45 determines that the pixel is the center point of the preset area, and the detecting module 44 detects the diameter of the head area in the acquired plurality of image samples.
  • the calculating module 43 calculates an average value of the diameter, and uses the average value as a preset length.
  • the determining module 45 takes the pixel as a center and determines a circular area by using a preset length as a radius. The determining module 45 uses the circular area as the circular area.
  • the determining module 45 determines that the pixel is the target pixel, and constitutes Block 46 in the image of the image to be recognized by the head region constituting the target pixel is determined. In this way, it is only necessary to compare the pixel value of a single pixel with the pixel value of a plurality of pixels to determine the pixel of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication link shown or discussed may be an indirect coupling or communication link through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.

Abstract

An image identification method, comprising: acquiring a pixel of an image to be identified; if a pixel value of the pixel is less than or equal to pixel values of multiple pixels in a predetermined region, then determining that the pixel is a target pixel, wherein the predetermined region is a region having the pixel as a center point; and forming, by means of the determined target pixel, an image of a head region in the image to be identified.

Description

一种图像识别方法和装置 Image recognition method and device 技术领域Technical field
本发明属于图像识别领域,尤其涉及一种图像识别方法和装置。  The invention belongs to the field of image recognition, and in particular relates to an image recognition method and device.
背景技术Background technique
随着城市化的日益加剧,城市人口持续膨胀,群体的活动的与日俱增,人群的安全问题已经成为社会性问题,所以人数统计成为研究的热点。With the increasing urbanization, the urban population continues to expand, the activities of the group are increasing day by day, and the safety of the population has become a social problem, so the number of people has become a research hotspot.
通常,人数统计会采用头部识别的技术对头部识别后进行统计。现有的头部识别技术采用颜色模型对头部进行识别,在前期的准备工作中,需要采集大量的头部样本进行学习,如穿着、装扮、发型、帽子以及头部装饰品的类型。Usually, the number of people will use the head recognition technology to count the head after the identification. The existing head recognition technology uses a color model to identify the head. In the preliminary preparation work, a large number of head samples need to be collected for learning, such as wearing, dressing, hairstyle, hat, and head ornament type.
现有的头部识别技术利用颜色模型对头部图像进行识别,如出现于头部相近的颜色或者不同的装扮、发型,会导致误判,对图像识别的精度低。The existing head recognition technology uses a color model to recognize the head image, such as colors that appear in the head or different dresses and hairstyles, which may lead to misjudgment and low accuracy of image recognition.
技术问题technical problem
本发明提供一种图像识别方法和装置,旨在解决对图像识别精度低的问题。 The invention provides an image recognition method and device, aiming at solving the problem of low image recognition accuracy.
技术解决方案Technical solution
为解决上述技术问题,本发明是这样实现的,一种图像识别方法,包括:获取待识别图像中的像素点,当所述像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定所述像素点为目标像素点,其中,所述预置区域为以所述像素点为中心点的区域,通过确定的所述目标像素点构成所述待识别图像中头部区域的图像。In order to solve the above technical problem, the present invention is implemented as follows. An image recognition method includes: acquiring pixel points in an image to be recognized, when a pixel value of the pixel point is less than or equal to a plurality of pixel points in a preset area. Determining, in the pixel value, the pixel point as a target pixel point, wherein the preset area is an area centered on the pixel point, and the determined target pixel point constitutes a head in the image to be recognized The image of the area.
一种图像识别装置,包括:获取模块、确定模块和构成模块;An image recognition apparatus includes: an acquisition module, a determination module, and a constituent module;
获取模块获取待识别图像中的像素点,当所述像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定模块确定所述像素点为目标像素点,其中,所述预置区域为以所述像素点为中心点的区域,构成模块通过确定的所述目标像素点构成所述待识别图像中头部区域的图像。Obtaining, by the module, the pixel in the image to be identified, when the pixel value of the pixel is less than or equal to the pixel value of the plurality of pixels in the preset area, the determining module determines that the pixel is the target pixel, where The preset area is an area centered on the pixel, and the constituent module forms an image of the head area in the image to be identified by the determined target pixel.
有益效果Beneficial effect
本发明与现有技术相比,有益效果在于:本发明获取待识别图像中的像素点,当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点,其中,该预置区域为以该像素点为中心点的区域,通过确定的该目标像素点构成该待识别图像中头部区域的图像。这样,只需对单个像素点的像素值与多个像素点的像素值进行比较即可确定头部区域像素点,不受行人的衣着、发型以及颜色的影响,提高了头部区域图像识别的精度。Compared with the prior art, the present invention has the beneficial effects that: the present invention obtains a pixel point in an image to be identified, and when the pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area, determining the pixel The point is a target pixel, wherein the preset area is an area centered on the pixel point, and the determined target pixel point constitutes an image of the head area in the image to be recognized. In this way, the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is some embodiments of the invention.
图1是本发明第一实施例提供的一种图像识别方法的实现流程示意图;1 is a schematic flowchart of an implementation of an image recognition method according to a first embodiment of the present invention;
图2是本发明第二实施例提供的一种图像识别方法的实现流程示意图;2 is a schematic flowchart showing an implementation of an image recognition method according to a second embodiment of the present invention;
图3是本发明第二实施例提供的待识别图像;3 is an image to be identified according to a second embodiment of the present invention;
图4是本发明第二实施例提供的待识别图像中的像素值变化曲线;4 is a pixel value change curve in an image to be recognized according to a second embodiment of the present invention;
图5是本发明第三实施例提供的一种图像识别装置的示意图;FIG. 5 is a schematic diagram of an image recognition apparatus according to a third embodiment of the present invention; FIG.
图6是本发明第四实施例提供的一种图像识别方法的示意图。FIG. 6 is a schematic diagram of an image recognition method according to a fourth embodiment of the present invention.
本发明的实施方式Embodiments of the invention
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而非全部实施例。基于本发明中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. The embodiments are merely a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供的头部区域图像识别方法可以应用于相机、电视机、显示器成像装置等所有具有显示功能的终端中。The head region image recognition method provided by the embodiment of the present invention can be applied to all terminals having a display function such as a camera, a television, a display imaging device, and the like.
请参阅图1,图1为本发明第一实施例提供的图像识别方法的实现流程示意图,可应用于所有具有显示功能的显示图像装置中,图1所示的图像处理方法主要包括以下步骤: Please refer to FIG. 1. FIG. 1 is a schematic flowchart of an image recognition method according to a first embodiment of the present invention, which can be applied to all display image devices having a display function. The image processing method shown in FIG. 1 mainly includes the following steps:
S101、获取待识别图像中的像素点;S101. Acquire a pixel in an image to be identified.
该待识别图像为利用深度摄像机或体感摄像拍摄的用于识别头部区域的图像,该图像可以为该深度摄像机拍摄的视频中的某一帧图像。The image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
S102、当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点;S102. When a pixel value of the pixel is less than or equal to a pixel value of a plurality of pixel points in the preset area, determining the pixel point as the target pixel point;
目标像素点为头部区域中的像素点。该预置区域为以该像素点为中心点的区域,该预置区域可以为圆形、正方形或椭圆形等规则图形,也可以为圆形的圆周、正方形边长或椭圆形圆周。利用深度摄像机或体感摄像机拍摄的图像中,某物体像素点的像素值与摄像头到该物体的距离成正比。因此,该待识别图像中的物体离摄像头越近,该物体的像素值越低。由于人站立时,头部区域离该摄像头的距离最近,因此,在该待识别图像中,头部区域像素点的像素值最小,即头部区域的像素点的像素值小于肩部、地面等待识别图像中显示的其它区域的像素值。The target pixel is a pixel in the head region. The preset area is an area centered on the pixel, and the preset area may be a regular pattern such as a circle, a square or an ellipse, or may be a circular circumference, a square side length or an elliptical circumference. In an image taken with a depth camera or a somatosensory camera, the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object. Since the head area is closest to the camera when standing, the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identifies the pixel values of other areas displayed in the image.
S103、通过确定的该目标像素点构成该待识别图像中头部区域的图像。S103. Form, by the determined target pixel, an image of a head region in the image to be identified.
本发明第一实施例中,获取待识别图像中的像素点,当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点,其中,该预置区域为以该像素点为中心点的区域,通过确定的该目标像素点构成该待识别图像中头部区域的图像。这样,只需对单个像素点的像素值与多个像素点的像素值进行比较即可确定头部区域像素点,不受行人的衣着、发型以及颜色的影响,提高了头部区域图像识别的精度。In the first embodiment of the present invention, the pixel point in the image to be identified is obtained. When the pixel value of the pixel point is less than or equal to the pixel value of the plurality of pixel points in the preset area, the pixel point is determined as the target pixel point, where The preset area is an area centered on the pixel point, and the determined target pixel point constitutes an image of the head area in the image to be recognized. In this way, the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
作为本发明的第二实施例,如图2至图3所示,图2为本发明第二实施例提供的图像识别方法的实现流程示意图,可应用于所有具有显示功能的显示图像装置中,图2所示的图像识别方法主要包括以下步骤:As shown in FIG. 2 to FIG. 3, FIG. 2 is a schematic flowchart of an implementation of an image recognition method according to a second embodiment of the present invention, which can be applied to all display image devices having a display function. The image recognition method shown in FIG. 2 mainly includes the following steps:
S201、获取待识别图像中的像素点;S201. Acquire pixel points in the image to be identified.
该待识别图像为利用深度摄像机或体感摄像机拍摄的用于识别头部区域的图像,该图像可以为该深度摄像机拍摄的视频中的某一帧图像。The image to be recognized is an image captured by a depth camera or a somatosensory camera for recognizing a head region, and the image may be a certain frame image in the video captured by the depth camera.
利用深度摄像机或体感摄像机拍摄的图像中,某物体像素点的像素值与摄像头到该物体的距离成正比。因此,该待识别图像中的物体离摄像头越近,该物体的像素值越低。由于人站立时,头部区域离该摄像头的距离最近,因此,在该待识别图像中,头部区域像素点的像素值最小,即头部区域的像素点的像素值小于肩部、地面等待识别图像中显示的其它区域的像素值。In an image taken with a depth camera or a somatosensory camera, the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object. Since the head area is closest to the camera when standing, the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identifies the pixel values of other areas displayed in the image.
具体的,图3为待识别图像,其中,图3示出的线段AD中的像素点包括头部区域图像和肩膀区域图像中的像素点,即线段AB和线段CD中的像素点为肩膀区域中的像素点,线段BC中的像素点为头部区域中的像素点。图4示出了待识别图像中线段AD中的像素点的像素值变化曲线,其中A’、B’、C’、D’分别对应A、B、C、D。由图3可知,线段BC中的像素点为头部区域像素点,线段AB和线段CD中的像素点为肩膀区域像素点。由图4中示出的像素值变化曲线可知,线段B’C’中的像素点的像素值均小于线段A’B’和线段C’D’中的像素点的像素值。设点K为在该待识别图像中获取的任意像素点。Specifically, FIG. 3 is an image to be recognized, wherein the pixel points in the line segment AD shown in FIG. 3 include pixel points in the head region image and the shoulder region image, that is, the pixel points in the line segment AB and the line segment CD are shoulder regions. The pixel in the line segment BC is the pixel point in the head region. Fig. 4 shows a pixel value variation curve of pixel points in the line segment AD in the image to be recognized, wherein A', B', C', D' correspond to A, B, C, D, respectively. As can be seen from FIG. 3, the pixel points in the line segment BC are the pixel points in the head region, and the pixel points in the line segment AB and the line segment CD are the shoulder region pixel points. As can be seen from the pixel value variation curve shown in Fig. 4, the pixel values of the pixel points in the line segment B'C' are smaller than the pixel values of the pixel points in the line segment A'B' and the line segment C'D'. Let point K be any pixel point acquired in the image to be recognized.
S202、按照该待识别图像中像素点的排列顺序,在该像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合;S202, selecting a preset number of pixel points on each side of the pixel point according to an arrangement order of pixel points in the image to be identified, to form a first pixel point set and a second pixel point set;
具体的,如图3,沿线段AD中像素点排列顺序,在点K的两端分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合。该预置数量可以进行自定义设置, 优选的,该第一像素点集合或第二像素点集合中像素点组成的线段长度数值为成年人头部半径的数值。Specifically, as shown in FIG. 3, along the order of pixel points in the line segment AD, a preset number of pixel points are respectively selected at both ends of the point K to form a first pixel point set and a second pixel point set. This preset number can be customized. Preferably, the line segment length value of the pixel points in the first pixel point set or the second pixel point set is a value of an adult head radius.
S203、对该第一像素点集合中像素点的像素平均值与该第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值;S203. Subtracting between a pixel average value of the pixel points in the first pixel point set and a pixel average value of the pixel point in the second pixel point set to obtain a difference value;
S204、若该差值的绝对值小于预置数值,则确定该像素点为该预置区域的中心点;S204. If the absolute value of the difference is less than a preset value, determine that the pixel point is a center point of the preset area;
通过判断该差值的绝对值小于该预置数值,可以确定该像素点的位置,即如图3所示的,点K在线段AD中的位置。对该差值的绝对值的大小与点K的位置进行分析,如下:By judging that the absolute value of the difference is less than the preset value, the position of the pixel point, that is, the position in the line segment AD of the point K, as shown in FIG. 3, can be determined. The magnitude of the absolute value of the difference and the position of the point K are analyzed as follows:
由图4示出的像素值变化曲线可知,点K在线段A’B’中时,点K与B’的距离越小,计算出的差值的绝对值越小;同理,点K在线段C’D’中时,点K与C’的距离越小,计算出的差值的绝对值越小;点K在线段B’C’中时,计算出的绝对值均小于点K在线段A’B’或线段C’D’中时计算出的绝对值。该预置数值可以按照上述计算出的绝对值进行自定义设置,确保点K在线段B’C’中或在点B’或点C’附近,当点K在线段B’C’中或在点B’或点C’附近,确定点K为预置区域的中心点,这样,一方面,可以减少该像素点的像素值与该预置区域中像素点的像素值比对的计算量;另一方面,可以缩小目标像素点的确定范围,提高识别效率。It can be seen from the pixel value variation curve shown in FIG. 4 that when the point K is in the line segment A'B', the smaller the distance between the points K and B' is, the smaller the absolute value of the calculated difference is. Similarly, the point K is online. In the segment C'D', the smaller the distance between the points K and C', the smaller the absolute value of the calculated difference; when the point K is in the line segment B'C', the calculated absolute value is smaller than the point K online. The absolute value calculated for the segment A'B' or the segment C'D'. The preset value can be customized according to the above calculated absolute value, ensuring that point K is in line segment B'C' or near point B' or point C', when point K is in line segment B'C' or in In the vicinity of the point B' or the point C', it is determined that the point K is the center point of the preset area, so that, on the one hand, the calculation amount of the pixel value of the pixel point and the pixel value of the pixel point in the preset area can be reduced; On the other hand, the determination range of the target pixel point can be narrowed, and the recognition efficiency can be improved.
S205检测获取的多个图像样本中头部区域的直径;S205 detects a diameter of a head region in the acquired plurality of image samples;
S206、计算该直径的平均值,并将该平均值作为预置长度;S206. Calculate an average value of the diameter, and use the average value as a preset length;
具体的,通过Auto CAD、Photoshop等图像处理工具检测多个图像样本中头部区域的直径。Specifically, the diameter of the head region in the plurality of image samples is detected by an image processing tool such as AutoCAD or Photoshop.
S207、以该像素点为圆心,以预置长度为半径确定圆形区域;S207: taking the pixel as a center and determining a circular area by using a preset length as a radius;
S208、将该圆形区域作为该预置区域;S208. The circular area is used as the preset area.
S209、当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点;S209, when the pixel value of the pixel is less than or equal to a pixel value of a plurality of pixel points in the preset area, determining the pixel point as the target pixel point;
该目标像素点为头顶图像的像素点。具体的,当该像素点的像素值小于或等于该圆形区域中多个像素点的像素值时,确定该像素点为目标像素点,其中,多个像素点的数量可以进行自定义设置。优选的,当该像素点的像素值小于或等于该圆形区域的圆周中多个像素点的像素值时,确定该像素点为目标像素点,The target pixel is the pixel of the overhead image. Specifically, when the pixel value of the pixel is less than or equal to the pixel value of the plurality of pixels in the circular area, the pixel is determined to be the target pixel, wherein the number of the plurality of pixels can be customized. Preferably, when the pixel value of the pixel point is less than or equal to the pixel value of the plurality of pixel points in the circumference of the circular area, determining the pixel point as the target pixel point,
具体的,以图4为例进行说明,当点K在线段B’C’中时,点K所在的像素点的像素值均小于或等于该圆周中的像素点的像素值,而当点K在线段A’D’或线段C’D’时,该圆周与线段B’ C’存在交点,此时,点K所在的像素点的像素值大于该交点所在的像素点的像素值。以此反推,只需确定K的像素值均小于该圆周中多个像素点的像素值,即可确定点K所在的像素点为目标像素点。Specifically, FIG. 4 is taken as an example. When the point K is in the line segment B′C′, the pixel value of the pixel where the point K is located is less than or equal to the pixel value of the pixel in the circle, and when the point K is When the line segment A'D' or the line segment C'D', the circumference and the line segment B' C' has an intersection point. At this time, the pixel value of the pixel at which the point K is located is larger than the pixel value of the pixel at which the intersection is located. In this way, it is only necessary to determine that the pixel value of K is smaller than the pixel value of a plurality of pixels in the circumference, and it can be determined that the pixel point where the point K is located is the target pixel point.
S2010、通过确定的该目标像素点构成该待识别图像中头部区域的图像。S2010. Form, by the determined target pixel, an image of a head region in the image to be identified.
在识别过程中,会出现待识别图像中包含多个头部区域的图像,按照步骤S201-S209的方法进行识别,并按照确定的目标像素点进行组合,即可出现多个头部区域的图像,并对识别后的头部区域图像进行统计,最终可得到人数。During the recognition process, an image containing a plurality of head regions in the image to be identified may appear, and the images are identified according to the methods of steps S201-S209, and combined according to the determined target pixel points, images of the plurality of head regions may appear. And the statistics of the identified head area image are obtained, and finally the number of people can be obtained.
本发明第二实施例中,获取待识别图像中的像素点,按照该待识别图像中像素点的排列顺序,在该像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合,对该第一像素点集合中像素点的像素平均值与该第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值,若该差值的绝对值小于预置数值,则确定该像素点为该预置区域的中心点,检测获取的多个图像样本中头部区域的直径,计算该直径的平均值,并将该平均值作为预置长度,以该像素点为圆心,以预置长度为半径确定圆形区域,将该圆形区域作为该预置区域,当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点,通过确定的该目标像素点构成该待识别图像中头部区域的图像。这样,只需对单个像素点的像素值与多个像素点的像素值进行比较即可确定头部区域的像素点,不受行人的衣着、发型以及颜色的影响,提高了头部区域图像识别的精度。In the second embodiment of the present invention, the pixel points in the image to be identified are obtained, and according to the arrangement order of the pixel points in the image to be identified, a preset number of pixel points are respectively selected on both sides of the pixel point to form a first pixel point set. And a second pixel point set, the pixel average value of the pixel point in the first pixel point set and the pixel average value of the pixel point in the second pixel point set are subtracted to obtain a difference, if the difference is If the absolute value is less than the preset value, determining that the pixel point is the center point of the preset area, detecting the diameter of the head region in the acquired plurality of image samples, calculating an average value of the diameter, and using the average value as a preset Length, taking the pixel as a center, determining a circular area by using a preset length as a radius, and using the circular area as the preset area, when the pixel value of the pixel is less than or equal to a plurality of pixels in the preset area When the pixel value is determined, the pixel point is determined as a target pixel point, and the determined target pixel point constitutes an image of the head region in the image to be recognized. In this way, it is only necessary to compare the pixel value of a single pixel with the pixel value of a plurality of pixels to determine the pixel of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
请参阅图5,图5是本发明第三实施例提供的图像识别装置的结构示意图,为了便于说明,仅示出了与本发明实施例相关的部分。图5示例的图像识别装置可以是前述图1和图2所示实施例提供的图像识别方法的执行主体,可以是图像识别装置或图像识别装置中的一个控制模块。图5示例的图像识别装置,主要包括:获取模块31、确定模块32及构成模块33。以上各功能模块详细说明如下:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of an image recognition apparatus according to a third embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. The image recognition device illustrated in FIG. 5 may be an execution body of the image recognition method provided by the foregoing embodiments shown in FIGS. 1 and 2, and may be one of the image recognition device or the image recognition device. The image recognition apparatus illustrated in FIG. 5 mainly includes an acquisition module 31, a determination module 32, and a constituent module 33. The above functional modules are described in detail as follows:
获取模块31,用于获取待识别图像中的像素点; An obtaining module 31, configured to acquire a pixel in the image to be identified;
该待识别图像为利用深度摄像机或体感摄像拍摄的用于识别头部区域的图像,该图像可以为该深度摄像机拍摄的视频中的某一帧图像。The image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
确定模块32,用于当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点;The determining module 32 is configured to determine that the pixel point is a target pixel point when a pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area;
目标像素点为头部区域中的像素点。该预置区域为以该像素点为中心点的区域,该预置区域可以为圆形、正方形或椭圆形等规则图形。利用深度摄像机或体感摄像机拍摄的图像中,某物体像素点的像素值与摄像头到该物体的距离成正比。因此,该待识别图像中的物体离摄像头越近,该物体的像素值越低。由于人站立时,头部区域离该摄像头的距离最近,因此,在该待识别图像中,头部区域像素点的像素值最小,即头部区域的像素点的像素值小于肩部、地面等待识别图像中显示的其它部位的像素值。The target pixel is a pixel in the head region. The preset area is an area centered on the pixel, and the preset area may be a regular pattern such as a circle, a square, or an ellipse. In an image taken with a depth camera or a somatosensory camera, the pixel value of a pixel of an object is proportional to the distance from the camera to the object. Therefore, the closer the object in the image to be recognized is to the camera, the lower the pixel value of the object. Since the head area is closest to the camera when standing, the pixel value of the head area pixel is the smallest in the image to be recognized, that is, the pixel value of the pixel area of the head area is smaller than the shoulder and the ground waiting Identify pixel values of other parts displayed in the image.
构成模块33,用于通过确定的该目标像素点构成该待识别图像中头部区域的图像。The constituting module 33 is configured to form an image of the head region in the image to be identified by the determined target pixel.
本实施例中的未尽细节,请参照图1所示的第一实施例,在此不再赘述。For the details of the present embodiment, please refer to the first embodiment shown in FIG. 1 , and details are not described herein again.
本发明第三实施例中,获取模块31获取待识别图像中的像素点,当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定模块32确定该像素点为目标像素点,其中,该预置区域为以该像素点为中心点的区域,构成模块33通过确定的该目标像素点构成该待识别图像中头部区域的图像。这样,只需对单个像素点的像素值与多个像素点的像素值进行比较即可确定头部区域像素点,不受行人的衣着、发型以及颜色的影响,提高了头部区域图像识别的精度。In the third embodiment of the present invention, the obtaining module 31 acquires a pixel in the image to be identified. When the pixel value of the pixel is less than or equal to the pixel value of the plurality of pixels in the preset area, the determining module 32 determines the pixel. And being a target pixel, wherein the preset area is an area centered on the pixel, and the forming module 33 forms an image of the head area in the image to be identified by the determined target pixel. In this way, the pixel value of the single pixel point can be compared with the pixel value of the plurality of pixel points to determine the pixel area of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
请参阅图6,图6是本发明第四实施例提供的图像识别装置的结构示意图,为了便于说明,仅示出了与本发明实施例相关的部分。图6示例的图像识别装置可以是前述图1和图2所示实施例提供的图像识别方法的执行主体,可以是图像识别装置或图像识别装置中的一个控制模块。图6示例的图像识别装置,主要包括:获取模块41、形成模块42、计算模块43、检测模块44、确定模块45及构成模块46。以上各功能模块详细说明如下:Referring to FIG. 6, FIG. 6 is a schematic structural diagram of an image recognition apparatus according to a fourth embodiment of the present invention. For convenience of description, only parts related to the embodiment of the present invention are shown. The image recognition device illustrated in FIG. 6 may be an execution body of the image recognition method provided by the foregoing embodiment shown in FIGS. 1 and 2, and may be a control module of the image recognition device or the image recognition device. The image recognition apparatus illustrated in FIG. 6 mainly includes an acquisition module 41, a formation module 42, a calculation module 43, a detection module 44, a determination module 45, and a configuration module 46. The above functional modules are described in detail as follows:
获取模块41,用于获取待识别图像中的像素点; An obtaining module 41, configured to acquire a pixel point in the image to be identified;
该待识别图像为利用深度摄像机或体感摄像拍摄的用于识别头部区域的图像,该图像可以为该深度摄像机拍摄的视频中的某一帧图像。The image to be recognized is an image for recognizing a head region captured by a depth camera or a stereo camera, and the image may be a certain frame image in the video captured by the depth camera.
形成模块42,用于按照该待识别图像中像素点的排列顺序,在该像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合;The forming module 42 is configured to select a preset number of pixel points on both sides of the pixel point according to an arrangement order of the pixel points in the image to be identified, to form a first pixel point set and a second pixel point set;
计算模块43,用于对该第一像素点集合中像素点的像素平均值与该第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值;The calculating module 43 is configured to perform subtraction between the pixel average value of the pixel point in the first pixel point set and the pixel average value of the pixel point in the second pixel point set to obtain a difference value;
检测模块44,用于检测获取的多个图像样本中头部区域的直径;a detecting module 44, configured to detect a diameter of a head region in the acquired plurality of image samples;
进一步的,计算模块43,用于计算该直径的平均值,并将该平均值作为预置长度;Further, the calculating module 43 is configured to calculate an average value of the diameter, and use the average value as a preset length;
确定模块45,用于当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定该像素点为目标像素点;a determining module 45, configured to determine that the pixel point is a target pixel point when a pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area;
该预置区域为以该像素点为中心的预置区域。该目标像素点为头顶图像的像素点。The preset area is a preset area centered on the pixel. The target pixel is the pixel of the overhead image.
进一步的,确定单元45,还用于若该差值的绝对值小于预置数值,则确定该像素点为该预置区域的中心点;Further, the determining unit 45 is further configured to: if the absolute value of the difference is less than a preset value, determine that the pixel point is a center point of the preset area;
进一步的,确定模块45,还用于以该像素点为圆心,以预置长度为半径确定圆形区域;Further, the determining module 45 is further configured to determine a circular area by using the pixel as a center and a preset length as a radius;
进一步的,确定模块45,还用于将该圆形区域作为该预置区域。Further, the determining module 45 is further configured to use the circular area as the preset area.
构成模块46,用于通过确定的该目标像素点构成该待识别图像中头部区域的图像。The constituting module 46 is configured to form an image of the head region in the image to be identified by the determined target pixel.
本实施例中的未尽细节,请参照图1所示的第一实施例和图2所示的第二实施例,在此不再赘述。For the details of the present embodiment, please refer to the first embodiment shown in FIG. 1 and the second embodiment shown in FIG. 2, and details are not described herein again.
本发明第四实施例中,获取模块41获取待识别图像中的像素点,形成模块42按照该待识别图像中像素点的排列顺序,在该像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合,计算模块43对该第一像素点集合中像素点的像素平均值与该第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值,若该差值的绝对值小于预置数值,则确定模块45确定该像素点为该预置区域的中心点,检测模块44检测获取的多个图像样本中头部区域的直径,计算模块43计算该直径的平均值,并将该平均值作为预置长度,确定模块45以该像素点为圆心,以预置长度为半径确定圆形区域,确定模块45将该圆形区域作为该预置区域,当该像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定模块45确定该像素点为目标像素点,构成模块46通过确定的该目标像素点构成该待识别图像中头部区域的图像。这样,只需对单个像素点的像素值与多个像素点的像素值进行比较即可确定头部区域的像素点,不受行人的衣着、发型以及颜色的影响,提高了头部区域图像识别的精度。In the fourth embodiment of the present invention, the acquiring module 41 acquires the pixel points in the image to be identified, and the forming module 42 selects a preset number of pixel points on both sides of the pixel according to the order of the pixels in the image to be recognized. Forming a first set of pixel points and a second set of pixel points, and the calculating module 43 performs a subtraction between a pixel average value of the pixel points in the first pixel point set and a pixel average value of the pixel points in the second pixel point set, Obtaining a difference. If the absolute value of the difference is less than the preset value, the determining module 45 determines that the pixel is the center point of the preset area, and the detecting module 44 detects the diameter of the head area in the acquired plurality of image samples. The calculating module 43 calculates an average value of the diameter, and uses the average value as a preset length. The determining module 45 takes the pixel as a center and determines a circular area by using a preset length as a radius. The determining module 45 uses the circular area as the circular area. In the preset area, when the pixel value of the pixel is less than or equal to the pixel value of the plurality of pixels in the preset area, the determining module 45 determines that the pixel is the target pixel, and constitutes Block 46 in the image of the image to be recognized by the head region constituting the target pixel is determined. In this way, it is only necessary to compare the pixel value of a single pixel with the pixel value of a plurality of pixels to determine the pixel of the head region, which is not affected by the clothing, hairstyle and color of the pedestrian, and improves the image recognition of the head region. Precision.
在本申请所提供的多个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信链接可以是通过一些接口,装置或模块的间接耦合或通信链接,可以是电性,机械或其它的形式。In the various embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be another division manner, for example, multiple modules or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication link shown or discussed may be an indirect coupling or communication link through some interface, device or module, and may be electrical, mechanical or otherwise.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read only memory (ROM, Read-Only) Memory, random access memory (RAM), disk or optical disk, and other media that can store program code.
需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本发明所必须的。It should be noted that, for the foregoing method embodiments, for the sake of brevity, they are all described as a series of action combinations, but those skilled in the art should understand that the present invention is not limited by the described action sequence. Because certain steps may be performed in other sequences or concurrently in accordance with the present invention. In the following, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above embodiments, the descriptions of the various embodiments are all focused, and the parts that are not detailed in a certain embodiment can be referred to the related descriptions of other embodiments.
以上为对本发明所提供的图像识别方法及装置的描述,对于本领域的技术人员,依据本发明实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本发明的限制。The above is a description of the image recognition method and apparatus provided by the present invention. For those skilled in the art, according to the idea of the embodiment of the present invention, there are changes in the specific implementation manner and application scope. In summary, the present specification The content should not be construed as limiting the invention.

Claims (8)

  1. 一种图像识别方法,其特征在于,所述方法包括:An image recognition method, the method comprising:
    获取待识别图像中的像素点; Obtaining pixel points in the image to be identified;
    当所述像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定所述像素点为目标像素点,其中,所述预置区域为以所述像素点为中心点的区域; Determining, when the pixel value of the pixel is less than or equal to a pixel value of a plurality of pixel points in the preset area, the pixel point is a target pixel point, wherein the preset area is centered on the pixel point Area;
    通过确定的所述目标像素点构成所述待识别图像中头部区域的图像。An image of the head region in the image to be recognized is formed by the determined target pixel.
  2. 如权利要求1所述的方法,其特征在于,所述获取待识别图像中的像素点之后,还包括:The method according to claim 1, wherein after the acquiring the pixel points in the image to be identified, the method further comprises:
    按照所述待识别图像中像素点的排列顺序,在所述像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合;Selecting a preset number of pixel points on both sides of the pixel to form a first pixel point set and a second pixel point set according to an arrangement order of pixel points in the image to be identified;
    对所述第一像素点集合中像素点的像素平均值与所述第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值;Subtracting between a pixel average value of the pixel points in the first pixel point set and a pixel average value of the pixel points in the second pixel point set to obtain a difference value;
    若所述差值的绝对值小于预置数值,则确定所述像素点为所述预置区域的中心点。If the absolute value of the difference is less than a preset value, it is determined that the pixel point is a center point of the preset area.
  3. 如权利要求1所述的方法,其特征在于,所述当所述像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定所述像素点为目标像素点之前,还包括: The method according to claim 1, wherein when the pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in the preset area, before the pixel point is determined as the target pixel point, Also includes:
    以所述像素点为圆心,以预置长度为半径确定圆形区域;Taking the pixel point as a center and determining a circular area by using a preset length as a radius;
    将所述圆形区域作为所述预置区域。The circular area is used as the preset area.
  4. 如权利要求3所述的方法,其特征在于,所述以所述像素点为圆心,以预置长度为半径确定圆形区域之前,还包括:The method according to claim 3, wherein the determining, by using the pixel point as a center and determining the circular area by using the preset length as a radius, further comprises:
    检测获取的多个图像样本中头部区域的直径;Detecting a diameter of a head region in the obtained plurality of image samples;
    计算所述直径的平均值,并将所述平均值作为所述预置长度。An average of the diameters is calculated and the average is taken as the preset length.
  5. 一种图像识别装置,其特征在于,所述装置包括:An image recognition device, characterized in that the device comprises:
    获取模块,用于获取待识别图像中的像素点; Obtaining a module, configured to acquire a pixel in the image to be identified;
    确定模块,用于当所述像素点的像素值小于或等于预置区域中多个像素点的像素值时,确定所述像素点为目标像素点,其中,所述预置区域为以所述像素点为中心点的区域; a determining module, configured to determine that the pixel point is a target pixel point when a pixel value of the pixel point is less than or equal to a pixel value of a plurality of pixel points in a preset area, where the preset area is The area where the pixel is the center point;
    构成模块,用于通过确定的所述目标像素点构成所述待识别图像中头部区域的图像。And a component module configured to form an image of the head region in the image to be identified by the determined target pixel.
  6. 如权利要求5所述的装置,其特征在于,所述装置还包括: The device of claim 5, wherein the device further comprises:
    形成模块,用于按照所述待识别图像中像素点的排列顺序,在所述像素点的两边分别选取预置数量的像素点,形成第一像素点集合和第二像素点集合;a forming module, configured to select a preset number of pixel points on each side of the pixel point according to an arrangement order of pixel points in the image to be identified, to form a first pixel point set and a second pixel point set;
    计算模块,用于对所述第一像素点集合中像素点的像素平均值与所述第二像素点集合中像素点的像素平均值之间进行减法运算,得到差值;a calculating module, configured to perform a subtraction between a pixel average value of the pixel points in the first pixel point set and a pixel average value of the pixel point in the second pixel point set to obtain a difference value;
    所述确定模块,还用于若所述差值的绝对值小于预置数值,则确定所述像素点为所述预置区域的中心点。The determining module is further configured to: if the absolute value of the difference is less than a preset value, determine that the pixel point is a center point of the preset area.
  7. 如权利要求5所述的装置,其特征在于, The device of claim 5 wherein:
    所述确定模块,还用于以所述像素点为圆心,以预置长度为半径确定圆形区域;The determining module is further configured to determine a circular area by using the pixel as a center and a preset length as a radius;
    所述确定模块,还用于将所述圆形区域作为所述预置区域。The determining module is further configured to use the circular area as the preset area.
  8. 如权利要求7所述的装置,其特征在于,所述装置还包括:The device of claim 7 wherein said device further comprises:
    检测模块,用于检测获取的多个图像样本中头部区域的直径;a detecting module, configured to detect a diameter of a head region in the obtained plurality of image samples;
    所述计算模块,还用于计算所述直径的平均值,并将所述平均值作为所述预置长度。The calculation module is further configured to calculate an average value of the diameters, and use the average value as the preset length.
PCT/CN2016/099757 2016-09-22 2016-09-22 Image identification method and device WO2018053763A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/099757 WO2018053763A1 (en) 2016-09-22 2016-09-22 Image identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/099757 WO2018053763A1 (en) 2016-09-22 2016-09-22 Image identification method and device

Publications (1)

Publication Number Publication Date
WO2018053763A1 true WO2018053763A1 (en) 2018-03-29

Family

ID=61690701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099757 WO2018053763A1 (en) 2016-09-22 2016-09-22 Image identification method and device

Country Status (1)

Country Link
WO (1) WO2018053763A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113155288A (en) * 2020-11-30 2021-07-23 齐鲁工业大学 Image identification method for hot spots of photovoltaic cell

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930524A (en) * 2012-09-11 2013-02-13 无锡数字奥森科技有限公司 Method for detecting heads based on vertically-placed depth cameras
CN103077380A (en) * 2013-01-07 2013-05-01 信帧电子技术(北京)有限公司 Method and device for carrying out statistics on number of people on basis of video
US20130272576A1 (en) * 2011-09-30 2013-10-17 Intel Corporation Human head detection in depth images
CN104268506A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Passenger flow counting detection method based on depth images
CN104751491A (en) * 2015-04-10 2015-07-01 中国科学院宁波材料技术与工程研究所 Method and device for tracking crowds and counting pedestrian flow
CN105118073A (en) * 2015-08-19 2015-12-02 南京理工大学 Human body head target identification method based on Xtion camera
CN105574891A (en) * 2015-12-11 2016-05-11 上海兴芯微电子科技有限公司 Method and system for detecting moving object in image
CN106485265A (en) * 2016-09-22 2017-03-08 深圳大学 A kind of image-recognizing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130272576A1 (en) * 2011-09-30 2013-10-17 Intel Corporation Human head detection in depth images
CN102930524A (en) * 2012-09-11 2013-02-13 无锡数字奥森科技有限公司 Method for detecting heads based on vertically-placed depth cameras
CN103077380A (en) * 2013-01-07 2013-05-01 信帧电子技术(北京)有限公司 Method and device for carrying out statistics on number of people on basis of video
CN104268506A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Passenger flow counting detection method based on depth images
CN104751491A (en) * 2015-04-10 2015-07-01 中国科学院宁波材料技术与工程研究所 Method and device for tracking crowds and counting pedestrian flow
CN105118073A (en) * 2015-08-19 2015-12-02 南京理工大学 Human body head target identification method based on Xtion camera
CN105574891A (en) * 2015-12-11 2016-05-11 上海兴芯微电子科技有限公司 Method and system for detecting moving object in image
CN106485265A (en) * 2016-09-22 2017-03-08 深圳大学 A kind of image-recognizing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113155288A (en) * 2020-11-30 2021-07-23 齐鲁工业大学 Image identification method for hot spots of photovoltaic cell
CN113155288B (en) * 2020-11-30 2022-09-06 齐鲁工业大学 Image identification method for hot spots of photovoltaic cell

Similar Documents

Publication Publication Date Title
WO2014019317A1 (en) Cloud-based search method for intelligent facial recognition
WO2014075430A1 (en) Method and system for changing theme based on color of clothes of user of mobile terminal
JP2011165008A (en) Image recognition apparatus and method
WO2014194620A1 (en) Method, module, apparatus and system for extracting, training and detecting image characteristic
WO2017067264A1 (en) Method and device for reducing misrecognition rate and smart mobile terminal
WO2014069822A1 (en) Apparatus and method for face recognition
EP3195524A1 (en) Systems and methods for device based authentication
US10657365B2 (en) Specific person detection system and specific person detection method
EP3418912A1 (en) Response device, response system, response method, and recording medium
WO2017088804A1 (en) Method and apparatus for detecting wearing of spectacles in facial image
TWI787113B (en) Methods, apparatuses, processors, electronic equipment and storage media for image processing
TW202213177A (en) Image processing method and electronic device and computer-readable storage medium
US10659680B2 (en) Method of processing object in image and apparatus for same
WO2015196878A1 (en) Television virtual touch control method and system
WO2018053763A1 (en) Image identification method and device
WO2020111637A1 (en) Method for managing immersion level and electronic device supporting same
WO2018058955A1 (en) Anti-lost method and system for wearable terminal, and wearable terminal
CN111814646A (en) Monitoring method, device, equipment and medium based on AI vision
WO2012034469A1 (en) Gesture-based human-computer interaction method and system, and computer storage media
WO2020242089A2 (en) Artificial intelligence-based curating method and device for performing same method
CN106485265B (en) Image identification method and device
WO2016074248A1 (en) Verification application method and apparatus based on face recognition
TW201738844A (en) Device and method for monitoring, method for counting people at a location
CN111579119B (en) Temperature measurement method and device, computer readable storage medium and robot
WO2023273151A1 (en) Patrol monitoring method and apparatus, electronic device, and computer-readable storage medium

Legal Events

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

Ref document number: 16916502

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 16916502

Country of ref document: EP

Kind code of ref document: A1