Method for identifying an object in a search image, method for generating a pattern vector and using the method for determining the position and / or orientation of a security element of a banknote
By moving the pattern vector in the image and using the difference in coordinates and orientation of feature pixels to identify objects, the problem of slow and unreliable object recognition under illumination conditions in the prior art is solved, and faster and more reliable object recognition is achieved, especially for the recognition of banknote security elements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GIESECKE & DEVRIENT CURRENCY TECHNOLOGY GMBH
- Filing Date
- 2022-03-02
- Publication Date
- 2026-06-09
AI Technical Summary
Existing methods are slow and unreliable when identifying objects under different lighting conditions, and they are difficult to effectively distinguish between objects and background.
By moving a pattern vector in an image, the success value is determined using the difference in coordinates and orientation of feature pixels, and objects, especially security elements of banknotes, are identified. The pattern vector describes the object through the coordinates of feature pixels, and the object is identified by combining the difference or ratio of the intensity values of the feature pixels in the first and second directions.
It enables faster and more reliable identification of objects, especially the security elements of banknotes, under different lighting conditions, improving the accuracy and efficiency of identification.
Smart Images

Figure CN116997943B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for identifying objects in a search image. A pattern vector is provided, which describes the object using the coordinates of feature pixels. The pattern vector is moved at different locations in the search image. Furthermore, a corresponding success value is determined at each location, and the object is identified at that location based on the success value. The invention also relates to a method for generating the corresponding pattern vector. Additionally, the invention relates to using a corresponding method to determine the position and / or orientation of security elements on banknotes. Background Technology
[0002] Methods for identifying objects are known. Therefore, this field is often referred to as pattern recognition or object recognition in digital images.
[0003] One known method is the Viola-Jones method. The Viola-Jones method can be used to identify prominent objects such as faces in digital images. At its core is the Viola-Jones basic pattern, which is partly based on the so-called Haar wavelet. The Haar wavelet is a simple wavelet composed of two rectangular functions.
[0004] In the following text, we will specifically aim to identify objects under constantly changing lighting conditions. The challenge here is that the same object may be depicted as bright against a dark background one time and as dark against a light background the next.
[0005] Under these conditions, known methods have repeatedly proven to be slow or unreliable. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to identify objects more quickly and reliably, which may be mapped in digital images with different brightness depending on the illumination.
[0007] According to the present invention, the above-mentioned problems are solved by a corresponding method having the features described in the independent claim. Advantageous embodiments of the invention are the subject of the dependent claims.
[0008] In the method according to the invention, objects, particularly banknotes, are identified in a search image. The following steps are performed:
[0009] a) Provide a pattern vector or pattern matrix that describes the object using the coordinates of its feature pixels;
[0010] b) Move the pattern vector at different locations in the search image;
[0011] c) Determine the corresponding success value at different locations; and
[0012] d) Identify the object at that location based on the success value, especially the maximum success value.
[0013] The key idea of this invention is, in particular, to associate a first direction and a second direction different from the first direction with each feature pixel via a pattern vector, wherein a first total intensity value of a first number of one-dimensionally arranged pixels in the first direction and a second total intensity value of a second number of one-dimensionally arranged pixels in the second direction are determined respectively, wherein a difference, in particular and / or a ratio, between the first total intensity value and the second total intensity value are determined respectively, wherein a success value is determined based on the corresponding difference, in particular and / or the corresponding ratio.
[0014] This invention is based on the understanding that sufficient features are provided by coordinates, i.e., the position of feature pixels and the direction in which the difference is formed, to identify objects or positions and / or directions in a search image.
[0015] When generating pattern vectors or classifiers, feature pixels are specifically selected at edges or locations with high frequency, i.e., pixels at locations with transitions from light to dark or dark to light. These feature pixels, or in particular, the two-dimensional pattern of feature pixels, are then re-found in the search image; this is the point cloud spanned by the coordinates of the feature pixels. For this, it is not necessary to specify specific values for the differences between pixels in different directions for each feature pixel. The corresponding positions of the feature pixels and their respective associated directions are sufficient.
[0016] The number of pixels for the corresponding direction of the interpolation can also be provided by the pattern vector, or it can be given in advance as a general standard setting.
[0017] Specifically, the first total strength value and / or the second total strength value are formed by an average value, such as an arithmetic mean or a median.
[0018] For example, success values can be derived directly from differences, such as through summation and optional normalization. However, success values can also be generated using a weighted function, into which differences are introduced in a weighted manner.
[0019] Preferably, the maximum difference in the difference results in a successful identification of the object. The location of the feature pixel is found by the maximum difference, at which the corresponding intensity difference between the pixel in the first direction and the pixel in the second direction is the largest.
[0020] When generating pattern vectors according to another method of the invention, it is preferable that after the feature pixels have been selected according to the criterion of maximum difference, it is sufficient to find the position of the feature pixel with the largest difference in the search image.
[0021] Furthermore, it is preferably specified that the first and second directions are correlated in opposite directions by 180°. By arranging them preferably in a quasi-diameter manner, more meaningful differences can be generated for each feature pixel. This allows for more reliable object identification.
[0022] Furthermore, it is preferably specified that the first quantity and / or the second quantity is determined to be greater than one. For a quantity greater than one, especially a quantity greater than two, such as three, four, or five, feature pixels can be more reliably determined on salient pixels, i.e., edges or corners, i.e., high-frequency image regions.
[0023] Furthermore, it is preferably specified that the first and / or second number is determined to be less than ten, particularly six. By limiting the first and / or second number, on the one hand, the overhead of determining the difference when generating the pattern vector and identifying objects in the search image can be limited. On the other hand, the provision of an appropriate number of feature pixels can thus be kept sufficiently large, such that the pattern vector can generate a sufficient number of feature pixels, for example, at least 10 to 100 feature pixels.
[0024] Furthermore, it is preferable to specify that the first quantity and / or the second quantity are determined differently. Thus, for example, there may be more pixels in the low-intensity direction than in the high-intensity direction, and vice versa. This allows the pattern vector to be set individually for a specific object. Therefore, the object or its position and / or orientation can be identified or located more reliably.
[0025] Furthermore, it is preferably specified that the pattern vector has a maximum of four values for each feature pixel. In this case, the pattern vector can only have the x-coordinate value of the feature pixel, the y-coordinate value of the feature pixel, a first relative value relative to a first direction of the corresponding feature pixel, and a second relative value relative to a second direction of the corresponding feature pixel, respectively. For example, for the first relative value and / or the second relative value, as a general specification, all pixels adjacent to the feature pixel can be numbered. For example, in the case of eight neighbors, this means eight numbers. Therefore, as a predetermined value, for example, given in advance, the value three always refers to the adjacent pixel at three o'clock, i.e., to the right of the reference pixel.
[0026] Furthermore, it is preferable to specify that the security element of the banknote is to be identified as an object. The security element of a banknote typically possesses special security features that are difficult to replicate, reprint, or emboss without sophisticated mechanisms. For example, a popular security element for banknotes is a hologram. Holograms are intentionally created so that light is reflected differently depending on the angle of incidence. This presents a challenge for automatically identifying such security elements using known methods, such as banknote processing devices. By utilizing methods designed for object identification, security elements can be identified more reliably.
[0027] Furthermore, it is preferably specified that the object is identified on the banknote. Banknotes typically have a heterogeneous background because each area on the banknote substrate is used to place information there, such as information about the denomination or serial number, and / or security elements and / or security features. This heterogeneity can also be a challenge for known methods, as it is difficult to distinguish the object from the background. By utilizing methods for identifying the object, security elements can be identified more reliably.
[0028] Alternatively, a ratio can be determined based on the difference. Then, a ratio is formed based on the first total strength value and the second strength value. For example, the first total strength value is divided by the second strength value, or vice versa. The success value is then determined based on the ratio.
[0029] In another method according to the invention, a pattern vector is generated. The following steps are performed:
[0030] (a) Determine the outlines of objects in the pattern image, particularly banknotes;
[0031] (b) Determine the gradient direction of the pixels of the contour;
[0032] (c) Determine the gradient amount of the pixels of the contour.
[0033] (d) When the gradient is greater than the threshold, the pixels of the contour are determined as feature pixels.
[0034] (e) Determine the corresponding positions of the feature pixels;
[0035] (f) Determine the first and second directions based on the gradient directions of the feature pixels; and
[0036] (g) Generate a pattern vector using, in particular, only the positions of feature pixels in the pattern image and the first and second directions.
[0037] Objects in a pattern image can also be called pattern objects.
[0038] Another method can also be referred to as the training phase.
[0039] The resulting pattern vector can then be provided in the method according to the invention for object identification.
[0040] Preferably, the pattern vector having a first direction and / or a second direction is generated only relative to the relevant feature pixels.
[0041] Specifically, it is stipulated that the first direction always points to a lower intensity value relative to the second direction, while the second direction always points to a higher intensity value relative to the first direction.
[0042] The present invention also relates to an application. In an application according to the invention, the method for identifying objects in a search image according to the invention is used to determine the position and / or orientation of a security element of a banknote relative to the banknote's substrate.
[0043] To identify orientation, a pattern vector or search window is applied in a predetermined manner, twisting or rotating it. Orientation is then preferably identified at the point of rotation with the highest success value.
[0044] The method for identifying objects in a search image according to the present invention is particularly applicable in banknote processing devices.
[0045] The preferred embodiments and advantages associated with the method according to the invention are correspondingly applicable to other methods and applications according to the invention within the scope of their applicability. The preferred embodiments and advantages proposed with respect to other methods and applications according to the invention are correspondingly applicable to the method according to the invention.
[0046] Further features of the invention are derived from the claims, drawings, and description thereof. Attached Figure Description
[0047] Embodiments of the present invention will be further illustrated with reference to the schematic diagram.
[0048] In the attached diagram:
[0049] Figure 1 A schematic diagram of a search image with an object is shown, on which a pattern vector moves.
[0050] Figure 2 A schematic diagram is shown of a patterned image with an object, from which a pattern vector is generated;
[0051] Figure 3 A detailed schematic diagram of a search image with objects is shown;
[0052] Figure 4 A detailed schematic diagram of a patterned image with the outline of an object is shown;
[0053] Figure 5 A schematic diagram of a banknote as a pattern image is shown;
[0054] Figure 6 A schematic diagram of a banknote as a search image is shown, wherein the banknote has a folded corner; and
[0055] Figure 7 Another schematic diagram of a banknote as a pattern image is shown, in which the banknote's security element is distorted and recorded.
[0056] In the accompanying drawings, elements that are identical or have the same function have the same reference numerals. Detailed Implementation
[0057] Figure 1 The search image 1 with object 2 is shown schematically.
[0058] According to an embodiment, the search image 1 is specifically formed as an image of banknote 3.
[0059] The image can be formed as a single-channel grayscale image, a multi-channel color image, or a multispectral image. For example, the image is recorded using a camera. The camera can be part of a banknote processing device.
[0060] Object 2 is specifically formed as security element 4 in banknote 3. For example, security element 4 may be formed as a printed feature, security strip, security thread, foil patch, hologram and / or security imprint.
[0061] According to an embodiment, pattern vector 5 is moved on the search image 1. The window 6 or the region opened by pattern vector 5 is, for example, rectangular and two-dimensional. Furthermore, window 6 is preferably smaller than the search image 1.
[0062] Pattern vector 5 has the coordinates (x, y) of feature pixel 7.
[0063] The window 6, opened by pattern vector 5, moves over the search image 1. Specifically, the pattern vector moves to all positions in the search image 1 and performs operations there.
[0064] When performing a search on pattern vector 5 in image 1, a first direction 8 and a second direction 9 different from the first direction 8 are considered for each feature point 7. Directions 8 and 9 are specifically formed as relative directions to the corresponding feature pixel 7. Furthermore, the directions are specifically included in or provided by pattern vector 5.
[0065] According to an embodiment, for each feature pixel 7, a first total intensity value 10 is determined for a first number 11 of pixels arranged in a one-dimensional manner along a first direction 8. For example, the first number 11 may have values from 1 to 20, preferably from 2 to 10, and particularly from 3 to 6. One-dimensional, in particular, refers to pixels arranged along a line. The first total intensity value 10 may, for example, be formed by the arithmetic mean or median of the corresponding intensity values of the pixels.
[0066] Similar to the first total intensity value 10, a second total intensity value 12 is determined for a second number 13 of pixels arranged in a one-dimensional manner in the second direction 9. The second number 13 may be different from the first number 11.
[0067] The pixels in the first direction 8, numbering 11 pixels, can be called lead points. The pixels in the second direction 9, numbering 13 pixels, can be called trail points.
[0068] The first quantity 11 and / or the second quantity 13 may be included in the pattern vector 5. Alternatively or supplementarily, the first quantity 11 and / or the second quantity 13 may generally be predetermined only once for all feature pixels 7. However, the first quantity 11 and / or the second quantity 13 may also be predetermined individually for each of the feature pixels 7.
[0069] Furthermore, according to the embodiment, a difference value 14 is determined for each feature pixel 7. The difference value 14 is determined to be the difference between the first total intensity value 10 and the second total intensity value 12.
[0070] Alternatively, the difference of 14 can be used to form a mathematical quantity.
[0071] According to an embodiment, a success value 15 is now determined based on the difference 14. According to an embodiment, a high success value 15 means that there is a high match between pattern vector 5 and object 2 in the search image 1. Specifically, it is assumed that the position of object 5 is at the position with the highest success value 15. For example, the success value 15 can be formed by adding the differences 14. Optionally, the added differences 14 can be normalized.
[0072] Additionally, the difference of 14 can also be incorporated into the success value in a weighted manner.
[0073] The conclusion of a difference of 14 or a success value of 15 is that the object's position is where the pattern of feature pixel 7 is located with the highest contrast or frequency.
[0074] This method can also be described as follows based on the formula.
[0075] p(x,y)=argmax{S(x i ,y i )},(i,j)∈[-d,+d]
[0076]
[0077]
[0078]
[0079] in
[0080] x = row pixel coordinate
[0081] y = column pixel coordinate
[0082] d = size of window 6
[0083] l = scaling parameter
[0084] t = scaling parameter
[0085] W = weighting parameter
[0086] LP = the number of pixels in the first quantity of 11 pixels along the first direction 8.
[0087] TP = the number of pixels in the second quantity of 13 pixels along the second direction 9.
[0088] This method can be called Location Matching Point Group (LPMG) for short.
[0089] Figure 2 A pattern image 16 is shown, from which a pattern vector 5 is generated. The pattern image 16 can be formed into a banknote.
[0090] Determine the outline 17 of the object 18 of the banknote 19 in the pattern image 16. The outline may be determined, for example, by a morphological filter, such as the Sobel operator or multiple edge recognizers.
[0091] Furthermore, a gradient direction 20 is determined for the pixels of contour 17. The gradient direction 20 specifically indicates the direction along which the maximum brightness difference extends. In other words, the gradient direction 20 is preferably determined in the direction of the maximum gradient amount.
[0092] In addition, a gradient amount 21 is determined for the pixels of contour 17. The gradient amount 21 indicates the magnitude of the brightness difference.
[0093] In a further step, when the corresponding gradient amount 21 is greater than a threshold, the pixels of contour 17 are determined as feature pixels 22. According to the embodiment, by using the threshold, only the most prominent pixels are determined or selected as feature pixels 22.
[0094] Furthermore, the corresponding positions of the previously determined or selected feature pixels 22 are determined. This can be achieved, for example, by acquiring the row pixel coordinates and column pixel coordinates of the corresponding feature pixels 22 respectively.
[0095] In a further step, a first direction 23 and a second direction 24 are determined based on the gradient direction 20. Directions 23 and 24 are preferably determined in opposite directions. Furthermore, directions 23 and 24 are preferably determined perpendicular to the profile 17.
[0096] In another step, the pattern vector 5 is generated using the positions of the feature pixels 22 in the pattern image 16 and the first direction 23 and the second direction 24.
[0097] Then, pattern vector 22 can be applied to the search image 1 to identify object 2.
[0098] In particular, object 2 in search image 1 and object 18 in pattern image 16 are identical or at least similar in formation.
[0099] Specifically, the recording distance and / or recording angle for recording the search image 1 and the pattern image 16 are similarly set. At least, the recording of the search image 1 can be performed, for example, using a recording unit included in a banknote processing device, particularly a camera.
[0100] Figure 3 A detailed schematic diagram of the search image 1 is shown. According to an embodiment, a portion of the shown search image 1 has two feature pixels 7. The first quantity 11 is three or one. In both cases, the second quantity 13 is three. In this case, the corresponding feature pixels 7 are not calculated when determining the quantities 11 and 13. However, the corresponding feature pixels 7 can also be calculated when the substitution is determined. The convention to be applied can be determined, for example, at the beginning of the method and / or stored in the pattern vector 5.
[0101] For example, for a first total intensity value of 10, the intensity values of a first quantity of 11 are then added together. Thus, in the case of an 8-bit image and three pixels, this is, for example, 236 + 245 + 215. For example, for a second total intensity value of 12, the intensity values of a second quantity of 13 are added together. Thus, in the case of an 8-bit image and three pixels, this is, for example, 30 + 27 + 29. Intensity values 10 and 12 can be normalized.
[0102] Figure 4 A detailed schematic diagram of pattern image 16 is shown. Feature pixels 22 arranged on contour 17 are shown.
[0103] Specifically, the corresponding feature pixel 22 stores only its position, preferably local coordinates related to window 6, together with the first direction 23 and the second direction 24 in the pattern vector 5.
[0104] Figure 5 An embodiment of a banknote 19 having an object 18 formed as a security element is schematically shown. In this embodiment, the security element is formed as the mark "50". Feature pixels 22 are shown by plus signs.
[0105] Figure 6 An embodiment of a banknote 3 with security element 4 is schematically shown. The banknote 3 has a folded corner 25. At folded corner 25, one corner of the banknote 3 is folded up. Due to the robustness of this method, security element 4 can be identified even with a folded corner. Therefore, for the identification of object 2, it may be sufficient if only a portion of object 2 is mapped in the search image 1.
[0106] Figure 7 An embodiment of banknote 19 is illustrated schematically. The object 18, forming a security element, has been recorded as slightly rotated or twisted. This is particularly likely if banknote 19 is a used or circulating banknote. In this case, it is additionally preferable to specify that neighboring pixels of the feature pixels are also checked during the training phase to enable a more reliable formation of the pattern vector 5 or classifier. This is advantageous because it also improves reliability in identifying distorted security elements.
Claims
1. A method for identifying an object (2) in a search image (1), comprising the following steps: a) Provide a pattern vector (5) that describes the object (2) by the coordinates of the feature pixels (7); b) Move the pattern vector (5) at different positions in the search image (1); c) Determine the corresponding success value at different locations (15); and d) Identify the object (2) at the location based on the success value (15); Its features are, The pattern vector is used to associate a first direction (8) and a second direction (9) different from the first direction (8) with each feature pixel (7), wherein a first total intensity value (10) of a first number (11) of pixels arranged in one dimension on the first direction (8) and a second total intensity value (12) of a second number (13) of pixels arranged in one dimension on the second direction (9) are determined respectively, wherein a difference (14) between the first total intensity value (10) and the second total intensity value (12) is determined respectively, wherein a success value (15) is determined based on the corresponding difference (14).
2. The method according to claim 1, wherein The maximum difference of the difference (14) results in a success value (15) for identifying the object (2).
3. The method according to claim 1 or 2, wherein The first direction (8) and the second direction (9) are associated with each other at 180° opposite angles.
4. The method according to claim 1 or 2, wherein The first quantity (11) and / or the second quantity (13) are determined to be greater than 1.
5. The method according to claim 1 or 2, wherein The first quantity (11) and / or the second quantity (13) are determined to be less than 10.
6. The method according to claim 1 or 2, wherein The first quantity (11) and / or the second quantity (13) are determined differently.
7. The method according to claim 1 or 2, wherein The pattern vector (5) has a maximum of four values for each feature pixel (7).
8. The method according to claim 1 or 2, wherein The security element (4) of the banknote (3) is identified as the object (2).
9. The method according to claim 1 or 2, wherein Identify the object (2) on the banknote (3).