WO2019019681A1 - 身份证图像的倾斜值获取方法及装置、终端、存储介质 - Google Patents

身份证图像的倾斜值获取方法及装置、终端、存储介质 Download PDF

Info

Publication number
WO2019019681A1
WO2019019681A1 PCT/CN2018/081222 CN2018081222W WO2019019681A1 WO 2019019681 A1 WO2019019681 A1 WO 2019019681A1 CN 2018081222 W CN2018081222 W CN 2018081222W WO 2019019681 A1 WO2019019681 A1 WO 2019019681A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
regions
character region
area
card image
Prior art date
Application number
PCT/CN2018/081222
Other languages
English (en)
French (fr)
Inventor
王健宗
王晨羽
马进
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019019681A1 publication Critical patent/WO2019019681A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/24Aligning, centring, orientation detection or correction of the image
    • G06V10/243Aligning, centring, orientation detection or correction of the image by compensating for image skew or non-uniform image deformations

Definitions

  • the present application relates to the field of image processing, and in particular, to a method and device for acquiring a tilt value of an ID card image, a terminal, and a storage medium.
  • the easiest way is to extract the boundary line of the ID card image, and determine the tilt value of the ID card image by the tilt value of the boundary line, but the resolution of the ID card image provided by some users is too low, or the ID card image
  • the color of the outer background image is too close to the color of the ID image itself, making the boundary lines of some ID images difficult to define, resulting in failure of the tilt value acquisition.
  • the present application provides a method and device for acquiring the tilt value of the ID card image, a terminal, and a storage medium.
  • the embodiment of the present application provides a method for acquiring a tilt value of an ID card image, including:
  • Parsing the ID card image extracting all single-character regions, the single-character region being an area containing a single character;
  • the embodiment of the present application provides a device for acquiring a tilt value of an ID card image, including:
  • a parsing module configured to parse the ID card image, and extract all single-character regions, where the single-character region is an area containing a single character
  • a grouping module configured to group all the single-character regions to obtain a plurality of single-character region groups, where a distance between any two adjacent single-character regions in the single-character region group is less than a first preset threshold
  • the obtaining module is configured to obtain a single-character region group with the largest length
  • the tilt value determining module is configured to obtain a tilt value of the connecting line segment of the first and last two character regions of the single-character region group having the largest length, and determine the tilt value of the connecting line segment as the tilt value of the ID image.
  • an embodiment of the present application provides a terminal, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable The following steps are implemented when the instruction is executed:
  • Parsing the ID card image extracting all single-character regions, the single-character region being an area containing a single character;
  • the embodiment of the present application provides one or more non-volatile readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, such that the one or Multiple processors perform the following steps:
  • Parsing the ID card image extracting all single-character regions, the single-character region being an area containing a single character;
  • FIG. 1 is a first schematic flowchart of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application
  • FIG. 2 is a second schematic flowchart of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application
  • FIG. 3 is a third schematic flowchart of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of an apparatus for acquiring a tilt value of an ID card image according to an embodiment of the present application.
  • FIG. 1 is a first flow diagram of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application.
  • the method includes:
  • the ID card image is parsed and all single character regions are extracted.
  • the ID card image includes a plurality of characters in a sequence of characters, and the characters can be characters or numbers.
  • the single character area is an area containing a single character.
  • all the feature regions in the ID card image may be extracted based on the region feature extraction algorithm, and the single character region (ie, the region that does not have all the features of a single character) is excluded from the region, thereby obtaining a single character region.
  • the feature area may be an area where the gray value is smaller than a preset gray value (eg, 20).
  • Step 102 Group all the single character regions to obtain a plurality of single character region groups.
  • the distance between any two adjacent single-character regions in the single-character region group is smaller than the first preset threshold, that is, in the single-character region group, any single-character region has at least one target single-character region, and
  • the distance between the target single-character area and the single-character area is smaller than the first preset threshold, and the target single-character area also belongs to the single-character area group.
  • the first preset threshold The range is greater than the minimum column spacing of the characters on the ID card image (in this embodiment, the column spacing is the distance between the geometric centers of two characters adjacent in the sorting direction of the character), and is smaller than the characters on the ID card image. Maximum line spacing (in this embodiment, the line spacing is the distance between the geometric centers of two characters respectively in the direction perpendicular to the sorting direction of the characters).
  • the first preset threshold is less than or equal to the minimum line spacing of characters on the ID image.
  • the first preset threshold may also be the line spacing of the "name" character line and the "gender" character line on the ID image.
  • any one of the single-character regions and any other single-character region group in any one-character region group is greater than or equal to the first predetermined threshold.
  • Step 103 Acquire a single-character region group with the largest length.
  • the step specifically includes: calculating the length of each single-character region group separately, and filtering out the single-character region group having the largest length.
  • the connecting line segment is a line segment that uses the reference point of each of the two single-character regions in the first and last ends as an end point.
  • the reference point is specifically a geometric center point of a single character area.
  • the step of obtaining the length of the connecting line segment of the first two character regions of the single-character region group includes: obtaining a distance between any two single-character regions in the current single-character region group, and filtering out the maximum distance; The maximum distance is determined as the length of the connecting line segment of the first two character regions of the current single-character region group.
  • the step of filtering out the single-character region group with the largest length includes: selecting the maximum length from the lengths of all the connected segment segments, and determining the single-character region group corresponding to the maximum length as the single-character region having the largest length. group.
  • Step 104 Obtain the tilt value of the connecting line segment of the first and last two character regions of the single-character region group with the largest length, and determine the tilt value of the connecting line segment as the tilt value of the ID image.
  • the tilt value can be either an oblique angle or a slope. Since the shapes of the characters are different, this may result in the geometric center points of the extracted single-character regions not being on the same line at the same time. Therefore, by obtaining the connecting line segments of the first and second single-character regions of the single-character region group having the largest length The tilt value can be minimized to make it close to the tilt value of the real ID image.
  • the embodiment of the present application determines the tilt value of the straight line connecting the single character area by extracting the single character area on the ID image, because the color of the character is high relative to the color of the identity image itself.
  • the recognition degree therefore, can accurately extract the single character area, thereby accurately obtaining the tilt value of the ID image.
  • FIG. 2 is a second schematic flowchart of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application.
  • the method includes:
  • the ID card image is parsed, and all the maximum stable extremum regions are extracted.
  • the ID card image can be a captured image of the ID card.
  • the maximum stable extremum region is the most stable region obtained when the ID image is binarized using different grayscale thresholds.
  • the step includes: acquiring a preset number of gray thresholds, performing binarization processing on the ID image by using each gray threshold, respectively, and obtaining a binarized image corresponding to each gray threshold; acquiring the preset gray A region with a stable shape is maintained in each binarized image corresponding to the threshold range, and a maximum stable extreme region is obtained.
  • the binarization processing of the ID card image is to set the gray value of the pixel in the ID card image to the first value or the second value, that is, to display the entire ID card image with a distinct black and white visual effect.
  • the binarization processing method for the ID card image has a bimodal method, an iterative method, a P-parameter method, etc., and several types of binarization processing methods are listed, and there are many other methods of binarization processing, and the present disclosure is implemented. For example, this is not listed one by one. For detailed steps of the binarization processing method, reference may be made to related technologies, which is not specifically described in this embodiment.
  • first value and the second value may be preset, and the first value is greater than the second value, for example, the first value may be 255, 254, 253, etc., and the second value may be 0, 1, 2 Etc., this embodiment does not specifically limit this.
  • Step 202 Determine a rectangular boundary for each of the maximum stable extreme value regions. Since each of the maximum stable extreme value regions is an irregular region, it is inconvenient to calculate the center point thereof, and it is also inconvenient to remove the non-single character region. Therefore, it is necessary to determine an external rectangular boundary for each of the maximum stable extreme value regions, so as to facilitate The calculation of the center point of a single-character area. Specifically, the step includes: determining a contour of the maximum stable extremum region; and obtaining a minimum circumscribed rectangle of the contour according to the determined contour, thereby obtaining a rectangular boundary of the maximum stable extremum region.
  • the minimum circumscribed rectangle refers to the maximum range of the two-dimensional shape represented by two-dimensional coordinates, that is, the maximum abscissa, the minimum abscissa, the maximum ordinate, and the minimum ordinate of each vertice of a given two-dimensional shape are defined The rectangle.
  • a single character area is filtered out from all the maximum stable extreme value areas to obtain a plurality of single character areas.
  • the single character area is an area containing a single character.
  • the step includes: detecting whether there is a first rectangular boundary; if detecting the first rectangular boundary, filtering out the maximum stable extreme region corresponding to the first rectangular boundary from all the maximum stable extreme regions.
  • the non-single character region is a maximum stable extreme value region corresponding to the first rectangular boundary; the first rectangular boundary is a rectangular boundary located inside the other rectangular boundary, a rectangular boundary having an area larger than a second preset threshold, or an aspect ratio greater than The rectangular boundary of the third preset threshold.
  • the second preset threshold is greater than or equal to the area value corresponding to the character in the ID image.
  • the size of the third preset threshold depends on the shape of the character. For example, if the shape of the character is a character, the third preset threshold may be set to 1.5, because normally, the length ratio of the rectangular boundary of the regular character is not greater than 1.5. . In some cases, the single-character region also wraps a smaller maximum stable extremum region, so it is also necessary to filter out the maximum stable extremum region corresponding to the inner rectangular boundary of the other rectangular boundary.
  • Step 204 Group all the single character regions to obtain a plurality of single character region groups.
  • the distance between any two adjacent single-character regions in the single-character region group is smaller than the first preset threshold. This step has been described in detail above and will not be described here.
  • Step 205 Acquire a single-character region group with the largest length. This step has been described in detail above and will not be described here.
  • Step 206 Obtain the tilt value of the connecting line segment of the first and last two character regions of the single-character region group with the largest length, and determine the tilt value of the connecting line segment as the tilt value of the ID image. This step has been described in detail above and will not be described here.
  • the embodiment of the present application filters out the single-character area to ensure that the remaining maximum stable extreme value regions are all single-character regions, thereby avoiding the subsequent calculation of the non-single-character region, thereby improving the image of the ID card.
  • FIG. 3 is a third schematic flowchart of a method for acquiring a tilt value of an ID card image according to an embodiment of the present application.
  • the method includes:
  • step 301 the ID card image is parsed, and all single character regions are extracted. This step has been described in detail above and will not be described here.
  • Step 302 Acquire a first single character area.
  • the first single-character region may be randomly selected from all the extracted single-character regions for the first-characterized single-character region group; for the first-character region group that is not first acquired, the first single-character region needs to be Random selection in the remaining single-character areas.
  • the remaining single-character area refers to a plurality of single-character areas obtained by culling the acquired single-character area group from all single-character areas.
  • Step 303 Acquire all second single-character regions whose distance from the first single-character region is less than a first preset threshold. The distance between any two adjacent single-character regions in the single-character region group is smaller than the first preset threshold. Further, in order to divide all single-character regions located on the same line of the ID image into the same group as possible, any one of the single-character regions and any other single-character region group in any one-character region group The distance between the single character regions is greater than or equal to the first predetermined threshold.
  • the first preset threshold has been described above in detail, and therefore will not be described herein.
  • the single-character region in the middle usually has at least two single-character regions with a distance less than the first predetermined threshold, so in order to obtain all the single-character regions in the same row Need to get all the second single character areas.
  • Step 304 until all the nth word single character regions whose distance from the n-1th single character region is smaller than the first preset threshold are acquired.
  • This step can be understood as: taking all the single-character regions whose reference distance is less than the first preset threshold from the newly acquired single-character region as a reference, up to the n-th single-character region.
  • the first single character area, the second single character area, and the nth single character area are different.
  • n can be a preset value, for example, n can be 10.
  • n may also be an indefinite value.
  • step 304 is specifically: obtaining the distance from the n-1th single-character area. All n-th character single-character regions smaller than the first preset threshold until the n+1th single-character region acquisition fails. The n+1th single character area is different from the first single character area, the second single character area, and the nth single character area.
  • Four single-character regions ... until all n-th single-character regions whose distance from the n-1th single-character region is less than the first predetermined threshold are obtained.
  • the third single-character area obtained and the previously acquired The first single-character area is repeated.
  • the k-1th single-character area is acquired.
  • the newly acquired k-th single-character region and all previously acquired single-character regions may be determined. Whether the character area is up to the kth single-character area), if there is a coincidence, the process ends.
  • the next step is performed: based on the newly acquired single-character area (ie, the k-th single-character area), Obtaining all of the k+1th single character regions that are smaller than the first preset threshold from the reference distance (k single character region). Where k is less than or equal to n-1.
  • Step 305 Determine the first single character area, the second single character area, and the nth single character area as a single character area group.
  • Step 306 Acquire a single-character region group with the largest length. This step has been described in detail above and will not be described here.
  • Step 307 Obtain the tilt value of the connecting line segment of the first and last two character regions of the single-character region group having the largest length, and determine the tilt value of the connecting line segment as the tilt value of the ID image. This step has been described in detail above and will not be described here.
  • all single character regions located on the same line of the ID card image can be equally divided into the same group, so as to improve the accuracy of the calculation of the tilt value of the ID card image.
  • FIG. 4 is a structural diagram of an apparatus for acquiring a tilt value of an ID card image according to an embodiment of the present application.
  • the ID image includes multiple characters arranged in order.
  • the tilt value acquisition means includes a parsing module 401, a grouping module 402, an obtaining module 403, and a tilt value determining module 404.
  • the parsing module 401 is configured to parse the ID card image and extract all the single character regions.
  • the single-character area is an area containing a single character.
  • the grouping module 402 is configured to group all the single character regions to obtain a plurality of single character region groups. The distance between any two adjacent single-character regions in the single-character region group is smaller than the first preset threshold.
  • the grouping module 402 further includes a first single character area acquiring unit, a second single character area acquiring unit, a sequential acquiring unit, and a single character area group determining unit.
  • the first single-character area acquiring unit is configured to acquire the first single-character area.
  • the second single-character area acquiring unit is configured to acquire all the second single-character areas whose distance from the first single-character area is smaller than the first preset threshold.
  • n is greater than or equal to 2
  • the single-character area group determining unit is configured to determine the first single-character area, the second single-character area, and the nth single-character area as the single-character area group.
  • the obtaining module 403 is configured to obtain a single-character region group with the largest length.
  • the acquisition module 403 includes a length calculation unit and a screening unit.
  • the length calculation unit is configured to separately calculate the length of each single-character region group.
  • a screening unit that filters out the largest single-character region group.
  • the length calculation unit is further configured to acquire the length of the connection line segment of the first and second two-character regions of the single-character region group; and determine the length of the connection segment as the length of the single-character region group.
  • the step of obtaining the length of the connecting line segment of the first two character regions of the single-character region group includes: obtaining a distance between any two single-character regions in the current single-character region group, and filtering out the maximum distance; The maximum distance is determined as the length of the connecting line segment of the first two character regions of the current single-character region group.
  • the screening unit is further configured to select the maximum length of the lengths of all the connected line segments, and determine the single-character region group corresponding to the maximum length as the single-character region group with the largest length.
  • the tilt value determining module 404 is configured to obtain the tilt value of the connecting line segment of the first and second two-character regions of the single-character region group having the largest length, and determine the tilt value of the connecting line segment as the tilt value of the ID image.
  • the connecting line segment is a line segment that uses the reference point of each of the two single-character regions in the first and last ends as an end point.
  • the reference point is specifically a geometric center point of a single character area.
  • the parsing module 401 comprises: a maximum stable extremum area unit and a single character area unit.
  • the maximum stable extreme value area unit is used to parse the ID card image and extract all the maximum stable extreme value areas.
  • a single-character area unit for filtering out a single-character area from all of the maximum stable extreme value areas to obtain a plurality of said single-character areas.
  • the embodiment of the present application determines the tilt value of the straight line connecting the single character area by extracting the single character area on the ID image, because the color of the character is high relative to the color of the identity image itself.
  • the recognition degree therefore, can accurately extract the single character area, thereby accurately obtaining the tilt value of the ID image.
  • the embodiment of the present application further provides a terminal, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, and the processor implements the above-mentioned ID image when executing the computer readable instructions
  • the processor implements the functions of the modules/units of the tilt value acquisition device of the ID image when executing the computer readable instructions, such as the parsing module 401, the grouping module 402, the obtaining module 403, and the tilt value determining module shown in FIG. 404 features to avoid duplication, not repeated here.
  • This embodiment provides one or more non-volatile readable storage media having computer readable instructions stored thereon.
  • the one or more non-transitory readable storage mediums storing computer readable instructions, when executed by one or more processors, causing one or more processors to execute cross-platform users in embodiment 1
  • the rights management method in order to avoid duplication, will not be described here.
  • the computer readable instructions when executed by the processor, the functions of the modules/units in the cross-platform user rights management device in Embodiment 2 are implemented. To avoid repetition, details are not described herein again.
  • non-volatile readable storage media storing computer readable instructions may comprise: any entity or device capable of carrying the computer readable instruction code, a recording medium, a USB flash drive, a mobile hard drive, Disk, optical disk, computer memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier signals, and telecommunications signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Input (AREA)

Abstract

本申请提供了一种身份证图像的倾斜值获取方法及装置、终端、存储介质。其中,倾斜值获取方法包括:解析身份证图像,提取所有的单字符区域;对所有的单字符区域进行分组,得到多个单字符区域组;获取长度最大的单字符区域组;获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将连接线段的倾斜值确定为身份证图像的倾斜值。本申请可以准确的得到身份证图像倾斜值。

Description

身份证图像的倾斜值获取方法及装置、终端、存储介质
本申请以2017年07月28日提交的申请号为201710631668.X,名称为“身份证图像的倾斜值获取方法及装置、终端、存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及图像处理领域,尤其涉及一种身份证图像的倾斜值获取方法及装置、终端、存储介质。
背景技术
目前,为了识别出用户提供的身份证图像中的字符信息,需要在识别字符信息之前,确定身份证图像的倾斜值,然后根据倾斜值对其进行校正。目前,最简单的方法是提取身份证图像的边界线,通过边界线的倾斜值来确定身份证图像的倾斜值,但是由于一些用户提供的身份证图像的分辨率太低,或者身份证图像之外的背景图像的颜色与身份证图像本身的颜色太过于接近,使得有些身份证图像的边界线难以界定,从而导致倾斜值获取失败。
发明内容
为克服现有技术中由一些身份证图像边界线的难以界定导致的倾斜值获取失败的问题,本申请提供一种身份证图像的倾斜值获取方法及装置、终端、存储介质。
第一方面,本申请实施例提供了一种身份证图像的倾斜值获取方法,包括:
解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
获取长度最大的单字符区域组;
获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
第二方面,本申请实施例提供了一种身份证图像的倾斜值获取装置,包括:
解析模块,用于解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
分组模块,用于对所有的单字符区域进行分组,得到多个单字符区域组,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
获取模块,用于获取长度最大的单字符区域组;
倾斜值确定模块,用于获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
第三方面,本申请实施例提供一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
获取长度最大的单字符区域组;
获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
第四方面,本申请实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
获取长度最大的单字符区域组;
获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
本申请的一个或多个实施例的细节在下面的附图及描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的 附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例的身份证图像的倾斜值获取方法的第一流程示意图;
图2是本申请实施例的身份证图像的倾斜值获取方法的第二流程示意图;
图3是本申请实施例的身份证图像的倾斜值获取方法的第三流程示意图;
图4是本申请实施例的身份证图像的倾斜值获取装置的结构示意图。
具体实施方式
为了使本申请所解决的技术问题、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
请参照图1,是本申请实施例的身份证图像的倾斜值获取方法的第一流程示意图。该方法包括:
步骤101,解析身份证图像,提取所有的单字符区域。身份证图像包括多个按序排列的字符多行字符,字符可以为文字或数字。其中,单字符区域为包含单个字符的区域。具体地,可以基于区域特征提取算法,对身份证图像中所有的特征区域进行提取,并从中剔除非单字符区域(即不具有单个字符全部特征的区域),从而得到单字符区域。具体地,对于黑色的字符来说,特征区域可以是灰度值小于预设灰度值(如20)的区域。
步骤102,对所有的单字符区域进行分组,得到多个单字符区域组。其中,单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值,(即单字符区域组中,任一单字符区域都具有至少一个目标单字符区域,且该目标单字符区域与该单字符区域之间的距离小于第一预设阈值,同时目标单字符区域也属于该单字符区域组)。由于身份证图像上的字符的行间距和列间距大小不一,为了尽可能使单字符区域组中各单字符区域均是位于身份证图像上同一行的字符,具体地,第一预设阈值的范围要大于身份证图像上字符的最小列间距(本实施例中,列间距为在字符的排序方向上相邻的两个字符的几何中心的距离),同时要小于身份证图像上字符的最大行间距(本实施例中,行间距为分别位于与字符的排序方向垂直的方向上的两个字符的几何中心的距离)。其中,优选地,第一预设阈值小于或等于身份证图像上字符的最小行间距。此外,第一预设阈值也可以为身份证图像上“姓名”字符行与“性别”字符行的行间距。
进一步地,为了尽可能将身份证图像上位于同一行的所有单字符区域均分为同一组中,任一单字符区域组中的任一单字符区域与另一单字符区域组中的任一单字符区域之间的距离大于或等于第一预设阈值。
步骤103,获取长度最大的单字符区域组。该步骤具体包括:分别计算各单字符区域组的长度,并筛选出长度最大的单字符区域组。
单字符区域组的长度计算包括:
获取单字符区域组的首尾两个单字符区域的连接线段的长度;将连接线段的长度确定为该单字符区域组的长度。其中,连接线段是将首尾两个单字符区域各自的参照点作为端点的线段。其中,参照点具体为单字符区域的几何中心点。具体地,获取单字符区域组的首尾两个单字符区域的连接线段的长度的步骤,包括:获取当前单字符区域组中任两个单字符区域之间的距离,并筛选出最大距离;将该最大距离确定为当前单字符区域组的首尾两个单字符区域的连接线段的长度。进一步地,筛选出长度最大的单字符区域组的步骤,包括:从获取的所有连接线段的长度中,筛选出最大长度,并将最大长度对应的单字符区域组确定为长度最大的单字符区域组。
步骤104,获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将连接线段的倾斜值确定为身份证图像的倾斜值。其通过获取连接线段的两端点的坐标,即可以得到连接线段的倾斜值。倾斜值可以为倾斜角度,也可以为斜率。由于各个字符的形状不一,这就会导致提取的各单字符区域的几何中心点不能同时位于同一直线上,因此,通过获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,可以尽量减少误差,使其接近于真实的身份证图像的倾斜值。
本申请实施例通过提取身份证图像上的单字符区域,并将连接单字符区域的直线的倾斜值,确定为身份证图像的倾斜值,由于字符的颜色相对于身份图像本身的颜色具有很高的辨识度,因此,可以精确的提取出单字符区域,从而准确的得到身份证图像倾斜值。
请参照图2,是本申请实施例的身份证图像的倾斜值获取方法的第二流程示意图。该方法包括:
步骤201,解析身份证图像,提取所有的最大稳定极值区域。身份证图像具体可以为身份证的拍摄图像。最大稳定极值区域是当使用不同的灰度阈值对身份证图像进行二值化处理时得到的最稳定的区域。具体地,本步骤包括:获取预设数目的灰度阈值,分别采用每个灰度阈值对身份证图像进行二值化处理,得到各个灰度阈值对应的二值化图像;获取在预设灰度阈值范围对应的各个二值化图像中均保持形状稳定的区域,得到最大稳定极值 区域。
身份证图像的二值化处理是将身份证图像中像素点的灰度值设置为第一数值或第二数值,也就是将整个身份证图像呈现出明显的只有黑和白的视觉效果。而对身份证图像的二值化处理方式有双峰法、迭代法、P参数法等,除去列出来的几种二值化处理方式,还有很多其他二值化处理的方式,本公开实施例对此不再一一列举。而关于二值化处理方式的详细步骤可以参考相关技术,本实施例对此不作具体阐述。需要说明的是,第一数值和第二数值可以预先设置,且第一数值大于第二数值,比如,第一数值可以为255、254、253等等,第二数值可以为0、1、2等等,本实施例对此不作具体限定。
步骤202,分别为各所述最大稳定极值区域确定矩形边界。由于各个最大稳定极值区域是不规则的区域,不便于计算其中心点,也不便于对非单字符区域的去除,因此需要为各最大稳定极值区域确定一个外接的矩形边界,以便于对单字符区域的中心点的计算。具体地,本步骤包括:确定最大稳定极值区域的轮廓;根据确定的轮廓,得到该轮廓的最小外接矩形,从而得到该最大稳定极值区域的矩形边界。其中,最小外接矩形是指以二维坐标表示的二维形状的最大范围,即以给定的二维形状各顶点中的最大横坐标、最小横坐标、最大纵坐标、最小纵坐标定下边界的矩形。
步骤203,从所有的最大稳定极值区域中滤除非单字符区域,得到多个单字符区域。其中,单字符区域为包含单个字符的区域。具体地,本步骤包括:检测是否有第一矩形边界;若检测有第一矩形边界,则从所有的最大稳定极值区域中将第一矩形边界对应的最大稳定极值区域滤除。其中,非单字符区域为第一矩形边界对应的最大稳定极值区域;第一矩形边界为位于其它矩形边界的内部的矩形边界、面积大于第二预设阈值的矩形边界、或长宽比大于第三预设阈值的矩形边界。其中,第二预设阈值大于或等于字符在身份证图像中所对应的面积值。第三预设阈值的大小取决于字符的形状,如字符的形状为字符,那么第三预设阈值可以设为1.5,这是因为通常情况下规则字符的矩形边界的长度比都不会大于1.5。在一些情况下,单字符区域内部也会包裹更小的最大稳定极值区域,因此,还需要将位于其它矩形边界的内部的矩形边界对应的最大稳定极值区域滤除。
步骤204,对所有的单字符区域进行分组,得到多个单字符区域组。其中,单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值。本步骤已在上文中作了详细介绍,故在此不作赘述。
步骤205,获取长度最大的单字符区域组。本步骤已在上文中作了详细介绍,故在此不作赘述。
步骤206,获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将连接线段的倾斜值确定为身份证图像的倾斜值。本步骤已在上文中作了详细介绍,故在此不作赘述。
本申请实施例通过滤除非单字符区域,从而保证得到的剩余最大稳定极值区域均为单字符区域,从而避免了非单字符区域的对后续计算的干拢,从而提高了对身份证图像的倾斜值计算的精确度。
请参照图3,是本申请实施例的身份证图像的倾斜值获取方法的第三流程示意图。该方法包括:
步骤301,解析身份证图像,提取所有的单字符区域。本步骤已在上文中作了详细介绍,故在此不作赘述。
步骤302,获取第一单字符区域。其中,对于首次获取的单字符区域组而言,第一单字符区域可从提取的所有的单字符区域中随机选择;对于非首次获取的单字符区域组而言,第一单字符区域需要从剩余的单字符区域中随机选择。其中,剩余的单字符区域是指从所有的单字符区域中,剔除掉已经获取的单字符区域组后得到的多个单字符区域。
步骤303,获取与第一单字符区域的距离小于第一预设阈值的所有的第二单字符区域。其中,单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值。进一步地,为了尽可能将身份证图像上位于同一行的所有单字符区域均分为同一组中,任一单字符区域组中的任一单字符区域与另一单字符区域组中的任一单字符区域之间的距离大于或等于第一预设阈值。第一预设阈值已经在上文中,作了详细介绍,故在此不作赘述。
针对于同一行的单字符区域而言,位于中间的单字符区域通常会具有至少两个与之距离小于第一预设阈值的单字符区域,因此,为了得到所有的位于同一行的单字符区域,需要获取所有的第二单字符区域。
步骤304,直至获取与第n-1单字符区域的距离小于第一预设阈值的所有的第n字单字符区域。本步骤可以理解为:依次以新获取到的单字符区域为基准,获取与该基准距离小于第一预设阈值的所有的单字符区域,直至第n单字符区域。为了保证不重复获取单字符区域,第一单字符区域、第二单字符区域直至第n单字符区域各不相同。其中,n可以为预设定值,例如n可以为10。此外,n也可以为一个不定值,为了尽可能将身份证图像上位于同一行的所有单字符区域均分为同一组中,步骤304具体为:获取与第n-1单字符区域的距离小于第一预设阈值的所有的第n字单字符区域,直至第n+1单字符区域获取失败。其中,第n+1单字符区域与第一单字符区域、第二单字符区域直至第n单字符区域各 不相同。
具体地,本步骤包括:获取与第二单字符区域的距离小于第一预设阈值的所有的第三单字符区域;获取与第三单字符区域的距离小于第一预设阈值的所有的第四单字符区域……直至获取与第n-1单字符区域的距离小于第一预设阈值的所有的第n单字符区域。在实施本步骤的过程中,由于第三单字符区域和第一字符区域与均第二字符区域的距离小于第一预设阈值,这样,就会导致获取的第三单字符区域和之前获取的第一单字符区域重复,因此,在实施步骤304中的过程,为了保证当前获取的单字符区域与之前获取的所有的单字符区域均不同,具体地,在获取与第k-1单字符区域小于第一预设阈值的所有的第k单字符区域的步骤之后,可以判断新获取的第k单字符区域与之前获取的所有的单字符区域(包括所有的第一单字符区域、第二单字符区域直至第k单字符区域)是否有重合,若有重合,则结束进程,若没有重合,则执行下一步骤:以最新获取到的单字符区域为基准(即第k单字符区域),获取与该基准距离(k单字符区域)小于第一预设阈值的所有的第k+1单字符区域。其中,k小于或等于n-1。
步骤305,将第一单字符区域、第二单字符区域直至第n单字符区域确定为单字符区域组。
步骤306,获取长度最大的单字符区域组。本步骤已在上文中作了详细介绍,故在此不作赘述。
步骤307,获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将连接线段的倾斜值确定为身份证图像的倾斜值。本步骤已在上文中作了详细介绍,故在此不作赘述。
本申请实施例,可以尽可能将身份证图像上位于同一行的所有单字符区域均分为同一组中,以便于提高身份证图像的倾斜值计算的精确度。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上文针对本申请实施例的身份证图像的倾斜值获取方法做了详细介绍,下面将相对于上述方法的装置做进一步阐述。
请参照图4,是本申请实施例的身份证图像的倾斜值获取装置结构示意图。身份证图像包括按序排列的多个字符。倾斜值获取装置包括解析模块401、分组模块402、获取模块403和倾斜值确定模块404。
解析模块401,用于解析身份证图像,提取所有的单字符区域。其中,单字符区域为 包含单个字符的区域。
分组模块402,用于对所有的单字符区域进行分组,得到多个单字符区域组。其中,单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值。优选地,分组模块402进一步包括第一单字符区域获取单元、第二单字符区域获取单元、依次获取单元和单字符区域组确定单元。其中,第一单字符区域获取单元,用于获取第一单字符区域。第二单字符区域获取单元,用于获取与第一单字符区域的距离小于所述第一预设阈值的所有的第二单字符区域。依次获取单元,用于直至获取与第n-1单字符区域的距离小于所述第一预设阈值的所有的第n字单字符区域(即依次以新获取到的单字符区域为基准,获取与基准距离小于第一预设阈值的所有的单字符区域,直至第n单字符区域)。其中,n大于等于2,且第一单字符区域、第二单字符区域直至第n单字符区域不相同。单字符区域组确定单元,用于将第一单字符区域、第二单字符区域直至第n单字符区域确定为单字符区域组。
获取模块403用于获取长度最大的单字符区域组。获取模块403包括长度计算单元和筛选单元。长度计算单元,用于分别计算各单字符区域组的长度。筛选单元,用于筛选出长度最大的单字符区域组。
优选地,长度计算单元进一步用于获取单字符区域组的首尾两个单字符区域的连接线段的长度;将连接线段的长度确定为该单字符区域组的长度。其中,获取单字符区域组的首尾两个单字符区域的连接线段的长度的步骤,包括:获取当前单字符区域组中任两个单字符区域之间的距离,并筛选出最大距离;将该最大距离确定为当前单字符区域组的首尾两个单字符区域的连接线段的长度。筛选单元进一步用于获取的所有连接线段的长度中,筛选出最大长度,并将最大长度对应的单字符区域组确定为长度最大的单字符区域组。
倾斜值确定模块404,用于获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将连接线段的倾斜值确定为身份证图像的倾斜值。其中,连接线段是将首尾两个单字符区域各自的参照点作为端点的线段。其中,参照点具体为单字符区域的几何中心点。通过获取连接线段的两端点的坐标,即可以得到连接线段的倾斜值。倾斜值可以为倾斜角度,也可以为斜率。由于各个字符的形状不一,这就会导致提取的各单字符区域的几何中心点不能同时位于同一直线上,因此,通过获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,可以尽量减少误差,使其接近于真实的身份证图像的倾斜值。
优选地,解析模块401,包括:最大稳定极值区域单元和单字符区域单元。
最大稳定极值区域单元,用于解析身份证图像,提取所有的最大稳定极值区域。
单字符区域单元,用于从所有的最大稳定极值区域中滤除非单字符区域,得到多个所述单字符区域。
本申请实施例通过提取身份证图像上的单字符区域,并将连接单字符区域的直线的倾斜值,确定为身份证图像的倾斜值,由于字符的颜色相对于身份图像本身的颜色具有很高的辨识度,因此,可以精确的提取出单字符区域,从而准确的得到身份证图像倾斜值。
本申请实施例还提供了一种终端,包括存储器、处理器以及存储在所述存储器中并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述的身份证图像的倾斜值获取方法。或者,处理器执行计算机可读指令时实现上述的身份证图像的倾斜值获取装置各模块/单元的功能,例如图4所示的解析模块401、分组模块402、获取模块403和倾斜值确定模块404的功能,以避免重复,此处不一一赘述。
本实施例提供一个或多个存储有计算机可读指令的非易失性可读存储介质。该一个或多个存储有计算机可读指令的非易失性可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行实施例1中跨平台用户权限管理方法,为避免重复,这里不再赘述。或者,该计算机可读指令被处理器执行时实现实施例2中跨平台用户权限管理装置中各模块/单元的功能,为避免重复,这里不再赘述。
可以理解地,一个或多个存储有计算机可读指令的非易失性可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号和电信信号等。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种身份证图像的倾斜值获取方法,其特征在于,包括:
    解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
    对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
    获取长度最大的单字符区域组;
    获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
  2. 如权利要求1所述的身份证图像的倾斜值获取方法,其特征在于,所述对所有的单字符区域进行分组,得到多个单字符区域组,包括:
    获取第一单字符区域;
    获取与所述第一单字符区域的距离小于所述第一预设阈值的所有的第二单字符区域;
    直至获取与第n-1单字符区域的距离小于所述第一预设阈值的所有的第n字单字符区域;其中,n大于2,且所述第一单字符区域、所述第二单字符区域直至所述第n单字符区域不相同;将第一单字符区域、第二单字符区域直至第n单字符区域确定为单字符区域组。
  3. 如权利要求1所述的身份证图像的倾斜值获取方法,其特征在于,所述获取长度最大的单字符区域组,包括:
    分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度;
    从获取的所有连接线段的长度中,筛选出最大长度,并将所述最大长度对应的单字符区域组确定为长度最大的单字符区域组。
  4. 如权利要求3所述的身份证图像的倾斜值获取方法,其特征在于,所述分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度,包括:
    获取当前单字符区域组中任两个单字符区域之间的距离,并筛选出最大距离;
    将所述最大距离确定为当前单字符区域组的首尾两个单字符区域的连接线段的长度。
  5. 如权利要求1所述的身份证图像的倾斜值获取方法,其特征在于,所述解析身份证图像,提取所有的单字符区域,包括:
    解析身份证图像,提取所有的最大稳定极值区域;
    从所有的最大稳定极值区域中滤除非单字符区域,得到多个所述单字符区域。
  6. 如权利要求5所述的身份证图像的倾斜值获取方法,其特征在于,所述非单字符区域为第一矩形边界对应的最大稳定极值区域;
    所述解析身份证图像,提取所有的最大稳定极值区域之后,还包括:
    分别为各所述最大稳定极值区域确定矩形边界;
    所述从所有的最大稳定极值区域中滤除非字符特征区域,包括:
    检测是否有所述第一矩形边界,所述第一矩形边界为位于其它矩形边界的内部的矩形边界、面积大于第二预设阈值的矩形边界、或长宽比大于第三预设阈值的矩形边界;
    若检测有第一矩形边界,则从所有的最大稳定极值区域中将第一矩形边界对应的最大稳定极值区域滤除。
  7. 一种身份证图像的倾斜值获取装置,其特征在于,包括:
    解析模块,用于解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
    分组模块,用于对所有的单字符区域进行分组,得到多个单字符区域组,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
    获取模块,用于获取长度最大的单字符区域组;
    倾斜值确定模块,用于获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
  8. 如权利要求7所述的身份证图像的倾斜值获取装置,其特征在于,所述解析模块,包括:
    最大稳定极值区域单元,用于解析身份证图像,提取所有的最大稳定极值区域;
    单字符区域单元,用于从所有的最大稳定极值区域中滤除非单字符区域,得到多个所述单字符区域。
  9. 一种终端,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
    对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
    获取长度最大的单字符区域组;
    获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
  10. 如权利要求9所述的终端,其特征在于,所述对所有的单字符区域进行分组,得到多个单字符区域组,包括:
    获取第一单字符区域;
    获取与所述第一单字符区域的距离小于所述第一预设阈值的所有的第二单字符区域;
    直至获取与第n-1单字符区域的距离小于所述第一预设阈值的所有的第n字单字符区域;其中,n大于2,且所述第一单字符区域、所述第二单字符区域直至所述第n单字符区域不相同;将第一单字符区域、第二单字符区域直至第n单字符区域确定为单字符区域组。
  11. 如权利要求9所述的终端,其特征在于,所述获取长度最大的单字符区域组,包括:
    分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度;
    从获取的所有连接线段的长度中,筛选出最大长度,并将所述最大长度对应的单字符区域组确定为长度最大的单字符区域组。
  12. 如权利要求11所述的终端,其特征在于,所述分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度,包括:
    获取当前单字符区域组中任两个单字符区域之间的距离,并筛选出最大距离;
    将所述最大距离确定为当前单字符区域组的首尾两个单字符区域的连接线段的长度。
  13. 如权利要求9所述的终端,其特征在于,所述解析身份证图像,提取所有的单字符区域,包括:
    解析身份证图像,提取所有的最大稳定极值区域;
    从所有的最大稳定极值区域中滤除非单字符区域,得到多个所述单字符区域。
  14. 如权利要求13所述的终端,其特征在于,所述非单字符区域为第一矩形边界对应的最大稳定极值区域;
    所述解析身份证图像,提取所有的最大稳定极值区域之后,所述处理器执行所述计算机可读指令时还实现如下步骤:
    分别为各所述最大稳定极值区域确定矩形边界;
    所述从所有的最大稳定极值区域中滤除非字符特征区域,包括:
    检测是否有所述第一矩形边界,所述第一矩形边界为位于其它矩形边界的内部的矩形边界、面积大于第二预设阈值的矩形边界、或长宽比大于第三预设阈值的矩形边界;
    若检测有第一矩形边界,则从所有的最大稳定极值区域中将第一矩形边界对应的最大 稳定极值区域滤除。
  15. 一个或多个存储有计算机可读指令的非易失性可读存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    解析身份证图像,提取所有的单字符区域,所述单字符区域为包含单个字符的区域;
    对所有的单字符区域进行分组,得到多个单字符区域组;其中,所述单字符区域组中任意相邻的两个单字符区域之间的距离小于第一预设阈值;
    获取长度最大的单字符区域组;
    获取长度最大的单字符区域组的首尾两个单字符区域的连接线段的倾斜值,并将所述连接线段的倾斜值确定为身份证图像的倾斜值。
  16. 如权利要求15所述的非易失性可读存储介质,其特征在于,所述对所有的单字符区域进行分组,得到多个单字符区域组,包括:
    获取第一单字符区域;
    获取与所述第一单字符区域的距离小于所述第一预设阈值的所有的第二单字符区域;
    直至获取与第n-1单字符区域的距离小于所述第一预设阈值的所有的第n字单字符区域;其中,n大于2,且所述第一单字符区域、所述第二单字符区域直至所述第n单字符区域不相同;将第一单字符区域、第二单字符区域直至第n单字符区域确定为单字符区域组。
  17. 如权利要求15所述的非易失性可读存储介质,其特征在于,所述获取长度最大的单字符区域组,包括:
    分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度;
    从获取的所有连接线段的长度中,筛选出最大长度,并将所述最大长度对应的单字符区域组确定为长度最大的单字符区域组。
  18. 如权利要求17所述的非易失性可读存储介质,其特征在于,所述分别获取各单字符区域组的首尾两个单字符区域的连接线段的长度,包括:
    获取当前单字符区域组中任两个单字符区域之间的距离,并筛选出最大距离;
    将所述最大距离确定为当前单字符区域组的首尾两个单字符区域的连接线段的长度。
  19. 如权利要求15所述的非易失性可读存储介质,其特征在于,所述解析身份证图像,提取所有的单字符区域,包括:
    解析身份证图像,提取所有的最大稳定极值区域;
    从所有的最大稳定极值区域中滤除非单字符区域,得到多个所述单字符区域。
  20. 如权利要求19所述的非易失性可读存储介质,其特征在于,所述非单字符区域为第一矩形边界对应的最大稳定极值区域;
    所述解析身份证图像,提取所有的最大稳定极值区域之后,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    分别为各所述最大稳定极值区域确定矩形边界;
    所述从所有的最大稳定极值区域中滤除非字符特征区域,包括:
    检测是否有所述第一矩形边界,所述第一矩形边界为位于其它矩形边界的内部的矩形边界、面积大于第二预设阈值的矩形边界、或长宽比大于第三预设阈值的矩形边界;
    若检测有第一矩形边界,则从所有的最大稳定极值区域中将第一矩形边界对应的最大稳定极值区域滤除。
PCT/CN2018/081222 2017-07-28 2018-03-30 身份证图像的倾斜值获取方法及装置、终端、存储介质 WO2019019681A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710631668.X 2017-07-28
CN201710631668.XA CN108268868B (zh) 2017-07-28 2017-07-28 身份证图像的倾斜值获取方法及装置、终端、存储介质

Publications (1)

Publication Number Publication Date
WO2019019681A1 true WO2019019681A1 (zh) 2019-01-31

Family

ID=62771728

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081222 WO2019019681A1 (zh) 2017-07-28 2018-03-30 身份证图像的倾斜值获取方法及装置、终端、存储介质

Country Status (2)

Country Link
CN (1) CN108268868B (zh)
WO (1) WO2019019681A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767787A (zh) * 2020-05-12 2020-10-13 北京奇艺世纪科技有限公司 身份证图像的正反面判断方法、装置、设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522892A (zh) * 2018-09-29 2019-03-26 北明智通(北京)科技有限公司 神经网络辅助的文字图像信息标注方法
CN111914836A (zh) * 2020-07-08 2020-11-10 浙江大华技术股份有限公司 一种身份证信息提取方法、装置、设备和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955941A (zh) * 2011-08-31 2013-03-06 汉王科技股份有限公司 身份信息录入方法和装置
US20150193667A1 (en) * 2014-01-08 2015-07-09 Qualcomm Incorporated Processing text images with shadows
CN106156767A (zh) * 2016-03-02 2016-11-23 平安科技(深圳)有限公司 行驶证有效期自动提取方法、服务器及终端
CN106846339A (zh) * 2017-02-13 2017-06-13 广州视源电子科技股份有限公司 一种图像检测方法和装置
CN107169489A (zh) * 2017-05-08 2017-09-15 北京京东金融科技控股有限公司 倾斜图像校正的方法和装置
CN107239776A (zh) * 2017-05-08 2017-10-10 北京京东金融科技控股有限公司 倾斜图像校正的方法和装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408937B (zh) * 2008-11-07 2011-12-21 东莞市微模式软件有限公司 一种字符行定位的方法及装置
CN104680161A (zh) * 2015-01-09 2015-06-03 安徽清新互联信息科技有限公司 一种身份证数字识别方法
CN106815583B (zh) * 2017-01-16 2020-07-14 上海理工大学 一种基于mser和swt相结合的夜间车辆车牌定位方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955941A (zh) * 2011-08-31 2013-03-06 汉王科技股份有限公司 身份信息录入方法和装置
US20150193667A1 (en) * 2014-01-08 2015-07-09 Qualcomm Incorporated Processing text images with shadows
CN106156767A (zh) * 2016-03-02 2016-11-23 平安科技(深圳)有限公司 行驶证有效期自动提取方法、服务器及终端
CN106846339A (zh) * 2017-02-13 2017-06-13 广州视源电子科技股份有限公司 一种图像检测方法和装置
CN107169489A (zh) * 2017-05-08 2017-09-15 北京京东金融科技控股有限公司 倾斜图像校正的方法和装置
CN107239776A (zh) * 2017-05-08 2017-10-10 北京京东金融科技控股有限公司 倾斜图像校正的方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767787A (zh) * 2020-05-12 2020-10-13 北京奇艺世纪科技有限公司 身份证图像的正反面判断方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN108268868A (zh) 2018-07-10
CN108268868B (zh) 2020-07-10

Similar Documents

Publication Publication Date Title
TWI726422B (zh) 二維碼識別方法、裝置及設備
WO2016065701A1 (zh) 图像文字识别方法及装置
JP5775225B2 (ja) マルチレイヤ連結成分をヒストグラムと共に用いるテキスト検出
US20140161365A1 (en) Method of Perspective Correction For Devanagari Text
CN110136069B (zh) 文本图像矫正方法、装置与电子设备
CN110363202B (zh) 指针式仪表数值读取方法及计算机终端
US11074443B2 (en) Method and device for acquiring slant value of slant image, terminal and storage medium
US20140023271A1 (en) Identifying A Maximally Stable Extremal Region (MSER) In An Image By Skipping Comparison Of Pixels In The Region
TW201732651A (zh) 一種單詞的分割方法和裝置
CN110647882A (zh) 图像校正方法、装置、设备及存储介质
US10438083B1 (en) Method and system for processing candidate strings generated by an optical character recognition process
CN108334879B (zh) 一种区域提取方法、系统及终端设备
WO2014014678A1 (en) Feature extraction and use with a probability density function and divergence|metric
WO2019019681A1 (zh) 身份证图像的倾斜值获取方法及装置、终端、存储介质
Swaileh et al. Multi-script iterative steerable directional filtering for handwritten text line extraction
WO2019232870A1 (zh) 手写字训练样本获取方法、装置、计算机设备及存储介质
CN111311497A (zh) 一种条形码图像角度校正方法和装置
CN111275049A (zh) 一种文字图像骨架特征描述符获取的方法及装置
CN112581374A (zh) 散斑亚像素中心提取方法、系统、设备及介质
KR101732359B1 (ko) 이미지 내의 텍스트를 검출하는 방법 및 장치
CN113269752A (zh) 一种图像检测方法、装置终端设备及存储介质
Qomariyah et al. The segmentation of printed Arabic characters based on interest point
CN115410191B (zh) 文本图像识别方法、装置、设备和存储介质
CN111325199B (zh) 一种文字倾斜角度检测方法及装置
US9152876B1 (en) Methods and systems for efficient handwritten character segmentation

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18837648

Country of ref document: EP

Kind code of ref document: A1

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

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 20.03.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18837648

Country of ref document: EP

Kind code of ref document: A1