Reading optically readable codes
Patent Information
- Application Number
- JP2024538178
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-02-10
- Filing Date
- 2022-12-15
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-12-15
AI Technical Summary
Consumers face difficulties in reading optical reading codes on plant and animal products due to low contrast, surface irregularities, and distortion, especially when using smartphones, which hinders the decoding process.
A method, system, and computer program product that enhance the contrast and reduce distortion of optical reading codes on product surfaces by applying conversion parameters to the captured images, utilizing machine learning models to identify target characteristics and optimize image processing techniques.
The solution effectively enhances the readability of optical codes by improving contrast and reducing distortion, enabling accurate decoding of codes on diverse product surfaces, including fruits, vegetables, and other items, using smartphones.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of marking objects with light readable codes and reading the codes. The subject matter of the invention is a method, a system and a computer program product for imaging and interpreting light readable codes introduced onto the surface of an object. [Background technology]
[0002] Tracking of goods and products plays an important role in many areas of the economy. Products and goods, as well as their packaging and / or containers, are provided with unique identifiers (e.g. serial numbers) so that they can be tracked through the supply chain and so that incoming and outgoing products can be imaged by machines (serialization).
[0003] Identifiers are often applied to products and goods and / or their packaging and / or containers in an optically readable form, such as a barcode (e.g. an EAN-8 barcode) or a matrix code (e.g. a QR Code®) (see, for example, EP 3 640 901 A1). The barcode or matrix code often contains a concealed serial number, which typically provides information about the type and origin of the product or goods.
[0004] In the case of some pharmaceutical products, it is even necessary to mark each individual package individually. In accordance with Article 54a paragraph 1 of Directive 2001 / 83 / EC, as amended by the so-called EU False Medicines Directive 2011 / 62 / EU (FMD), at least medicinal products that are subject to a prescription must be marked with an individual recognition feature (called a unique identifier) which makes it possible, inter alia, to check the authenticity and to identify the individual packs.
[0005] Plant and animal products are usually only provided with a serial code, in which case the marking is usually applied or attached to the packaging and / or container, for example in the form of a sticker or imprint.
[0006] In some cases, identifiers are added directly to plant or animal products: for example, in the European Union, eggs are given a producer code from which it is possible to derive the poultry farming, the country of origin of the egg, and the producer of the egg. The skins of fruits and vegetables are also increasingly being marked (see, for example, E. Etxeberria et al., "Anatomical and Morphological Characteristics of Laser Etching Depressions for Fruit Labeling," 2006, HortTechnology. 16, 10.21273 / HORTTECH.16.3.0527).
[0007] Consumers are increasingly interested in the origin and supply chain of plant and animal products. They want to know, for example, where each product comes from, whether and how it has been treated (e.g., with crop protection compounds), how long it took to be transported, what conditions prevailed during transport, and / or the like.
[0008] EP 3896629 proposes to provide plant and animal products with unique identifiers in the form of light-readable codes. The code can be read by the consumer, for example, by the camera of his smartphone. Based on the read code, various information about the plant or animal product can be displayed to the consumer. EP 3896629 proposes to introduce light-readable codes, for example by laser, into the surface of the plant or animal product. The contrast of the light codes introduced into the surface of the plant or animal product is low with respect to the surrounding tissue, making them more difficult to read than light codes applied in black on a white background, for example, as is usually the case with stickers and tags. Furthermore, the appearance of the light codes on different objects differs from object to object. For example, when a light-readable code is applied by laser to a curved surface, as is the case with many fruits and many vegetable varieties, distortion of the code may occur, which prevents reading. When a light-readable code is applied to a smooth surface, the surface may produce reflections (e.g., reflections caused by ambient light) that may prevent the code from being read. Fruit and vegetable surfaces may not be uniform, for example, apples may have bitter pits or spots, and potatoes may have bumps and grooves. Such unevenness and bumps may prevent the code from being read. [Prior art documents] [Patent documents]
[0009] [Patent Document 1] European Patent Application Publication No. 3640901 [Patent Document 2] European Patent Application Publication No. 3896629 [Non-patent literature]
[0010] [Non-Patent Document 1] E. Etxeberria et al., "Anatomical and Morphological Characteristics of Laser Etching Depressions for Fruit Labeling" 2006, HortTechnology.16,10.21273 / HORTTECH.16.3.0527 Summary of the Invention [Problem to be solved by the invention]
[0011] The problem addressed is therefore to provide a means by which a consumer can reliably read light-readable codes on a number of different objects, in particular a number of plant and animal products, using simple means such as a smartphone. [Means for solving the problem]
[0012] This problem is solved by the subject matter of the independent claims. Preferred embodiments can be found in the dependent claims, the description and the drawings.
[0013] A first subject matter of the invention relates to a computer-implemented method for reading a light-readable code introduced into a surface of an object, the method comprising: receiving a first image recording of a subject; identifying the object based on the first image record; retrieving transformation parameters of the identified object from a database; transforming a first image record and / or a second image record of the object based on the transformation parameters, whereby a transformed image record is obtained; decoding the light readable code imaged in the converted image record; This is a method for providing the above.
[0014] A further subject of protection of the present invention is a system comprising at least one processor, the processor comprising: receiving a first image record of an object, the object comprising a light readable code, the light readable code being introduced into a surface of the object; identifying an object imaged in the first image record; Retrieving transformation parameters of the identified object from a database; Transforming a first image record and / or a second image record of the object according to a transformation parameter, whereby a transformed image record is obtained; Decoding the light readable code imaged in the converted image record. The system is configured to:
[0015] A further subject of protection of the invention is a computer program product comprising a data carrier on which a computer program is stored, the computer program being loadable into the main memory of a computer system, the computer program comprising: receiving a first image record of an object, the object comprising a light readable code, the light readable code being introduced into a surface of the object; identifying the object based on the first image record; retrieving transformation parameters of the identified object from a database; transforming a first image record and / or a second image record of the object based on the transformation parameters, whereby a transformed image record is obtained; decoding the light readable code imaged in the converted image record; It is a computer program product that causes a computer system to execute the above. [Brief description of the drawings]
[0016] [Figure 1] 1 shows, by way of example only, in the form of a flow chart, the reading of a light readable code introduced onto a surface of an object. [Diagram 2]1 shows a schematic diagram of an exemplary system according to the invention; [Diagram 3] 1 illustrates a schematic of a computer system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0017] In the following, the present invention will be described in more detail without distinguishing between the subject matter of the present invention (system, method, computer program product). Moreover, the following description shall apply equally to all subject matter of the present invention, regardless of the context in which it is described (system, method, computer program product).
[0018] If steps are described in a certain order in the present specification or claims, this does not necessarily mean that the invention is limited to the order described. Moreover, it is conceivable that the steps are performed in a different order or in parallel with each other. An exception is when a certain step is based on another step, which requires that the step based on the previous step is performed next (although this will be clear in each individual case). The order described is therefore a preferred embodiment of the invention.
[0019] The present invention provides a means for reading light readable codes. The terms "read" and "decode" are used interchangeably herein.
[0020] The term "light-readable code" is understood to mean a marking that can be imaged, for example with a camera, and converted into alphanumeric characters.
[0021] Examples of optically readable codes are bar codes, stacked codes, composite codes, matrix codes, 3D codes. The term optically readable codes also includes alphanumeric characters that can be captured (interpreted, read) and digitized by automatic text recognition (abbreviated as Optical Character Recognition: OCR).
[0022] Readable codes belong to the group of machine-readable codes, i.e. codes that can be captured and processed by a machine. In the case of light-readable codes, such a "machine" usually comprises a camera.
[0023] A camera usually comprises an image sensor and optical elements. The image sensor is a device that records a two-dimensional image from light by electrical means. It usually comprises a semiconductor-based image sensor, for example a CCD (CCD = Charge Coupled Device) or a CMOS sensor (CMOS = Complementary Metal Oxide Semiconductor). Optical elements (lenses, aperture, etc.) are used to maximize the sharpness of the image of the subject on the image sensor to produce a digital image record.
[0024] Light-readable codes have the advantage that they can be read by many consumers using simple means. In this regard, many consumers have, for example, a smartphone equipped with one or more cameras. Using such a camera, it is possible to generate an image representation of the light-readable code on an image sensor. The image representation can be digitized, processed and / or stored by a computer program stored in the smartphone. Such a computer program can be configured to identify and interpret the light-readable code, i.e. to convert it into various forms, such as, for example, a string of numbers, a string of characters and / or the like, depending on what information is present in the form of the light-readable code.
[0025] The light-readable code is introduced onto the surface of an object. Such an object is a real, physical, tangible object. Such an object can be natural or industrially manufactured. Examples of objects within the meaning of the present invention are tools, machine parts, circuit boards, chips, containers, packaging, jewellery, design objects, works of art, pharmaceuticals (e.g. pharmaceuticals in tablet form), pharmaceutical packaging and plant and animal products.
[0026] In a preferred embodiment of the invention, the object is a pharmaceutical product (eg, a pharmaceutical product in the form of a tablet or capsule) or pharmaceutical packaging.
[0027] In a further preferred embodiment of the invention, the object is an industrially manufactured product, such as a part of a machine.
[0028] In a further preferred embodiment of the invention, the object is a plant or animal product.
[0029] A plant product is a plant, a part of a plant (e.g., fruit), a collection of plants, or a collection of plant parts. An animal product is an animal, an animal part, a collection of animals, a collection of animal parts, or an object produced by an animal (e.g., eggs). Industrially processed products, such as cheese products and sausage products, are also intended to be included in the term "plant or animal product".
[0030] A plant or animal product is typically a part of a plant or animal suitable and / or intended for human or animal consumption.
[0031] Preferably, the plant product is at least a part of a crop plant. The term "crop plant" is understood to mean a plant that is specifically cultivated as a useful plant by human intervention. In a preferred embodiment, the crop plant is a fruit plant or a vegetable plant. Fungi, and in particular fungal fruiting bodies, are also intended to be included in the term plant product, even though fungi are not biologically considered to be plants.
[0032] Preferably, the cultivated plant is one of the plants described in the encyclopedia "Encyclopedia of Cultivated Plants: From Acacia to Zinnia" by Christopher Cumo, Volumes 1 to 3, ABC-CLIO, 2013, ISBN 9781598847758.
[0033] The plant or animal product can be, for example, apple, pear, lemon, orange, tangerine, lime, grapefruit, kiwi, banana, peach, plum, mirabelle, apricot, tomato, cabbage (such as cauliflower, white cabbage, purple cabbage, kale, Brussels sprouts), melon, pumpkin, cucumber, bell pepper, zucchini, eggplant, potato, sweet potato, leek, celery, kohlrabi, radish, carrot, parsnip, scorzonera, asparagus, sugar beet, ginger rhizome, rhubarb, coconut, Brazil nut, walnut, hazelnut, chestnut, egg, fish, meat pieces, cheese pieces, sausage, and / or the like.
[0034] The light readable code is introduced into the surface of the object, which means that the light readable code is not attached to the object in the form of a tag or added to the object in the form of a sticker, but rather the surface of the object itself is modified to carry the light readable code.
[0035] In the case of vegetable products and eggs the surface can be for example the skin / shell.
[0036] An object may be engraved, etched, branded and / or imprinted with a light-readable code and / or the readable code may be introduced into the surface of the object in some other way. The light-readable code is preferably introduced into the surface of the object (e.g., the epidermis in the case of fruits and vegetables) by a laser, where the laser modifies (e.g., bleaches or destroys) pigment molecules on the surface of the object and / or causes local tissue burning and / or destruction and / or chemical and / or physical modification events (e.g., water evaporation, protein denaturation and / or the like), thereby creating a contrast with the surrounding parts of the surface (parts not modified by the laser).
[0037] The light readable code may also be introduced into the surface of the object by a water jet or a jet of sand.
[0038] Light-readable codes can also be mechanically introduced into the surface of an object by scribing, puncturing, parting, rasping, scraping, stamping, and / or the like.
[0039] Further details concerning the marking of objects, in particular plant or animal products, can be gleaned from the prior art (see, for example, EP2281468A1, WO2015 / 117438A1, WO2015 / 117541A1, WO2016 / 118962A1, WO2016 / 118973A1, DE102005019008A, WO2007 / 130968A2, US5660747, EP1737306A2, US10481589, US20080124433).
[0040] The light readable code is preferably introduced into the surface of the object by a carbon dioxide laser (CO2 laser).
[0041] Usually, when a light-readable code is introduced on the surface of an object, a marking with lower contrast is obtained than, for example, a light-readable code in the form of a black or colored imprint on a white sticker. Since the sticker can be individually designed, the contrast can be optimized, for example, a black marking on a white background (for example, a black barcode or a black matrix code) results in a very high contrast. Usually, such a high contrast is not achieved when a light-readable code is introduced on the surface of an object, especially in the case of plant or animal products, but also in the case of pharmaceuticals. This can lead to difficulties in reading the code. Furthermore, the appearance of a light-readable code introduced on the surface of an object by a laser varies from object to object. In other words, the appearance of a light-readable code introduced on, for example, an apple is usually different from a light-readable code introduced on a banana, a tomato, a pumpkin or a potato. The respective variety of fruit may also affect the appearance of the light-readable code, so that the appearance of a light-readable code on a "Granny Smith" apple is different from a light-readable code on a "Pink Lady" apple. The surface structure of the plant or animal product may also affect the appearance of the light-readable code; the relatively rough surface structure of a kiwi may hinder the reading of the light-readable code in much the same way as the bumps and spots on the skin of a potato or an apple. Fruit and vegetable surfaces are usually curved. When an optical code is introduced into a curved surface, distortions of the code may occur, for example pincushion or barrel distortions of the code. Such distortions may prevent the code from being decoded. In this case, the degree of distortion usually depends on the degree of curvature. If a light-readable code with a size of 2 cm x 2 cm is introduced into an apple, the distortion is higher than if the same code is introduced into a melon. Furthermore, the distortions that occur in roughly spherical products (e.g. apples, tomatoes, melons) are different from the distortions that occur in roughly cylindrical products (e.g. cucumbers). Smooth surfaces (e.g. apple surfaces) generate more reflections (e.g. reflections caused by ambient light) than rough surfaces (e.g. kiwi surfaces).
[0042] Thus, according to the invention, an image record of a light-readable code introduced into the surface of an object is subjected to one or more transformations before the code is read, such transformations being able to increase the contrast between the light-readable code and the surrounding parts of the surface (parts of the surface not bearing the code), and / or reduce or eliminate distortion, and / or reduce or eliminate reflections, and / or reduce or eliminate artifacts due to the presence of objects with distinctive features, where one or more transformations are selected for each particular object present depending on its distinctive features.
[0043] A "transform" is a function or operator that takes an image as input and produces an image as output. The transform can ensure that when a light-readable code is imaged in the input image, the readable code has a higher contrast with its surroundings in the output image than in the input image and / or is less distorted in the output image than in the input image. The transform can ensure that light reflections at the object's surface are reduced in the output image compared to the input image. The transform can ensure that irregularities and / or unevenness in the object's surface are less clearly visible in the output image than in the input image. In general, the transform ensures that when decoding the imaged light-readable code, fewer decoding errors occur in the output image than in the input image. Such decoding errors occur, for example, when a white square in a QR code is interpreted as a black square by an image sensor.
[0044] One or more transformation parameters determine which transformation(s) are performed and, in the case of multiple transformations, the order in which these transformations are performed.
[0045] First, a first image recording of the object is generated.
[0046] The term "image record" is preferably understood to mean a two-dimensional image representation of an object or part thereof. The image record is usually a digital image record. The term "digital" means that the image record can be processed by a machine, usually a computer system. "Processing" is understood to mean known methods of electronic data processing (EDP).
[0047] Using computer systems and software, digital image records can be processed, edited, played back, and converted into standardized data formats, such as, for example, JPEG, Portable Network Graphics (PNG), Scalable Vector Graphics (SVG), etc. The digital image records can be visualized using suitable display devices, such as, for example, a computer monitor, a projector, and / or a printer.
[0048] In digital image records, the image content is usually stored represented by integers. In most cases, digital image records contain two-dimensional images that can be binary coded and compressed accordingly. Digital image records usually contain raster graphics, where the image information is stored in a uniform raster grid. Raster graphics consists of a raster arrangement of so-called picture elements (pixels) in the case of two-dimensional representations, or of volume elements (voxels) in the case of three-dimensional representations, which in each case are assigned a color or grayscale value. The main characteristics of 2D raster graphics are therefore the image size (width and height measured in pixels, commonly known as: image resolution) and the color depth. Usually, colors are assigned to the pixels of a digital image file. The color coding used for the pixels is determined in particular by means of a color space and color depth representation. The simplest example is a binary image, where black and white values are stored in the pixels. In the case of images whose colors are defined using the representation of the so-called RGB color space (RGB stands for the primary colors red, green and blue), each pixel consists of three color values, one color value is used for red, one color value for green and one color value for blue. The color of a pixel results from the superposition (additive mixing) of the three color values. The individual color values are discretized into, for example, 256 distinguishable levels, called tonal values, which usually range from 0 to 255. The shade "0" of each color channel is the darkest. If the tonal values of all three channels are 0, the corresponding pixel appears black, if the tonal values of all three channels are 255, the corresponding pixel appears white. When implementing the invention, the digital image record is subjected to certain operations (transformations). In this case, the operations mainly concern the pixels as so-called spatial operators, for example edge detectors, or as tonal values of the individual pixels, for example in the case of color space transformations. There are several possible digital image formats and color encodings. For simplicity, this specification assumes that the images used herein are RGB raster graphics having a particular number of pixels, although this assumption should not be taken as limiting in any way.It will be clear to those skilled in the art of image processing how the teachings herein can be applied to image files that exist in other image formats and / or where the color values are coded differently.
[0049] It is also possible that the at least one image recording is one or more excerpts from a video sequence.
[0050] The at least one image recording is generated using one or more cameras, preferably the at least one image recording is generated by one or more cameras of a smartphone.
[0051] The use of multiple cameras to view an object from different directions and generate image records from different viewing directions has the advantage that depth information is captured, from which, by way of example, information can be derived and / or gleaned about the curvature of the imaged object in front of the eye.
[0052] The first image record shows a light readable code that has been introduced onto the surface of an object.
[0053] The first image record is used to determine transformation parameters, on the basis of which transformation parameters are determined, such that in the course of transforming the first image record (and / or the second image record) in response to the transformation parameters a transformed image record is obtained which produces fewer decoding errors during decoding of the imaged optical code than the first image record, e.g. due to a higher contrast of the light readable code with respect to its surroundings in the transformed image record than in the first image record and / or due to smaller distortions / reflections occurring.
[0054] The transformation parameters can be determined in two steps: in a first step, the object imaged (at least in a symmetrical manner) in the first image recording can be identified, and in a second step, for the identified object, the transformation parameters that result in an increase in the contrast of the optically readable code relative to its surroundings can be read from the data storage medium.
[0055] Identification can for example be achieved based on characteristics of the object imaged in the first image record. Such characteristic characteristics are for example color and / or color distribution, shape, size, texture and / or other / further characteristics. Pattern recognition methods as known in image processing can be used to identify the object based on its imaged characteristics.
[0056] Preferably, a machine learning model trained for object identification is used, also referred to herein as a recognition model.
[0057] Such a model may be trained in a supervised learning manner to output at least a balanced manner based on first image record information indicative of what objects are present in the first image record.
[0058] A "machine learning model" can be understood as a computer-implemented data processing architecture. The model can receive input data and provide output data based on said input data and model parameters. The model can learn the relationship between the input data and the output data by training. During training, the model parameters can be adapted to provide a desired output for a particular input.
[0059] During training of such a model, the model is provided with training data that can be used to learn from the model. A trained machine learning model is the result of the training process. The training data includes the input data as well as the correct output data (target data) that should be generated by the model based on the input data. During training, patterns that map the input data to the target data are recognized.
[0060] In the training process, the input data from the training set are fed into the model, and the model generates output data. The output data is compared with target data (so-called ground truth data). The model parameters are changed to reduce the deviation between the output data and the target data to a minimum (default value).
[0061] During training, a loss function can be used to evaluate the predictive quality of the model. The loss function can be selected to reward desirable relationships between the output data and the target data and / or to penalize undesirable relationships between the output data and the target data. Such relationships can be, for example, similarity, dissimilarity, or other relationships.
[0062] A loss function can be used to calculate the loss for a particular pair comprising output data and target data. The goal of the training process is to change (adapt) the parameters of the machine learning model such that the loss value for all pairs of the training dataset is reduced to a minimum (default) value.
[0063] A loss function can, for example, quantify the deviation between a model's output data and target data for a given input data. For example, if the output data and target data are numerical, the loss function is the absolute difference between these numerical values. In this case, a large absolute value of the loss function may mean that one or more model parameters must be significantly changed.
[0064] For output data in vector format, one can choose a difference metric between vectors as the loss function, e.g., mean squared error, norm of difference vectors such as cosine distance, Euclidean distance, Chebyshev distance, Lp norm of difference vectors, weighted norm, or any other type of difference metric of two vectors.
[0065] The machine learning model can be implemented as a classification model that assigns an image record as input data to a particular object as output data. The model can, for example, output a numerical value that represents the particular object imaged in the image record.
[0066] Such classification models have been described in the prior art (see, for example, F. Sultana et al.: Advancements in Image Classification using Convolutional Neural Network, arXiv:1905.03288v1[cs.CV], 2019; A. Khan et al.: A Survey of the Recent Architectures of Deep Convolutional Neural Networks, Artificial Intelligence Review, DOI: https: / / doi.org / 10.1007 / s10462-020-09825-6).
[0067] Assigning a first image record to an object imaged in the first image record is also referred to herein as "identifying the object." In this case, the first image record can be assigned to the object and / or to the respective part of the object imaged in the image record. In the case of a plant product, the first image record can also be assigned to a ripeness and / or visual appearance, in the case of bananas, e.g. green and yellow bananas, in the case of peppers, e.g. green, yellow and red peppers, in the case of apples, to the respective existing apple varieties, and / or the like.
[0068] Finally, the identification of the object in the first image record is used to determine transformation parameters intended to be applied to the first image record (or the second image record) to, for example, enhance the contrast of the light-readable code relative to its surroundings, reduce distortions, reduce reflections and / or reduce / eliminate other features that may lead to decoding errors. The identification is therefore intended to identify characteristics of the object being imaged that allow the selection of said transformation parameters that enable the light-readable code to be decoded while minimizing possible errors.
[0069] The transformation parameters are typically stored in a data storage medium, for example a relational database. A machine learning model can be configured and trained to output an identifier associated with the transformation parameters in the database based on the first image record. In other words, based on an identifier representing the object imaged in the first image record, the transformation parameters assigned to the identifier can be determined and retrieved from the database.
[0070] It is also possible to train a machine learning model to feed / output the transformation parameters itself.
[0071] As already explained, the transformation parameters define what transformations are intended to be applied to the first image record (or second image record) and, in the case of multiple transformations, in what order the transforms are intended to be applied.
[0072] For a particular subject, the above transformation can be empirically determined to ensure that the transformed image record produces fewer decoding errors than the untransformed image record.
[0073] It is therefore possible to generate image records for a number of objects in which the light-readable code introduced into the surface of the object is imaged in at least a balanced manner, and for each individual record a person skilled in the art of image processing can define a transformation that results in an increase in the contrast of the light-readable code relative to its surroundings, and / or results in the reduction / elimination of distortions, and / or results in the reduction / elimination of reflections and / or the reduction / elimination of other features that may result in decoding errors.
[0074] The decoding error can be empirically quantified. It can be, for example, the percentage of the code that could not be decoded. Many optically readable codes have a means of error correction. The decoding error can also represent the number of corrected bits in the code.
[0075] Each transformation can be verified, and if a transformation does not produce the desired outcome, it can be discarded, refined, modified, and / or extended with further transformations.
[0076] Examples of transformations are spatial low-pass filtering, spatial high-pass filtering, sharpening, blurring (e.g. Gaussian blur), unsharp masking, erosion, median filtering, maximum filtering, contrast range reduction, edge detection, color depth reduction, grayscale level conversion, negative creation, color correction (color balance, gamma correction, saturation), color replacement, Fourier transform, Fourier low-pass filtering, Fourier high-pass filtering, and inverse Fourier transform.
[0077] Several transformations can be performed by convolving raster graphics with one or more convolution matrices (called convolution kernels). Convolution matrices are usually square matrices with an odd number of dimensions and can have various sizes (e.g., 3x3, 5x5, 9x9, and / or the like). Some transformations can be represented as a linear system to which discrete convolutions (linear operations) are applied. For discrete two-dimensional functions (digital images), the following formula is provided for discrete convolution:
number
[0078] For example, for apples, the following transformations and transformation sequences have the effect of producing fewer decoding errors in the transformed image record than in the untransformed image record: -Color conversion to intensity i.e. linear RGB signal A colour transformation that converts the linear RGB signals into, for example, a reflectance channel and / or an illumination channel and at least two colour channels that are used to differentiate between coded and uncoded surface parts. To do this, the intensity or linear RGB colour signals are linearly combined with each other in such a way that the best possible differentiation between coded and uncoded surface parts is achieved. Reflection correction by subtracting the reflectance channel from at least two color channels (additive correction) Lighting correction by normalizing at least two color channels to the lighting channel (multiplicative correction) -Detection of imperfections on the apple surface, correction of imperfections on the apple surface, and spatial interpolation of the imperfections from their surroundings Unsharp masking of the illumination- and reflectance-corrected image segments using a range-related filter mask. This ensures that spatial inhomogeneities in image brightness, e.g. due to the curved shape of the apple, are adequately compensated for and the image contrast between coded and non-coded surface areas is amplified and optimized by increasing the high frequency image parts.
[0079] Further examples of transformations can be gleaned from numerous publications on the subject of digital image processing.
[0080] It is further conceivable to analyze the first image record in order to derive the transformation parameters directly from the image record. In case of identifying an object imaged in the image record, the transformation parameters are determined based on the identified object, in case of direct derivation of the transformation parameters, the transformation parameters can be derived from the way the object is imaged. As an example, it is possible to determine the average luminance, the contrast range, the color distribution and / or the like, on the basis of which one or more transformation parameters are selected, set or determined, which results in fewer decoding errors. Optimization of the contrast between coded and non-coded surface areas can also be achieved directly by correlation analysis, for example by principal axis transformation of the colors of the recorded objects in this image area.
[0081] In a further step, one or more transformations are applied to the first or second image record depending on the transformation parameters. As already made clear, it is not necessary to apply the transformation to the first image record, i.e. the image record on which the transformation parameters were determined. Moreover, it is also conceivable to apply the transformation to a second image record, preferably showing the same object as the first image record, but suitably at a different time (e.g. an earlier or later time). It is conceivable that the camera used to generate the first image record is configured to continuously digitize the image representation incident on the image sensor of the camera at a predefined rate to generate digital image records, and to feed these digital image records to a recognition model that recognizes the object being imaged. The recognition model can pass an identifier of the recognized (identified) object to a control unit, which determines the transformation parameters based on the identifier. The determined transformation parameters can then be applied to one or more subsequently generated digital image records. Such subsequently generated image records are referred to herein as "second image records".
[0082] It is also conceivable that the imaged object is not identified on the basis of a single first image record, but on the basis of a plurality of first image records, for example a series of temporally consecutive image records. It is also conceivable that the transformation parameters are not determined on the basis of a single first image record, but on the basis of a plurality of first image records, for example a series of temporally consecutive image records. It is also conceivable that the transformation is not applied to a single (first or second) image record, but on a plurality of image records, for example an image record of a series of temporally consecutive image records.
[0083] The result of applying one or more transforms to an image recording of a light-readable code on the surface of an object is a transformed image recording.
[0084] The transformed image record is better able to recognize and read the light readable code than the original (non-transformed) image record.
[0085] In the next step the code in the transformed image record is read (decoded). Here, depending on the code used, there are existing methods for reading (decoding) the respective code.
[0086] The read (decoded) code may contain information about the object whose surface the code is installed on.
[0087] In a preferred embodiment, the read code comprises an identifier (unique identifier) based on which the consumer can retrieve further information about the object, for example from a database. The read code and / or information associated with the read code can be output, i.e. displayed on a screen, printed on a printer and / or stored on a data carrier.
[0088] Further information regarding such identifiers (unique identifiers) and the information that can be stored and displayed to the consumer relating to the object associated with the identifier is described in patent application EP 3896629 A1, the entire contents of which are incorporated herein by reference.
[0089] The present invention will now be described in more detail with reference to the drawings, but the present invention is not limited to the features and combinations of features shown in the drawings.
[0090] FIG. 1 shows, by way of example only, in the form of a flow chart, the reading of a light-readable code introduced onto the surface of an object.
[0091] In a first step (110), a digital image recording (I) of an object (O) is generated by means of a camera (C). In a second step (120), the digital image recording (I) is provided to a recognition model (IM), which is configured to identify the photographed object (O) in the image recording (I) based on the image recording (I). In a third step (130), the recognition model (IM) provides information (OI1) about the identified object (O). In a fourth step (140), transformation parameters (TP) are determined from a database (DB) based on the information (OI1) about the identified object (O). In a fifth step (150), the determined transformation parameters (TP) are provided to a process for transforming the image recording (I). In a sixth step (160), one or more transformations are applied to the image recording (I) depending on the transformation parameters (TP). This results in a transformed image recording (I). * ) is obtained, in which the contrast of the light-readable code (in this case a QR code) introduced on the surface of the object (O) is high with respect to its surroundings and is more clearly recognized and easier to read than the code in the case of the untransformed image recording (i). In a seventh step (170), the light-readable code is read and a read code (OI2) is provided. The read code (OI2) can be displayed and / or information about the object O can be provided (e.g. communicated and displayed) based on the read code OI, for example retrieved from a database.
[0092] FIG. 2 shows a schematic diagram of an exemplary system according to the invention.
[0093] The system (1) comprises a computer system (10), a camera (20) and one or more data storage media (30). The camera (20) can be used to generate an image recording of an object. The camera (20) is connected to the computer system (10) so that the generated image recording can be sent to the computer system (10). The camera (20) can be connected to the computer system (10) via a cable connection and / or a wireless connection. A connection via one or more networks is also conceivable. It is further conceivable that the camera (20) is an integral part of the computer system (10), as is the case for example with today's smartphones and tablet computers.
[0094] The computer system (10) is configured (e.g. configured by a computer program) to receive an image record (from a camera or a data storage medium), identify an object imaged in the image record, determine transformation parameters based on the identified object, transform the image record and / or a further image record of the object in response to the transformation parameters, obtain a transformed image record, decode an optical code in the transformed image record and output the decoded code and / or provide information associated with the decoded code.
[0095] The data storage medium (30) may store image records, models, transformation parameters, transformation operators and / or transformation functions, recognition models, computer programs and / or other / further information. The data storage medium (30) may be connected to the computer system (10) via a cabled and / or wireless connection. A connection via one or more networks is also conceivable. It is further conceivable that the data storage medium (30) is an integral part of the computer system 10. It is further conceivable that there are multiple data storage media.
[0096] 3 shows a schematic representation of a computer system (10). Such a computer system (10) may comprise one or more stationary or portable electronic devices. The computer system (10) may comprise one or more components, such as a processing unit (11) connected to a storage medium (15).
[0097] The processing unit (11) may comprise one or more processors, alone or in combination with one or more storage media. The processing unit (11) may be, for example, general computer hardware capable of processing information such as digital image records, computer programs and / or other digital information. The processing unit (11) typically consists of an arrangement of electronic circuits, some of which may be designed as an integrated circuit or as multiple integrated circuits connected together (integrated circuits are also referred to as "chips"). The processing unit (11) may be configured to execute computer programs, which may be stored in a main memory of the processing unit (11) or in a storage medium (15) of the same or a different computer system.
[0098] The storage medium (15) can be, for example, general computer hardware capable of temporarily and / or permanently storing information such as digital image records, data, computer programs, and / or other digital information. The storage medium (15) can comprise volatile and / or non-volatile storage media and can be embedded, fixed, or removable. Examples of suitable storage media are RAM (random access memory), ROM (read only memory), hard disks, flash memory, interchangeable computer floppy disks, optical disks, magnetic tapes, or combinations thereof. Optical disks include compact disks with read only memory (CD-ROM), compact disks with read / write capabilities (CD-R / W), DVDs, Blu-ray® disks, etc.
[0099] The processing unit (11) can be connected to the storage medium (15) as well as to one or more interfaces (12, 13, 14, 17, 18) for displaying, sending and / or receiving information. The interfaces can comprise one or more communication interfaces (17, 18) and / or one or more user interfaces (12, 13, 14). The one or more communication interfaces can be configured to send and / or receive information, for example, to a camera, another computer, a network, a data storage medium, etc. The one or more communication interfaces can be configured to send and / or receive information via a physical connection (wired connection) and / or a wireless communication connection. The one or more communication interfaces can comprise one or more interfaces for connecting to a network using technologies such as mobile phone, Wi-Fi, satellite, cable, DSL, fiber optics and / or the like. In some examples, the one or more communication interfaces may comprise one or more short-range communication interfaces configured to connect devices using short-range communication technologies such as NFC, RFID, Bluetooth, Bluetooth LE, ZigBee, infrared (e.g., IrDA), etc.
[0100] The user interface (12, 13, 14) may include a display (14). The display (14) may be configured to display information to a user. Suitable examples include a liquid crystal display (LCD), a light emitting diode display (LED), a plasma display panel (PDP), and the like. The user input interface (12, 13) may be wired or wireless and may be configured to receive information from a user for, for example, processing, storage, and / or display in the computer system (10). Suitable examples of user input interfaces include microphones, image or video recording devices (e.g., cameras), keyboards or keypads, joysticks, touch-sensitive screens (separate from or integrated into a touch screen), and the like. In some examples, the user interface may include automatic identification and data capture technology (AIDC) used for machine-readable information. AIDC include bar codes, radio frequency identification (RFID), magnetic stripes, optical character recognition (OCR), integrated circuit cards (ICC), and the like. The user interface may further comprise one or more interfaces used to communicate with peripheral devices such as a printer.
[0101] One or more computer programs (16) may be stored on the storage medium (15) and executed by the processor (11) such that the processor (11) is programmed to perform the functions described herein. The instructions of the computer programs (16) may be obtained, loaded, and executed sequentially, respectively, although the obtaining, loading, and / or execution may also be performed in parallel.
[0102] The system according to the invention can be implemented as a laptop, notebook, netbook, tablet PC and / or mobile device (eg smartphone).The system according to the invention preferably comprises a camera. [Explanation of symbols]
[0103] 1 System 10. Computer Systems 11 Processing section 12 Interface 13 Interface 14 Interface 15 Storage medium 16 Computer Programs 17 Interface 18 Interface 20 Camera 30 Data storage media 110 First Step 120 Second Step 130 Third Step 140 Fourth Step 150 The Fifth Step 160 The Sixth Step 170 The Seventh Step C Camera DB Database I Digital Image Recording i Unconverted image recording I * Transformed image record IM Recognition Model O Target OI1 Information about the subject OI2 Code read TP Conversion Parameters
Claims
1. 1. A computer-implemented method comprising: receiving a first image record of an object, the object comprising a light-readable code, the light-readable code being introduced into a surface of the object; identifying the object based on the first image record; retrieving transformation parameters for the identified object from a database; transforming the first and / or second image records of the object based on the transformation parameters, whereby a transformed image record is obtained; decoding the light-readable code imaged in the converted image record; A method for providing the above.
2. The method of claim 1 , wherein the target is a plant product or an animal product.
3. The method of claim 2, wherein the object is a plant product and the light-readable code is introduced into the epidermis of the plant product.
4. The method of claim 1, wherein the target is a drug.
5. The method of claim 1 , wherein the light-readable code is introduced into the surface of the object by a laser.
6. The method of claim 1 , wherein the optically readable code is a bar code or a matrix code.
7. The method of claim 1 , wherein the light-readable code is alphanumeric.
8. The method of claim 1 , wherein the object is identified based on features imaged in the first image record.
9. 2. The method of claim 1, wherein the objects are identified using a trained machine learning model, the machine learning model being trained based on training data to assign image records to objects, and the training data used for each object of a plurality of objects comprises: i) at least one image record of the object; and ii) information about which objects are imaged in the image record.
10. The training of the machine learning model includes: inputting the image record of a subject into the machine learning model; receiving output data from the machine learning model; calculating the deviation between the output data and the information about what objects are imaged in the image record using a loss function; modifying parameters of the machine learning model with respect to reducing the deviation; storing the trained machine learning model in a data storage medium; The method of claim 9, comprising:
11. 2. The method of claim 1, wherein the transformation parameters are empirically determined, and during the empirical determination, the transformation parameters are selected such that reading the light-readable code in the transformed image record results in fewer decoding errors than reading the light-readable code in the untransformed image record.
12. Transforming the first image record and / or the second image record includes: reducing distortion of the light-readable code imaged in the first image record and / or the second image record; reducing reflections of the first image recording and / or the second image recording; enhancing the contrast of the light-readable code imaged in the first image record and / or the second image record relative to its surroundings; The method of claim 1 , comprising one or more of:
13. 1. A system comprising at least one processor, the processor comprising: receiving a first image record of an object, the object comprising a light-readable code, the light-readable code being introduced into a surface of the object; identifying the object imaged in the first image record; retrieving transformation parameters of the identified object from a database; transforming the first and / or second image records of the object in accordance with the transformation parameters, whereby a transformed image record is obtained; and decoding the light-readable code imaged in the converted image record; and A system configured to:
14. A computer program that can be loaded into a main memory of a computer system, the computer program comprising: receiving a first image record of an object, the object comprising a light-readable code, the light-readable code being introduced into a surface of the object; identifying the object based on the first image record; retrieving transformation parameters for the identified object from a database; transforming the first and / or second image records of the object based on the transformation parameters, whereby a transformed image record is obtained; decoding the light-readable code imaged in the converted image record; A computer program for causing the computer system to execute the above.