CN107818539B - Construction method of conversion template of image contour data structure - Google Patents

Construction method of conversion template of image contour data structure Download PDF

Info

Publication number
CN107818539B
CN107818539B CN201710995309.2A CN201710995309A CN107818539B CN 107818539 B CN107818539 B CN 107818539B CN 201710995309 A CN201710995309 A CN 201710995309A CN 107818539 B CN107818539 B CN 107818539B
Authority
CN
China
Prior art keywords
point
value
deflection
data structure
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710995309.2A
Other languages
Chinese (zh)
Other versions
CN107818539A (en
Inventor
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Qingchuang Technology Co ltd
Original Assignee
Hunan Qingchuang Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Qingchuang Technology Co ltd filed Critical Hunan Qingchuang Technology Co ltd
Priority to CN201710995309.2A priority Critical patent/CN107818539B/en
Publication of CN107818539A publication Critical patent/CN107818539A/en
Application granted granted Critical
Publication of CN107818539B publication Critical patent/CN107818539B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The construction method of the conversion template of the image outline data structure is constructed for converting the ordered outline point set in the dot matrix diagram into the image outline data structure; at least one of the data sets of the image contour data structure includes a deflection value, the deflection value included in the member of the data of the image contour data structure may be one of a positive value, a zero value and a negative value, and the deflection value included in the member of the data of the image contour data structure is expressed as a degree of deflection between a first connection line of a last point of the current point and a second connection line of the current point and the last point of the current point. The computer vision system, the artificial intelligence system and the product quality detection system adopt the construction method of the conversion template of the image contour data structure as a link of image contour processing. The invention improves the operation efficiency, reduces the cost, is suitable for parallel operation, improves the identification speed and provides a new idea.

Description

Construction method of conversion template of image contour data structure
Technical Field
The invention belongs to computer vision, and particularly relates to a construction method of a conversion template of an image contour data structure, and a computer vision or artificial intelligence or product quality detection system.
Background
Computer vision is an important module of artificial intelligence.
Vision is an integral part of a variety of intelligent/autonomous systems in various application areas, such as manufacturing, inspection, document analysis, medical diagnostics, and military.
The processing of the image contour is a more important step in the calculation of vision, and has significance in many applications such as character recognition systems, certificate recognition systems, fingerprint recognition systems, iris recognition systems, material surface texture recognition, quality detection of physical products, identification code recognition (such as bar codes, two-dimensional codes and the like).
Computer vision systems are developed in the direction of human recognition and error correction, however, the computing power of hundreds of billions of neurons possessed by human brains is difficult to catch up with modern science and technology (the strongest super computers in the world cannot be simulated), so that many human beings have functions in the aspect of pattern recognition, which are difficult to achieve.
The human brain can easily identify the patterns placed at different positions and different rotation angles in the image, the patterns can be easily and quickly identified by human beings by rotating the patterns by any angle (the reason is that the human beings can quickly obtain the relative relation of all parts of the contour line), on the one hand, the operation efficiency of the existing computer image identification system also has a space for improving, the existing identification system has certain conflict between the processing speed and the identification rate in the aspect, the identification rate is high, the operation is slow, the identification rate is high, and the improvement space exists.
Parallel operation (such as CUDA technology) is an important method for improving the operation efficiency of an artificial intelligence system and a machine vision system, but the method adopted by the existing image contour identification technology has room for improvement in parallel processing.
The application provides a brand-new image outline data structure, develops a brand-new computer image line or outline processing method, and overcomes the technical problems.
Disclosure of Invention
In order to overcome the problems, the application provides an image profile data structure, a fingerprint identification system, a computer vision system, an artificial intelligence system and a product quality detection system; has the following scheme.
Scheme 1, image profile data structure, is an ordered data set, its characterized in that: the number of members of the data set of the image contour data structure is at least 3, at least one piece of data of the data set of the image contour data structure contains a deflection value, the deflection value contained by the members of the data of the image contour data structure can be one of a positive value, a zero value and a negative value, and the expression of the deflection value contained by the members of the data of the image contour data structure is the deflection degree between a first connecting line of a previous point of the current point and a second connecting line of the current point and the previous point of the current point; the method of the direction of operation of the deflection values contained by all the members of the data set of the image contour data structure is identical; the sign of the deflection direction of the deflection values contained for all members of the data set of the image contour data structure represents the deflection direction, the value represents the degree of deflection, the greater the value the greater the deflection.
The image contour data structure according to claim 2 or 1, wherein: the positive sign of the deflection direction of the contained deflection values of all members of the data set of the data structure represents a left deflection. (assuming that a virtual human progresses from the last point through the last point to constitute a ray path, the sign of the deflection value is positive if the point is on the left-hand side of the virtual human, and the sign of the deflection value is negative if the point is on the right-hand side of the virtual human)
The image contour data structure according to claim 3 or 1, wherein: the positive sign of the deflection direction of the contained deflection values of all members of the data set of the data structure represents a right deflection. (assuming that a virtual human advances from the last point via the last point to constitute a ray path, the sign of the deflection value is positive if the point is on the right-hand side of the virtual human, and the sign of the deflection value is negative if the point is on the left-hand side of the virtual human)
The image contour data structure according to claim 4 or 1, wherein: if the position of the upper point of the current point is overlapped with the current point, the deflection value of the current point is zero, that is, if the current point is the same as the upper point, the deflection value of the current point is zero. For example, if the coordinates of the data P2 in the ordered data set { P0, P1, P2} are equal to the coordinates of P0, the deflection value of P2 is zero.
The image contour data structure according to claim 5 or 1, wherein: the deflection values range in value from-3 to 3 positive or negative integers or zero.
Scheme 6, image profile data structure's conversion template, its characterized in that: constructing for converting the ordered set of contour points in the bitmap into the image contour data structure described in scheme 1; constructing a lookup table array int M [ a1] [ a2] [ b1] [ b2] for storing deflection values of the local point to be calculated in advance, a1, a2, b1 and b2 are both 3, that is, M is a four-dimensional array, each dimension of M includes 3 members, the query value of the first dimension is the difference between the two X coordinate values of the X coordinate of the last point of the point and the X coordinate of the last point of the point plus 1, the query value of the second dimension is the difference between the two y coordinate values of the y coordinate of the last point of the point and the y coordinate of the last point of the point plus 1, the query value of the third dimension is the difference between the X coordinate of the point and the two X coordinate values of the X coordinate of the last point of the point plus 1, and the query value of the fourth dimension is the difference between the y coordinate of the point and the two y coordinate values of the y coordinate of the last point of the point plus 1; if a contour ordered point set { P0, P1, P2} is set, the deflection value of P2 is equal to the value stored in M [ P0.X-P1.X +1] [ P0.Y-P1.Y +1] [ P2.X-P1.X +1] [ P2.Y-P1.Y +1 ]; the value stored by the array M is ready before the image is processed. The addition of 1 is to prevent the array index filled in at the time of query from being a negative number, and the array member index is started from zero or 1 and cannot be filled in a negative number.
Scheme 7, a transformation template for an image profile data structure as in scheme 6, characterized by: the values stored in the array M are well calculated through an operation program, and are written into fixed data to be stored in a storage device for real-time calling during image processing.
A transformation template for an image profile data structure of scheme 8, such as the image profile data structure of scheme 1 or the image profile data structure of scheme 6, characterized by: the value stored by the array M is obtained through manual operation, and is written into fixed data to be stored in the storage device for real-time calling during image processing.
A transformation template for an image profile data structure of scheme 9, such as the image profile data structure of scheme 1 or the image profile data structure of 6, characterized by:
the value stored by the array M is obtained by calculating the following method:
taking the last point of the point as a central point, taking 8 points around the central point as peripheral points, wherein the point and the last point of the point necessarily belong to the peripheral points, giving an auxiliary calculation value U to the peripheral points according to the hour sequence by taking the last point of the point as a starting point, and dividing the last point of the point by the auxiliary calculation value of the peripheral points being equal to the serial number of the peripheral points in the hour direction, wherein the auxiliary calculation value of the last point of the point is 4;
the deflection value at this point is equal to the auxiliary operation value minus 4.
The hour hand sequence of scenario 10, as depicted in scenario 9, is clockwise.
The clockwise order in scenario 11, as depicted in scenario 9, is counterclockwise. As shown in fig. 11.
A transformation template for an image profile data structure of scheme 12, such as the image profile data structure of scheme 1 or the image profile data structure of scheme 6, characterized by:
the value stored by the array M is obtained by calculating the following method:
the upper point of the point is taken as a central point, 8 points surrounding the central point are taken as peripheral points, the point and the upper point of the point necessarily belong to the peripheral points, and the deflection values of the peripheral points are {0,3,2,1,0, -1, -2, -3} in sequence by taking the upper point of the point as a starting point according to the hour sequence.
The hour hand sequence of scenario 13, as depicted in scenario 12, is clockwise. As shown in FIG. 10, the sequence of three points in FIG. 12 is P0- > P1- > P2
Scenario 14, the hour hand order as depicted in scenario 12 is counterclockwise. As shown in FIG. 12, the sequence of three points in FIG. 12 is P0- > P1- > P2.
Scheme 15, fingerprint identification system, its characterized in that: processing the image by adopting the technical scheme of any one of the schemes 1 to 11.
Scheme 16, computer vision system, its characterized in that: processing the image by adopting the technical scheme of any one of the schemes 1 to 11.
Scheme 17, artificial intelligence system, its characterized in that: processing the image by adopting the technical scheme of any one of the schemes 1 to 11.
Scheme 18, product quality detecting system, its characterized in that: processing the image by adopting the technical scheme of any one of the schemes 1 to 11.
The invention can greatly improve the operation efficiency, reduce the cost, is more suitable for parallel operation, improves the identification speed and provides a new idea for processing the image contour. The storage of the image contour data structure can be an array commonly used in computer programming or a pointer linked list, or an ordered hardware storage device, and the obtaining of the deflection value can be obtained through computer software operation or specially designed hardware. The present invention can process ring-shaped closed point sets (such as closed ordered point sets) and non-closed edge point sets (such as straight lines, arcs, etc.).
Drawings
Fig. 1 shows an image to be processed according to embodiment 1, and numerals in parentheses mean (X coordinate, Y coordinate, color), where (-1, -1, -1) is an auxiliary point constructed for convenience of operation, and the operation is facilitated.
Fig. 2-7 show the operation process of the deflection value for the point in fig. 1, where U is the value for the auxiliary operation and S is the deflection value, and the point with the written S in the figure is the current point of the current operation.
Fig. 8 is a schematic illustration of an ordered set of deflection values obtained from fig. 1 after operation through the process of fig. 2-7, the ordered set of deflection values being in the form of a closed loop.
FIG. 9 is a representation of an ordered set of deflection values that may be obtained after processing of the rotated and translated image of the middle graph of FIG. 8, the ordered set of deflection values of FIG. 9 being equal to the ordered set of deflection values of FIG. 8.
Fig. 10-12 are intended to illustrate various examples of the operation of the deflection values of the present invention.
Detailed Description
Example 1 was carried out, taking the processing of the 4 × 4 pixel image shown in fig. 1 as an example, using the method shown in fig. 2 to 7, to obtain an image contour data structure, where the number of members of the data set of the image contour data structure is at least 3, at least one piece of data of the data set of the image contour data structure contains a deflection value, the deflection value contained by the members of the data of the image contour data structure may be one of a positive value, zero, and a negative value, and the expression of the deflection value contained by the members of the data of the image contour data structure is a degree of deflection between a first connection line of a last point of the point and a second connection line of the last point of the point and the point of the point; the method of the direction of operation of the deflection values contained by all the members of the data set of the image contour data structure is identical; the sign of the deflection direction of the deflection values contained for all members of the data set of the image contour data structure represents the deflection direction, the value represents the degree of deflection, the greater the value the greater the deflection.
In the processing of the embodiment, the ordered marked boundaries are firstly converted by using the prior art to orderly mark the point set of the image contour in the image 1 (there are various means such as, but not limited to, a worm-and-follower method, a raster scanning method, a dot breaking method, and the like for obtaining the image contour in the prior art), and the conversion method is as follows: taking a current point to be operated as a local point, taking the last point of the local point as a central point, taking 8 points surrounding the central point as peripheral points, wherein the local point and the last point of the local point necessarily belong to the peripheral points, giving an auxiliary operation value U to the peripheral points according to a clock sequence by taking the last point of the local point as a starting point, and dividing the last point of the local point by the fact that the auxiliary operation value of the peripheral points is equal to the sequence number of the peripheral points in the clock direction, wherein the auxiliary operation value of the last point of the local point is 4; the deflection value of the point is equal to the auxiliary operation value minus 4; the hour hand sequence is clockwise.
The point is a point which needs to obtain a deflection value at the time of operation, and the point set of the image contour can be sequentially operated one by one during operation, and can also be calculated by parallel operation (because the operation of the point is only related to the first two points, and the point which needs to be written with data is only the point, each point of the point set of the image contour can be operated in parallel, so that a faster operation speed can be obtained). This point is (1, 2, 1) in fig. 2, (2, 2, 1) in fig. 3, (3, 2, 1) in fig. 4, (3, 1, 1) in fig. 5, (2, 0, 1) in fig. 6, (1, 1, 1) in fig. 7, and the arrows in fig. 1-7 indicate the sequential direction of the point sets. The image of fig. 1 is subjected to the operation method shown in fig. 2-7 to obtain the labeled result of fig. 8, and the image contour data structure can be converted into a logically end-to-end annular array data {1,2,1,2,0,2 }.
Example 2 was carried out, and the contour of the image of fig. 9 was transformed in the method used in example 1, and logically leading ring array data {2,1,2,1,2,0} was obtained, since the ring array data obtained in example 1 and the ring array data obtained in example 2 were logically leading ring array data, {1,2,1,2,0,2} were equal to {2,1,2,1,2,0} and the ring data were arranged in the computer memory in various forms such as {0.2,1,2,1,2}, {2, 0,2,1,2,1}, {1,2,0,2,1,2} and the like, not to mention one another.
Example 3 is an embodiment of the present invention, in which as shown in fig. 10, the method of calculating the deflection value of the present point according to example 1 or example 1 is modified such that the upper point of the present point is the center point, 8 points around the center point are the peripheral points, the present point and the upper point of the present point necessarily belong to the peripheral points, and the deflection values of the peripheral points are {0,3,2,1,0, -1, -2, -3} in this order in the hour-hand order starting from the upper point of the present point. The hour hand sequence is clockwise.
Example 4 is an example of embodiment, in which, as shown in fig. 11, the method of calculating the deflection value of the local point in example 1 or example 1 is modified such that the upper point of the local point is the center point, 8 points around the center point are peripheral points, the local point and the upper point of the local point necessarily belong to the peripheral points, and the deflection values of the peripheral points are {0,3,2,1,0, -1, -2, -3} in this order in the hour-hand order starting from the upper point of the local point. The hour hand sequence is counterclockwise.
Example 5 shows a processing method in a case where this point is equal to the last point of this point, as shown in fig. 12, where P2 is the last point of this point, P1 is the last point of this point, P2 is the last point of this point, and the deflection value of P2 is 0.
In embodiment 6, the calculation methods in embodiment 1 to 5 are changed such that the deflection value of the current point is equal to S =4 when the current point is equal to the upper point of the current point.
Other descriptions: fig. 8 and 9 illustrate that the invention can unify the outlines of similar images of different rotation angles into an equal or ordered data set with similar regularity, so that a computer vision system can well recognize the rotated characters or images.

Claims (1)

1. The construction method of the conversion template of the image contour data structure is characterized in that: constructed for converting the ordered set of outline points in the bitmap into an image outline data structure;
the image contour data structure is an ordered data set, and is characterized in that: the number of members of the data set of the image contour data structure is at least 3, at least one piece of data of the data set of the image contour data structure contains a deflection value, the deflection value contained by the members of the data of the image contour data structure is one of a positive value, a zero value and a negative value, and the expression of the deflection value contained by the members of the data of the image contour data structure is the deflection degree between a first connecting line of a previous point of the current point and a second connecting line of the current point and the previous point of the current point; the method of the direction of operation of the deflection values contained by all the members of the data set of the image contour data structure is identical; the sign of the deflection direction of the deflection values contained by all members of the data set of the image profile data structure represents the deflection direction, the value represents the deflection degree, the larger the value the larger the deflection;
constructing a query table array int M3 for storing a deflection value of a point to be calculated in advance, wherein the query value of a first dimension is the difference value of two X coordinate values of an X coordinate of a last point of the point and the X coordinate of the last point of the point plus 1, the query value of a second dimension is the difference value of two Y coordinate values of a y coordinate of the last point of the point and the y coordinate of the last point of the point plus 1, the query value of a third dimension is the difference value of two X coordinate values of the X coordinate of the point and the X coordinate of the last point of the point plus 1, and the query value of a fourth dimension is the difference value of two Y coordinate values of the y coordinate of the point and the y coordinate of the last point of the point plus 1;
the value stored by the array M is ready before the image is processed;
the value stored by the array M is obtained by calculating the following method:
the upper point of the point is taken as a central point, 8 points surrounding the central point are taken as peripheral points, the point and the upper point of the point necessarily belong to the peripheral points, and the deflection values of the peripheral points are {0,3,2,1,0, -1, -2, -3} in sequence by taking the upper point of the point as a starting point according to the hour sequence.
CN201710995309.2A 2017-10-23 2017-10-23 Construction method of conversion template of image contour data structure Active CN107818539B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710995309.2A CN107818539B (en) 2017-10-23 2017-10-23 Construction method of conversion template of image contour data structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710995309.2A CN107818539B (en) 2017-10-23 2017-10-23 Construction method of conversion template of image contour data structure

Publications (2)

Publication Number Publication Date
CN107818539A CN107818539A (en) 2018-03-20
CN107818539B true CN107818539B (en) 2021-04-23

Family

ID=61607494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710995309.2A Active CN107818539B (en) 2017-10-23 2017-10-23 Construction method of conversion template of image contour data structure

Country Status (1)

Country Link
CN (1) CN107818539B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7116823B2 (en) * 2002-07-10 2006-10-03 Northrop Grumman Corporation System and method for analyzing a contour of an image by applying a Sobel operator thereto
CN101118544A (en) * 2006-08-01 2008-02-06 华为技术有限公司 Method for constructing picture shape contour outline descriptor
CN103530639B (en) * 2013-10-30 2017-10-31 湖南轻创科技有限公司 A kind of orderly point set extracting method of image outline
CN104077775A (en) * 2014-06-28 2014-10-01 中国科学院光电技术研究所 Shape matching method and device combined with framework feature points and shape contexts

Also Published As

Publication number Publication date
CN107818539A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
CN110020620B (en) Face recognition method, device and equipment under large posture
EP3373242B1 (en) Coarse-to-fine search method and image processing device
JP2021511579A (en) Image processing system and image processing method
CN115063768A (en) Three-dimensional target detection method, encoder and decoder
Reuse et al. About the ambiguity of data augmentation for 3d object detection in autonomous driving
CN107818539B (en) Construction method of conversion template of image contour data structure
CN107704861B (en) Method for constructing transformation template of image contour data structure for computer vision system
CN106296741A (en) Cell high-speed motion feature mask method in nanoscopic image
CN113627397B (en) Hand gesture recognition method, system, equipment and storage medium
Zheng et al. A novel binary image representation algorithm by using NAM and coordinate encoding procedure and its application to area calculation
CN112184884A (en) Three-dimensional model construction method and device, computer equipment and storage medium
CN108564013B (en) Gesture recognition method based on gesture contour rapid matching
CN111260723A (en) Barycenter positioning method of bar and terminal equipment
CN114973396B (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN108629264A (en) Method and apparatus for image procossing
Shi Two image-template operations for binary image processing
Molchanova The methods of homotopic skeletonization of bit-mapped drawings of parts of sea transport
US20230071291A1 (en) System and method for a precise semantic segmentation
Popa et al. The Intelligent Robotic System for Text Typing based on the Image Processing
JPS5935470B2 (en) Shape correction method
Zhang et al. DSNet: Double Strand Robotic Grasp Detection Network Based on Cross Attention
Wagner et al. NeuralQAAD: An Efficient Differentiable Framework for High Resolution Point Cloud Compression
CN114648636A (en) Method, system, device and medium for generating confrontation sample
JP2801246B2 (en) Character processing apparatus and method
Wang et al. Calligraphy image processing with stroke extraction and representation

Legal Events

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