1 ROBUST ENCODING OF METADATA IN LOSSY ENCODED IMAGES
The present invention relates to image processing in general, and more particularly to encoding metadata in images.
BACKGROUND OF THE INVENTION
Some computer-based applications that process images provide no facility for receiving non-pixel-related data, hereinafter referred to as “metadata,” that may be used to control hoW an image is to be processed. As shown by Way of example in FIG. 1, an image 100 is sent from a computer 102 via a computer netWork 1 04, such as the Internet, to a server 106. In the example shown in FIG. 1, image 100 is encoded using a lossy compression scheme, such as J PEG. Image 100 is decoded by an image decoder 1 08 into raW pixel data encoded in RGB (3 bytes of 8 bits each) color format, and the raW pixel data is provided to some element that then processes the pixel values, typically for display, such as to a rendering engine 1 1 0 that is, for example, capable of implementing the OpenGL standard, Which renders the image.
It may be advantageous to include metadata along With the raW pixel data that is provided to engine 110. HoWever, if the image data is passed to a loWer level OpenGL rendering engine, that layer has no access to any metadata Which is related to the RGB pixel values. Thus, as the OpenGL specification does not make provisions for receiving metadata, any metadata Would have to be embedded Within the pixel data of image 100. Unfortunately, as images are typically compressed using lossy compression before they are seen by the OpenGL layer, any embedded metadata may be corrupted before being made available to the OpenGL layer for inspection.
The present invention in embodiments thereof discloses novel systems and methods for encoding metadata in lossy encoded images.
In one aspect of the present invention a system is provided for processing an image With embedded metadata, the system including a digit separator configured to determine an integer value of a byte and separate the integer value into a plurality of digits, a digit converter configured to convert each of the digits into an encoding value using a predefined conversion function, a pixel block selector configured to select a pixel block in a metadata container, and a pixel value setter configured to encode into the selected pixel block each of the encoding values, Where any of the digit separator, digit converter, pixel block selector, and pixel value setter are implemented in either of computer hardWare and computer softWare and embodied in a computer-readable medium.
In another aspect of the present invention the pixel block includes a plurality of pixels, Where each of the pixels includes a plurality of color component values, and Where the pixel value setter is configured to encode the encoding values of each of the digits into corresponding ones of the color component values of each of the pixels in the block.
In another aspect of the present invention the color component values are RGB triplets.
In another aspect of the present invention the system further includes means to encode the metadata container using a lossy compression scheme.
In another aspect of the present invention the lossy compression scheme is JPEG.
In another aspect of the present invention the conversion function multiplies any of the digits by 20 and adds 10 to the product of the multiplication.
In another aspect of the present invention the system further includes a pixel block selector configured to select a pixel block from raW pixel data from Which to decode metadata, a pixel value getter configured to select any pixel in the selected pixel block and retrieve color component values of the selected pixel, a byte value calculator configured to determine the integer value for the byte by applying a predefined reconversion function to the color component values, and a metadata interpreter configured to determine Whether the byte is metadata, interpret the metadata, determine Whether a predefined action should be performed using the metadata, and perform the predefined action.
In another aspect of the present invention the system further includes a value converter configured to average color component values of a plurality of selected pixels in a predefined region of the selected pixel block, and create a single set of averaged pixel color component values from the average of the color component values of each of the pixels in the predefined region, Where the byte value calculator is configured to determine the integer value from the set of averaged pixel color component values.
In another aspect of the present invention the byte value calculator is configured to determine the integer value by dividing each of the averaged color component values by 20 and multiplying an integer portion of one of the division results corresponding to a hundreds digit of the averaged color component values by 100 and an integer portion of one of the division results corresponding to a tens digit of the averaged color component values by 10 and then adding the products of the multiplications to an integer portion of one of the division results corresponding to a ones digit of the color component values.
In another aspect of the present invention a system is provided for processing an image With embedded metadata, the system including a metadata encoder configured to encode one or more bytes of metadata into image pixels of metadata container prior to the metadata container being encoded using a lossy compression scheme and subsequently decoded into raW pixel data, and a metadata processor configured to extract the metadata from the raW pixel data and perform at least one predefined actions using the metadata.
In another aspect of the present invention a method is provided for processing an image With embedded metadata, the method including determining an integer value of a byte and separate the integer value into a plurality of digits, converting each of the digits into an encoding value using a predefined conversion function, selecting a pixel block in a metadata container, and encoding into the selected pixel block each of the encoding values.
In another aspect of the present invention a method is provided for processing an image With embedded metadata, the method including encoding one or more bytes of metadata into image pixels prior to the image pixels being encoded using a lossy compression scheme and subsequently decoded into raW pixel data, extracting the metadata from the raW pixel data, and performing at least one predefined action using the metadata.
BRIEF DESCRIPTION OF THE DRAWINGS
The present invention Will be understood and appreciated more fully from the folloWing detailed description taken in conjunction With the appended draWings in Which: