CN111242141A - Key tooth shape code identification method and device, storage medium and image acquisition equipment - Google Patents

Key tooth shape code identification method and device, storage medium and image acquisition equipment Download PDF

Info

Publication number
CN111242141A
CN111242141A CN202010056497.4A CN202010056497A CN111242141A CN 111242141 A CN111242141 A CN 111242141A CN 202010056497 A CN202010056497 A CN 202010056497A CN 111242141 A CN111242141 A CN 111242141A
Authority
CN
China
Prior art keywords
key
image
light source
tooth
identified
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010056497.4A
Other languages
Chinese (zh)
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.)
Shenzhen Shuma Electronic Technology Co ltd
Original Assignee
Shenzhen Shuma Electronic 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 Shenzhen Shuma Electronic Technology Co ltd filed Critical Shenzhen Shuma Electronic Technology Co ltd
Priority to CN202010056497.4A priority Critical patent/CN111242141A/en
Publication of CN111242141A publication Critical patent/CN111242141A/en
Priority to EP20913855.1A priority patent/EP4092569A4/en
Priority to US17/439,363 priority patent/US11790626B2/en
Priority to PCT/CN2020/111755 priority patent/WO2021143146A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/751Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
    • 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)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a key tooth shape code identification method, which comprises the following steps: acquiring an image of a key to be identified by using a back light source and/or a side light source; and identifying the tooth shape code of the key to be identified based on the image. The invention also discloses a key tooth shape code recognition device, a storage medium and image acquisition equipment. The invention can improve the identification efficiency of the key tooth shape code and reduce the key abrasion in the identification process.

Description

Key tooth shape code identification method and device, storage medium and image acquisition equipment
Technical Field
The invention relates to the technical field of image processing, in particular to a key tooth shape code identification method and device, a storage medium and image acquisition equipment.
Background
In the existing key tooth shape code identification technology, key tooth shape parameters are generally measured by utilizing mechanical equipment to be in contact with a key tooth shape area, then key tooth shape codes are determined based on the measured key tooth shape parameters, and the key tooth shape codes are identified by a purely mechanical method.
Disclosure of Invention
The invention mainly aims to provide a key tooth shape code identification method, a key tooth shape code identification device, a storage medium and image acquisition equipment, which are used for improving the identification efficiency of key tooth shape codes and avoiding the loss of keys.
In order to achieve the above object, the present invention provides a key tooth shape code recognition method, comprising the steps of:
s1, acquiring an image of the key to be identified by using a back light source and/or a side light source;
and S2, identifying the tooth shape code of the key to be identified based on the image.
Optionally, the step S1 is preceded by the step of:
s3, acquiring the key model information of the key to be identified;
s4, determining a target image acquisition mode corresponding to the key model information according to the incidence relation information of the key model information and the image acquisition mode;
the step S1 includes the steps of:
and S11, acquiring the image of the key to be identified by utilizing the back light source and/or the side light source based on the target image acquisition mode.
Optionally, the target image capturing mode includes a first image capturing mode in which only the backlight is activated, and the step S11 includes the steps of:
s111, acquiring a first image of the key to be identified under the independent irradiation of the back light source based on the first image acquisition mode;
the step S2 includes the steps of:
and S21, identifying the tooth shape code of the key to be identified according to the first image.
Optionally, the target image capturing mode includes a second image capturing mode that enables a back light source and a side light source, respectively, and the step S11 includes the steps of:
s112, acquiring a first image of the key to be identified under the independent irradiation of the back light source and a second image of the key to be identified under the independent irradiation of the side light source in different directions based on the second image acquisition mode;
the step S2 includes the steps of:
and S22, identifying the tooth-shaped code of the key to be identified according to the first image and the second image.
Optionally, the target image capturing mode includes a third image capturing mode in which only the side light source is activated, and the step S11 includes the steps of:
s113, acquiring second images of the key to be identified under the independent irradiation of the lateral light sources in different directions and third images of the key to be identified under the common irradiation of the lateral light sources in different directions based on the third image acquisition mode;
the step S2 includes the steps of:
and S23, recognizing the tooth-shaped code of the key to be recognized according to the second image and the third image.
Optionally, the step S2 includes the steps of:
s24, carrying out image correction on the image to obtain a corrected image;
and S25, determining the tooth shape code of the key to be identified based on the correction image.
Optionally, the step S2 includes the steps of:
s26, detecting the tooth-shaped image contour of the image;
s27, positioning image tooth-shaped characteristic points in the tooth-shaped image contour according to prestored tooth-shaped characteristic point positioning information;
s28, acquiring tooth profile characteristic parameters in the tooth profile characteristic points of the image;
and S29, determining the tooth shape code of the key to be identified based on the tooth shape characteristic parameters.
Optionally, the tooth profile feature point positioning information includes positioning feature point information and relative position information between the tooth profile feature point and the positioning feature point, and the step S27 includes the steps of:
s271, identifying image positioning feature points in the tooth profile image outline according to the positioning feature point information;
and S272, positioning the image tooth profile characteristic points in the tooth profile image outline according to the image positioning characteristic points and the relative position information.
In order to achieve the above object, the present invention also provides a key bit recognition apparatus comprising: a memory, a processor and an identification program stored on the memory and executable on the processor, the identification program when executed by the processor implementing the steps of the key tooth shape code identification method as described above.
To achieve the above object, the present invention also provides a storage medium having stored thereon a key bit shape code recognition program that, when executed by the processor, implements the steps of the key bit shape code recognition method as described above.
In order to achieve the above object, the present invention also provides an image capturing apparatus, which is applied to the above step S1; the image acquisition equipment comprises a back light source and/or a side light source, and further comprises a box body and a camera; the box body is provided with a key inlet and a key outlet; the camera and the lateral light source are both arranged inside the box body and are connected with the inner wall of the box body; the orientation of the camera is perpendicular to the orientation of the key access; the lateral light source is arranged on the periphery of a key placing area in the box body; the backlight set up in the inside of box body, just backlight with the inner wall of box body is connected, the camera with backlight is located separately the both sides in key placement area.
Preferably, the image acquisition equipment further comprises a light homogenizing sheet; the light homogenizing sheet is connected with the inner wall of the box body, arranged in the box body, arranged between the back light source and the key placing area and perpendicular to the direction of the camera.
Preferably, the image capturing apparatus further comprises a key holder; the key fixing piece penetrates through the side plate where the key access opening is located from the outside of the box body to enter the key access opening, and a key to be identified entering the key access opening is fixed.
The invention provides a method, a device and a storage medium for identifying a key tooth-shaped code, wherein the method comprises the following steps: firstly, acquiring an image of a key to be identified by using a back light source and/or a side light source; and identifying the tooth shape code of the key to be identified based on the image. Through the key tooth-shaped code recognition mode, mechanical contact does not exist with a tooth-shaped code part in the tooth-shaped code recognition process, abrasion to the tooth shape of the key is avoided, the part needing manual operation in the recognition process is mainly used for placing a key to be recognized into image acquisition equipment, the operation is simple, professional skill is not needed, the efficiency and the accuracy of tooth-shaped code recognition are improved, key tooth-shaped information in an image can be highlighted by utilizing a back light source and/or a lateral light source, image processing is facilitated, and the recognition accuracy is improved.
The box body in the image acquisition equipment provided by the invention has the function of blocking light, reduces the interference of an external light source, obtains an image with prominent tooth profile characteristics, is convenient for tooth profile code identification of the image, and improves the identification accuracy; by arranging the lateral light sources to irradiate the two pairs of keys to be identified, the definition of the tooth profile in the collected image is improved, the tooth profile characteristics in the image are highlighted, the identification accuracy is improved, the method is suitable for keys with different tooth profile characteristic types, and the identification range is expanded.
Drawings
Fig. 1 is a schematic diagram of a hardware operating environment of a terminal according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an image capturing apparatus according to an embodiment of the present application;
FIG. 3 is a schematic cross-sectional view of the image capturing device shown in FIG. 2;
fig. 4 is a schematic structural diagram of a backlight according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a side light source according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a key tooth shape code identification method according to an embodiment of the present application;
FIG. 7 is a schematic shape diagram of a key of the outer profile type provided by an embodiment of the present application;
FIG. 8 is a schematic illustration of a key of the female profile type according to an embodiment of the present application;
FIG. 9 is a schematic illustration of the shape of an internally contoured key provided in accordance with an embodiment of the present application;
fig. 10 is a schematic flow chart of a key tooth identification method according to another embodiment of the present application;
fig. 11 is a flowchart illustrating step S2 according to an embodiment of the present application;
FIG. 12 is a flowchart illustrating a specific implementation of steps S11 and S2 according to an embodiment of the present application;
FIG. 13 is a schematic illustration of a key location feature and a key profile feature provided in accordance with an embodiment of the present application;
FIG. 14 is a flowchart illustrating a detailed implementation of steps S11 and S2 according to another embodiment of the present application;
FIG. 15 is a flowchart illustrating a specific implementation of steps S11 and S2 according to another embodiment of the present application;
fig. 16 is a schematic flowchart of step S2 according to yet another embodiment of the present application;
fig. 17 is a flowchart illustrating step S27 according to an embodiment of the present application;
reference numerals
1. An image acquisition device; 11. a box body; 12. a camera 13, a back light source; 14. a lateral light source; 111. a first side plate; 112. a second side plate; s, a key placement area; 1111. a key access; 131. a first light source fixing plate; 132. a first light emitter; 15. a linker; 141. a second light source fixing plate; 142. a second light emitter; 16. light homogenizing; 17. a key holder; v1, recess; v2, boss; k1, right angle positioning feature points; k2, vertex positioning feature points; o, tooth profile characteristic points; 143. a first reference point; 144. a second reference point.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if not conflicted, the various features of the embodiments of the invention may be combined with each other within the scope of protection of the invention. Additionally, while functional block divisions are performed in the device diagrams, with logical sequences shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than the block divisions in the device diagrams, or the flowcharts.
The existing key tooth shape code identification technology relies on a pure mechanical method to identify the key tooth shape code, and the identification efficiency of the pure mechanical key tooth shape code identification technology is low, and the loss of a key is easily caused.
In order to solve the technical problem, the invention provides a key tooth shape code identification method, which utilizes a back light source and/or a side light source to collect an image of a key to be identified; the tooth profile code of the key to be identified is identified based on the image, mechanical contact does not exist between the tooth profile code and the tooth profile code part in the tooth profile code identification process, abrasion of the key tooth profile is avoided, the part needing manual operation in the identification process is mainly used for placing the key to be identified into image acquisition equipment, the operation is simple, professional skill and skill are not needed, and the tooth profile code identification efficiency and accuracy are improved.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 4) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is one type of computer storage medium, may include an operating system, a network communication module, a user interface module, and a key fob identification program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke a key shape code identification program stored in the memory 1005 and perform the following operations:
s1, acquiring an image of the key to be identified by using a back light source and/or a side light source;
and S2, identifying the tooth shape code of the key to be identified based on the image.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s3, acquiring the key model information of the key to be identified;
s4, determining a target image acquisition mode corresponding to the key model information according to the incidence relation information of the key model information and the image acquisition mode;
and S11, acquiring the image of the key to be identified by utilizing the back light source and/or the side light source based on the target image acquisition mode.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s111, acquiring a first image of the key to be identified under the independent irradiation of the back light source based on the first image acquisition mode;
and S21, identifying the tooth shape code of the key to be identified according to the first image.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s112, acquiring a first image of the key to be identified under the independent irradiation of the back light source and a second image of the key to be identified under the independent irradiation of the side light source in different directions based on the second image acquisition mode;
and S22, identifying the tooth-shaped code of the key to be identified according to the first image and the second image.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s113, acquiring second images of the key to be identified under the independent irradiation of the lateral light sources in different directions and third images of the key to be identified under the common irradiation of the lateral light sources in different directions based on the third image acquisition mode;
and S23, recognizing the tooth-shaped code of the key to be recognized according to the second image and the third image.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s24, carrying out image correction on the image to obtain a corrected image;
and S25, determining the tooth shape code of the key to be identified based on the correction image.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s26, detecting the tooth-shaped image contour of the image;
s27, positioning image tooth-shaped characteristic points in the tooth-shaped image contour according to prestored tooth-shaped characteristic point positioning information;
s28, acquiring tooth profile characteristic parameters in the tooth profile characteristic points of the image;
and S29, determining the tooth shape code of the key to be identified based on the tooth shape characteristic parameters.
Further, the processor 1001 may call a key tooth shape code identification program stored in the memory 1005, and also perform the following operations:
s271, identifying image positioning feature points in the tooth profile image outline according to the positioning feature point information;
s272, positioning image tooth-shaped feature points in the tooth-shaped image contour according to the image positioning feature points and the relative position information.
As shown in fig. 2-5, based on fig. 2-5, the image capturing device 1 comprises a back light source 13 and/or a side light source 14, and further comprises a box body 11 and a camera 12; a key inlet 1111 is arranged on the box body 11; the camera 12 and the lateral light source 14 are both arranged inside the box body 11 and connected with the inner wall of the box body 11; the orientation of the camera 12 is perpendicular to the orientation of the key access 1111; the lateral light source 14 is disposed at the periphery of the key placement area S in the case 11; the back light source 14 is arranged in the box body 11, the back light source 13 is connected with the inner wall of the box body 11, and the camera 12 and the back light source 13 are respectively arranged at two sides of the key placing area S.
Specifically, the box 11 is used to fixedly support other components of the image capturing device 1, i.e. the camera 12, the back light source 13, and the lateral light source 14, and is also used to block light to reduce interference from an external light source, so as to obtain an image convenient for identification. The box 11 may be in various shapes and structures as long as the above composition and connection mode are satisfied, for example, the box may be a hexahedron, a heptahedron, or an octahedron, the box 11 preferably has a hexahedron structure, for example, a cuboid or a cube, the box 11 in the hexahedron structure includes six side plates, the six side plates are respectively disposed on six faces, the camera 12, the backward light source 13, and the lateral light source 14 are connected to the inner wall of the box 11, that is, disposed inside the box 11, and directly connected to the side plates of the box 11 or indirectly connected to the side plates through other connectors. One side plate of the box body 11 includes a key access 1111 for a key to enter and exit the box body 11, and the side plate including the key access 1111 is set as the first side plate 111. The orientation of the key access 1111 refers to the opening direction of the key access 1111, and the orientation of the key access 1111 is perpendicular to the first side plate 111. Generally, the key to be identified includes a handle portion and a tooth portion, when the key to be identified enters the inside of the case body 11 from the key inlet 1111, the key inlet 1111 limits the handle portion of the key to be identified to the outside of the case body 11, and the key inlet 1111 limits the key to be identified to be approximately perpendicular to the first side plate 111. Through the matching arrangement of the width of the key access 1111 and the thickness of the key to be identified, the key to be identified can enter the key access opening and then be perpendicular to the side plate where the key access opening is located. Of course, in another embodiment, in order to adapt to keys to be identified with different sizes, the width of the key access opening is not matched with the thickness of the key, and the key to be identified entering the interior of the box body 11 can also be fixed by arranging the key fixing piece, so that the key to be identified enters the key access opening 1111 and then is perpendicular to the side plate where the key access opening 1111 is located. The key placement area S refers to a parking position range of a part of the box body 11 where the key to be identified enters, in the box body 11, and is schematically indicated by a dotted line area S shown in fig. 3, the orientation of the camera 12 is perpendicular to the key placement area S, and the distance between the key placement area S and the camera in the direction in which the camera faces is equal to the distance between the key access 1111 and the camera in the direction in which the camera 12 faces.
The camera 12 is used for acquiring an image of the key to be identified, and the orientation of the camera 12 refers to a normal direction of a central point of a lens of the camera 12, that is, a shooting direction of the camera 12. Preferably, the camera 12 is connected with any side plate of the box body 11 through a camera 12 connecting piece, the orientation of the camera 12 is perpendicular to the orientation of the key access 1111, the orientation of the camera 12 is perpendicular to the second side plate 112 of the box body 11, and in one embodiment, when the key to be identified enters the box body 11 from the key access 1111, the tooth-shaped area of the key to be identified faces the camera 12.
For the back light source 13 and the side light source 14, the embodiment of the image capturing device 1 of the present invention includes the following 3 setting modes: 1) only the back light source 13 is provided, and the side light source 14 is not provided; 2) only the lateral light source 14 is provided, and the back light source 13 is not provided; 3) a back light source 13 and a side light source 14 are provided.
The back light source 13 is used for illuminating the key to be identified on the opposite side of the camera 12. The backlight 13 may include a first light source fixing plate 131 and a first light emitter 132, the first light emitter 132 being fixed on the first light source fixing plate 131, preferably, the first light source fixing plate 131 being disposed perpendicular to the orientation of the camera 12. The first light source fixing plate 131 is indirectly connected with the box body 11, specifically, the image capturing device 1 further includes a connecting body 15, the connecting body 15 is connected with the second side plate 112, the first light source fixing plate 131 is placed on the connecting body 15, or the first light source fixing plate 131 is connected with the light source, and the first light source fixing plate 131 is parallel to the second side plate 112, so that the irradiation of the key to be recognized from the light source 13 is relatively uniform. The key placement area S refers to a placement area of a portion of the box body 11 where a key to be identified enters, within the box body 11, schematically indicated by a dotted area S as shown in fig. 3. The backlight source 13 and the camera 12 are separately provided at both sides of the key placing area S, thereby forming an effect of backlight collection when collecting an image. The back light source 13 is mainly used for illuminating the outer profile type key with the tooth profiles arranged at the extreme edges of the two sides of the key to obtain a key image comprising a complete tooth profile. The first light emitter and the second light emitter described below refer to various devices for illumination, for example, LED lamps.
The lateral light source 14 is mainly used for irradiating the key with the key tooth profile arranged in the innermost edge area of two sides of the key, but not the key with the inner profile type at the outermost edge, under the irradiation of the light source at a specific direction, an image of the key area corresponding to the direction can be acquired, the image is a key image comprising partial tooth profile, and the lateral light sources 14 at a plurality of directions are used for acquiring images respectively, so that complete tooth profile information can be obtained. The image acquired by the lateral light source 14 is more accurate and clear for the inner profile type key. The lateral light source 14 includes a second light source fixing plate 141 and second light emitting bodies 142, the second light emitting bodies 142 are fixed on the second light source fixing plate 141, the second light source fixing plate is connected to the bottom of the connector 15, the second light source fixing plate is disposed outside the key placement region S, and a distance between each of the second light emitting bodies 142 and the second side plate 112 is equal to a distance between the key placement region S and the second side plate 112. In one embodiment, the lateral light sources 14 may be disposed around the key placement area S in three directions except for the key access 1111, so as to form a "U" shaped lateral light source 14, and the key access 1111 is located at the opening of the "U" shaped lateral light source 14. The lateral light sources 14 in the three directions can be independently controlled, the lateral light source 14 in one direction is turned on each time an image is acquired, and the images of the key to be identified when the lateral light sources 14 in the three directions are turned on are respectively acquired, so that the tooth shape code of the key is identified based on the images of the key to be identified in the three directions. In one embodiment, a side light source 14 may also be provided at a location between the key access 1111 and the camera 12 as desired. Here, the first and second light emitters 132 and 142 may be the same type of light emitter. Due to the structural arrangement of the image acquisition equipment 1, the box body 11 plays a role in blocking light, reduces the interference of an external light source, obtains an image with prominent tooth-shaped characteristics, is convenient for tooth-shaped code identification of the image and improves the identification accuracy; the back light source 13 and the lateral light source 14 are arranged to irradiate the key to be recognized in two different directions, so that the definition of the tooth profile in the collected image is improved, the tooth profile characteristics in the image are highlighted, the recognition accuracy is improved, the device is suitable for keys with different tooth profile characteristic types, and the recognition range is expanded. The side light source can include two types, set up as first side light source and second side light source, first side light source and second side light source are close to and are set up, and the distance in camera orientation direction between camera and the first side light source is equal to the key exit and the camera in camera orientation direction distance. The first lateral light source is mainly used for collecting the image of the key to be identified in the inner convex profile type, and the second lateral light source is used for collecting the image of the key to be identified in the concave profile type.
As shown in fig. 3, in an embodiment, the image capturing apparatus 1 further includes a light uniformizing sheet 16; the light homogenizing sheet 16 is connected with the inner wall of the box body 11, is arranged inside the box body 11, is specifically arranged between the back light source 13 and the key placing area S, and is vertical to the orientation of the camera 12.
Specifically, the connection of the light uniformizing sheet 16 with the inner wall of the box body 11 means that the light uniformizing sheet 16 is disposed inside the box body 11 and is directly connected with one side plate of the box body 11 or indirectly connected with one side plate of the box body 11 through the connecting body 15. The light homogenizing sheet 16 is disposed between the backlight 13 and the key entrance 1111, that is, the light homogenizing sheet 16 is disposed between the backlight 13 and the key placement area S. The light emitted by the light source 13 back to the key to be identified is uniformly irradiated on the key to be identified after passing through the light homogenizing action of the light homogenizing sheet 16, so that the definition of the collected image can be improved, the tooth profile code identification can be conveniently carried out based on the image, and the accuracy of the tooth profile code identification is improved.
As shown in fig. 2 and 3, in an embodiment, the key fixing member 17 passes through a side plate where the key access 1111 is located from the outside of the box body 11 to enter the key access 1111, and fixes the key to be identified which enters the key access 1111.
Specifically, the key fixing member 17 is configured to press the key to be identified after the key to be identified is inserted into the box body 11 from the key inlet 1111, and fix the key to be identified. The key holder 17 includes a set screw, and when the key holder 17 is a screw, a threaded passage extending from the outside of the case 11 to the key access 1111 is provided in the first side plate 111, and the size of the threaded passage matches the size of the set screw. The set screw enters the key access 1111 through a threaded passage out of the housing 11. After the key to be identified enters the box body 11, the key to be identified can be fixed by screwing the fixing screw; after the image is collected, the key to be identified can be loosened by unscrewing the fixing screw. By arranging the key fixing piece 17, the key to be identified can be parallel to the second side plate 112 by fixing the key to be identified by the key fixing piece 17, and the key to be identified is prevented from moving or shaking in the process of acquiring an image, so that the image quality is improved.
Referring to fig. 6, fig. 6 is a schematic flowchart of a key bit shape code identification method provided in an embodiment of the present application, where the key bit shape code identification method includes:
s1, acquiring an image of the key to be identified by using a back light source and/or a side light source;
in particular, the key to be identified refers to a key which needs tooth code identification, and the key tooth code identification method of the present invention can be applied to keys containing tooth shapes, such as door lock keys, automobile keys, and the like. The key to be identified is classified into different types such as an outer profile type and/or an inner profile type according to the key profile characteristics. The key with the tooth profile arranged at one side edge or the outermost side edges of the two sides of the key belongs to an outer profile type, and the shape of the outer profile type key is schematically shown in fig. 7. Keys with teeth located inward of the two side edges of the key are classified as inner profile type. The inner profile key type key may be further classified into a concave profile type and an inner convex profile type based on the features of the depressions or the protrusions of the tooth-shaped region. The concave profile type key, in which the tooth form of the key is set in the concave portion V1, has concave portions V1 on both sides thereof, and the shape of the concave profile type key is schematically shown in fig. 8; the inner cam profile type key has projections V2 on both sides thereof, and the key has a tooth form provided on the projections V1, and the shape of the inner cam profile type key is schematically shown in fig. 9.
Step S1 includes, but is not limited to, the following several execution modes: 1) acquiring an image of a key to be identified under the independent irradiation of a back light source; 2) acquiring an image of a key to be identified under the independent irradiation of a back light source, and acquiring an image of the key to be identified under the independent irradiation of a side light source; 3) acquiring an image of a key to be identified under the common irradiation of a plurality of lateral light sources, and acquiring an image of the key to be identified under the independent irradiation of the lateral light sources; 4) and acquiring an image of the key to be identified under the independent irradiation of the lateral light source. Wherein, the above-mentioned single illumination means that only the light source in one direction is turned on, and all the light sources in other directions are turned off; the acquisition of the image of the key to be identified under the independent irradiation of the lateral light sources comprises the acquisition of the image of the key to be identified under the independent irradiation of one lateral light source, or the acquisition of the image of the key to be identified under the independent irradiation of a plurality of lateral light sources. By the mode, the key with different tooth profile characteristics can acquire the image containing obvious tooth profile information.
And S2, identifying the tooth shape code of the key to be identified based on the image.
Before performing step S2, model information of the key to be identified may be acquired, and then the tooth code of the key to be identified may be identified based on the model information and the captured image. For example, the model information input into the model input box is acquired based on the model input instruction or the selected model information is acquired based on the model selection instruction, and then the pre-stored tooth-shaped feature point positioning information is acquired according to the model information. And after the image of the key to be identified is obtained, processing the image, extracting the tooth profile characteristics in the image, and obtaining the tooth profile code of the key to be identified. Specifically, the image may be subjected to preprocessing operations such as perspective transformation, rotation, and/or scaling to obtain a corrected image. And then identifying the profile of the tooth profile image from the corrected image, identifying a positioning characteristic point from the profile of the tooth profile image based on the positioning information of the tooth profile characteristic point, identifying a tooth profile characteristic point o based on the positioning characteristic point, acquiring an imaging parameter of the tooth profile characteristic point from the image to obtain a tooth profile characteristic parameter, and acquiring the tooth profile code of the key to be identified according to the obtained tooth profile characteristic parameter. Of course, in some embodiments, the model number of the key may also be identified based on the captured image.
In the key tooth shape code identification method, firstly, a back light source and/or a side light source are/is utilized to collect an image of a key to be identified; and identifying the tooth shape code of the key to be identified based on the image. Through the key tooth shape code recognition mode, mechanical contact does not exist with the tooth shape code part in the tooth shape code recognition process, abrasion to the key tooth shape is avoided, the part needing manual operation in the recognition process is mainly to place a key to be recognized into the image acquisition equipment 1, the operation is simple, professional skill is not needed, the efficiency and the accuracy of tooth shape code recognition are improved, the key tooth shape information in an image can be highlighted by utilizing a back light source and/or a lateral light source, image processing is facilitated, and the recognition accuracy is improved.
As shown in fig. 10, in another embodiment, step S1 is preceded by the steps of:
s3, acquiring the key model information of the key to be identified;
specifically, the key type is a type code preset for the key, one key type corresponds to one key type and corresponds to the same key blank, the number of teeth is the same as the positions of the teeth, and the tooth codes of different keys of the same key type are different. The key profile type information can be determined based on the key model, and in the embodiment of the key tooth shape code identification method, the key model information of the key to be identified can be acquired in a mode of acquiring the input or selected key model information. Specifically, in the key bit shape code recognition process, an input frame for inputting information related to the key model information may be displayed first, so that the key model information of the key to be recognized is obtained from the input frame. Of course, the key model information may also be displayed in a list form, and the selected key model information may be acquired as the key model information of the key to be identified.
In addition, the key model information of the key to be identified can also be identified by image recognition technology. For example, for the key model information of the outer contour type and the inner contour type, in the process of acquiring the key model information of the key to be identified, an image of the key to be identified including the tooth-shaped region may be acquired, then the tooth-shaped region of the image may be determined, and the key model information may be determined based on the tooth-shaped region. Or comparing the image of the key to be identified with the pre-stored images corresponding to the key model information, calculating the similarity, and taking the key model information corresponding to the pre-stored image with the highest similarity as the key model information of the key to be identified.
S4, determining a target image acquisition mode corresponding to the key type information according to the incidence relation information of the key type information and the image acquisition mode;
based on the above embodiment, the side light source includes two types, which are a first side light source and a second side light source, the first side light source and the second side light source are disposed in close proximity, and a distance between the first side light source and the camera in the direction in which the camera faces is equal to a distance between the key access and the camera in the direction in which the camera faces. The first lateral light source is mainly used for collecting the image of the key to be identified in the inner convex profile type, and the second lateral light source is used for collecting the image of the key to be identified in the concave profile type.
The image acquisition mode comprises the following steps: 1) acquiring an image of the key to be identified under the condition of independent irradiation of a back light source, wherein the method is suitable for the key to be identified with the outer contour type; 2) the method is suitable for the key to be identified with the single-side tooth-shaped inner convex profile type; 3) the method is suitable for the key to be identified with the internal convex profile type of the double-side tooth shape; 4) the method is suitable for the key to be identified with the concave profile type of the single-side tooth shape; 5) the method is suitable for the key to be identified with the concave profile type of the double-side tooth shape. Of course, the means for acquiring the image of the key to be identified under the condition of being independently irradiated by the back light source in each mode can be replaced by two means of acquiring the image of the key to be identified under the condition of being commonly irradiated by the first side light sources in the two opposite directions or acquiring the image of the key to be identified under the condition of being commonly irradiated by the second side light sources in the two opposite directions.
The target image acquisition mode refers to an image acquisition mode corresponding to the key model information of the key to be identified when tooth code identification is carried out each time.
Based on the image acquisition mode and the applicable key profile type thereof, the key model and the applicable image acquisition mode may be associated in advance to generate association relationship information between the key model and the image acquisition mode, for example, the association relationship information may be an association relationship table between the key model and the image acquisition mode.
Based on step S1, after the key model information of the key to be identified is obtained, when step S4 is executed, the key model information of the key to be identified is compared with the key models in the association table, a target key model matching the key models in the association table is determined, and an image acquisition mode associated with the target key model is obtained from the association table to serve as a target image acquisition mode.
The step S1 includes the steps of:
and S11, acquiring the image of the key to be identified by utilizing the back light source and/or the side light source based on the target image acquisition mode.
Based on the step S4, after the target image capturing mode is determined, step S11 is executed to turn on the light source corresponding to the orientation based on the target image capturing mode, and capture an image by using the camera, after one image capturing is completed, the light source originally turned on may be turned off, the light source corresponding to the next image may be turned on, and the image may be captured again.
Specifically, based on the above description, if the key to be identified is of the outer profile type, the target image capturing manner determined in step S4 may be the image capturing manner 1), and after the back light source is turned on based on the image capturing manner 1), the camera is used to capture the image of the key to be identified under the back light source. If the key to be identified is of the type of the inner convex profile with the single-sided tooth shape, the back light source can be started firstly, and the camera is used for collecting the image of the key to be identified under the irradiation of the back light source; and after the back light source is turned off, the first lateral light source in the opposite direction to the key tooth shape is turned on, and the image is collected again. If the key to be identified is of the inner convex profile type with the tooth shapes on two sides, the back light source can be started first, other light sources are turned off, an image of the key to be identified under the independent irradiation of the back light source is collected, the first lateral light source in the first direction is started after the back light source is turned off, the camera is used for collecting an image of the key to be identified under the independent irradiation of the lateral light source in the direction, then the first lateral light source in the second direction is started, and the camera is used for collecting an image of the key to be identified under the irradiation of the lateral light source in the second direction. If the key to be identified is of a concave profile type with a single-sided tooth shape, the back light source can be started firstly, the camera is used for collecting an image of the key to be identified under the independent irradiation of the back light source, after the back light source is closed, the second side light source in one direction is started, and the camera is used for collecting an image of the key to be identified under the independent irradiation of the second side light source. If the key to be identified is of a type with a double-sided tooth-shaped concave contour, the back light source can be started firstly, the camera is used for collecting the images of the key to be identified under the independent irradiation of the back light source, the second side light source in the first direction is started after the back light source is closed, the camera is used for collecting the images, the second testing light source in the second direction is started after the second side light source in the first direction is closed, and the camera is used for collecting the images. In particular, the amount of the solvent to be used,
and S4, determining the tooth shape code of the key to be identified based on the image.
Based on step S3, after the image of the key to be identified is obtained, the image is processed to extract the tooth shape feature in the image, and the tooth shape code of the key to be identified is obtained. Specifically, the image may be subjected to preprocessing operations such as perspective transformation, rotation, and/or scaling to obtain a corrected image. And then identifying the profile of the tooth profile image from the corrected image, identifying a positioning characteristic point from the profile of the tooth profile image, identifying a tooth profile characteristic point o based on the positioning characteristic point, acquiring an imaging parameter of the tooth profile characteristic point from the image to obtain a tooth profile characteristic parameter, and acquiring a tooth profile code of the key to be identified according to the obtained tooth profile characteristic parameter. For keys of the outer profile type, the key bitting code can be determined directly from the outermost edge profile of the image. For an inner profile type key, the image acquired by the back light source and the image acquired by the side light source can be combined into the same coordinate system, the image acquired by the back light source provides the outermost edge feature of the key, the image acquired by the side light source provides the feature of the tooth part of the key, and the tooth code of the key to be identified is determined based on the outermost edge feature and the tooth part feature.
An execution main body of the key tooth shape code identification method comprises a mobile terminal such as a smart phone or a tablet personal computer and a fixed terminal such as a personal computer or a server, the execution main body of the key tooth shape code identification method is in communication connection with the image acquisition device 1, after the execution main body executes the step S1 and the step S2, the execution main body sends an image acquisition instruction to the image acquisition device 1 based on the searched shooting light source direction when executing the step S3, the image acquisition device 1 performs image acquisition on a key to be identified inserted into the box body 11 based on the image acquisition instruction and sends the acquired image to the execution main body, the execution main body obtains an image of the key to be identified, and then the step S4 is executed. Of course, it is also possible to configure the image capturing device 1 with a user interaction means such as a touch screen and/or a mouse, and to embed the processor performing steps S1-S4 in the image capturing device 1, with the image capturing device 1 itself serving as the execution subject of the key fob code recognition method of the present invention.
The key tooth shape code identification method of the embodiment includes the steps of firstly obtaining key type information of a key to be identified, then searching a camera light source position corresponding to the key type information through pre-stored association information of the key type and the light source position, collecting an image of the key to be identified based on the camera light source position, and then determining a tooth shape code of the key to be identified from the image. Through above-mentioned key tooth profile code recognition mode, there is not mechanical contact with tooth profile code part in tooth profile code identification process, avoid causing wearing and tearing to the key profile of tooth, the part that needs manual operation in identification process is mainly to put into image acquisition equipment 1 with waiting to discern the key, easy operation need not professional skill, is favorable to improving the efficiency and the accuracy of tooth profile code discernment.
In one embodiment, as shown in fig. 11, step S2 includes the steps of:
s24, carrying out image correction on the image to obtain a corrected image;
and S25, determining the tooth shape code of the key to be identified based on the correction image.
Specifically, based on the above-described embodiment, after the image of the key to be identified is obtained, the obtained image may be subjected to image correction to obtain a corrected image after correction. The image correction includes preprocessing processes such as perspective transformation, rotation and/or scaling. The embodiment of the invention preferably selects perspective transformation processing, takes the perspective transformation processing as an example, a correlation relationship can be constructed between the key type and perspective feature point information corresponding to the key type in advance, in the implementation process, four perspective feature points in the acquired image can be identified firstly based on the key type, the original coordinates of the four perspective feature points in the original image are obtained, a perspective transformation matrix is calculated according to the original coordinates of the perspective feature points and the set target coordinates, then the perspective transformation matrix is used for carrying out perspective transformation processing on the acquired image, a corrected image after the perspective transformation processing is obtained, and then the tooth-shaped feature is extracted from the corrected image, and the tooth-shaped code of the key to be identified is obtained. If the same key to be identified has a plurality of images acquired by using the camera light sources in different directions, a perspective transformation matrix is calculated based on one of the images, and then the perspective transformation matrix is used for carrying out perspective transformation processing on the plurality of images of the same key to be identified so as to obtain a plurality of corrected images in the same plane and with the same transformation specification.
In the key tooth shape code identification method of the above embodiment, the acquired image is corrected, and then the tooth shape code of the key to be identified is extracted from the corrected image. Through the image correction processing process, the specification parameter proportion of the key to be identified can be restored in the image, so that the proportion of the imaging parameter of the image is consistent with the specification parameter proportion of the key, the identification error caused by the inclined placement of the key to be identified in the image acquisition equipment 1 is avoided, and the accuracy of tooth profile code identification is improved.
In an embodiment, the target image capturing mode includes a first image capturing mode in which only the backlight is activated, as shown in fig. 12, step S11 includes:
s111, acquiring a first image of the key to be identified under the independent irradiation of the back light source based on the first image acquisition mode;
specifically, the first image acquisition mode refers to a mode in which only a backlight source is activated to perform image acquisition, and the first image refers to an image acquired by using the first image acquisition mode. The first image capturing mode corresponds to the image capturing mode 1) in the above embodiment, that is, after the back light source is turned on based on the image capturing mode 1) and the light sources except the back light source are turned off, the camera is used to capture the image of the key to be identified under the back light source. Based on the above embodiment, the first image capturing mode is suitable for the key to be identified of the outer profile type, and therefore, the model number of the key of the outer profile type can be associated with the first image capturing mode in advance.
The step S2 includes the steps of:
and S21, identifying the tooth shape code of the key to be identified according to the first image.
In particular, based on the above-described embodiments, the tooth shape code can be determined from the outer contour feature after the first image is obtained. The outer contour features refer to imaging parameters of the teeth in the image. As shown in fig. 13, for the same type of outer profile type key, the key vertex and/or the key shoulder corner point may be used as the positioning feature point, and the tooth point is the tooth-shaped feature point o, where the distance between each tooth of the same type of key and the positioning feature point in the X direction is constant. More than three reference points are set on the second light source fixing plate 141 of the U-shaped lateral light source 14, as shown in fig. 5, and the actual distance between the first reference point 143 and the second reference point 144 and the actual distance between the positioning feature point and the tooth-shaped feature point o are prestored. Based on the image correction of the above embodiment, the x direction of the key is parallel to the x' axis of the image, and the key image is located on the plane of the reference point. After the first image is obtained, identifying a reference point and an image positioning characteristic point in the image, determining an image transformation ratio based on the distance between the reference point in the image and a pre-stored reference point distance, constructing an image rectangular coordinate system based on the image positioning characteristic point in the image and an x ' axis in a corrected image plane, determining the position of teeth in the image rectangular coordinate system based on the transformation ratio and the pre-stored distance between the positioning characteristic point and a tooth profile characteristic point o, and obtaining the value of the teeth in the image on a y ' axis vertical to the x ' axis to serve as the outer contour characteristic of the first image. Of course, a rectangular image coordinate system may also be constructed with a certain corner point of the perspective transformed plane as the origin and two sides of the corner point as the x 'axis and the y' axis. After obtaining the values of the bits on the image on the y 'axis, the actual value sequence of the bits can be obtained based on the image and the actual transformation ratio, and the sequence can be used as the key's tooth shape code.
According to the key tooth shape identification method, the first image of the key to be identified under the independent irradiation of the back light source is acquired based on the first image acquisition mode, the tooth shape code of the key to be identified is identified according to the first image, the mode is suitable for the key to be identified with the outer contour type, the back light source is used for acquiring the image, the tooth shape of the key with the outer contour type can be highlighted, the image identification is convenient, the implementation process is relatively simple, and the key tooth shape code identification efficiency and accuracy can be improved.
As shown in fig. 14, in an embodiment, the target image capturing mode includes a second image capturing mode in which a back light source and a side light source are respectively activated, and the step S11 includes the steps of:
s112, acquiring a first image of the key to be identified under the independent irradiation of the back light source and a second image of the key to be identified under the independent irradiation of the side light source in different directions based on the second image acquisition mode;
the second image acquisition mode refers to an image acquisition mode in which a back light source and a side light source are respectively started for image acquisition. The first image is defined in accordance with the first image of the above-described embodiment, and the second image refers to an image when the object to be recognized is illuminated solely with the side light source of one orientation. The image acquisition mode is suitable for the key to be identified with the inner contour characteristics. If the key to be identified is of the inner convex profile type with the tooth shapes on two sides, the back light source can be started first, other light sources are turned off, an image of the key to be identified under the independent irradiation of the back light source is collected, the first lateral light source in the first direction is started after the back light source is turned off, the camera is used for collecting an image of the key to be identified under the independent irradiation of the lateral light source in the direction, then the first lateral light source in the second direction is started, and the camera is used for collecting an image of the key to be identified under the irradiation of the lateral light source in the second direction.
The step S2 includes the steps of:
and S22, identifying the tooth-shaped code of the key to be identified according to the first image and the second image.
For keys of the outer profile type, the key bitting code can be determined directly from the outermost edge profile of the image. For an inner profile type key, the image acquired by the back light source and the image acquired by the side light source can be combined into the same coordinate system, the image acquired by the back light source provides the outermost edge feature of the key, the image acquired by the side light source provides the feature of the tooth part of the key, and the tooth code of the key to be identified is determined based on the outermost edge feature and the tooth part feature. For keys of the outer profile type, the key bitting code can be determined directly from the outermost edge profile of the image. For an inner profile type key, the image acquired by the back light source and the image acquired by the side light source can be combined into the same coordinate system, the image acquired by the back light source provides the outermost edge feature of the key, the image acquired by the side light source provides the feature of the tooth part of the key, and the tooth code of the key to be identified is determined based on the outermost edge feature and the tooth part feature.
According to the key tooth profile identification method, the first image of the key to be identified under the independent irradiation of the back light source and the second image of the key to be identified under the independent irradiation of the lateral light source in different directions are acquired based on the second image acquisition mode, and the tooth profile code of the key to be identified is identified according to the first image and the second image.
As shown in fig. 15, in an embodiment, the target image capturing mode includes a third image capturing mode in which only the side light source is activated:
the step S11 includes the steps of:
s113, acquiring second images of the key to be identified under the independent irradiation of the lateral light sources in different directions and third images of the key to be identified under the common irradiation of the lateral light sources in different directions based on the third image acquisition mode;
the third image acquisition mode refers to a mode of only enabling the lateral light source to acquire images, and the third image refers to a mode including the second image and the third image.
Specifically, the backlight effect of the backlight light source can be realized by simultaneously starting more than two lateral light sources. More than two lateral light sources can be started first, the camera is used for collecting more than two lateral light sources to collect a third image, and then a single lateral light source is started each time to continue image collection until the set image collection of each lateral light source is completed.
The step S2 includes the steps of:
and S23, recognizing the tooth-shaped code of the key to be recognized according to the second image and the third image.
Based on the above embodiments, for keys of the outer profile type, the key bitting code can be determined directly from the image outermost edge profile. For an inner profile type key, the image acquired by the back light source and the image acquired by the side light source can be combined into the same coordinate system, the image acquired by the back light source provides the outermost edge feature of the key, the image acquired by the side light source provides the feature of the tooth part of the key, and the tooth code of the key to be identified is determined based on the outermost edge feature and the tooth part feature. For keys of the outer profile type, the key bitting code can be determined directly from the outermost edge profile of the image. For an inner profile type key, the image acquired by the back light source and the image acquired by the side light source can be combined into the same coordinate system, the image acquired by the back light source provides the outermost edge feature of the key, the image acquired by the side light source provides the feature of the tooth part of the key, and the tooth code of the key to be identified is determined based on the outermost edge feature and the tooth part feature.
According to the key tooth shape identification method, the second image of the key to be identified under the independent irradiation of the lateral light sources in different directions and the third image of the key to be identified under the common irradiation of the lateral light sources in different directions are acquired based on the third image acquisition mode, and the tooth shape code of the key to be identified is identified according to the second image and the third image.
As shown in fig. 16, in an embodiment, the step S2 includes the steps of:
s26, detecting the tooth-shaped image contour of the image;
the profile of the tooth image refers to the profile of the tooth portion of the key in the image. Specifically, based on the above-described embodiment, when step S27 is executed, the image may be image-corrected, a corrected image may be obtained, and then the profile image contour may be detected from the corrected image. And for the corrected image of the key to be identified with the outer contour type, identifying the contour of the key based on the image gray scale by using an image edge detection algorithm to obtain the tooth profile image contour. For the corrected image of the key to be identified with the inner contour type, the image can be subjected to difference processing firstly, and the tooth profile image contour is obtained based on the difference processing structure.
S27, positioning image tooth-shaped characteristic points in the tooth-shaped image contour according to prestored tooth-shaped characteristic point positioning information;
as shown in fig. 17, in an embodiment, the tooth-shaped feature point positioning information includes positioning feature point information and relative position information between the tooth-shaped feature point and the positioning feature point, and the step S49 includes the steps of:
s271, identifying image positioning feature points in the tooth profile image outline according to the positioning feature point information;
and S272, positioning the image tooth profile characteristic points in the tooth profile image outline according to the image positioning characteristic points and the relative position information.
Specifically, the feature point positioning information refers to information for positioning image tooth feature points in the tooth image profile, and the image tooth feature points refer to corresponding points of tooth points of the key in the tooth image profile. The locating feature points refer to feature points which are convenient to identify in the image and can be used for locating the tooth-shaped feature points of the image, and the locating feature point information comprises information of the type of the locating feature points, for example, the type of the locating feature points can be a right-angle locating feature point k1 or a vertex locating feature point k2, and different key types can adopt different types of locating feature points. For example, if the positioning feature point corresponding to the key type of the key to be identified is a right-angle point, a point corresponding to a right angle in the profile of the tooth image may be identified as the positioning feature point. After the first image is obtained, identifying a reference point and an image positioning characteristic point in the image, determining an image transformation ratio based on the distance between the reference point in the image and a pre-stored reference point distance, constructing an image rectangular coordinate system based on the image positioning characteristic point in the image and an x' axis in a corrected image plane, and determining the position of a tooth in the image rectangular coordinate system, namely the position of the image tooth-shaped characteristic point based on the transformation ratio and the pre-stored distance between the positioning characteristic point and the tooth-shaped characteristic point.
S28, acquiring tooth profile characteristic parameters in the tooth profile characteristic points of the image;
specifically, based on the above-described embodiment, the value of each image tooth profile feature point in the image on the y ' axis perpendicular to the x ' axis can be obtained, and the y ' value corresponding to each image tooth profile feature point is used as the tooth profile feature parameter.
And S29, determining the tooth shape code of the key to be identified based on the tooth shape characteristic parameters.
After the tooth profile characteristic parameters are obtained, a specification parameter sequence of the actual tooth points of the key to be identified is determined based on the image transformation ratio, and the specification parameter sequence is used as a tooth profile code.
In the key tooth profile identification method, the tooth profile image profile of the image is detected, the image tooth profile characteristic points in the tooth profile image profile are positioned according to the prestored tooth profile characteristic point positioning information, the tooth profile characteristic parameters in the image tooth profile characteristic points are obtained, and the tooth profile code of the key to be identified is determined based on the tooth profile characteristic parameters.
The present invention also provides a key bit shape code recognition device, which includes a memory, a processor and a key bit shape code recognition program stored in the memory and operable on the processor, wherein the processor implements the steps of the key bit shape code recognition method according to the above embodiments when executing the key bit shape code recognition program.
Furthermore, the present invention also proposes a storage medium comprising a key bit shape code recognition program which, when executed by a processor, implements the steps of the key bit shape code recognition method as described in the above embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a television, a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (13)

1. A method of identifying a key tooth form code, the method comprising the steps of:
s1, acquiring an image of the key to be identified by using a back light source and/or a side light source;
and S2, identifying the tooth shape code of the key to be identified based on the image.
2. The key tooth shape code identification method according to claim 1, wherein said step S1 is preceded by the step of:
s3, acquiring the key model information of the key to be identified;
s4, determining a target image acquisition mode corresponding to the key model information according to the incidence relation information of the key model information and the image acquisition mode;
the step S1 includes the steps of:
and S11, acquiring the image of the key to be identified by utilizing the back light source and/or the side light source based on the target image acquisition mode.
3. The key tooth shape code identification method according to claim 2, wherein the target image capturing mode includes a first image capturing mode in which only a backlight is activated, and the step S11 includes the steps of:
s111, acquiring a first image of the key to be identified under the independent irradiation of the back light source based on the first image acquisition mode;
the step S2 includes the steps of:
and S21, identifying the tooth shape code of the key to be identified according to the first image.
4. The key tooth shape code identification method according to claim 2, wherein the target image capturing mode includes a second image capturing mode enabling a back light source and a side light source, respectively, and the step S11 includes the steps of:
s112, acquiring a first image of the key to be identified under the independent irradiation of the back light source and a second image of the key to be identified under the independent irradiation of the side light source in different directions based on the second image acquisition mode;
the step S2 includes the steps of:
and S22, identifying the tooth-shaped code of the key to be identified according to the first image and the second image.
5. The key tooth shape code identification method according to claim 2, wherein the target image capturing mode includes a third image capturing mode in which only the side light source is activated, and the step S11 includes the steps of:
s113, acquiring second images of the key to be identified under the independent irradiation of the lateral light sources in different directions and third images of the key to be identified under the common irradiation of the lateral light sources in different directions based on the third image acquisition mode;
the step S2 includes the steps of:
and S23, recognizing the tooth-shaped code of the key to be recognized according to the second image and the third image.
6. The key tooth shape code recognition method as claimed in claim 1, wherein the step S2 includes the steps of:
s24, carrying out image correction on the image to obtain a corrected image;
and S25, determining the tooth shape code of the key to be identified based on the correction image.
7. The identification method according to claim 1, wherein said step S2 includes the steps of:
s26, detecting the tooth-shaped image contour of the image;
s27, positioning image tooth-shaped characteristic points in the tooth-shaped image contour according to prestored tooth-shaped characteristic point positioning information;
s28, acquiring tooth profile characteristic parameters in the tooth profile characteristic points of the image;
and S29, determining the tooth shape code of the key to be identified based on the tooth shape characteristic parameters.
8. The key fob code identifying method of claim 7, wherein the tooth profile feature point location information includes location feature point information and relative location information between the tooth profile feature point and the location feature point, the step S27 including the steps of:
s271, identifying image positioning feature points in the tooth profile image outline according to the positioning feature point information;
s272, positioning image tooth-shaped feature points in the tooth-shaped image contour according to the image positioning feature points and the relative position information.
9. A key tooth identification device, comprising: memory, a processor and an identification program stored on the memory and executable on the processor, the identification program when executed by the processor implementing the steps of the key tooth shape code identification method according to any one of claims 1-8.
10. A storage medium having stored thereon a key bit identification program which, when executed by the processor, carries out the steps of the key bit identification method according to any one of claims 1-8.
11. An image pickup apparatus characterized in that the image pickup apparatus is applied to step S1 as recited in claim 1; the image acquisition equipment comprises a back light source and/or a side light source, and further comprises a box body and a camera; the box body is provided with a key inlet and a key outlet; the camera and the lateral light source are both arranged inside the box body and are connected with the inner wall of the box body; the orientation of the camera is perpendicular to the orientation of the key access; the lateral light source is arranged on the periphery of a key placing area in the box body; the backlight set up in the inside of box body, just backlight with the inner wall of box body is connected, the camera with backlight is located separately the both sides in key placement area.
12. The image capturing apparatus of claim 11, wherein the image capturing apparatus further comprises a light homogenizer; the light homogenizing sheet is connected with the inner wall of the box body, arranged in the box body, arranged between the back light source and the key placing area and perpendicular to the direction of the camera.
13. The image capturing apparatus of claim 11, wherein the image capturing apparatus further comprises a key holder; the key fixing piece penetrates through the side plate where the key access opening is located from the outside of the box body to enter the key access opening, and a key to be identified entering the key access opening is fixed.
CN202010056497.4A 2020-01-18 2020-01-18 Key tooth shape code identification method and device, storage medium and image acquisition equipment Pending CN111242141A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202010056497.4A CN111242141A (en) 2020-01-18 2020-01-18 Key tooth shape code identification method and device, storage medium and image acquisition equipment
EP20913855.1A EP4092569A4 (en) 2020-01-18 2020-08-27 Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
US17/439,363 US11790626B2 (en) 2020-01-18 2020-08-27 Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
PCT/CN2020/111755 WO2021143146A1 (en) 2020-01-18 2020-08-27 Method and apparatus for recognizing bitting code of key, and storage medium and image collection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010056497.4A CN111242141A (en) 2020-01-18 2020-01-18 Key tooth shape code identification method and device, storage medium and image acquisition equipment

Publications (1)

Publication Number Publication Date
CN111242141A true CN111242141A (en) 2020-06-05

Family

ID=70872752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010056497.4A Pending CN111242141A (en) 2020-01-18 2020-01-18 Key tooth shape code identification method and device, storage medium and image acquisition equipment

Country Status (1)

Country Link
CN (1) CN111242141A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021143146A1 (en) * 2020-01-18 2021-07-22 深圳数马电子技术有限公司 Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
CN113310414A (en) * 2021-06-01 2021-08-27 北京远鸥科技有限公司 Key image tooth profile rapid measurement and definition method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021143146A1 (en) * 2020-01-18 2021-07-22 深圳数马电子技术有限公司 Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
US11790626B2 (en) 2020-01-18 2023-10-17 Shenzhen Xhorse Electronics Co., Ltd Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
CN113310414A (en) * 2021-06-01 2021-08-27 北京远鸥科技有限公司 Key image tooth profile rapid measurement and definition method and system

Similar Documents

Publication Publication Date Title
US10521640B1 (en) System and method of capturing and producing biometric-matching quality fingerprints and other types of dactylographic images with a mobile device
US8848088B2 (en) Product identification using mobile device
WO2017156964A1 (en) Terminal unlocking method and terminal
CN109145926B (en) Similar picture identification method and computer equipment
CN110472480A (en) Item identification method, device and computer readable storage medium
WO2017166318A1 (en) Fingerprint identification method and apparatus, and terminal
CN111242141A (en) Key tooth shape code identification method and device, storage medium and image acquisition equipment
US11048950B2 (en) Method and device for processing images of vehicles
CN112614085A (en) Object detection method and device and terminal equipment
US11302099B2 (en) Method and device for recognizing states of electrical devices
CN113780201B (en) Hand image processing method and device, equipment and medium
CN112465517A (en) Anti-counterfeiting verification method and device and computer readable storage medium
CN110910445A (en) Object size detection method and device, detection equipment and storage medium
CN111080665B (en) Image frame recognition method, device, equipment and computer storage medium
CN109241892B (en) Instrument panel reading method, instrument panel reading device and electronic equipment
CN110187806B (en) Fingerprint template input method and related device
US9904355B2 (en) Display method, image capturing method and electronic device
US11790626B2 (en) Method and apparatus for recognizing bitting code of key, and storage medium and image collection device
JP2012226085A (en) Electronic apparatus, control method and control program
TWI773961B (en) Image unlocking method and fingerprint identification device and information processing device using the same
CN111598094B (en) Angle regression instrument reading identification method, equipment and system based on deep learning
CN113850766A (en) Camshaft surface defect detection method and device and computer readable storage medium
CN112200151A (en) Iris collecting and identifying device
CN112016386A (en) Training data acquisition method and system suitable for security inspection recognition
JP2005148522A5 (en)

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